You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Place an x between the square brackets where applicable)
Yes
[] No
Setup
napalm version
(Paste verbatim output from pip freeze | grep napalm between quotes below)
napalm==3.2.0
napalm-panos==0.5.2
Network operating system version
(Paste verbatim output from show version - or equivalent - between quotes below)
Cisco Nexus Operating System (NX-OS) Software
TAC support: http://www.cisco.com/tac
Documents: http://www.cisco.com/en/US/products/ps9372/tsd_products_support_series_home.html
Copyright (c) 2002-2019, Cisco Systems, Inc. All rights reserved.
The copyrights to certain works contained in this software are
owned by other third parties and used and distributed under
license. Certain components of this software are licensed under
the GNU General Public License (GPL) version 2.0 or the GNU
Lesser General Public License (LGPL) Version 2.1. A copy of each
such license is available at
http://www.opensource.org/licenses/gpl-2.0.php and
http://www.opensource.org/licenses/lgpl-2.1.php
Software
BIOS: version 2.12.0
kickstart: version 7.3(5)D1(1)
system: version 7.3(5)D1(1)
BIOS compile time: 05/29/2013
kickstart image file is: bootflash:///n7000-s2-kickstart.7.3.5.D1.1.bin
kickstart compile time: 9/30/2019 21:00:00 [11/09/2019 05:55:30]
system image file is: bootflash:///n7000-s2-dk9.7.3.5.D1.1.bin
system compile time: 9/30/2019 21:00:00 [11/09/2019 08:12:42]
Hardware
cisco Nexus7000 C7004 (4 Slot) Chassis ("Supervisor Module-2")
Intel(R) Xeon(R) CPU with 32940104 kB of memory.
Processor Board ID xxxx
Device name: my_router
bootflash: 1966080 kB
slot0: 0 kB (expansion flash)
Kernel uptime is 352 day(s), 3 hour(s), 58 minute(s), 46 second(s)
Last reset at 966994 usecs after Tue Feb 25 09:19:35 2020
Reason: Reset due to upgrade
System version: 7.3(3)D1(1)
Service:
plugin
Core Plugin, Ethernet Plugin
Active Package(s)
with further testing on additional Nexus switches, it turns out that each of the other places in the file where "ok" or "Ok" are checked need to be converted to lower case and compared with 'ok'
Description of Issue/Question
Some models or maybe versions report a good power supply status as “Ok” and others as lower case “ok”
The _process_pdus() function in nxos.py only looks for the lower case string and so reports a failed power supply that was "Ok".
I propose as the fix to change the return value to lower case before comparing to 'ok'
'''
psinfo.get("ps_status", "ok").lower() == "ok"
'''
Did you follow the steps from https://github.com/napalm-automation/napalm#faq
(Place an
x
between the square brackets where applicable)Setup
napalm version
(Paste verbatim output from
pip freeze | grep napalm
between quotes below)Network operating system version
(Paste verbatim output from
show version
- or equivalent - between quotes below)Steps to Reproduce the Issue
I executed the napalm call from saltstack:
'''
salt my_router napalm.call get_environment
sb1agrt732:
----------
comment:
out:
----------
cpu:
----------
0:
----------
%usage:
-1.0
fans:
----------
Fan1(sys_fan1):
----------
status:
True
memory:
----------
available_ram:
178000
used_ram:
55000
power:
----------
1:
----------
capacity:
3000.0
output:
786.0
status:
False
2:
----------
capacity:
0.0
output:
0.0
status:
False
'''
While running the RPC call shows the switch was returning the power supply status as 'Ok':
'''
salt my_router napalm.nxos_api_rpc 'show environment'
my_router:
|_
----------
command:
show environment
id:
1
jsonrpc:
2.0
result:
----------
body:
----------
powersup:
----------
TABLE_psinfo:
----------
ROW_psinfo:
|_
----------
actual_out:
782 W
ps_status:
Ok
psmodel:
N7K-AC-3KW
psnum:
1
tot_capa:
3000 W
|_
----------
actual_out:
0 W
ps_status:
Shutdown
psmodel:
N7K-AC-3KW
psnum:
2
tot_capa:
0 W
|_
'''
Error Traceback
(Paste the complete traceback of the exception between quotes below)
The text was updated successfully, but these errors were encountered: