我正在尝试将配置推送到多个瞻博网络设备中。但作为测试,我进入配置模式并更改配置。
client1 = paramiko.SSHClient()
client1.set_missing_host_key_policy(paramiko.AutoAddPolicy())
client1.connect(IP, username=username, password=password)
configure = client1.invoke_shell()
configure.send('configure')
configure.send('set interfaces ge-0/0/10 description "test"')
configure.send('show | compare')
print configure.recv(1000)
client1.close()
我期待输出如下:
[edit interfaces ge-0/0/10]
- description "Internet Simulation Interface connect to QFX ge-0/0/21";
+ description test;
但实际输出是这样的:
JUNOS 12.3X50-D35 built 2013-10-22 07:02:18 UTC