Exemplo n.º 1
0
 def stop(self):
     bigtest.tryToStopProcess(bigtest.readPidFile(os.path.join(self.statedir_, "pid")))
     bridges, intfBridges = bigtest.bridgeInfo()
     config = self.config()
     sw = 0
     for vlans in config.get("switch_intf_vlans"):
         intf = 0
         for v in vlans:
             bridge = intfBridges.get("%s.%s" % (self.name_, v))
             if os.path.exists("/sys/class/net/%s" % bridge):
                 bigtest.sudo(["ifconfig", bridge, "down"])
                 bigtest.sudo(["brctl", "delbr", bridge])
             intf += 1
         sw += 1
     bigtest.run(["rm", "-rf", self.statedir_])
Exemplo n.º 2
0
 def stop(self):
     bigtest.tryToStopProcess(
         bigtest.readPidFile(os.path.join(self.statedir_, "pid")))
     bridges, intfBridges = bigtest.bridgeInfo()
     config = self.config()
     sw = 0
     for vlans in config.get("switch_intf_vlans"):
         intf = 0
         for v in vlans:
             bridge = intfBridges.get("%s.%s" % (self.name_, v))
             if os.path.exists("/sys/class/net/%s" % bridge):
                 bigtest.sudo(["ifconfig", bridge, "down"])
                 bigtest.sudo(["brctl", "delbr", bridge])
             intf += 1
         sw += 1
     bigtest.run(["rm", "-rf", self.statedir_])
Exemplo n.º 3
0
 def pid(self):
     return bigtest.readPidFile(os.path.join(self.statedir_, "pid"))
Exemplo n.º 4
0
 def pid(self):
     return bigtest.readPidFile(os.path.join(self.statedir_, "pid"))