Ciscolib is an open-source third-party Python module on git that manages Cisco switches. Only simple Telnet management is supported at this time. The management method is very simple, the module source code itself is not complex. It is helpful for daily batch configuration.
The module structure is:
Official Operating Example:
Import ciscolib switch = Ciscolib. Device ("hostname or IP", "Login password", "Optional login username") switch.connect () # Defaults to Port 23 # There is some helper commands for common tasks print (Switch.get_model ()) print (Switch.get_ios_version ()) Print ( Switch.get_neighbors ()) switch.enable ("Enable_password") # Or can throw plain commands at the switch print (SW Itch.cmd ("show Run"))
The relevant details can view the module source code, relatively simple. Ciscolib implementation of exception handling, in the encounter anomalies can be seen when the source of exception handling, can be very good to help the script debugging.
Python Management of Cisco switches third-party package Ciscolib