Add product property to the root Sushy object

Chages made to sushy/main.py
product property is the product associated with this Redfish service.

Change-Id: I2ab5bd73ac609a8563807bdc0d1c1825cd5b4bba
This commit is contained in:
dnuka 2018-09-28 21:21:06 +05:30
parent ec6e6c1df1
commit 2bdae43029
3 changed files with 5 additions and 0 deletions

View File

@ -37,6 +37,9 @@ class Sushy(base.ResourceBase):
uuid = base.Field('UUID')
"""The Redfish root service UUID"""
product = base.Field('Product')
"""The product associated with this Redfish service"""
_systems_path = base.Field(['Systems', '@odata.id'])
"""SystemCollection path"""

View File

@ -4,6 +4,7 @@
"Name": "Root Service",
"RedfishVersion": "1.0.2",
"UUID": "92384634-2938-2342-8820-489239905423",
"Product": "Product",
"Systems": {
"@odata.id": "/redfish/v1/Systems"
},

View File

@ -54,6 +54,7 @@ class MainTestCase(base.TestCase):
self.assertEqual('1.0.2', self.root.redfish_version)
self.assertEqual('92384634-2938-2342-8820-489239905423',
self.root.uuid)
self.assertEqual('Product', self.root.product)
self.assertEqual('/redfish/v1/Systems', self.root._systems_path)
self.assertEqual('/redfish/v1/Managers', self.root._managers_path)
self.assertEqual('/redfish/v1/SessionService',