Пример #1
0
    def get_dracut_arguments(self, nic):
        """Get dracut arguments for the given FCoE device.

        :param nic: a name of the network device
        :return: a list of dracut arguments

        FIXME: This is just a temporary method taken from blivet.
        """
        log.debug("Getting dracut arguments for FCoE nic %s", nic)

        dcb = True

        for _nic, _dcb, _auto_vlan in fcoe().nics:
            if nic == _nic:
                dcb = _dcb
                break
        else:
            return list()

        dcb_opt = "dcb" if dcb else "nodcb"

        if nic in fcoe().added_nics:
            return ["fcoe=%s:%s" % (nic, dcb_opt)]
        else:
            return ["fcoe=edd:%s" % dcb_opt]
Пример #2
0
    def get_dracut_arguments(self, nic):
        """Get dracut arguments for the given FCoE device.

        :param nic: a name of the network device
        :return: a list of dracut arguments

        FIXME: This is just a temporary method taken from blivet.
        """
        dcb = True

        for _nic, _dcb, _auto_vlan in fcoe().nics:
            if nic == _nic:
                dcb = _dcb
                break
        else:
            return list()

        dcb_opt = "dcb" if dcb else "nodcb"

        if nic in fcoe().added_nics:
            return ["fcoe=%s:%s" % (nic, dcb_opt)]
        else:
            return ["fcoe=edd:%s" % dcb_opt]
Пример #3
0
    def get_nics(self):
        """Get all NICs.

        :return: a list of names of network devices connected to FCoE switches
        """
        return [nic for nic, dcb, auto_vlan in fcoe().nics]
Пример #4
0
    def get_nics(self):
        """Get all NICs.

        :return: a list of names of network devices connected to FCoE switches
        """
        return [nic for nic, dcb, auto_vlan in fcoe().nics]