Beispiel #1
0
    def _discover_device(self):
        """Discover the device."""
        try:
            error_message = fcoe.add_san(self._nic, self._dcb, self._auto_vlan)
        except (IOError, OSError) as e:
            raise StorageDiscoveryError(str(e)) from e

        if error_message:
            raise StorageDiscoveryError(error_message)

        fcoe.added_nics.append(self._nic)
Beispiel #2
0
    def _discover_device(self):
        """Discover the device."""
        try:
            error_message = fcoe.add_san(self._nic, self._dcb, self._auto_vlan)
        except (IOError, OSError) as e:
            raise StorageDiscoveryError(str(e))

        if error_message:
            raise StorageDiscoveryError(error_message)

        fcoe.added_nics.append(self._nic)
Beispiel #3
0
    def parse(self, args):
        fc = super().parse(args)

        if fc.nic not in nm.nm_devices():
            raise KickstartParseError(_("NIC \"{}\" given in fcoe command does not "
                                        "exist.").format(fc.nic), lineno=self.lineno)

        if fc.nic in (info[0] for info in fcoe.nics):
            log.info("Kickstart fcoe device %s was already added from EDD, ignoring.", fc.nic)
        else:
            msg = fcoe.add_san(nic=fc.nic, dcb=fc.dcb, auto_vlan=True)

            if not msg:
                msg = "Succeeded."
                fcoe.added_nics.append(fc.nic)

            log.info("Adding FCoE SAN on %s: %s", fc.nic, msg)

        return fc
Beispiel #4
0
    def parse(self, args):
        fc = super().parse(args)

        if fc.nic not in [dev.device_name for dev in get_supported_devices()]:
            raise KickstartParseError(_(
                "NIC \"{}\" given in fcoe command does not "
                "exist.").format(fc.nic),
                                      lineno=self.lineno)

        if fc.nic in (info[0] for info in fcoe.nics):
            log.info(
                "Kickstart fcoe device %s was already added from EDD, ignoring.",
                fc.nic)
        else:
            msg = fcoe.add_san(nic=fc.nic, dcb=fc.dcb, auto_vlan=True)

            if not msg:
                msg = "Succeeded."
                fcoe.added_nics.append(fc.nic)

            log.info("Adding FCoE SAN on %s: %s", fc.nic, msg)

        return fc