From c96bd9cdf7cce5e1ee40b7ed413b78e2c42d8517 Mon Sep 17 00:00:00 2001 From: Lin Yang Date: Wed, 11 Sep 2019 14:03:35 -0700 Subject: [PATCH] Add missing resource class in 2.3 RESOURCE_CLASS Change-Id: Ifab0202d983347cd8a47c30431ae20b502d9750f --- rsd_lib/resources/v2_3/types.py | 60 +++++++++++++++++++++++++++------ 1 file changed, 49 insertions(+), 11 deletions(-) diff --git a/rsd_lib/resources/v2_3/types.py b/rsd_lib/resources/v2_3/types.py index 62b7ecc..937965c 100644 --- a/rsd_lib/resources/v2_3/types.py +++ b/rsd_lib/resources/v2_3/types.py @@ -16,26 +16,64 @@ from copy import deepcopy from rsd_lib.resources.v2_2.types import RESOURCE_CLASS as RESOURCE_CLASS_V22 +from rsd_lib.resources.v2_3.chassis import chassis +from rsd_lib.resources.v2_3.ethernet_switch import ethernet_switch +from rsd_lib.resources.v2_3.fabric import endpoint +from rsd_lib.resources.v2_3.fabric import fabric +from rsd_lib.resources.v2_3.fabric import zone +from rsd_lib.resources.v2_3.manager import manager +from rsd_lib.resources.v2_3.node import attach_action_info +from rsd_lib.resources.v2_3.node import node from rsd_lib.resources.v2_3.storage_service import drive from rsd_lib.resources.v2_3.storage_service import drive_metrics from rsd_lib.resources.v2_3.storage_service import storage_pool +from rsd_lib.resources.v2_3.storage_service import storage_service +from rsd_lib.resources.v2_3.storage_service import volume from rsd_lib.resources.v2_3.storage_service import volume_metrics +from rsd_lib.resources.v2_3.system import ethernet_interface +from rsd_lib.resources.v2_3.system import system RESOURCE_CLASS = deepcopy(RESOURCE_CLASS_V22) RESOURCE_CLASS.update( { - 'DriveCollection': drive.DriveCollection, - 'DriveMetrics': drive_metrics.DriveMetrics, - 'StoragePool': storage_pool.StoragePool, - 'StoragePoolCollection': storage_pool.StoragePoolCollection, - 'VolumeMetrics': volume_metrics.VolumeMetrics + "ActionInfo": attach_action_info.AttachResourceActionInfo, + "Chassis": chassis.Chassis, + "ChassisCollection": chassis.ChassisCollection, + "ComposedNode": node.Node, + "ComposedNodeCollection": node.NodeCollection, + "ComputerSystem": system.System, + "ComputerSystemCollection": system.SystemCollection, + "Drive": drive.Drive, + "DriveCollection": drive.DriveCollection, + "DriveMetrics": drive_metrics.DriveMetrics, + "Endpoint": endpoint.Endpoint, + "EndpointCollection": endpoint.EndpointCollection, + "EthernetInterface": ethernet_interface.EthernetInterface, + "EthernetInterfaceCollection": + ethernet_interface.EthernetInterfaceCollection, + "EthernetSwitch": ethernet_switch.EthernetSwitch, + "EthernetSwitchCollection": ethernet_switch.EthernetSwitchCollection, + "Fabric": fabric.Fabric, + "FabricCollection": fabric.FabricCollection, + "Manager": manager.Manager, + "ManagerCollection": manager.ManagerCollection, + "StoragePool": storage_pool.StoragePool, + "StoragePoolCollection": storage_pool.StoragePoolCollection, + "StorageService": storage_service.StorageService, + "StorageServiceCollection": storage_service.StorageServiceCollection, + "Volume": volume.Volume, + "VolumeCollection": volume.VolumeCollection, + "VolumeMetrics": volume_metrics.VolumeMetrics, + "Zone": zone.Zone, + "ZoneCollection": zone.ZoneCollection, } ) for k in ( - 'LogicalDrive', - 'LogicalDriveCollection', - 'PhysicalDrive', - 'PhysicalDriveCollection', - 'RemoteTarget', - 'RemoteTargetCollection'): + "LogicalDrive", + "LogicalDriveCollection", + "PhysicalDrive", + "PhysicalDriveCollection", + "RemoteTarget", + "RemoteTargetCollection", +): RESOURCE_CLASS.pop(k)