add node on nodes feature
This commit is contained in:
parent
fd8b367d52
commit
2b9e754ff5
@ -51,6 +51,8 @@ for i in result:
|
|||||||
print("---" + i + "---")
|
print("---" + i + "---")
|
||||||
print(result[i])
|
print(result[i])
|
||||||
print()
|
print()
|
||||||
|
# Or for one specific node
|
||||||
|
mynodes.router1.run(["term len 0". "show run"], folder = "/home/user/logs")
|
||||||
```
|
```
|
||||||
|
|
||||||
## Connection manager usage
|
## Connection manager usage
|
||||||
|
@ -290,7 +290,10 @@ class nodes:
|
|||||||
self.nodelist = []
|
self.nodelist = []
|
||||||
self.config = config
|
self.config = config
|
||||||
for n in nodes:
|
for n in nodes:
|
||||||
self.nodelist.append(node(n, **nodes[n], config = config))
|
this = node(n, **nodes[n], config = config)
|
||||||
|
self.nodelist.append(this)
|
||||||
|
setattr(self,n,this)
|
||||||
|
|
||||||
|
|
||||||
def splitlist(self, lst, n):
|
def splitlist(self, lst, n):
|
||||||
for i in range(0, len(lst), n):
|
for i in range(0, len(lst), n):
|
||||||
|
Loading…
Reference in New Issue
Block a user