From 7928866b3b740fc388b512ae5d2f4600e910ceb6 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 23 Feb 2019 18:19:00 +0100 Subject: [PATCH] [controller] python2.7 subprocess change --- p4app/controller.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/p4app/controller.py b/p4app/controller.py index 6866883..0c2b7fc 100644 --- a/p4app/controller.py +++ b/p4app/controller.py @@ -57,10 +57,10 @@ class L2Controller(object): @staticmethod def add_host_ips(host, net, ipaddr, dev): - subprocess.run(["mx", host, "ip", "addr", "flush", "dev", dev]) - subprocess.run(["mx", host, "sysctl", "net.ipv6.conf.lo.disable_ipv6=0"]) - subprocess.run(["mx", host, "sysctl", "net.ipv6.conf.{}.disable_ipv6=0".format(dev)]) - subprocess.run(["mx", host, "ip", "addr", "add", ipaddr, "dev", dev]) + subprocess.call(["mx", host, "ip", "addr", "flush", "dev", dev]) + subprocess.call(["mx", host, "sysctl", "net.ipv6.conf.lo.disable_ipv6=0"]) + subprocess.call(["mx", host, "sysctl", "net.ipv6.conf.{}.disable_ipv6=0".format(dev)]) + subprocess.call(["mx", host, "ip", "addr", "add", ipaddr, "dev", dev]) def init_boilerplate(self, sw_name): self.topo = Topology(db="topology.db")