Update ios_facts.py (#40928)
Account for upper/lower case match occurrences of "[Nn]umber" and "[Ss]erial" Model Number : WS-C3850-12X48U System Serial Number : <removed>
This commit is contained in:
parent
a60fe1946c
commit
12d221152b
1 changed files with 2 additions and 2 deletions
|
@ -204,11 +204,11 @@ class Default(FactsBase):
|
|||
return match.group(1)
|
||||
|
||||
def parse_stacks(self, data):
|
||||
match = re.findall(r'^Model number\s+: (\S+)', data, re.M)
|
||||
match = re.findall(r'^Model [Nn]umber\s+: (\S+)', data, re.M)
|
||||
if match:
|
||||
self.facts['stacked_models'] = match
|
||||
|
||||
match = re.findall(r'^System serial number\s+: (\S+)', data, re.M)
|
||||
match = re.findall(r'^System [Ss]erial [Nn]umber\s+: (\S+)', data, re.M)
|
||||
if match:
|
||||
self.facts['stacked_serialnums'] = match
|
||||
|
||||
|
|
Loading…
Reference in a new issue