Use rsd-lib base resource class instead of sushy base class
Change-Id: I6c0414a89cf3345bee2cdee05efeda58627376f2
This commit is contained in:
parent
b2b2aeda0c
commit
03c212de0b
@ -111,7 +111,7 @@ class IdentifierCollectionField(ReferenceableMemberField):
|
||||
|
||||
class ResourceBase(base.ResourceBase):
|
||||
|
||||
identity = base.Field("Id", required=True)
|
||||
identity = base.Field("Id")
|
||||
"""The resource identity string"""
|
||||
|
||||
name = base.Field("Name")
|
||||
|
@ -13,9 +13,9 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from sushy.resources import base
|
||||
from sushy import utils
|
||||
|
||||
from rsd_lib import base as rsd_lib_base
|
||||
from rsd_lib.resources.v2_1.ethernet_switch import ethernet_switch
|
||||
from rsd_lib.resources.v2_2.ethernet_switch import ethernet_switch_metrics
|
||||
from rsd_lib.resources.v2_2.ethernet_switch import ethernet_switch_port
|
||||
@ -51,7 +51,7 @@ class EthernetSwitch(ethernet_switch.EthernetSwitch):
|
||||
)
|
||||
|
||||
|
||||
class EthernetSwitchCollection(base.ResourceCollectionBase):
|
||||
class EthernetSwitchCollection(rsd_lib_base.ResourceCollectionBase):
|
||||
@property
|
||||
def _resource_type(self):
|
||||
return EthernetSwitch
|
||||
|
@ -16,6 +16,8 @@
|
||||
from sushy.resources import base
|
||||
from sushy import utils
|
||||
|
||||
from rsd_lib import base as rsd_lib_base
|
||||
|
||||
NAME_MAPPING = {
|
||||
"Name": "name",
|
||||
"Required": "required",
|
||||
@ -24,7 +26,8 @@ NAME_MAPPING = {
|
||||
}
|
||||
|
||||
|
||||
class ActionInfo(base.ResourceBase):
|
||||
class ActionInfo(rsd_lib_base.ResourceBase):
|
||||
|
||||
oem = base.Field("Oem")
|
||||
"""The action info oem"""
|
||||
|
||||
|
@ -19,6 +19,7 @@ from rsd_lib.resources.v2_2.ethernet_switch import ethernet_switch\
|
||||
as v2_2_ethernet_switch
|
||||
from sushy.resources import base
|
||||
|
||||
from rsd_lib import base as rsd_lib_base
|
||||
from rsd_lib import utils as rsd_lib_utils
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
@ -97,7 +98,7 @@ class EthernetSwitch(v2_2_ethernet_switch.EthernetSwitch):
|
||||
"""The ethernet switch transmission selection"""
|
||||
|
||||
|
||||
class EthernetSwitchCollection(base.ResourceCollectionBase):
|
||||
class EthernetSwitchCollection(rsd_lib_base.ResourceCollectionBase):
|
||||
|
||||
@property
|
||||
def _resource_type(self):
|
||||
|
@ -19,6 +19,7 @@ import logging
|
||||
from sushy.resources import base
|
||||
from sushy import utils
|
||||
|
||||
from rsd_lib import base as rsd_lib_base
|
||||
from rsd_lib import common as rsd_lib_common
|
||||
from rsd_lib.resources.v2_3.fabric import endpoint_schemas
|
||||
from rsd_lib import utils as rsd_lib_utils
|
||||
@ -64,7 +65,7 @@ class OemField(base.CompositeField):
|
||||
authentication = AuthenticationField(['Intel_RackScale', 'Authentication'])
|
||||
|
||||
|
||||
class Endpoint(base.ResourceBase):
|
||||
class Endpoint(rsd_lib_base.ResourceBase):
|
||||
|
||||
connected_entities = ConnectedEntitiesField('ConnectedEntities')
|
||||
"""Entities connected to endpoint"""
|
||||
@ -130,7 +131,7 @@ class Endpoint(base.ResourceBase):
|
||||
self._conn.delete(self.path)
|
||||
|
||||
|
||||
class EndpointCollection(base.ResourceCollectionBase):
|
||||
class EndpointCollection(rsd_lib_base.ResourceCollectionBase):
|
||||
|
||||
@property
|
||||
def _resource_type(self):
|
||||
|
@ -18,6 +18,7 @@ import logging
|
||||
from sushy.resources import base
|
||||
from sushy import utils
|
||||
|
||||
from rsd_lib import base as rsd_lib_base
|
||||
from rsd_lib import common as rsd_lib_common
|
||||
from rsd_lib.resources.v2_3.fabric import endpoint
|
||||
from rsd_lib.resources.v2_3.fabric import zone
|
||||
@ -25,7 +26,7 @@ from rsd_lib.resources.v2_3.fabric import zone
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class Fabric(base.ResourceBase):
|
||||
class Fabric(rsd_lib_base.ResourceBase):
|
||||
|
||||
description = base.Field('Description')
|
||||
"""The fabric description"""
|
||||
@ -77,7 +78,7 @@ class Fabric(base.ResourceBase):
|
||||
redfish_version=self.redfish_version)
|
||||
|
||||
|
||||
class FabricCollection(base.ResourceCollectionBase):
|
||||
class FabricCollection(rsd_lib_base.ResourceCollectionBase):
|
||||
|
||||
@property
|
||||
def _resource_type(self):
|
||||
|
@ -18,6 +18,8 @@ import logging
|
||||
from sushy.resources import base
|
||||
from sushy import utils
|
||||
|
||||
from rsd_lib import base as rsd_lib_base
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
NAME_MAPPING = {
|
||||
@ -29,7 +31,7 @@ NAME_MAPPING = {
|
||||
}
|
||||
|
||||
|
||||
class AttachResourceActionInfo(base.ResourceBase):
|
||||
class AttachResourceActionInfo(rsd_lib_base.ResourceBase):
|
||||
|
||||
identity = base.Field('Id', required=True)
|
||||
"""The storage pool identity string"""
|
||||
|
@ -16,6 +16,7 @@
|
||||
from sushy.resources import base
|
||||
from sushy import utils
|
||||
|
||||
from rsd_lib import base as rsd_lib_base
|
||||
from rsd_lib import common as rsd_lib_common
|
||||
from rsd_lib.resources.v2_3.storage_service import drive_metrics
|
||||
from rsd_lib import utils as rsd_lib_utils
|
||||
@ -55,7 +56,7 @@ class LocationField(base.ListField):
|
||||
info_format = base.Field('InfoFormat')
|
||||
|
||||
|
||||
class Drive(base.ResourceBase):
|
||||
class Drive(rsd_lib_base.ResourceBase):
|
||||
|
||||
identity = base.Field('Id', required=True)
|
||||
"""The drive identity string"""
|
||||
@ -154,7 +155,7 @@ class Drive(base.ResourceBase):
|
||||
redfish_version=self.redfish_version)
|
||||
|
||||
|
||||
class DriveCollection(base.ResourceCollectionBase):
|
||||
class DriveCollection(rsd_lib_base.ResourceCollectionBase):
|
||||
|
||||
@property
|
||||
def _resource_type(self):
|
||||
|
@ -14,6 +14,7 @@
|
||||
|
||||
from sushy.resources import base
|
||||
|
||||
from rsd_lib import base as rsd_lib_base
|
||||
from rsd_lib import utils as rsd_lib_utils
|
||||
|
||||
|
||||
@ -59,7 +60,7 @@ class HealthDataField(base.CompositeField):
|
||||
"""The number of media and data integrity errors of this drive"""
|
||||
|
||||
|
||||
class DriveMetrics(base.ResourceBase):
|
||||
class DriveMetrics(rsd_lib_base.ResourceBase):
|
||||
|
||||
name = base.Field('Name')
|
||||
"""Drive metrics name"""
|
||||
|
@ -18,6 +18,7 @@ import logging
|
||||
from sushy.resources import base
|
||||
from sushy import utils
|
||||
|
||||
from rsd_lib import base as rsd_lib_base
|
||||
from rsd_lib import common as rsd_lib_common
|
||||
from rsd_lib.resources.v2_3.storage_service import volume
|
||||
from rsd_lib import utils as rsd_lib_utils
|
||||
@ -48,7 +49,7 @@ class IdentifierField(base.CompositeField):
|
||||
durable_name_format = base.Field('DurableNameFormat')
|
||||
|
||||
|
||||
class StoragePool(base.ResourceBase):
|
||||
class StoragePool(rsd_lib_base.ResourceBase):
|
||||
|
||||
identity = base.Field('Id', required=True)
|
||||
"""The storage pool identity string"""
|
||||
@ -104,7 +105,7 @@ class StoragePool(base.ResourceBase):
|
||||
redfish_version=self.redfish_version)
|
||||
|
||||
|
||||
class StoragePoolCollection(base.ResourceCollectionBase):
|
||||
class StoragePoolCollection(rsd_lib_base.ResourceCollectionBase):
|
||||
|
||||
@property
|
||||
def _resource_type(self):
|
||||
|
@ -18,6 +18,7 @@ import logging
|
||||
from sushy.resources import base
|
||||
from sushy import utils
|
||||
|
||||
from rsd_lib import base as rsd_lib_base
|
||||
from rsd_lib import common as rsd_lib_common
|
||||
from rsd_lib.resources.v2_3.fabric import endpoint
|
||||
from rsd_lib.resources.v2_3.storage_service import drive
|
||||
@ -27,7 +28,7 @@ from rsd_lib.resources.v2_3.storage_service import volume
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class StorageService(base.ResourceBase):
|
||||
class StorageService(rsd_lib_base.ResourceBase):
|
||||
|
||||
description = base.Field('Description')
|
||||
"""The storage service description"""
|
||||
@ -106,7 +107,7 @@ class StorageService(base.ResourceBase):
|
||||
redfish_version=self.redfish_version)
|
||||
|
||||
|
||||
class StorageServiceCollection(base.ResourceCollectionBase):
|
||||
class StorageServiceCollection(rsd_lib_base.ResourceCollectionBase):
|
||||
|
||||
@property
|
||||
def _resource_type(self):
|
||||
|
@ -20,6 +20,7 @@ from sushy import exceptions
|
||||
from sushy.resources import base
|
||||
from sushy import utils
|
||||
|
||||
from rsd_lib import base as rsd_lib_base
|
||||
from rsd_lib import common as rsd_lib_common
|
||||
from rsd_lib.resources.v2_3.storage_service import volume_metrics
|
||||
from rsd_lib.resources.v2_3.storage_service import volume_schemas
|
||||
@ -67,7 +68,7 @@ class VolumeActionsField(base.CompositeField):
|
||||
initialize = InitializeActionField('#Volume.Initialize')
|
||||
|
||||
|
||||
class Volume(base.ResourceBase):
|
||||
class Volume(rsd_lib_base.ResourceBase):
|
||||
|
||||
identity = base.Field('Id', required=True)
|
||||
"""The volume identity string"""
|
||||
@ -201,7 +202,7 @@ class Volume(base.ResourceBase):
|
||||
redfish_version=self.redfish_version)
|
||||
|
||||
|
||||
class VolumeCollection(base.ResourceCollectionBase):
|
||||
class VolumeCollection(rsd_lib_base.ResourceCollectionBase):
|
||||
|
||||
@property
|
||||
def _resource_type(self):
|
||||
|
@ -14,10 +14,11 @@
|
||||
|
||||
from sushy.resources import base
|
||||
|
||||
from rsd_lib import base as rsd_lib_base
|
||||
from rsd_lib import utils as rsd_lib_utils
|
||||
|
||||
|
||||
class VolumeMetrics(base.ResourceBase):
|
||||
class VolumeMetrics(rsd_lib_base.ResourceBase):
|
||||
|
||||
name = base.Field('Name')
|
||||
"""The volume metrics name"""
|
||||
|
@ -19,6 +19,7 @@ import logging
|
||||
from sushy.resources import base
|
||||
from sushy import utils
|
||||
|
||||
from rsd_lib import base as rsd_lib_base
|
||||
from rsd_lib import common as rsd_lib_common
|
||||
from rsd_lib.resources.v2_4.fabric import endpoint_schemas
|
||||
from rsd_lib import utils as rsd_lib_utils
|
||||
@ -95,7 +96,7 @@ class OemField(base.CompositeField):
|
||||
intel_rackscale = OemIntelRackScaleField('Intel_RackScale')
|
||||
|
||||
|
||||
class Endpoint(base.ResourceBase):
|
||||
class Endpoint(rsd_lib_base.ResourceBase):
|
||||
|
||||
identity = base.Field('Id', required=True)
|
||||
"""The endpoint identity string"""
|
||||
@ -140,7 +141,7 @@ class Endpoint(base.ResourceBase):
|
||||
self._conn.delete(self.path)
|
||||
|
||||
|
||||
class EndpointCollection(base.ResourceCollectionBase):
|
||||
class EndpointCollection(rsd_lib_base.ResourceCollectionBase):
|
||||
|
||||
@property
|
||||
def _resource_type(self):
|
||||
|
@ -13,9 +13,9 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from sushy.resources import base
|
||||
from sushy import utils
|
||||
|
||||
from rsd_lib import base as rsd_lib_base
|
||||
from rsd_lib.resources.v2_3.fabric import fabric
|
||||
from rsd_lib.resources.v2_4.fabric import endpoint
|
||||
|
||||
@ -39,7 +39,7 @@ class Fabric(fabric.Fabric):
|
||||
redfish_version=self.redfish_version)
|
||||
|
||||
|
||||
class FabricCollection(base.ResourceCollectionBase):
|
||||
class FabricCollection(rsd_lib_base.ResourceCollectionBase):
|
||||
|
||||
@property
|
||||
def _resource_type(self):
|
||||
|
@ -13,9 +13,9 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from sushy.resources import base
|
||||
from sushy import utils
|
||||
|
||||
from rsd_lib import base as rsd_lib_base
|
||||
from rsd_lib.resources.v2_3.storage_service import storage_service
|
||||
from rsd_lib.resources.v2_4.storage_service import volume
|
||||
|
||||
@ -35,7 +35,7 @@ class StorageService(storage_service.StorageService):
|
||||
redfish_version=self.redfish_version)
|
||||
|
||||
|
||||
class StorageServiceCollection(base.ResourceCollectionBase):
|
||||
class StorageServiceCollection(rsd_lib_base.ResourceCollectionBase):
|
||||
|
||||
@property
|
||||
def _resource_type(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user