From a93477ec425fb1949c1335fc454d15a45eb61dc8 Mon Sep 17 00:00:00 2001 From: Martin Winter Date: Thu, 6 Apr 2017 17:38:48 -0700 Subject: [PATCH] topotest library: Fix creation of /etc/XXX/vtysh.conf - Needs to be created in local filesystem of each router Signed-off-by: Martin Winter --- tests/topotests/lib/topotest.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/topotests/lib/topotest.py b/tests/topotests/lib/topotest.py index 015705510a..bd797bfafc 100644 --- a/tests/topotests/lib/topotest.py +++ b/tests/topotests/lib/topotest.py @@ -143,8 +143,7 @@ class Router(Node): # print "Daemons after:", self.daemons def startRouter(self): # Disable integrated-vtysh-config - with open('/etc/%s/vtysh.conf' % self.routertype, "w") as vtyshfile: - vtyshfile.write('no service integrated-vtysh-config') + self.cmd('echo "no service integrated-vtysh-config" >> /etc/%s/vtysh.conf' % self.routertype) self.cmd('chown %s:%svty /etc/%s/vtysh.conf' % (self.routertype, self.routertype, self.routertype)) # Try to find relevant old logfiles in /tmp and delete them map(os.remove, glob.glob("/tmp/*%s*.log" % self.name)) -- 2.39.5