Skip to content

Commit

Permalink
napalm-automation#1046 Use new dictionary key to fetch OS version
Browse files Browse the repository at this point in the history
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 committed Sep 13, 2019
1 parent 3a7e9c0 commit f8999b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion napalm/nxos/nxos.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ 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 f8999b0

Please sign in to comment.