DMTF / Redfish-Mockup-Server

A simple Python 3.4 program that can be copied into a folder at the top of any Redfish mockup and can serve Redfish requests on the specified IP/port.
Other
72 stars 37 forks source link

NVMe drives are returning only @odata.id in expand query, no other fields #78

Closed MoshiBin closed 3 years ago

MoshiBin commented 3 years ago

When querying the mockup server for NVMe drives, the drives only have an @odata.id field with no other fields:

>>> import redfish
>>> con = redfish.redfish_client(base_url="http://127.0.0.1:8000")
>>> drives = con.get("/redfish/v1/Systems/AccessModule1/Storage/NVMe?expand=.($levels=1)", None).obj.Drives
>>> drives[0]
{'@odata.id': '/redfish/v1/Chassis/Chassis/Drives/0'}

Contrast this with a real server:

>>> import redfish
>>> con = redfish.redfish_client(base_url="https://real-redfish-server")
>>> con.login()
>>> drives = con.get("/redfish/v1/Systems/AccessModule1/Storage/NVMe?expand=.($levels=1)", None).obj.Drives
>>> drives[0].keys()
dict_keys(['@odata.context', '@odata.type', '@odata.id', 'Id', 'Name', 'Status', 'PhysicalLocation', 'Links', 'Oem', 'MediaType', 'Protocol', 'Model', 'Manufacturer', 'PartNumber', 'SerialNumber', 'CapacityBytes', 'CapableSpeedGbs', 'Revision', 'PredictedMediaLifeLeftPercent', 'IndicatorLED', 'Assembly'])
mraineri commented 3 years ago

I think we have this issue already covered in the request for #72

The current $expand support has a limitation to only work on collections and go one level in depth.

mraineri commented 3 years ago

Discussion from the call: The group agrees this is lacking and is already covered in the request for issue #72 to enhance the $expand support.