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>

(cherry picked from commit 12d221152b)
pull/41306/head
epicanthal 7 years ago committed by Matt Clay
parent 5503285c20
commit f54b9e4dd8

@ -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…
Cancel
Save