From bdd105f740115ecec71b0c3d498491a51a4e7ec7 Mon Sep 17 00:00:00 2001 From: Deepak Agrawal Date: Wed, 18 Apr 2018 13:22:08 +0530 Subject: [PATCH] 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 --- lib/ansible/modules/network/iosxr/iosxr_facts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/network/iosxr/iosxr_facts.py b/lib/ansible/modules/network/iosxr/iosxr_facts.py index ffe66a4e35..56bfe397d3 100644 --- a/lib/ansible/modules/network/iosxr/iosxr_facts.py +++ b/lib/ansible/modules/network/iosxr/iosxr_facts.py @@ -307,7 +307,7 @@ class Interfaces(FactsBase): return int(match.group(1)) 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: return match.group(1)