Merge "Add `ProtocolFeaturesSupported` property of the `Root Service`"
This commit is contained in:
commit
0480def823
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
features:
|
||||
- |
|
||||
Adds `Product` and `ProductFeaturesSupported` properties support to
|
||||
the Redfish `Root Service`
|
|
@ -27,6 +27,24 @@ from sushy.resources.system import system
|
|||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class ProtocolFeaturesSupportedField(base.CompositeField):
|
||||
|
||||
excerpt_query = base.Field('ExcerptQuery')
|
||||
"""The excerpt query parameter is supported"""
|
||||
|
||||
expand_query = base.Field('ExpandQuery')
|
||||
"""The expand query parameter is supported"""
|
||||
|
||||
filter_query = base.Field('FilterQuery')
|
||||
"""The filter query parameter is supported"""
|
||||
|
||||
only_member_query = base.Field('OnlyMemberQuery')
|
||||
"""The only query parameter is supported"""
|
||||
|
||||
select_query = base.Field('SelectQuery')
|
||||
"""The select query parameter is supported"""
|
||||
|
||||
|
||||
class Sushy(base.ResourceBase):
|
||||
|
||||
identity = base.Field('Id', required=True)
|
||||
|
@ -41,6 +59,10 @@ class Sushy(base.ResourceBase):
|
|||
product = base.Field('Product')
|
||||
"""The product associated with this Redfish service"""
|
||||
|
||||
protocol_features_supported = ProtocolFeaturesSupportedField(
|
||||
'ProtocolFeaturesSupported')
|
||||
"""The information about protocol features supported by the service"""
|
||||
|
||||
_systems_path = base.Field(['Systems', '@odata.id'])
|
||||
"""SystemCollection path"""
|
||||
|
||||
|
|
|
@ -5,6 +5,13 @@
|
|||
"RedfishVersion": "1.0.2",
|
||||
"UUID": "92384634-2938-2342-8820-489239905423",
|
||||
"Product": "Product",
|
||||
"ProtocolFeaturesSupported": {
|
||||
"ExcerptQuery": true,
|
||||
"ExpandQuery": false,
|
||||
"FilterQuery": true,
|
||||
"OnlyMemberQuery": true,
|
||||
"SelectQuery": false
|
||||
},
|
||||
"Systems": {
|
||||
"@odata.id": "/redfish/v1/Systems"
|
||||
},
|
||||
|
|
|
@ -56,6 +56,12 @@ class MainTestCase(base.TestCase):
|
|||
self.assertEqual('92384634-2938-2342-8820-489239905423',
|
||||
self.root.uuid)
|
||||
self.assertEqual('Product', self.root.product)
|
||||
self.assertTrue(self.root.protocol_features_supported.excerpt_query)
|
||||
self.assertFalse(self.root.protocol_features_supported.expand_query)
|
||||
self.assertTrue(self.root.protocol_features_supported.filter_query)
|
||||
self.assertTrue(
|
||||
self.root.protocol_features_supported.only_member_query)
|
||||
self.assertFalse(self.root.protocol_features_supported.select_query)
|
||||
self.assertEqual('/redfish/v1/Systems', self.root._systems_path)
|
||||
self.assertEqual('/redfish/v1/Managers', self.root._managers_path)
|
||||
self.assertEqual('/redfish/v1/SessionService',
|
||||
|
|
Loading…
Reference in New Issue