예제 #1
0
	def _unconfigLink(self):
		host = self.getHost()
		iface = self.internalInterface()
		ifb = None
		if not self.getAttribute("ifb_id", None) is None:
			ifb = "ifb%d" % self.getAttribute("ifb_id", None)
		try:
			tc.clearIncomingRedirect(host, iface)
			tc.clearLinkEmulation(host, iface)
			if ifb:
				tc.clearLinkEmulation(host, ifb)
		except:
			pass
예제 #2
0
파일: emulated.py 프로젝트: m3z/ToMaTo
 def _unconfigLink(self):
     host = self.getHost()
     iface = self.internalInterface()
     if ifaceutil.interfaceExists(host, iface):
         try:
             tc.clearIncomingRedirect(host, iface)
             tc.clearLinkEmulation(host, iface)
         except:
             # might still fail if interface is deleted in between
             pass
     if self.hasIfbId():
         ifb = "ifb%d" % self.getIfbId()
         tc.clearLinkEmulation(host, ifb)
     self._unassignIfb()