Python Management of Cisco switches third-party package Ciscolib

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.