Remove 'required' flag in root service

Some properties are not mandatory in root service. In some
cases, the sub-resource is not available. So remove the 'required'
flag from them, just leave Nodes and Systems as required.

Change-Id: I38e5c36d0b1c2c23c682f102afea8c1a7b9fcb99
This commit is contained in:
Lin Yang 2019-02-06 11:15:34 -08:00
parent 519b4c4043
commit b742b61230
3 changed files with 14 additions and 20 deletions

View File

@ -33,34 +33,31 @@ class RSDLibV2_1(base.ResourceBase):
_nodes_path = base.Field(['Nodes', '@odata.id'], required=True)
"""NodeCollection path"""
_chassis_path = base.Field(['Chassis', '@odata.id'], required=True)
_chassis_path = base.Field(['Chassis', '@odata.id'])
"""ChassisCollection path"""
_storage_service_path = base.Field(['Services',
'@odata.id'], required=True)
_storage_service_path = base.Field(['Services', '@odata.id'])
"""StorageServiceCollection path"""
_fabrics_path = base.Field(['Fabrics', '@odata.id'], required=True)
_fabrics_path = base.Field(['Fabrics', '@odata.id'])
"""FabricCollection path"""
_managers_path = base.Field(['Managers', '@odata.id'], required=True)
_managers_path = base.Field(['Managers', '@odata.id'])
"""ManagerCollection path"""
_ethernet_switches_path = base.Field(['EthernetSwitches', '@odata.id'],
required=True)
_ethernet_switches_path = base.Field(['EthernetSwitches', '@odata.id'])
"""EthernetSwitchCollecton path"""
_task_service_path = base.Field(['Tasks', '@odata.id'], required=True)
_task_service_path = base.Field(['Tasks', '@odata.id'])
"""Task Service path"""
_registries_path = base.Field(['Registries', '@odata.id'], required=True)
_registries_path = base.Field(['Registries', '@odata.id'])
"""RegistriesCollection path"""
_redfish_version = base.Field(['RedfishVersion'], required=True)
_redfish_version = base.Field(['RedfishVersion'])
"""Redfish version"""
_rsd_api_version = base.Field(['Oem', 'Intel_RackScale', 'ApiVersion'],
required=True)
_rsd_api_version = base.Field(['Oem', 'Intel_RackScale', 'ApiVersion'])
"""RSD API version"""
def __init__(self, connector, identity="/redfish/v1/",

View File

@ -34,16 +34,14 @@ class RSDLibV2_2(v2_1.RSDLibV2_1):
required=True)
"""NodeCollection path"""
_storage_service_path = base.Field(['Oem', 'Intel_RackScale', 'Services',
'@odata.id'], required=True)
_storage_service_path = base.Field(
['Oem', 'Intel_RackScale', 'Services', '@odata.id'])
"""StorageServiceCollection path"""
_telemetry_service_path = base.Field(['TelemetryService', '@odata.id'],
required=True)
_telemetry_service_path = base.Field(['TelemetryService', '@odata.id'])
"""Telemetry Service path"""
_update_service_path = base.Field(['UpdateService', '@odata.id'],
required=True)
_update_service_path = base.Field(['UpdateService', '@odata.id'])
"""Update Service path"""
def get_system(self, identity):

View File

@ -34,8 +34,7 @@ class RSDLibV2_3(v2_2.RSDLibV2_2):
['Oem', 'Intel_RackScale', 'EthernetSwitches', '@odata.id'])
"""EthernetSwitchCollecton path"""
_storage_service_path = base.Field(['StorageServices',
'@odata.id'], required=True)
_storage_service_path = base.Field(['StorageServices', '@odata.id'])
"""StorageServiceCollection path"""
def get_system(self, identity):