Fix nxos_igmp_interface for diff nxos versions (#35959) (#36019)

(cherry picked from commit 7a711cf942)
This commit is contained in:
Trishna Guha 2018-02-12 10:41:58 +05:30 committed by GitHub
parent 50e79c5a14
commit d2e5706467
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -339,9 +339,9 @@ def get_igmp_interface(module, interface):
igmp['report_llg'] = False
immediate_leave = str(resource['ImmediateLeave']).lower() # returns en or dis
if immediate_leave == 'en' or immediate_leave == 'true':
if re.search(r'^en|^true|^enabled', immediate_leave):
igmp['immediate_leave'] = True
elif immediate_leave == 'dis' or immediate_leave == 'false':
elif re.search(r'^dis|^false|^disabled', immediate_leave):
igmp['immediate_leave'] = False
# the next block of code is used to retrieve anything with: