25

python网络设备配置备份-运维不粘锅

 3 years ago
source link: https://blog.51cto.com/xxy12345/2542884
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
经过几天折腾,终于搞出来了一个python网络设备配置备份的脚本。基本思路如下:1.定义设备类Device1.1初始化参数dc,zone,hostname,ip,user,passwd(数据中心,网络区域,设备名称,ip,用户名,密码)1.2函数login设备登录1.3函数screenCMD设备测试是否支持分屏命令(目前只有华为的做这个测试)1.4函数get_config支持分屏命令的设备取配置方

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK