Add missing resource class in 2.3 RESOURCE_CLASS

Change-Id: Ifab0202d983347cd8a47c30431ae20b502d9750f
This commit is contained in:
Lin Yang 2019-09-11 14:03:35 -07:00
parent 3327195d0c
commit c96bd9cdf7

View File

@ -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)