mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
nxos_igmp_snooping: more group-timeout fixes (#53553)
* Fixed another problem where `group-timeout` was processed before `ip igmp snooping` was enabled * `sanity` playbook: * N6K: `show ip igmp snooping | json` succeeds on the device but doesn't return any data in body; added a skip to the sanity playbook to keep it out of CI * Added a setup task to do initial cleanup on the device
This commit is contained in:
parent
07212c395b
commit
07774b4ccf
2 changed files with 19 additions and 12 deletions
|
@ -181,11 +181,12 @@ def config_igmp_snooping(delta, existing, default=False):
|
|||
|
||||
commands = []
|
||||
command = None
|
||||
gt_command = None
|
||||
for key, value in delta.items():
|
||||
if value:
|
||||
if default and key == 'group_timeout':
|
||||
if existing.get(key):
|
||||
command = 'no ' + CMDS.get(key).format(existing.get(key))
|
||||
gt_command = 'no ' + CMDS.get(key).format(existing.get(key))
|
||||
elif value == 'default' and key == 'group_timeout':
|
||||
if existing.get(key):
|
||||
command = 'no ' + CMDS.get(key).format(existing.get(key))
|
||||
|
@ -198,6 +199,9 @@ def config_igmp_snooping(delta, existing, default=False):
|
|||
commands.append(command)
|
||||
command = None
|
||||
|
||||
if gt_command:
|
||||
# ensure that group-timeout command is configured last
|
||||
commands.append(gt_command)
|
||||
return commands
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue