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