Esempio 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_])
Esempio 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_])
Esempio n. 3
0
 def powerOff(self):
     bigtest.tryToStopProcess(self.pid())
     self.serialConsole_ = None