[controller] python2.7 subprocess change

This commit is contained in:
Nico Schottelius 2019-02-23 18:19:00 +01:00
parent abff485183
commit 7928866b3b

View file

@ -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")