From 04f13bb80debf27a9b80ab0f3f0eee587c197298 Mon Sep 17 00:00:00 2001 From: Ichabond Date: Wed, 18 Sep 2019 09:21:57 +0100 Subject: [PATCH] #1046 Use new dictionary key to fetch OS version (#1047) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some Cisco Nexus equipment doesn’t have `sys_ver_str`, but has `rr_sys_ver` instead. Use this as a backup. --- napalm/nxos/nxos.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/napalm/nxos/nxos.py b/napalm/nxos/nxos.py index f14338f35..eb10c2313 100644 --- a/napalm/nxos/nxos.py +++ b/napalm/nxos/nxos.py @@ -800,7 +800,9 @@ def get_facts(self): show_version = self._send_command("show version") facts["model"] = show_version.get("chassis_id", "") facts["hostname"] = show_version.get("host_name", "") - facts["os_version"] = show_version.get("sys_ver_str", "") + facts["os_version"] = show_version.get( + "sys_ver_str", show_version.get("rr_sys_ver", "") + ) uptime_days = show_version.get("kern_uptm_days", 0) uptime_hours = show_version.get("kern_uptm_hrs", 0)