예제 #1
0
    def __init__(self, path, height=3, multi=False, filter_configured=False):
        header = self.__build_header(has_managed_ifnames(),
                                     system.has_systemd(), multi)

        super(NicTable, self).__init__(path,
                                       "Available System NICs",
                                       header,
                                       self._get_nics(filter_configured),
                                       height=height, multi=multi),
예제 #2
0
    def __init__(self, path, height=3, multi=False, filter_configured=False):
        header = self.__build_header(has_managed_ifnames(),
                                     system.has_systemd(), multi)

        super(NicTable, self).__init__(path,
                                       "Available System NICs",
                                       header,
                                       self._get_nics(filter_configured),
                                       height=height,
                                       multi=multi),
    def __debugfiles_to_offer(self):
        items = [("node", "/var/log/ovirt.log"),
                 ("ui", "/var/log/ovirt-node.log"), ("dmesg", "dmesg"),
                 ("audit", "/var/log/audit/audit.log")]

        if system.has_systemd():
            items.append(("journal", "journal (systemd)"))
        else:
            items.append(("messages", "/var/log/messages"))

        return items
예제 #4
0
    def __debugfiles_to_offer(self):
        items = [
            ("node", "/var/log/ovirt.log"),
            ("ui", "/var/log/ovirt-node.log"),
            ("dmesg", "dmesg"),
            ("audit", "/var/log/audit/audit.log"),
        ]

        if system.has_systemd():
            items.append(("journal", "journal (systemd)"))
        else:
            items.append(("messages", "/var/log/messages"))

        return items
예제 #5
0
    def _get_nics(self, filter_configured):
        node_nics = []
        first_nic = None
        model = utils.network.NodeNetwork()
        nics = model.nics(filter_slaveless=True,
                          filter_configured=filter_configured)
        for name, nic in sorted(nics.items()):
            if first_nic is None:
                first_nic = name
            if has_managed_ifnames():
                is_cfg = "Managed"
            else:
                is_cfg = ("Configured" if nic.is_configured() else
                          "Unconfigured")

            fields = self.__build_fields(nic, is_cfg, has_managed_ifnames(),
                                         system.has_systemd())

            description = " ".join(fields)

            node_nics.append((name, description))
        return node_nics
예제 #6
0
    def _get_nics(self, filter_configured):
        node_nics = []
        first_nic = None
        model = utils.network.NodeNetwork()
        nics = model.nics(filter_slaveless=True,
                          filter_configured=filter_configured)
        for name, nic in sorted(nics.items()):
            if nic.ifname.startswith(";"):
                continue
            if first_nic is None:
                first_nic = name
            if has_managed_ifnames():
                is_cfg = "Managed"
            else:
                is_cfg = ("Configured"
                          if nic.is_configured() else "Unconfigured")

            fields = self.__build_fields(nic, is_cfg, has_managed_ifnames(),
                                         system.has_systemd())

            description = " ".join(fields)

            node_nics.append((name, description))
        return node_nics