コード例 #1
0
ファイル: tc.py プロジェクト: IstanbulBoy/floodlight-test
 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_])
コード例 #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_])
コード例 #3
0
ファイル: node.py プロジェクト: IstanbulBoy/floodlight-test
 def powerOff(self):
     bigtest.tryToStopProcess(self.pid())
     self.serialConsole_ = None