Fix rendering duplicate peer-ip commands (#66088)

Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
pull/66234/head
Nilashish Chakraborty 5 years ago committed by GitHub
parent 4674435367
commit 0ebb0ac0fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -259,10 +259,10 @@ def state_present(module, existing, proposed, candidate):
ingress_replicationnb_command, ingress_replicationns_command)):
static_level_cmds = [cmd for cmd in commands if 'peer' in cmd]
parents = [interface_command, vni_command]
commands = [cmd for cmd in commands if 'peer' not in cmd]
for cmd in commands:
parents.append(cmd)
candidate.add(static_level_cmds, parents=parents)
commands = [cmd for cmd in commands if 'peer' not in cmd]
elif 'peer-ip' in commands[0]:
static_level_cmds = [cmd for cmd in commands]
@ -325,7 +325,7 @@ def main():
if peer_list[0] == 'default':
module.params['peer_list'] = 'default'
else:
stripped_peer_list = map(str.strip, peer_list)
stripped_peer_list = list(map(str.strip, peer_list))
module.params['peer_list'] = stripped_peer_list
state = module.params['state']

Loading…
Cancel
Save