Automation 解析一组cisco交换机,编译IP和接口列表,然后将netmiko脚本指向该新列表。可能的
我认为我的用词是正确的。我想使用一组交换机并编译一个Ip地址和特定接口的列表,以便使用netmiko push命令。例如,扫描所有cisco交换机并将vlan X中未使用的所有接口的列表放在一起。有人能给我指出正确的方向吗?听起来你需要找出解决方案的不同步骤 也许是这样的:Automation 解析一组cisco交换机,编译IP和接口列表,然后将netmiko脚本指向该新列表。可能的,automation,cisco,netmiko,Automation,Cisco,Netmiko,我认为我的用词是正确的。我想使用一组交换机并编译一个Ip地址和特定接口的列表,以便使用netmiko push命令。例如,扫描所有cisco交换机并将vlan X中未使用的所有接口的列表放在一起。有人能给我指出正确的方向吗?听起来你需要找出解决方案的不同步骤 也许是这样的: 连接到交换机 运行show命令 vlan xx的配置接口 到目前为止,我没有看到任何代码或您尝试过的任何内容,但这里有一个简单的流程,用于循环遍历IP地址列表 #Python 3.7 from netmiko import
#Python 3.7
from netmiko import ConnectionHandler
username = "user"
password = "password"
for ip in IPlist:
# netmiko code profiles;
cisco ={
"host":IP,
"username":username,
"password":password,
"device_type: "cisco_ios"
}
with ConnectHandler(**cisco) as ssh_conn:
print(sshcon.find_prompt())
# do stuff here.