exscript

Python Exscript - JunOS

a 夏天 提交于 2019-12-11 13:58:58
问题 I'm trying to to run a script to show all of the configuration and write them on files for juniper and CISCO routers. So far the CISCO script is working as it should but the thing is with the juniper router. for ii in JUNIPER: print ii cmd2 = 'show configuration | display set' conn.connect(ii) conn.login(account1) conn.execute(cmd2) print conn.response #filerouter = open(ii, "w") #filerouter.write(conn.response) #filerouter.close() After getting the list of devices to query, I run this but it