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

View File

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

View File

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