简化到Cisco IOS设备的Telnet连接的库

unha的Python项目详细描述


https://img.shields.io/pypi/v/unha.svg?style=flat-squarehttps://img.shields.io/pypi/pyversions/unha.svg?style=flat-squarehttps://img.shields.io/pypi/l/unha.svg?style=flat-square

简化到Cisco IOS设备的Telnet连接的库

安装

unha在pypi上发布,在linux/macos和windows上可用,并支持python 3.6+。

$ pip install -U unha

为什么不直接用netmiko呢?

我尽可能使用netmiko。不幸的是,我有一些老的思科设备拒绝 与netmiko合作。我花了很多时间试图让它工作,但最终还是放弃了。

unha是一个后备库,当具有cisco_ios_telnet的netmiko无法连接到 短粗的装置。

通常,我的脚本会尝试使用以下方法连接到设备:

  • netmiko,设备类型为cisco_ios
  • netmiko,设备类型为cisco_ios_telnet
  • UNHA

用法

我试着模仿netmiko的方法。

>>>device=Unha('10.0.0.1','username','password')>>>output=device.send_command('show version')>>>device.send_config_set(['snmp ifmib ifindex persist','snmp-server enable traps cpu threshold'])>>>device.disconnect()

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java无法启动应用程序:JNLP错误   java根据用户输入在PreparedStatement中使用setTime()或setNull()   java EJB与同步   java以object为键通过hashmap进行搜索   java中的模10^9+7   针对包含其他对象的对象的java OOP最佳实践   如何将字符串作为HTML代码从Java文件读取到JSP页面?   java我的POM怎么了?“解析表达式..检测到递归表达式循环”   用于Hbase的Mapreduce的java NoSuchMethodError   JAVAlang.SecurityException:权限拒绝:启动意图{act=安卓.Intent.action.MAIN cat=[安卓.Intent.category.LAUNCHER]   数组初始化谜语Java   通过arraylist搜索时的java句柄关联