Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network's __create_new_epair_interface function parameter nic_suffix_b is ignored #766

Open
igalic opened this issue Dec 13, 2020 · 0 comments

Comments

@igalic
Copy link
Collaborator

igalic commented Dec 13, 2020

the following code snippet from the Network class :

    def __create_new_epair_interface(
        self,
        nic_suffix_a: str=":a",
        nic_suffix_b: str=":b",
        mac_addresses: typing.Optional[libioc.MacAddress.MacAddressPair]=None,
        **nic_args: typing.Any
    ) -> typing.Tuple[
        libioc.NetworkInterface.NetworkInterface,
        libioc.NetworkInterface.NetworkInterface
    ]:

       … 

        nic_a = libioc.NetworkInterface.NetworkInterface(
            name="epair",
            create=True,
            logger=self.logger
        )
        nic_b_name = nic_a.name[:-1] + "b" # ⬅️

is later called as

nic_a, nic_b = self.__create_new_epair_interface(
            nic_suffix_a="",
            nic_suffix_b=":j",
            mac_addresses=mac_address_pair,
            mtu=self.mtu,
            description=self.nic_local_description,
        )

which won't do what we tell it to do

@igalic igalic changed the title Network's __create_new_epair_interface function never uses its nic_suffix_b parameter Network's __create_new_epair_interface function parameter nic_suffix_b is ignored Dec 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant