I have no experience with Nexus outside of managing it once for a friend of mine when he ran into an issue, so I don't claim to be an expert in the OS That being said, Jon is correct that it seems like you have that functionality in the OS already, but if you're wanting to run scripts from a server, have you looked at the telnetlib and sshlib for python? You can still configure commands using these modules as if you were sitting at the terminal.
Thanks for the replies, what I am trying to do is somewhat different. Python scripts can be run from the switch directly, however the other option is to compile the scripts from a central location and using API's run them on the nexus7k's remotely as it would not be practical to run seperate scripts on say 20+ 7000 switches all the time.
So the actual script still runs on the switch however complied remotely, from what i found this needs to be done via Cisco OnePK which has the relevant API's and python libraries which can be imported into python eg; import cisco.py (within the code)...
I attended a Cisco python scripting for Nexus7k recently and this was demonstrated however I assumed locating the relevant modules would be easy so did not bother to ask anyway the Cisco devnet looks to be unaccessable at the moment so will wait until Monday to have a go.
Also the sshlib and telnetlib are good however just run commands remotely, with the built in modules we can create trigger events for thresholds such as "run sh ip route | inc 00:00" when the cpu spikes due to BGP / ARP which will give us the routes that are flapping at that point in time without anyone needing to monitor the switch manually for this.
Thanks again, I will update this post when I get it working.
Re: Where can I download python libraries / module
So the actual script still runs on the switch however complied remotely, from what i found this needs to be done via Cisco OnePK which has the relevant API's and python libraries which can be imported into python eg; import cisco.py (within the code)..
thanks for clarifying that. I was thinking that if you ran them remotely on a server you would actually lose access to some of the APIs built into NX-OS but from the sounds of it you don't.
We are pleased to announce availability of Beta software for 16.6.3.
16.6.3 will be the second rebuild on the 16.6 release train targeted
towards Catalyst 9500/9400/9300/3850/3650 switching platforms. We are
looking for early feedback from customers befor...
Introduction Featured Speakers Luis Espejel is the Telecommunications
Manager of IENova, an Oil & Gas company. Currently he works with Cisco
IOS® and Cisco IOS XE platforms, and NX to some extent. He has also
worked as a Senior Engineer with the Routing P...
In this session you can learn more about Layer 3 multicast and the best
practices to identify possible threats and take security measures. It
provides an overview of basic multicast, the best security practices for
use of this technology, and recommendati...