Giter Club home page Giter Club logo

napalm-h3c-cw7-ssh's Introduction

napalm-h3c-cw7-ssh

English | 中文

This repository is published in https://github.com/napalm-automation-community/napalm-h3c-cw7-ssh

NAPALM

NAPALM (Network Automation and Programmability Abstraction Layer with Multivendor support) is a Python library that implements a set of functions to interact with different router vendor devices using a unified API.

NAPALM supports several methods to connect to the devices, to manipulate configurations or to retrieve data.

napalm-h3c-cw7-ssh

NAPALM driver for H3C Comware V7 network devices, over ssh.

Supported devices

S5100、S5500、S6800、S12500 Series Data Center Switches.

Some methods may work on Routers.

Looking forward to your testing and feedback :).

Supported functions

  • ✅ is_alive()
  • ✅ get_facts()
  • ✅ get_interfaces()
  • ✅ get_interfaces_ip()
  • ✅ get_interfaces_counters()❌needs to be rewritten
  • ✅ get_lldp_neighbors()
  • ✅ get_lldp_neighbors_detail()
  • ✅ get_environment()
  • ✅ cli()
  • ✅ get_arp_table()
  • ✅ get_mac_address_move_table()
  • ✅ get_mac_address_table()
  • ✅ get_vlans()
  • ✅ get_config()
  • ✅ get_irf_config()
  • ✅ is_irf()

Getting Started

Install

pip install napalm-h3c-comware

Upgrading

pip install napalm-h3c-comware -U

Use

You can use this driver like this:

from napalm import get_network_driver

driver = get_network_driver("h3c_comware")
driver = driver("192.168.56.20", "netdevops", "NetDevops@01",)
driver.open()
ret = driver.is_alive()
print(ret)

If you want to custom some connection parameter, example: the port connected to the device, you should use optional_args, it is exactly the same as netmiko.BaseConnection.__init__:

from napalm import get_network_driver

driver = get_network_driver("h3c_comware")
conn_args = {
    "port": 2222
}
driver = driver("192.168.56.21", "netdevops", "NetDevops@01",optional_args=conn_args)
driver.open()
ret = driver.is_alive()
print(ret)

Sometimes you want to execute raw command via netmiko, you can use send_command, it is exactly the same as netmiko.send_command:

from napalm import get_network_driver

driver = get_network_driver("h3c_comware")
driver = driver("192.168.56.20", "netdevops", "NetDevops@01",)
driver.open()
# you can use any options that supported by netmiko.send_command
ret = driver.send_command("display clock", use_textfsm=True)
print(ret)

napalm-h3c-cw7-ssh's People

Contributors

xdai555 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.