diff --git a/README.md b/README.md index 755f2f2..7804f85 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,8 @@ for i in result: print("---" + i + "---") print(result[i]) print() +# Or for one specific node +mynodes.router1.run(["term len 0". "show run"], folder = "/home/user/logs") ``` ## Connection manager usage diff --git a/conn/core.py b/conn/core.py index 455fa49..6a54826 100755 --- a/conn/core.py +++ b/conn/core.py @@ -290,7 +290,10 @@ class nodes: self.nodelist = [] self.config = config 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): for i in range(0, len(lst), n):