]> git.puffer.fish Git - matthieu/frr.git/commitdiff
topotest library: Fix creation of /etc/XXX/vtysh.conf
authorMartin Winter <mwinter@opensourcerouting.org>
Fri, 7 Apr 2017 00:38:48 +0000 (17:38 -0700)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 28 Nov 2018 01:22:11 +0000 (20:22 -0500)
- Needs to be created in local filesystem of each router

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
tests/topotests/lib/topotest.py

index 015705510a9c2dbd160e6ead212cc25e16e109c0..bd797bfafc4c62fa20d7d5bba3857eb18f229f00 100644 (file)
@@ -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))