diff options
author | CaptTrews <capttrews@gmail.com> | 2019-09-20 00:12:55 +0000 |
---|---|---|
committer | CaptTrews <capttrews@gmail.com> | 2019-09-20 00:12:55 +0000 |
commit | a0333117eddd25ec1dcb8302a5ae322ccbe1029d (patch) | |
tree | 92d21c41c8bbbfb85e83a21b3af8c7b5b2b6c294 | |
parent | 75582948949168ca2eaa04413db09298c52ada95 (diff) | |
download | vyos.vyos-a0333117eddd25ec1dcb8302a5ae322ccbe1029d.tar.gz vyos.vyos-a0333117eddd25ec1dcb8302a5ae322ccbe1029d.zip |
Updated from network content collector
Signed-off-by: CaptTrews <capttrews@gmail.com>
6 files changed, 17 insertions, 11 deletions
diff --git a/plugins/module_utils/network/vyos/config/lag_interfaces/lag_interfaces.py b/plugins/module_utils/network/vyos/config/lag_interfaces/lag_interfaces.py index af49f42..290f3b3 100644 --- a/plugins/module_utils/network/vyos/config/lag_interfaces/lag_interfaces.py +++ b/plugins/module_utils/network/vyos/config/lag_interfaces/lag_interfaces.py @@ -120,7 +120,9 @@ class Lag_interfaces(ConfigBase): state = self._module.params["state"] if state in ("merged", "replaced", "overridden") and not want: self._module.fail_json( - msg="config is required for state {0}".format(state) + msg="value of config parameter must not be empty for state {0}".format( + state + ) ) if state == "overridden": commands.extend(self._state_overridden(want, have)) diff --git a/plugins/module_utils/network/vyos/config/lldp_global/lldp_global.py b/plugins/module_utils/network/vyos/config/lldp_global/lldp_global.py index 8570874..303d46a 100644 --- a/plugins/module_utils/network/vyos/config/lldp_global/lldp_global.py +++ b/plugins/module_utils/network/vyos/config/lldp_global/lldp_global.py @@ -106,7 +106,9 @@ class Lldp_global(ConfigBase): state = self._module.params["state"] if state in ("merged", "replaced") and not want: self._module.fail_json( - msg="config is required for state {0}".format(state) + msg="value of config parameter must not be empty for state {0}".format( + state + ) ) if state == "deleted": commands.extend(self._state_deleted(want=None, have=have)) diff --git a/plugins/module_utils/network/vyos/config/lldp_interfaces/lldp_interfaces.py b/plugins/module_utils/network/vyos/config/lldp_interfaces/lldp_interfaces.py index 6b76296..aa0bd36 100644 --- a/plugins/module_utils/network/vyos/config/lldp_interfaces/lldp_interfaces.py +++ b/plugins/module_utils/network/vyos/config/lldp_interfaces/lldp_interfaces.py @@ -117,7 +117,9 @@ class Lldp_interfaces(ConfigBase): state = self._module.params["state"] if state in ("merged", "replaced", "overridden") and not want: self._module.fail_json( - msg="config is required for state {0}".format(state) + msg="value of config parameter must not be empty for state {0}".format( + state + ) ) if state == "overridden": commands.extend(self._state_overridden(want=want, have=have)) diff --git a/tests/integration/targets/vyos_lag_interfaces/tests/cli/empty_config.yaml b/tests/integration/targets/vyos_lag_interfaces/tests/cli/empty_config.yaml index 50f6d97..c222354 100644 --- a/tests/integration/targets/vyos_lag_interfaces/tests/cli/empty_config.yaml +++ b/tests/integration/targets/vyos_lag_interfaces/tests/cli/empty_config.yaml @@ -11,7 +11,7 @@ - assert: that: - - result.msg == 'config is required for state merged' + - result.msg == 'value of config parameter must not be empty for state merged' - name: Replaced with empty config should give appropriate error message vyos.vyos.vyos_lag_interfaces: @@ -22,7 +22,7 @@ - assert: that: - - result.msg == 'config is required for state replaced' + - result.msg == 'value of config parameter must not be empty for state replaced' - name: Overridden with empty config should give appropriate error message vyos.vyos.vyos_lag_interfaces: @@ -33,4 +33,4 @@ - assert: that: - - result.msg == 'config is required for state overridden' + - result.msg == 'value of config parameter must not be empty for state overridden' diff --git a/tests/integration/targets/vyos_lldp_global/tests/cli/empty_config.yaml b/tests/integration/targets/vyos_lldp_global/tests/cli/empty_config.yaml index 2497015..5bac638 100644 --- a/tests/integration/targets/vyos_lldp_global/tests/cli/empty_config.yaml +++ b/tests/integration/targets/vyos_lldp_global/tests/cli/empty_config.yaml @@ -11,7 +11,7 @@ - assert: that: - - result.msg == 'config is required for state merged' + - result.msg == 'value of config parameter must not be empty for state merged' - name: Replaced with empty config should give appropriate error message vyos.vyos.vyos_lldp_global: @@ -22,4 +22,4 @@ - assert: that: - - result.msg == 'config is required for state replaced' + - result.msg == 'value of config parameter must not be empty for state replaced' diff --git a/tests/integration/targets/vyos_lldp_interfaces/tests/cli/empty_config.yaml b/tests/integration/targets/vyos_lldp_interfaces/tests/cli/empty_config.yaml index 9711791..4afb7fe 100644 --- a/tests/integration/targets/vyos_lldp_interfaces/tests/cli/empty_config.yaml +++ b/tests/integration/targets/vyos_lldp_interfaces/tests/cli/empty_config.yaml @@ -11,7 +11,7 @@ - assert: that: - - result.msg == 'config is required for state merged' + - result.msg == 'value of config parameter must not be empty for state merged' - name: Replaced with empty config should give appropriate error message vyos.vyos.vyos_lldp_interfaces: @@ -22,7 +22,7 @@ - assert: that: - - result.msg == 'config is required for state replaced' + - result.msg == 'value of config parameter must not be empty for state replaced' - name: Overridden with empty config should give appropriate error message vyos.vyos.vyos_lldp_interfaces: @@ -33,4 +33,4 @@ - assert: that: - - result.msg == 'config is required for state overridden' + - result.msg == 'value of config parameter must not be empty for state overridden' |