From e5373b9c12fffd436893030ced81f1ac4c05b794 Mon Sep 17 00:00:00 2001 From: Tom Strickx Date: Tue, 14 Apr 2020 17:24:46 +0100 Subject: [PATCH] Use Kickstart version to determine NXOS version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `rr_sys_ver` reports the system version from before a reboot, not the current version. As the NXAPI seems to lack a straightforward `sys_ver_str` (This is why we’re in this mess in the first place), we’ll need to use the `kickstart_ver_str` instead. This is also shown to be an issue in the official documentation: https://developer.cisco.com/docs/nx-api-cli-reference-for-the-cisco-nexus-9000-series-platform/#!version-commands/show-version This fixes #1171 --- napalm/nxos/nxos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/napalm/nxos/nxos.py b/napalm/nxos/nxos.py index 41e506846..963a8d208 100644 --- a/napalm/nxos/nxos.py +++ b/napalm/nxos/nxos.py @@ -804,7 +804,7 @@ def get_facts(self): facts["model"] = show_version.get("chassis_id", "") facts["hostname"] = show_version.get("host_name", "") facts["os_version"] = show_version.get( - "sys_ver_str", show_version.get("rr_sys_ver", "") + "sys_ver_str", show_version.get("kickstart_ver_str", "") ) uptime_days = show_version.get("kern_uptm_days", 0)