summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbk2zsto <bk2zsto@users.noreply.github.com>2022-09-07 19:31:57 -0400
committerGitHub <noreply@github.com>2022-09-07 23:31:57 +0000
commitf2541b3b4e176a7d0d9cca05e8e5dc9e5ff27ddb (patch)
tree16627f8df806c4a9ff59baa26eb3d85c469cb6a3
parentc02067c4dcb455b6284bf9c386db3a1465f5c4a5 (diff)
downloadvyos.vyos-f2541b3b4e176a7d0d9cca05e8e5dc9e5ff27ddb.tar.gz
vyos.vyos-f2541b3b4e176a7d0d9cca05e8e5dc9e5ff27ddb.zip
Equuleus facts (#271)
* support 1.3 version output Co-authored-by: Kate Case <this.is@katherineca.se>
-rw-r--r--changelogs/fragments/271_equuleus_facts.yaml3
-rw-r--r--plugins/cliconf/vyos.py2
-rw-r--r--plugins/module_utils/network/vyos/facts/legacy/base.py2
3 files changed, 5 insertions, 2 deletions
diff --git a/changelogs/fragments/271_equuleus_facts.yaml b/changelogs/fragments/271_equuleus_facts.yaml
new file mode 100644
index 0000000..1399180
--- /dev/null
+++ b/changelogs/fragments/271_equuleus_facts.yaml
@@ -0,0 +1,3 @@
+---
+minor_changes:
+ - Update fact gathering to support v1.3 show version output
diff --git a/plugins/cliconf/vyos.py b/plugins/cliconf/vyos.py
index f2064d7..885cf1f 100644
--- a/plugins/cliconf/vyos.py
+++ b/plugins/cliconf/vyos.py
@@ -83,7 +83,7 @@ class Cliconf(CliconfBase):
if match:
device_info["network_os_version"] = match.group(1)
- match = re.search(r"HW model:\s*(\S+)", data)
+ match = re.search(r"(?:HW|Hardware) model:\s*(\S+)", data)
if match:
device_info["network_os_model"] = match.group(1)
diff --git a/plugins/module_utils/network/vyos/facts/legacy/base.py b/plugins/module_utils/network/vyos/facts/legacy/base.py
index a493421..6f063d6 100644
--- a/plugins/module_utils/network/vyos/facts/legacy/base.py
+++ b/plugins/module_utils/network/vyos/facts/legacy/base.py
@@ -47,7 +47,7 @@ class Default(LegacyFactsBase):
self.facts.update(self.platform_facts())
def parse_serialnum(self, data):
- match = re.search(r"HW S/N:\s+(\S+)", data)
+ match = re.search(r"(?:HW|Hardware) S/N:\s+(\S+)", data)
if match:
return match.group(1)