summaryrefslogtreecommitdiff
path: root/tests/topotests/lib/topotest.py
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-12-17 10:38:02 -0500
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-12-17 10:38:02 -0500
commitd29fb5bd5245670d8b8148ecbf35d4eef82b9b0c (patch)
tree82b50d2666286c924b3b8ac4a7b967988f06f3c1 /tests/topotests/lib/topotest.py
parent7cc96035a73e66f110116ef7cde1b1717b694911 (diff)
topotests: Move linux specific config into Linux config section
As part of the class rework, move the linux specific config into the LinuxRouter.config section instead of being in the Router class. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'tests/topotests/lib/topotest.py')
-rw-r--r--tests/topotests/lib/topotest.py20
1 files changed, 9 insertions, 11 deletions
diff --git a/tests/topotests/lib/topotest.py b/tests/topotests/lib/topotest.py
index 101f1776aa..30079874bf 100644
--- a/tests/topotests/lib/topotest.py
+++ b/tests/topotests/lib/topotest.py
@@ -663,17 +663,6 @@ class Router(Node):
if params.get('routertype') is not None:
self.routertype = self.params.get('routertype')
- # Enable forwarding on the router
- assert_sysctl(self, 'net.ipv4.ip_forward', 1)
- assert_sysctl(self, 'net.ipv6.conf.all.forwarding', 1)
- # Enable coredumps
- assert_sysctl(self, 'kernel.core_uses_pid', 1)
- assert_sysctl(self, 'fs.suid_dumpable', 1)
- #this applies to the kernel not the namespace...
- #original on ubuntu 17.x, but apport won't save as in namespace
- # |/usr/share/apport/apport %p %s %c %d %P
- corefile = '%e_core-sig_%s-pid_%p.dmp'
- assert_sysctl(self, 'kernel.core_pattern', corefile)
self.cmd('ulimit -c unlimited')
# Set ownership of config files
self.cmd('chown {0}:{0}vty /etc/{0}'.format(self.routertype))
@@ -1080,6 +1069,15 @@ class LinuxRouter(Router):
# Enable forwarding on the router
assert_sysctl(self, 'net.ipv4.ip_forward', 1)
assert_sysctl(self, 'net.ipv6.conf.all.forwarding', 1)
+ # Enable coredumps
+ assert_sysctl(self, 'kernel.core_uses_pid', 1)
+ assert_sysctl(self, 'fs.suid_dumpable', 1)
+ #this applies to the kernel not the namespace...
+ #original on ubuntu 17.x, but apport won't save as in namespace
+ # |/usr/share/apport/apport %p %s %c %d %P
+ corefile = '%e_core-sig_%s-pid_%p.dmp'
+ assert_sysctl(self, 'kernel.core_pattern', corefile)
+
def terminate(self):
"""
Terminate generic LinuxRouter Mininet instance