[controller] python2.7 subprocess change
This commit is contained in:
parent
abff485183
commit
7928866b3b
1 changed files with 4 additions and 4 deletions
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue