예제 #1
0
    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)
예제 #2
0
파일: network.py 프로젝트: sorianoas/core
    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)
예제 #3
0
파일: network.py 프로젝트: lmerat46/core
    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)