def attach(self, netif): """ Attach a network interface, but limit attachment to two interfaces. :param core.coreobj.PyCoreNetIf netif: network interface :return: nothing """ if len(self._netif) >= 2: raise ValueError("Point-to-point links support at most 2 network interfaces") LxBrNet.attach(self, netif)
def attach(self, netif): """ Attach a network interface, but limit attachment to two interfaces. :param core.netns.vif.VEth netif: network interface :return: nothing """ if len(self._netif) >= 2: raise ValueError("Point-to-point links support at most 2 network interfaces") LxBrNet.attach(self, netif)
def attach(self, netif): """ Attach a network interface. :param core.coreobj.PyCoreNetIf netif: network interface :return: nothing """ LxBrNet.attach(self, netif) if self.model: netif.poshook = self.model.position_callback if netif.node is None: return x, y, z = netif.node.position.get() # invokes any netif.poshook netif.setposition(x, y, z)
def attach(self, netif): """ Attach a network interface. :param core.netns.vif.VEth netif: network interface :return: nothing """ LxBrNet.attach(self, netif) if self.model: netif.poshook = self.model.position_callback if netif.node is None: return x, y, z = netif.node.position.get() # invokes any netif.poshook netif.setposition(x, y, z)