Handle Duplex parsing on some version of iosxr (#38738)

* Handle Duplex parsing on some version of iosxr

* use re noncapture group for multiple match as suggested by Eric
pull/38944/head
Deepak Agrawal 7 years ago committed by GitHub
parent 8173602a34
commit bdd105f740
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -307,7 +307,7 @@ class Interfaces(FactsBase):
return int(match.group(1)) return int(match.group(1))
def parse_duplex(self, data): def parse_duplex(self, data):
match = re.search(r'(\w+) Duplex', data, re.M) match = re.search(r'(\w+)(?: D|-d)uplex', data, re.M)
if match: if match:
return match.group(1) return match.group(1)

Loading…
Cancel
Save