update big
This commit is contained in:
28
test.py
28
test.py
@@ -1,7 +1,29 @@
|
||||
#!/usr/bin/python3
|
||||
import conn
|
||||
import yaml
|
||||
|
||||
conf = conn.configfile()
|
||||
conn1=conn.node("pruebas@conn", **conf.connections["home"]["xr"])
|
||||
conn1.connect("interact")
|
||||
conf = conn.configfile("test.yaml")
|
||||
# ***
|
||||
# conf._connections_del(id = "zab3mu", folder="teco")
|
||||
# conf._connections_add(id = "zzztest", folder="teco" ,host = "10.21.96.45", user="sarabada")
|
||||
# conf._folder_add(folder="zzz")
|
||||
# conf._folder_add(folder="zzz", subfolder="achus")
|
||||
# conf._connections_add(id = "zzztec", subfolder="achus", folder="zzz" ,host = "10.21.96.45")
|
||||
# conf._connections_add(id = "zzztec", subfolder="achus", folder="zzz" ,host = "10.21.96.45", options=" saracatanga")
|
||||
# conf._folder_del(folder = "zzz", subfolder = "achus")
|
||||
# conf._profiles_add(id = "test", user = 'tesuser')
|
||||
# conf._profiles_add(id = "test", user = 'tesuser', protocol = 'telnet')
|
||||
# conf._profiles_del(id = "test")
|
||||
# print(yaml.dump(conf.profiles))
|
||||
# conf.saveconfig("test.yaml")
|
||||
# ***
|
||||
xr=conn.node("xr@home", **conf.connections["home"]["xr"], config=conf)
|
||||
ios=conn.node("ios@home", **conf.connections["home"]["ios"], config=conf)
|
||||
norman = conn.node("norman@home", **conf.connections["home"]["norman"], config=conf)
|
||||
eve = conn.node("eve@home", **conf.connections["home"]["eve"], config=conf)
|
||||
# xr.run(["term len 0","show ip bgp", "show ip bgp summ"], folder="test")
|
||||
# ios.run(["term len 0","show ip bgp", "show ip bgp summ"], folder="test")
|
||||
# norman.run(["ls -la", "pwd"], folder = "test")
|
||||
# eve.run(["ls -la", "pwd"], folder = "test")
|
||||
xr.interact()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user