Skip to content

Commit

Permalink
napalm-automation#1046 Use new dictionary key to fetch OS version (na…
Browse files Browse the repository at this point in the history
…palm-automation#1047)

Some Cisco Nexus equipment doesn’t have `sys_ver_str`, but has `rr_sys_ver` instead. Use this as a backup.
  • Loading branch information
Ichabond authored and bravindranath-bsn committed Apr 19, 2020
1 parent c0f703d commit 04f13bb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion napalm/nxos/nxos.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 04f13bb

Please sign in to comment.