Add missing fields in 2.3&2.4 root service
Change-Id: If14aa7d384b8f0e66eef45c153c2ac18a44c645f
This commit is contained in:
parent
ec67bbbd59
commit
cfc0aa8d05
@ -26,10 +26,6 @@ from rsd_lib.resources.v2_3.system import system
|
||||
|
||||
class RSDLibV2_3(v2_2.RSDLibV2_2):
|
||||
|
||||
# Override telemetry variable inherited from v2.2. The corresponding
|
||||
# service don't exist in RSD v2.3
|
||||
_telemetry_service_path = None
|
||||
|
||||
_ethernet_switches_path = base.Field(
|
||||
['Oem', 'Intel_RackScale', 'EthernetSwitches', '@odata.id'])
|
||||
"""EthernetSwitchCollecton path"""
|
||||
|
@ -13,12 +13,18 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from sushy.resources import base
|
||||
|
||||
from rsd_lib.resources import v2_3
|
||||
from rsd_lib.resources.v2_4.storage_service import storage_service
|
||||
|
||||
|
||||
class RSDLibV2_4(v2_3.RSDLibV2_3):
|
||||
|
||||
_telemetry_service_path = base.Field(
|
||||
['Oem', 'Intel_RackScale', 'TelemetryService', '@odata.id'])
|
||||
"""EthernetSwitchCollecton path"""
|
||||
|
||||
def get_storage_service_collection(self):
|
||||
"""Get the StorageServiceCollection object
|
||||
|
||||
|
@ -20,16 +20,19 @@
|
||||
"@odata.id": "/redfish/v1/EventService"
|
||||
},
|
||||
"Fabrics": {
|
||||
"@odata.id": "/redfish/v1/Fabrics"
|
||||
"@odata.id": "/redfish/v1/Fabrics"
|
||||
},
|
||||
"Tasks": {
|
||||
"@odata.id": "/redfish/v1/TaskService"
|
||||
},
|
||||
"StorageServices": {
|
||||
"@odata.id": "/redfish/v1/StorageServices"
|
||||
"@odata.id": "/redfish/v1/StorageServices"
|
||||
},
|
||||
"Registries": {
|
||||
"@odata.id": "/redfish/v1/Registries"
|
||||
"@odata.id": "/redfish/v1/Registries"
|
||||
},
|
||||
"TelemetryService": {
|
||||
"@odata.id": "/redfish/v1/TelemetryService"
|
||||
},
|
||||
"Oem": {
|
||||
"Intel_RackScale": {
|
||||
@ -38,6 +41,9 @@
|
||||
"Nodes": {
|
||||
"@odata.id": "/redfish/v1/Nodes"
|
||||
},
|
||||
"Services": {
|
||||
"@odata.id": "/redfish/v1/Services"
|
||||
},
|
||||
"EthernetSwitches": {
|
||||
"@odata.id": "/redfish/v1/EthernetSwitches"
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
{
|
||||
"@odata.context": "/redfish/v1/$metadata#ServiceRoot.ServiceRoot",
|
||||
"@odata.id": "/redfish/v1/",
|
||||
"@odata.type": "#ServiceRoot.v1_1_1.ServiceRoot",
|
||||
"@odata.type": "#ServiceRoot.v1_3_1.ServiceRoot",
|
||||
"Id": "RootService",
|
||||
"Name": "Root Service",
|
||||
"Description": "description-as-string",
|
||||
"RedfishVersion": "1.1.0",
|
||||
"RedfishVersion": "1.5.0",
|
||||
"UUID": "92384634-2938-2342-8820-489239905423",
|
||||
"Systems": {
|
||||
"@odata.id": "/redfish/v1/Systems"
|
||||
@ -20,16 +20,16 @@
|
||||
"@odata.id": "/redfish/v1/EventService"
|
||||
},
|
||||
"Fabrics": {
|
||||
"@odata.id": "/redfish/v1/Fabrics"
|
||||
"@odata.id": "/redfish/v1/Fabrics"
|
||||
},
|
||||
"Tasks": {
|
||||
"@odata.id": "/redfish/v1/TaskService"
|
||||
},
|
||||
"StorageServices": {
|
||||
"@odata.id": "/redfish/v1/StorageServices"
|
||||
"@odata.id": "/redfish/v1/StorageServices"
|
||||
},
|
||||
"Registries": {
|
||||
"@odata.id": "/redfish/v1/Registries"
|
||||
"@odata.id": "/redfish/v1/Registries"
|
||||
},
|
||||
"Oem": {
|
||||
"Intel_RackScale": {
|
||||
@ -38,8 +38,14 @@
|
||||
"Nodes": {
|
||||
"@odata.id": "/redfish/v1/Nodes"
|
||||
},
|
||||
"Services": {
|
||||
"@odata.id": "/redfish/v1/Services"
|
||||
},
|
||||
"EthernetSwitches": {
|
||||
"@odata.id": "/redfish/v1/EthernetSwitches"
|
||||
},
|
||||
"TelemetryService": {
|
||||
"@odata.id": "/redfish/v1/TelemetryService"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -56,8 +56,11 @@ class RSDLibV2_2TestCase(testtools.TestCase):
|
||||
self.assertEqual("/redfish/v1/Services",
|
||||
self.rsd._storage_service_path)
|
||||
self.assertEqual("/redfish/v1/Fabrics", self.rsd._fabrics_path)
|
||||
self.assertEqual("/redfish/v1/Managers", self.rsd._managers_path)
|
||||
self.assertEqual("/redfish/v1/TelemetryService",
|
||||
self.rsd._telemetry_service_path)
|
||||
self.assertEqual("/redfish/v1/EthernetSwitches",
|
||||
self.rsd._ethernet_switches_path)
|
||||
self.assertEqual("/redfish/v1/TaskService",
|
||||
self.rsd._task_service_path)
|
||||
self.assertEqual("/redfish/v1/Registries",
|
||||
|
@ -54,7 +54,11 @@ class RSDLibV2_3TestCase(testtools.TestCase):
|
||||
self.assertEqual("/redfish/v1/Fabrics", self.rsd._fabrics_path)
|
||||
self.assertEqual("/redfish/v1/StorageServices",
|
||||
self.rsd._storage_service_path)
|
||||
self.assertEqual(None, self.rsd._telemetry_service_path)
|
||||
self.assertEqual("/redfish/v1/Managers", self.rsd._managers_path)
|
||||
self.assertEqual("/redfish/v1/EthernetSwitches",
|
||||
self.rsd._ethernet_switches_path)
|
||||
self.assertEqual("/redfish/v1/TelemetryService",
|
||||
self.rsd._telemetry_service_path)
|
||||
self.assertEqual("/redfish/v1/TaskService",
|
||||
self.rsd._task_service_path)
|
||||
self.assertEqual("/redfish/v1/Registries",
|
||||
|
@ -47,14 +47,18 @@ class RSDLibV2_3TestCase(testtools.TestCase):
|
||||
def test__parse_attributes(self):
|
||||
self.rsd._parse_attributes()
|
||||
self.assertEqual("2.4.0", self.rsd._rsd_api_version)
|
||||
self.assertEqual("1.1.0", self.rsd._redfish_version)
|
||||
self.assertEqual("1.5.0", self.rsd._redfish_version)
|
||||
self.assertEqual("/redfish/v1/Systems", self.rsd._systems_path)
|
||||
self.assertEqual("/redfish/v1/Nodes", self.rsd._nodes_path)
|
||||
self.assertEqual("/redfish/v1/Chassis", self.rsd._chassis_path)
|
||||
self.assertEqual("/redfish/v1/Fabrics", self.rsd._fabrics_path)
|
||||
self.assertEqual("/redfish/v1/StorageServices",
|
||||
self.rsd._storage_service_path)
|
||||
self.assertEqual(None, self.rsd._telemetry_service_path)
|
||||
self.assertEqual("/redfish/v1/Managers", self.rsd._managers_path)
|
||||
self.assertEqual("/redfish/v1/EthernetSwitches",
|
||||
self.rsd._ethernet_switches_path)
|
||||
self.assertEqual("/redfish/v1/TelemetryService",
|
||||
self.rsd._telemetry_service_path)
|
||||
self.assertEqual("/redfish/v1/TaskService",
|
||||
self.rsd._task_service_path)
|
||||
self.assertEqual("/redfish/v1/Registries",
|
||||
|
Loading…
x
Reference in New Issue
Block a user