Fixing issue when multiple vni exist (#19928)

This commit is contained in:
Gabriele 2017-01-06 22:36:13 +01:00 committed by Peter Sprygada
parent f2baa6d61a
commit c980b52d33

View file

@ -376,11 +376,11 @@ def get_existing(module, args):
parents = ['interface {0}'.format(interface_exist)]
temp_config = netcfg.get_section(parents)
if 'associate-vrf' in temp_config:
if 'member vni {0} associate-vrf'.format(module.params['vni']) in temp_config:
parents.append('member vni {0} associate-vrf'.format(
module.params['vni']))
config = netcfg.get_section(parents)
elif 'member vni' in temp_config:
elif "member vni {0}".format(module.params['vni']) in temp_config:
parents.append('member vni {0}'.format(module.params['vni']))
config = netcfg.get_section(parents)
else: