def attach(self, interface): if self.up: utils.check_cmd([ constants.OVS_BIN, "add-port", self.bridge_name, interface.localname ]) utils.check_cmd( [constants.IP_BIN, "link", "set", interface.localname, "up"]) CoreNetworkBase.attach(self, interface)
def attach(self, netif): """ Attach a network interface. :param core.netns.vnode.VEth netif: network interface to attach :return: nothing """ if self.up: self.net_client.create_interface(self.brname, netif.localname) CoreNetworkBase.attach(self, netif)
def attach(self, netif): """ Attach a network interface. :param core.netns.vnode.VEth netif: network interface to attach :return: nothing """ if self.up: utils.check_cmd([constants.BRCTL_BIN, "addif", self.brname, netif.localname]) utils.check_cmd([constants.IP_BIN, "link", "set", netif.localname, "up"]) CoreNetworkBase.attach(self, netif)