mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07:00
fix nxos_igmp_snooping issues (#38566)
* fix nxos_igmp_snooping issue * shippable error fix
This commit is contained in:
parent
0d79268a6d
commit
ed42331105
3 changed files with 48 additions and 25 deletions
|
@ -53,6 +53,7 @@ options:
|
|||
report_supp:
|
||||
description:
|
||||
- Global IGMPv1/IGMPv2 Report Suppression.
|
||||
type: bool
|
||||
v3_report_supp:
|
||||
description:
|
||||
- Global IGMPv3 Report Suppression and Proxy Reporting.
|
||||
|
@ -127,17 +128,6 @@ def get_group_timeout(config):
|
|||
return value
|
||||
|
||||
|
||||
def get_snooping(config):
|
||||
REGEX = re.compile(r'{0}$'.format('no ip igmp snooping'), re.M)
|
||||
value = False
|
||||
try:
|
||||
if REGEX.search(config):
|
||||
value = False
|
||||
except TypeError:
|
||||
value = True
|
||||
return value
|
||||
|
||||
|
||||
def get_igmp_snooping(module):
|
||||
command = 'show ip igmp snooping'
|
||||
existing = {}
|
||||
|
@ -196,6 +186,9 @@ def config_igmp_snooping(delta, existing, default=False):
|
|||
if default and key == 'group_timeout':
|
||||
if existing.get(key):
|
||||
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))
|
||||
else:
|
||||
command = CMDS.get(key).format(value)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue