GithubHelp home page GithubHelp logo

diffh / h3c_netconf_lib Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hongfeioo/h3c_netconf_lib

0.0 0.0 0.0 4.64 MB

通过netconf协议操作h3c交换机,可实现增删静态路由条目等功能

License: Apache License 2.0

Python 100.00%

h3c_netconf_lib's Introduction

简介

  1. 请在manager.py里面填如下信息:
host = '172.16.1.162' #要登录的主机 
user = 'aaa' #netconf用户名 
password = 'aaa' #netconf密码

注意:请保证h3c设备开启netconf服务 例如,在h3c交换机上配置如下信息,具体参见press手册。 
system-view 
local-user aaa class manage 
password simple aaa 
authorization-attribute user-role network-admin work-directory flash:/ 
service-type https 
quit 
netconf soap https enable 
quit
  1. 执行set_static_route_table为配置静态路由 执行delete_static_route_table.py为删除静态路由
把需要下的配置写在manager.py里面,netconf接口参照 doc/Comware V7 StaticRoute NETCONF XML API Configuration Reference

例如,静态路由的信息为: 
DestVrfIndex = '0' 
DestTopologyIndex = '0' 
Ipv4Address = '3.3.3.3' 
Ipv4PrefixLength = '24' 
NexthopVrfIndex = '0' 
NexthopIpv4Address = '4.4.4.1' 
IfIndex = '0'

以上代码由H3C厂家提供

h3c_netconf_lib's People

Contributors

hongfeioo 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.