Beispiel #1
0
    def __init__(self, parent=None, equipment_psu=None):
        GenericUcsInventoryObject.__init__(self, parent=parent, ucs_sdk_object=equipment_psu)

        self.id = self.get_attribute(ucs_sdk_object=equipment_psu, attribute_name="id")
        self.model = self.get_attribute(ucs_sdk_object=equipment_psu, attribute_name="model")
        self.serial = self.get_attribute(ucs_sdk_object=equipment_psu, attribute_name="serial")
        self.vendor = self.get_attribute(ucs_sdk_object=equipment_psu, attribute_name="vendor")
Beispiel #2
0
    def __init__(self, parent=None, memory_unit=None):
        GenericUcsInventoryObject.__init__(self,
                                           parent=parent,
                                           ucs_sdk_object=memory_unit)

        self.capacity = self.get_attribute(ucs_sdk_object=memory_unit,
                                           attribute_name="capacity",
                                           attribute_type="int")
        self.clock = self.get_attribute(ucs_sdk_object=memory_unit,
                                        attribute_name="clock",
                                        attribute_type="int")
        self.form_factor = self.get_attribute(ucs_sdk_object=memory_unit,
                                              attribute_name="form_factor")
        self.id = self.get_attribute(ucs_sdk_object=memory_unit,
                                     attribute_name="id")
        self.location = self.get_attribute(ucs_sdk_object=memory_unit,
                                           attribute_name="location")
        self.model = self.get_attribute(ucs_sdk_object=memory_unit,
                                        attribute_name="model")
        self.serial = self.get_attribute(ucs_sdk_object=memory_unit,
                                         attribute_name="serial")
        self.type = self.get_attribute(ucs_sdk_object=memory_unit,
                                       attribute_name="type")
        self.vendor = self.get_attribute(ucs_sdk_object=memory_unit,
                                         attribute_name="vendor")
        self.width = self.get_attribute(ucs_sdk_object=memory_unit,
                                        attribute_name="width",
                                        attribute_type="int")
Beispiel #3
0
    def __init__(self, parent=None, compute_system=None):
        GenericUcsInventoryObject.__init__(self,
                                           parent=parent,
                                           ucs_sdk_object=compute_system)

        self.id = self.get_attribute(ucs_sdk_object=compute_system,
                                     attribute_name="id")
Beispiel #4
0
    def __init__(self, parent=None, transceiver=None):
        GenericUcsInventoryObject.__init__(self,
                                           parent=parent,
                                           ucs_sdk_object=transceiver)

        self.type = self.get_attribute(ucs_sdk_object=transceiver,
                                       attribute_name="type")
        self.vendor = self.get_attribute(ucs_sdk_object=transceiver,
                                         attribute_name="vendor")
Beispiel #5
0
    def __init__(self, parent=None, adaptor_unit=None):
        GenericUcsInventoryObject.__init__(self,
                                           parent=parent,
                                           ucs_sdk_object=adaptor_unit)

        self.model = self.get_attribute(ucs_sdk_object=adaptor_unit,
                                        attribute_name="model")

        self.ports = self._get_ports()
Beispiel #6
0
    def __init__(self, parent=None, equipment_chassis=None):
        GenericUcsInventoryObject.__init__(self, parent=parent, ucs_sdk_object=equipment_chassis)

        self.model = self.get_attribute(ucs_sdk_object=equipment_chassis, attribute_name="model")
        self.serial = self.get_attribute(ucs_sdk_object=equipment_chassis, attribute_name="serial")
        self.user_label = self.get_attribute(ucs_sdk_object=equipment_chassis, attribute_name="usr_lbl",
                                             attribute_secondary_name="user_label")

        self.power_supplies = self._get_power_supplies()
        self.system_io_controllers = self._get_system_io_controllers()
Beispiel #7
0
    def __init__(self, parent=None, equipment_rack_enclosure=None):
        GenericUcsInventoryObject.__init__(
            self, parent=parent, ucs_sdk_object=equipment_rack_enclosure)

        self.model = self.get_attribute(
            ucs_sdk_object=equipment_rack_enclosure, attribute_name="model")
        self.serial = self.get_attribute(
            ucs_sdk_object=equipment_rack_enclosure, attribute_name="serial")

        self.power_supplies = self._get_power_supplies()
        self.server_nodes = self._get_server_nodes()
Beispiel #8
0
    def __init__(self, parent=None, equipment_io_card=None):
        GenericUcsInventoryObject.__init__(self, parent=parent, ucs_sdk_object=equipment_io_card)

        self.chassis_id = self.get_attribute(ucs_sdk_object=equipment_io_card, attribute_name="chassis_id")
        self.id = self.get_attribute(ucs_sdk_object=equipment_io_card, attribute_name="id")
        self.model = self.get_attribute(ucs_sdk_object=equipment_io_card, attribute_name="model")
        self.revision = self.get_attribute(ucs_sdk_object=equipment_io_card, attribute_name="revision")
        self.serial = self.get_attribute(ucs_sdk_object=equipment_io_card, attribute_name="serial")
        self.vendor = self.get_attribute(ucs_sdk_object=equipment_io_card, attribute_name="vendor")

        self.ports = self._get_ports()
Beispiel #9
0
    def __init__(self, parent=None, mgmt_if=None):
        GenericUcsInventoryObject.__init__(self,
                                           parent=parent,
                                           ucs_sdk_object=mgmt_if)

        self.default_gw = self.get_attribute(
            ucs_sdk_object=mgmt_if,
            attribute_name="ext_gw",
            attribute_secondary_name="default_gw")
        self.id = self.get_attribute(ucs_sdk_object=mgmt_if,
                                     attribute_name="id")
        self.ip = self.get_attribute(ucs_sdk_object=mgmt_if,
                                     attribute_name="ext_ip",
                                     attribute_secondary_name="ip")
        self.mac = self.get_attribute(ucs_sdk_object=mgmt_if,
                                      attribute_name="mac")
        self.mask = self.get_attribute(ucs_sdk_object=mgmt_if,
                                       attribute_name="ext_mask",
                                       attribute_secondary_name="mask")
Beispiel #10
0
    def __init__(self, parent=None, equipment_tpm=None):
        GenericUcsInventoryObject.__init__(self,
                                           parent=parent,
                                           ucs_sdk_object=equipment_tpm)

        self.active_status = self.get_attribute(ucs_sdk_object=equipment_tpm,
                                                attribute_name="active_status")
        self.enabled_status = self.get_attribute(
            ucs_sdk_object=equipment_tpm, attribute_name="enabled_status")
        self.model = self.get_attribute(ucs_sdk_object=equipment_tpm,
                                        attribute_name="model")
        self.ownership = self.get_attribute(ucs_sdk_object=equipment_tpm,
                                            attribute_name="ownership")
        self.serial = self.get_attribute(ucs_sdk_object=equipment_tpm,
                                         attribute_name="serial")
        self.tpm_revision = self.get_attribute(ucs_sdk_object=equipment_tpm,
                                               attribute_name="tpm_revision")
        self.vendor = self.get_attribute(ucs_sdk_object=equipment_tpm,
                                         attribute_name="vendor")
Beispiel #11
0
    def __init__(self, parent=None, network_element=None):
        GenericUcsInventoryObject.__init__(self,
                                           parent=parent,
                                           ucs_sdk_object=network_element)

        self.id = self.get_attribute(ucs_sdk_object=network_element,
                                     attribute_name="id")
        self.model = self.get_attribute(ucs_sdk_object=network_element,
                                        attribute_name="model")
        self.revision = self.get_attribute(ucs_sdk_object=network_element,
                                           attribute_name="revision")
        self.serial = self.get_attribute(ucs_sdk_object=network_element,
                                         attribute_name="serial")
        self.vendor = self.get_attribute(ucs_sdk_object=network_element,
                                         attribute_name="vendor")

        self.expansion_modules = self._get_expansion_modules()
        self.ports = self._get_ports()
        self.power_supplies = self._get_power_supplies()
Beispiel #12
0
    def __init__(self, parent=None, compute_blade=None):
        GenericUcsInventoryObject.__init__(self, parent=parent, ucs_sdk_object=compute_blade)

        self.model = self.get_attribute(ucs_sdk_object=compute_blade, attribute_name="model")
        self.revision = self.get_attribute(ucs_sdk_object=compute_blade, attribute_name="revision")
        self.serial = self.get_attribute(ucs_sdk_object=compute_blade, attribute_name="serial")
        self.slot_id = self.get_attribute(ucs_sdk_object=compute_blade, attribute_name="slot_id")
        self.user_label = self.get_attribute(ucs_sdk_object=compute_blade, attribute_name="usr_lbl",
                                             attribute_secondary_name="user_label")
        self.vendor = self.get_attribute(ucs_sdk_object=compute_blade, attribute_name="vendor")

        self.adaptors = self._get_adaptors()
        self.cpus = self._get_cpus()
        self.gpus = self._get_gpus()
        self.memory_arrays = self._get_memory_arrays()
        self.mgmt_interfaces = self._get_mgmt_interfaces()
        self.nvme_drives = self._get_nvme_drives()
        self.storage_controllers = self._get_storage_controllers()
        self.storage_flexflash_controllers = self._get_storage_flexflash_controllers()
        self.tpms = self._get_tpms()
Beispiel #13
0
    def __init__(self, parent=None, equipment_fex=None):
        GenericUcsInventoryObject.__init__(self,
                                           parent=parent,
                                           ucs_sdk_object=equipment_fex)

        self.id = self.get_attribute(ucs_sdk_object=equipment_fex,
                                     attribute_name="id")
        self.model = self.get_attribute(ucs_sdk_object=equipment_fex,
                                        attribute_name="model")
        self.revision = self.get_attribute(ucs_sdk_object=equipment_fex,
                                           attribute_name="revision")
        self.serial = self.get_attribute(ucs_sdk_object=equipment_fex,
                                         attribute_name="serial")
        self.switch_id = self.get_attribute(ucs_sdk_object=equipment_fex,
                                            attribute_name="switch_id")
        self.vendor = self.get_attribute(ucs_sdk_object=equipment_fex,
                                         attribute_name="vendor")

        self.fabric_ports = self._get_fabric_ports()
        self.host_ports = self._get_host_ports()
        self.power_supplies = self._get_power_supplies()
Beispiel #14
0
    def __init__(self, parent=None, compute_server_node=None):
        GenericUcsInventoryObject.__init__(self,
                                           parent=parent,
                                           ucs_sdk_object=compute_server_node)

        self.id = self.get_attribute(ucs_sdk_object=compute_server_node,
                                     attribute_name="server_id",
                                     attribute_secondary_name="id")
        self.model = self.get_attribute(ucs_sdk_object=compute_server_node,
                                        attribute_name="model")
        self.serial = self.get_attribute(ucs_sdk_object=compute_server_node,
                                         attribute_name="serial")
        self.vendor = self.get_attribute(ucs_sdk_object=compute_server_node,
                                         attribute_name="vendor")

        self.cpus = self._get_cpus()
        self.gpus = self._get_gpus()
        self.memory_arrays = self._get_memory_arrays()
        self.mgmt_interfaces = self._get_mgmt_interfaces()
        self.storage_flexflash_controllers = self._get_storage_flexflash_controllers(
        )
        self.tpms = self._get_tpms()
Beispiel #15
0
    def __init__(self, parent=None, memory_array=None):
        GenericUcsInventoryObject.__init__(self,
                                           parent=parent,
                                           ucs_sdk_object=memory_array)

        self.capacity_current = self.get_attribute(
            ucs_sdk_object=memory_array,
            attribute_name="curr_capacity",
            attribute_secondary_name="capacity_current",
            attribute_type="int")
        self.id = self.get_attribute(ucs_sdk_object=memory_array,
                                     attribute_name="id")
        self.slots_max = self.get_attribute(
            ucs_sdk_object=memory_array,
            attribute_name="max_devices",
            attribute_secondary_name="slots_max",
            attribute_type="int")
        self.slots_populated = self.get_attribute(
            ucs_sdk_object=memory_array,
            attribute_name="populated",
            attribute_secondary_name="slots_populated",
            attribute_type="int")

        self.memory_units = self._get_memory_units()
Beispiel #16
0
    def __init__(self, parent=None, equipment_system_io_controller=None):
        GenericUcsInventoryObject.__init__(self, parent=parent, ucs_sdk_object=equipment_system_io_controller)

        self.id = self.get_attribute(ucs_sdk_object=equipment_system_io_controller, attribute_name="id")

        self.ports = self._get_ports()
Beispiel #17
0
    def __init__(self, parent=None, compute_rack_unit=None):
        GenericUcsInventoryObject.__init__(self,
                                           parent=parent,
                                           ucs_sdk_object=compute_rack_unit)

        self.id = self.get_attribute(ucs_sdk_object=compute_rack_unit,
                                     attribute_name="server_id",
                                     attribute_secondary_name="id")
        self.memory_available = self.get_attribute(
            ucs_sdk_object=compute_rack_unit,
            attribute_name="available_memory",
            attribute_secondary_name="memory_available",
            attribute_type="int")
        self.memory_speed = self.get_attribute(
            ucs_sdk_object=compute_rack_unit,
            attribute_name="memory_speed",
            attribute_type="int")
        self.memory_total = self.get_attribute(
            ucs_sdk_object=compute_rack_unit,
            attribute_name="total_memory",
            attribute_secondary_name="memory_total",
            attribute_type="int")
        self.model = self.get_attribute(ucs_sdk_object=compute_rack_unit,
                                        attribute_name="model")
        self.serial = self.get_attribute(ucs_sdk_object=compute_rack_unit,
                                         attribute_name="serial")
        self.slot_id = self.get_attribute(ucs_sdk_object=compute_rack_unit,
                                          attribute_name="slot_id")
        self.user_label = self.get_attribute(
            ucs_sdk_object=compute_rack_unit,
            attribute_name="usr_lbl",
            attribute_secondary_name="user_label")
        self.vendor = self.get_attribute(ucs_sdk_object=compute_rack_unit,
                                         attribute_name="vendor")

        # Adding a human-readable attribute for memory capacity
        self.memory_total_marketing = None
        if self.memory_total:
            if self.memory_total / 1024 < 1024:
                memory_total_gb = str(self.memory_total / 1024)
                memory_total_gb = memory_total_gb.rstrip('0').rstrip(
                    '.') if '.' in memory_total_gb else memory_total_gb
                self.memory_total_marketing = memory_total_gb + " GB"
            else:
                memory_total_tb = str(self.memory_total / 1048576)
                memory_total_tb = memory_total_tb.rstrip('0').rstrip(
                    '.') if '.' in memory_total_tb else memory_total_tb
                self.memory_total_marketing = memory_total_tb + " TB"

        self.adaptors = self._get_adaptors()
        self.cpus = self._get_cpus()
        self.gpus = self._get_gpus()
        self.memory_arrays = self._get_memory_arrays()
        self.mgmt_interfaces = self._get_mgmt_interfaces()
        self.nvme_drives = self._get_nvme_drives()
        if self.slot_id in [
                None, "0"
        ]:  # We only get power supplies for rack servers that are not part of an enclosure
            self.power_supplies = self._get_power_supplies()
        self.storage_controllers = self._get_storage_controllers()
        self.storage_flexflash_controllers = self._get_storage_flexflash_controllers(
        )
        self.tpms = self._get_tpms()
Beispiel #18
0
    def __init__(self, parent=None, processor_unit=None):
        GenericUcsInventoryObject.__init__(self,
                                           parent=parent,
                                           ucs_sdk_object=processor_unit)

        self.arch = self.get_attribute(ucs_sdk_object=processor_unit,
                                       attribute_name="arch")
        self.cores = self.get_attribute(ucs_sdk_object=processor_unit,
                                        attribute_name="cores",
                                        attribute_type="int")
        self.cores_enabled = self.get_attribute(ucs_sdk_object=processor_unit,
                                                attribute_name="cores_enabled",
                                                attribute_type="int")
        self.id = self.get_attribute(ucs_sdk_object=processor_unit,
                                     attribute_name="id")
        self.model = self.get_attribute(ucs_sdk_object=processor_unit,
                                        attribute_name="model")
        self.speed = self.get_attribute(ucs_sdk_object=processor_unit,
                                        attribute_name="speed")
        self.threads = self.get_attribute(ucs_sdk_object=processor_unit,
                                          attribute_name="threads",
                                          attribute_type="int")
        self.vendor = self.get_attribute(ucs_sdk_object=processor_unit,
                                         attribute_name="vendor")

        self.model_short_name = None
        if self.model is not None:
            if "AMD EPYC" in self.model:
                # We have an AMD processor. Getting its model short name
                regex_amd = r"EPYC (\d*)"
                res_amd = re.search(regex_amd, self.model)
                if res_amd is not None:
                    self.model_short_name = res_amd.group(1)
                self.family_name = "AMD EPYC E7 Series processors"

            else:
                # We have an Intel processor. Getting its model short name
                regex = r"CPU *([EX].*\d) *@"
                res = re.search(regex, self.model)
                if res is not None:
                    self.model_short_name = res.group(1)
                    # Remove trailing 0 for E5-2XXX processors models
                    if self.model_short_name.endswith(" 0"):
                        self.model_short_name = self.model_short_name[:-2]
                    # Fix catalog issue for E7-8867L processor model
                    if self.model_short_name == "E7-L8867":
                        self.model_short_name = "E7-8867L"
                    # Remove extra space for E7-XXXX processors models
                    if "- " in self.model_short_name:
                        self.model_short_name = self.model_short_name.replace(
                            "- ", "-")
                        if self.model_short_name[:5] == "E7-28":
                            self.family_name = "Intel Xeon E7-2800 Series processors"
                        elif self.model_short_name[:5] == "E7-48":
                            self.family_name = "Intel Xeon E7-4800 Series processors"
                        elif self.model_short_name[:5] == "E7-88":
                            self.family_name = "Intel Xeon E7-8800 Series processors"
                else:
                    # We might have an M5 Intel CPU
                    regex2 = r"Xeon\(R\) .* (\d*\w?) CPU"
                    res2 = re.search(regex2, self.model)
                    if res2 is not None:
                        self.model_short_name = res2.group(1)
                        if self.model_short_name[1:2] == "1":
                            self.family_name = "Intel Xeon Processor Scalable Family"
                        elif self.model_short_name[1:2] == "2":
                            self.family_name = "2nd Gen Intel Xeon Processor Scalable Family"

                if self.model_short_name is not None:
                    if self.model_short_name[:5] == "E5-24":
                        if self.model_short_name[-2:] == "v2":
                            self.family_name = "Intel Xeon E5-2400 v2 Series processors"
                        else:
                            self.family_name = "Intel Xeon E5-2400 Series processors"
                    elif self.model_short_name[:5] == "E5-26":
                        if self.model_short_name[-2:] == "v2":
                            self.family_name = "Intel Xeon E5-2600 v2 Series processors"
                        elif self.model_short_name[-2:] == "v3":
                            self.family_name = "Intel Xeon E5-2600 v3 Series processors"
                        elif self.model_short_name[-2:] == "v4":
                            self.family_name = "Intel Xeon E5-2600 v4 Series processors"
                        else:
                            self.family_name = "Intel Xeon E5-2600 Series processors"
                    elif self.model_short_name[:5] == "E5-46":
                        if self.model_short_name[-2:] == "v2":
                            self.family_name = "Intel Xeon E5-4600 v2 Series processors"
                        elif self.model_short_name[-2:] == "v3":
                            self.family_name = "Intel Xeon E5-4600 v3 Series processors"
                        elif self.model_short_name[-2:] == "v4":
                            self.family_name = "Intel Xeon E5-4600 v4 Series processors"
                        else:
                            self.family_name = "Intel Xeon E5-4600 Series processors"
                    elif self.model_short_name[:5] == "E7-28":
                        if self.model_short_name[-2:] == "v2":
                            self.family_name = "Intel Xeon E7-2800 v2 Series processors"
                        else:
                            self.family_name = "Intel Xeon E7-2800 Series processors"
                    elif self.model_short_name[:5] == "E7-48":
                        if self.model_short_name[-2:] == "v2":
                            self.family_name = "Intel Xeon E7-4800 v2 Series processors"
                        elif self.model_short_name[-2:] == "v3":
                            self.family_name = "Intel Xeon E7-4800 v3 Series processors"
                        elif self.model_short_name[-2:] == "v4":
                            self.family_name = "Intel Xeon E7-4800 v4 Series processors"
                        else:
                            self.family_name = "Intel Xeon E7-4800 Series processors"
                    elif self.model_short_name[:5] == "E7-88":
                        if self.model_short_name[-2:] == "v2":
                            self.family_name = "Intel Xeon E7-8800 v2 Series processors"
                        elif self.model_short_name[-2:] == "v3":
                            self.family_name = "Intel Xeon E7-8800 v3 Series processors"
                        elif self.model_short_name[-2:] == "v4":
                            self.family_name = "Intel Xeon E7-8800 v4 Series processors"
                        else:
                            self.family_name = "Intel Xeon E7-8800 Series processors"
                    elif len(self.model_short_name) == 5:
                        if self.model_short_name[1:3] == "55":
                            self.family_name = "Intel Xeon 5500 Series processors"
                        elif self.model_short_name[1:3] == "56":
                            self.family_name = "Intel Xeon 5600 Series processors"
                        elif self.model_short_name[1:3] == "65":
                            self.family_name = "Intel Xeon 6500 Series processors"
                        elif self.model_short_name[1:3] == "75":
                            self.family_name = "Intel Xeon 7500 Series processors"
Beispiel #19
0
    def __init__(self, parent=None, port=None):
        GenericUcsInventoryObject.__init__(self, parent=parent, ucs_sdk_object=port)

        self.transport = None

        self.transceivers = self._get_transceivers()
Beispiel #20
0
    def __init__(self, parent=None, graphics_card=None):
        GenericUcsInventoryObject.__init__(self, parent=parent, ucs_sdk_object=graphics_card)

        self.id = self.get_attribute(ucs_sdk_object=graphics_card, attribute_name="id")
        self.model = self.get_attribute(ucs_sdk_object=graphics_card, attribute_name="model")
        self.vendor = self.get_attribute(ucs_sdk_object=graphics_card, attribute_name="vendor")