Fix detection of associate-vrf parameter (#28725)

pull/27734/head
Nathaniel Case 7 years ago committed by GitHub
parent 4f6b270620
commit 40907d7db2

@ -107,7 +107,7 @@ from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.netcfg import CustomNetworkConfig
BOOL_PARAMS = [
'assoc-vrf',
'assoc_vrf',
'suppress_arp',
]
PARAM_TO_COMMAND_KEYMAP = {
@ -164,8 +164,7 @@ def get_existing(module, args):
temp_config = netcfg.get_section(parents)
if 'member vni {0} associate-vrf'.format(module.params['vni']) in temp_config:
parents.append('member vni {0} associate-vrf'.format(
module.params['vni']))
parents.append('member vni {0} associate-vrf'.format(module.params['vni']))
config = netcfg.get_section(parents)
elif "member vni {0}".format(module.params['vni']) in temp_config:
parents.append('member vni {0}'.format(module.params['vni']))

Loading…
Cancel
Save