summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoransible-zuul[bot] <48994755+ansible-zuul[bot]@users.noreply.github.com>2019-09-20 03:53:14 +0000
committerGitHub <noreply@github.com>2019-09-20 03:53:14 +0000
commit1c3031ec21cd14952fb3256600e3ab50fc28fd77 (patch)
tree92d21c41c8bbbfb85e83a21b3af8c7b5b2b6c294
parent75582948949168ca2eaa04413db09298c52ada95 (diff)
parenta0333117eddd25ec1dcb8302a5ae322ccbe1029d (diff)
downloadvyos-ansible-old-1c3031ec21cd14952fb3256600e3ab50fc28fd77.tar.gz
vyos-ansible-old-1c3031ec21cd14952fb3256600e3ab50fc28fd77.zip
Merge pull request #36 from CaptTrews/ansible/collections-sync-master
Updated from network content collector Reviewed-by: https://github.com/apps/ansible-zuul
-rw-r--r--plugins/module_utils/network/vyos/config/lag_interfaces/lag_interfaces.py4
-rw-r--r--plugins/module_utils/network/vyos/config/lldp_global/lldp_global.py4
-rw-r--r--plugins/module_utils/network/vyos/config/lldp_interfaces/lldp_interfaces.py4
-rw-r--r--tests/integration/targets/vyos_lag_interfaces/tests/cli/empty_config.yaml6
-rw-r--r--tests/integration/targets/vyos_lldp_global/tests/cli/empty_config.yaml4
-rw-r--r--tests/integration/targets/vyos_lldp_interfaces/tests/cli/empty_config.yaml6
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'