Fixing issue when multiple vni exist (#19928)
This commit is contained in:
parent
f2baa6d61a
commit
c980b52d33
1 changed files with 2 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue