コード例 #1
0
    def get_data(cls, data, context=None):
        data = cls.prepare_data(data)
        psme_manager = ManagersList.get_manager(ManagersTypes.PSME_MANAGER)
        compute_module_manager = ManagersList.get_manager(ManagersTypes.MANAGER_BLADE_MANAGER)

        manager_drawer = ManagerDrawer()
        manager_drawer.manager = compute_module_manager.get_data(data, context=cls.my_context())

        manager_drawer = cls.set_fields(manager_drawer, data, context=context)

        return manager_drawer
コード例 #2
0
ファイル: psme_manager.py プロジェクト: iamyaw/intelRSD
    def get_data(cls, data, context=None):
        data = cls.prepare_data(data)
        network_service_manager = ManagersList.get_manager(ManagersTypes.NETWORK_SERVICE_MANAGER)
        serial_console_manager = ManagersList.get_manager(ManagersTypes.SERIAL_CONSOLE_MANAGER)

        psme = Psme()

        psme.networkService = network_service_manager.get_data(data, context=cls.my_context())
        psme.serialConsole = serial_console_manager.get_data(data, context=cls.my_context())

        psme = cls.set_fields(psme, data, context=context)

        return psme
コード例 #3
0
    def get_data(cls, data, context=None):
        data = cls.prepare_data(data)
        psme_manager = ManagersList.get_manager(ManagersTypes.PSME_MANAGER)
        compute_module_manager = ManagersList.get_manager(ManagersTypes.MANAGER_BLADE_MANAGER)

        manager_drawer = ManagerDrawer()
        manager_drawer.manager = compute_module_manager.get_data(data, context=cls.my_context())

        manager_drawer = cls.set_fields(manager_drawer, data, context=context)

        cls.move_drives_to_chassis(manager_drawer)

        return manager_drawer
コード例 #4
0
    def get_data(cls, data, context=None):
        data = cls.prepare_data(data)
        network_service_manager = ManagersList.get_manager(ManagersTypes.NETWORK_SERVICE_MANAGER)
        serial_console_manager = ManagersList.get_manager(ManagersTypes.SERIAL_CONSOLE_MANAGER)

        psme = Psme()

        psme.networkService = network_service_manager.get_data(data, context=cls.my_context())
        psme.serialConsole = serial_console_manager.get_data(data, context=cls.my_context())

        psme = cls.set_fields(psme, data, context=context)

        return psme
コード例 #5
0
ファイル: bmc_manager.py プロジェクト: iamyaw/intelRSD
    def get_data(cls, data, context=None):
        data = cls.prepare_data(data)
        bmc = Bmc()

        status_manager = ManagersList.get_manager(ManagersTypes.STATUS_MANAGER)
        network_service_manager = ManagersList.get_manager(ManagersTypes.NETWORK_SERVICE_MANAGER)
        serial_console_manager = ManagersList.get_manager(ManagersTypes.SERIAL_CONSOLE_MANAGER)

        bmc.status = status_manager.get_data(data, context=cls.my_context())
        bmc.networkService = network_service_manager.get_data(data, context=cls.my_context())
        bmc.serialConsole = serial_console_manager.get_data(data, context=cls.my_context())

        bmc = cls.set_fields(bmc, data, context=context)

        return bmc
コード例 #6
0
    def get_data(cls, data, context=None):
        data = cls.prepare_data(data)
        bmc = Bmc()

        status_manager = ManagersList.get_manager(ManagersTypes.STATUS_MANAGER)
        network_service_manager = ManagersList.get_manager(
            ManagersTypes.NETWORK_SERVICE_MANAGER)
        serial_console_manager = ManagersList.get_manager(
            ManagersTypes.SERIAL_CONSOLE_MANAGER)

        bmc.status = status_manager.get_data(data, context=cls.my_context())
        bmc.networkService = network_service_manager.get_data(
            data, context=cls.my_context())
        bmc.serialConsole = serial_console_manager.get_data(
            data, context=cls.my_context())

        bmc = cls.set_fields(bmc, data, context=context)

        return bmc
コード例 #7
0
    def get_data(cls, data, context=None):
        data = cls.prepare_data(data)
        compute_system = ManagersList.get_manager(ManagersTypes.COMPUTE_SYSTEM_MANAGER)

        manager_blade = ManagerBlade()

        manager_blade.ComputeSystem = compute_system.get_data(data, context=cls.my_context())

        manager_blade = cls.set_fields(manager_blade, data, context=context)

        return manager_blade
コード例 #8
0
    def get_data(cls, data, context=None):
        raw_data = cls.prepare_data(data)
        compute_system = ComputeSystem()

        try:
            data = raw_data[XML_LIST][XML_NODE][XML_NODE]
            if not isinstance(data, list):
                data = [data]
            for data_part in data:
                if data_part[XML_AT_ID] == LSHW_CORE:
                    data_node = data_part[XML_NODE]
                    break
        except KeyError as e:
            return compute_system

        fru_blade = data_part

        processor_manager = ManagersList.get_manager(
            ManagersTypes.PROCESSOR_MANAGER)
        memory_manager = ManagersList.get_manager(ManagersTypes.MEMORY_MANAGER)
        storage_controller_manager = ManagersList.get_manager(
            ManagersTypes.STORAGE_CONTROLLER_MANAGER)
        network_interface_manager = ManagersList.get_manager(
            ManagersTypes.NETWORK_INTERFACE_MANAGER)
        fru_info_manager = ManagersList.get_manager(
            ManagersTypes.FRU_INFO_MANAGER)
        usb_device_manager = ManagersList.get_manager(
            ManagersTypes.USB_DEVICE_MANAGER)
        pci_device_manager = ManagersList.get_manager(
            ManagersTypes.PCI_DEVICE_MANAGER)

        compute_system = ComputeSystem()

        compute_system.processor = processor_manager.get_data(
            data_node, context=cls.my_context())
        compute_system.memory = memory_manager.get_data(
            data_node, context=cls.my_context())
        storage_subsystem = StorageSubsystem()
        storage_subsystem.storageController = storage_controller_manager.get_data(
            data_node, context=cls.my_context())
        compute_system.storageSubsystem = storage_subsystem
        compute_system.networkInterface = network_interface_manager.get_data(
            data_node, context=cls.my_context())
        compute_system.usbDevice = usb_device_manager.get_data(
            data_node, context=cls.my_context())
        compute_system.pciDevice = pci_device_manager.get_data(
            data_node, context=cls.my_context())

        compute_system = cls.set_fields(compute_system,
                                        data_node,
                                        context=context)
        compute_system.fruInfo = fru_info_manager.get_data(
            fru_blade, context=cls.my_context())

        return compute_system
コード例 #9
0
    def get_data(cls, data, context=None):
        data = cls.prepare_data(data)
        ret = []
        drive_manager = ManagersList.get_manager(ManagersTypes.DRIVE_MANAGER)
        data = cls.split_data(data)
        for data_block in data:
            storage_controller = StorageController()
            storage_controller.drive = drive_manager.get_data(data_block, context=cls.my_context())

            storage_controller = cls.set_fields(storage_controller, data_block, context=context)

            ret.append(storage_controller)

        return ret
コード例 #10
0
    def get_data(cls, data, context=None):
        data = cls.prepare_data(data)

        ret = []
        fru_info_manager = ManagersList.get_manager(ManagersTypes.FRU_INFO_MANAGER)

        data = cls.split_data(data)
        for data_block in data:
            drive = Drive()
            drive = cls.set_fields(drive, data_block, context=context)
            if not drive:
                continue
            drive.fruInfo = fru_info_manager.get_data(data_block, context=cls.my_context())
            ret.append(drive)

        return ret
コード例 #11
0
    def get_data(cls, data, context=None):
        data = cls.prepare_data(data)
        ret = []

        cpu_id_manager = ManagersList.get_manager(ManagersTypes.CPU_ID_MANAGER)

        data = cls.split_data(data)
        for data_block in data:
            processor = Processor()
            processor.cpuid = cpu_id_manager.get_data(data_block, context=cls.my_context())

            processor = cls.set_fields(processor, data_block, context=context)

            ret.append(processor)

        return ret
コード例 #12
0
ファイル: dimm_manager.py プロジェクト: iamyaw/intelRSD
    def get_data(cls, data, context=None):
        data = cls.prepare_data(data)
        ret = []
        fru_info_manager = ManagersList.get_manager(ManagersTypes.FRU_INFO_MANAGER)

        data = cls.split_data(data)
        for data_block in data:
            dimm = Dimm()

            dimm.fruInfo = fru_info_manager.get_data(data_block, context=cls.my_context())

            dimm = cls.set_fields(dimm, data_block, context=context)

            ret.append(dimm)

        return ret
コード例 #13
0
    def get_data(cls, data, context=None):
        data = cls.prepare_data(data)
        ret = []
        drive_manager = ManagersList.get_manager(ManagersTypes.DRIVE_MANAGER)
        data = cls.split_data(data)
        for data_block in data:
            storage_controller = StorageController()
            storage_controller.drive = drive_manager.get_data(
                data_block, context=cls.my_context())

            storage_controller = cls.set_fields(storage_controller,
                                                data_block,
                                                context=context)

            ret.append(storage_controller)

        return ret
コード例 #14
0
    def get_data(cls, data, context=None):
        data = cls.prepare_data(data)
        ret = []
        fru_info_manager = ManagersList.get_manager(
            ManagersTypes.FRU_INFO_MANAGER)

        data = cls.split_data(data)
        for data_block in data:
            memory = Memory()

            memory.fruInfo = fru_info_manager.get_data(
                data_block, context=cls.my_context())

            memory = cls.set_fields(memory, data_block, context=context)

            ret.append(memory)

        return ret
コード例 #15
0
    def get_data(cls, data, context=None):
        data = cls.prepare_data(data)
        ret = []
        fru_info_manager = ManagersList.get_manager(
            ManagersTypes.FRU_INFO_MANAGER)

        data = cls.split_data(data)
        for data_block in data:
            dimm = Dimm()

            dimm.fruInfo = fru_info_manager.get_data(data_block,
                                                     context=cls.my_context())

            dimm = cls.set_fields(dimm, data_block, context=context)

            ret.append(dimm)

        return ret
コード例 #16
0
    def get_data(cls, data, context=None):
        raw_data = cls.prepare_data(data)
        compute_system = ComputeSystem()

        try:
            data = raw_data[XML_LIST][XML_NODE][XML_NODE]
            if not isinstance(data, list):
                data = [data]
            for data_part in data:
                if data_part[XML_AT_ID] == LSHW_CORE:
                    data_node = data_part[XML_NODE]
                    break
        except KeyError as e:
            return compute_system

        fru_blade = raw_data[XML_LIST][XML_NODE]

        processor_manager = ManagersList.get_manager(ManagersTypes.PROCESSOR_MANAGER)
        dimm_manager = ManagersList.get_manager(ManagersTypes.DIMM_MANAGER)
        storage_controller_manager = ManagersList.get_manager(ManagersTypes.STORAGE_CONTROLLER_MANAGER)
        network_interface_manager = ManagersList.get_manager(ManagersTypes.NETWORK_INTERFACE_MANAGER)
        fru_info_manager = ManagersList.get_manager(ManagersTypes.FRU_INFO_MANAGER)
        usb_device_manager = ManagersList.get_manager(ManagersTypes.USB_DEVICE_MANAGER)
        pci_device_manager = ManagersList.get_manager(ManagersTypes.PCI_DEVICE_MANAGER)

        compute_system = ComputeSystem()

        compute_system.processor = processor_manager.get_data(data_node, context=cls.my_context())
        compute_system.dimm = dimm_manager.get_data(data_node, context=cls.my_context())
        compute_system.storageController = storage_controller_manager.get_data(data_node, context=cls.my_context())
        compute_system.networkInterface = network_interface_manager.get_data(data_node, context=cls.my_context())
        compute_system.usbDevice = usb_device_manager.get_data(data_node, context=cls.my_context())
        compute_system.pciDevice = pci_device_manager.get_data(data_node, context=cls.my_context())

        compute_system = cls.set_fields(compute_system, data_node, context=context)
        compute_system.fruInfo = fru_info_manager.get_data(fru_blade, context=cls.my_context())

        return compute_system
コード例 #17
0
ファイル: initialize.py プロジェクト: iamyaw/intelRSD
def initialize():
    ManagersList.clear_managers_list()
    for manager_type, manager in ManagersMap.iteritems():
        ManagersList.add_manager(manager_type=manager_type, manager=manager)
コード例 #18
0
def initialize():
    ManagersList.clear_managers_list()
    for manager_type, manager in ManagersMap.iteritems():
        ManagersList.add_manager(manager_type=manager_type, manager=manager)