コード例 #1
0
    def __init__(self, parent=None, memory_array=None):
        UcsMemoryArray.__init__(self, parent=parent, memory_array=memory_array)
        UcsImcInventoryObject.__init__(self,
                                       parent=parent,
                                       ucs_sdk_object=memory_array)

        self.capacity_max = None
        max_ram_capacity = {
            # C200 M2
            "UCSC-BSE-SFF-C200": 196608,
            "R200-1120402W": 196608,
            # C210 M2
            "R210-2121605W": 196608,
            # C250 M2
            "R250-2480805W": 393216,
            # C260 M2
            "C260-BASE-2646": 1048576,
            # C460 M2
            "UCSC-BASE-M2-C460": 2097152,
            # C22 M3
            "UCSC-C22-M3S": 393216,
            "UCSC-C22-M3L": 393216,
            # C24 M3
            "UCSC-C24-M3S": 393216,
            "UCSC-C24-M3S2": 393216,
            "UCSC-C24-M3L": 393216,
            # C220 M3
            "UCSC-C220-M3S": 524288,
            "UCSC-C220-M3L": 524288,
            # C240 M3
            "UCSC-C240-M3S": 786432,
            "UCSC-C240-M3S2": 786432,
            "UCSC-C240-M3L": 786432,
            # C420 M3
            "UCSC-C420-M3": 1572864,
            # C220 M4
            "UCSC-C220-M4S": 1572864,
            "UCSC-C220-M4L": 1572864,
            # C240 M4
            "UCSC-C240-M4S": 1572864,
            "UCSC-C240-M4S2": 1572864,
            "UCSC-C240-M4SX": 1572864,
            "UCSC-C240-M4L": 1572864,
            # C460 M4
            "UCSC-C460-M4": 6291456,
            # C220 M5
            "UCSC-C220-M5SX": 3145728,
            "UCSC-C220-M5SN": 3145728,
            # C240 M5
            "UCSC-C240-M5S": 3145728,
            "UCSC-C240-M5SX": 3145728,
            "UCSC-C240-M5SN": 3145728,
            "UCSC-C240-M5L": 3145728,
            # C480 M5
            "UCSC-C480-M5": 6291456
        }
        if hasattr(self._parent, "model"):
            if self._parent.model in max_ram_capacity:
                self.capacity_max = max_ram_capacity[self._parent.model]
コード例 #2
0
    def __init__(self, parent=None, equipment_tpm=None):
        UcsTpm.__init__(self, parent=parent, equipment_tpm=equipment_tpm)

        self.version = self.get_attribute(ucs_sdk_object=equipment_tpm,
                                          attribute_name="version")

        UcsImcInventoryObject.__init__(self,
                                       parent=parent,
                                       ucs_sdk_object=equipment_tpm)
コード例 #3
0
    def __init__(self, parent=None, adaptor_connector_info=None):
        UcsTransceiver.__init__(self,
                                parent=parent,
                                transceiver=adaptor_connector_info)

        self.model = self.get_attribute(ucs_sdk_object=adaptor_connector_info,
                                        attribute_name="part_number",
                                        attribute_secondary_name="model")
        self.revision = self.get_attribute(
            ucs_sdk_object=adaptor_connector_info,
            attribute_name="part_revision",
            attribute_secondary_name="revision")

        UcsImcInventoryObject.__init__(self,
                                       parent=parent,
                                       ucs_sdk_object=adaptor_connector_info)
コード例 #4
0
    def __init__(self, parent=None, equipment_chassis=None):
        UcsChassis.__init__(self,
                            parent=parent,
                            equipment_chassis=equipment_chassis)
        UcsImcInventoryObject.__init__(self,
                                       parent=parent,
                                       ucs_sdk_object=equipment_chassis)

        self.name = self.get_attribute(ucs_sdk_object=equipment_chassis,
                                       attribute_name="name")

        # Since we don't have a catalog item for finding the SKU, we set it manually here
        self.sku = self.model
        if self.sku == "UCSS-S3260-BASE":
            self.sku = "UCSS-S3260"

        self.locator_led_status = None
        self.short_name = None

        self.server_nodes = self._get_server_nodes()
        self.storage_enclosures = self._get_storage_enclosures()
        self.slots_max = self._get_chassis_slots_max()
        self.slots_populated = self._calculate_chassis_slots_populated()
        self.slots_free_half = self._calculate_chassis_slots_free_half()
        self.slots_free_full = self._calculate_chassis_slots_free_full()

        if self._inventory.load_from == "live":
            self.locator_led_status = self._determine_locator_led_status()
            self.short_name = self._get_model_short_name()
        elif self._inventory.load_from == "file":
            for attribute in ["locator_led_status", "short_name"]:
                setattr(self, attribute, None)
                if attribute in equipment_chassis:
                    setattr(
                        self, attribute,
                        self.get_attribute(ucs_sdk_object=equipment_chassis,
                                           attribute_name=attribute))