fix UnboundLocalError nxos_bgp_af module (#37610)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
parent
716e170821
commit
00abe6dbe7
1 changed files with 8 additions and 4 deletions
|
@ -490,6 +490,7 @@ def get_network_command(existing, key, value):
|
|||
command = '{0} {1}'.format(key, inet[0])
|
||||
elif len(inet) == 2:
|
||||
command = '{0} {1} route-map {2}'.format(key, inet[0], inet[1])
|
||||
if command:
|
||||
commands.append(command)
|
||||
for enet in existing_networks:
|
||||
if enet not in value:
|
||||
|
@ -497,6 +498,7 @@ def get_network_command(existing, key, value):
|
|||
command = 'no {0} {1}'.format(key, enet[0])
|
||||
elif len(enet) == 2:
|
||||
command = 'no {0} {1} route-map {2}'.format(key, enet[0], enet[1])
|
||||
if command:
|
||||
commands.append(command)
|
||||
return commands
|
||||
|
||||
|
@ -515,6 +517,7 @@ def get_inject_map_command(existing, key, value):
|
|||
command = ('inject-map {0} exist-map {1} '
|
||||
'copy-attributes'.format(maps[0],
|
||||
maps[1]))
|
||||
if command:
|
||||
commands.append(command)
|
||||
for emaps in existing_maps:
|
||||
if emaps not in value:
|
||||
|
@ -525,6 +528,7 @@ def get_inject_map_command(existing, key, value):
|
|||
command = ('no inject-map {0} exist-map {1} '
|
||||
'copy-attributes'.format(emaps[0],
|
||||
emaps[1]))
|
||||
if command:
|
||||
commands.append(command)
|
||||
return commands
|
||||
|
||||
|
|
Loading…
Reference in a new issue