diff options
author | Sumit Jaiswal <sjaiswal@redhat.com> | 2019-09-17 22:11:20 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-17 22:11:20 +0530 |
commit | 9addad0f4a5ae23c15d3c2ae04568dbe873d6757 (patch) | |
tree | 4f9bacbf6ac794bf33ea295c3a369549f6e885b9 | |
parent | f11429a80db74a87f28473623889527c1d93964e (diff) | |
download | ansible-9addad0f4a5ae23c15d3c2ae04568dbe873d6757.tar.gz |
fix ios_lldp_global (#62420)
6 files changed, 11 insertions, 11 deletions
diff --git a/lib/ansible/module_utils/network/ios/argspec/lldp_global/lldp_global.py b/lib/ansible/module_utils/network/ios/argspec/lldp_global/lldp_global.py index 5597340469..62630036c2 100644 --- a/lib/ansible/module_utils/network/ios/argspec/lldp_global/lldp_global.py +++ b/lib/ansible/module_utils/network/ios/argspec/lldp_global/lldp_global.py @@ -36,7 +36,7 @@ class Lldp_globalArgs(object): argument_spec = {'config': {'options': {'holdtime': {'type': 'int'}, 'reinit': {'type': 'int'}, - 'enable': {'type': 'bool'}, + 'enabled': {'type': 'bool'}, 'timer': {'type': 'int'}, 'tlv_select': { 'options': { diff --git a/lib/ansible/module_utils/network/ios/config/lldp_global/lldp_global.py b/lib/ansible/module_utils/network/ios/config/lldp_global/lldp_global.py index 6a0c11af7c..02eec6ddc7 100644 --- a/lib/ansible/module_utils/network/ios/config/lldp_global/lldp_global.py +++ b/lib/ansible/module_utils/network/ios/config/lldp_global/lldp_global.py @@ -190,7 +190,7 @@ class Lldp_global(ConfigBase): if diff: diff = dict(diff) holdtime = diff.get('holdtime') - enable = diff.get('enable') + enabled = diff.get('enabled') timer = diff.get('timer') reinit = diff.get('reinit') tlv_select = diff.get('tlv_select') @@ -198,7 +198,7 @@ class Lldp_global(ConfigBase): if holdtime: cmd = 'lldp holdtime {0}'.format(holdtime) self.add_command_to_config_list(cmd, commands) - if enable: + if enabled: cmd = 'lldp run' self.add_command_to_config_list(cmd, commands) if timer: @@ -223,7 +223,7 @@ class Lldp_global(ConfigBase): if have.get('holdtime'): cmd = 'lldp holdtime' self._remove_command_from_config_list(cmd, commands) - if have.get('enable'): + if have.get('enabled'): cmd = 'lldp run' self._remove_command_from_config_list(cmd, commands) if have.get('timer'): diff --git a/lib/ansible/module_utils/network/ios/facts/lldp_global/lldp_global.py b/lib/ansible/module_utils/network/ios/facts/lldp_global/lldp_global.py index 368851b718..1643d52476 100644 --- a/lib/ansible/module_utils/network/ios/facts/lldp_global/lldp_global.py +++ b/lib/ansible/module_utils/network/ios/facts/lldp_global/lldp_global.py @@ -81,7 +81,7 @@ class Lldp_globalFacts(object): if holdtime: config['holdtime'] = int(holdtime) if 'lldp run' in conf: - config['enable'] = True + config['enabled'] = True if timer: config['timer'] = int(timer) if reinit: diff --git a/lib/ansible/modules/network/ios/ios_lldp_global.py b/lib/ansible/modules/network/ios/ios_lldp_global.py index 6207633afb..49c146f8d2 100644 --- a/lib/ansible/modules/network/ios/ios_lldp_global.py +++ b/lib/ansible/modules/network/ios/ios_lldp_global.py @@ -69,7 +69,7 @@ options: For any other reinit value, idempotency will be maintained since any other reinit value is recorded in the Cisco device. type: int - enable: + enabled: description: - Enable LLDP type: bool @@ -150,7 +150,7 @@ EXAMPLES = """ ios_lldp_global: config: holdtime: 10 - run: True + enabled: True reinit: 3 timer: 10 state: merged diff --git a/test/integration/targets/ios_lldp_global/tests/cli/merged.yaml b/test/integration/targets/ios_lldp_global/tests/cli/merged.yaml index e84e475ad6..00757ecfac 100644 --- a/test/integration/targets/ios_lldp_global/tests/cli/merged.yaml +++ b/test/integration/targets/ios_lldp_global/tests/cli/merged.yaml @@ -9,7 +9,7 @@ ios_lldp_global: &merged config: holdtime: 10 - enable: True + enabled: True reinit: 3 timer: 20 state: merged diff --git a/test/integration/targets/ios_lldp_global/vars/main.yaml b/test/integration/targets/ios_lldp_global/vars/main.yaml index e40498f01d..ed87644bf8 100644 --- a/test/integration/targets/ios_lldp_global/vars/main.yaml +++ b/test/integration/targets/ios_lldp_global/vars/main.yaml @@ -12,14 +12,14 @@ merged: timer: 20 holdtime: 10 reinit: 3 - enable: True + enabled: True replaced: before: timer: 100 holdtime: 10 reinit: 3 - enable: True + enabled: True commands: - "no lldp run" @@ -36,7 +36,7 @@ deleted: timer: 100 holdtime: 10 reinit: 3 - enable: True + enabled: True commands: - "no lldp holdtime" |