Closed DileepEx closed 4 years ago
Maybe I'm misunderstanding the problem but since it's implemented as
<Property Name="HostedServices" Type="ComputerSystem.v1_2_0.HostedServices" Nullable="false">
<Annotation Term="OData.Description" String="The services that this computer system supports."/>
<Annotation Term="OData.LongDescription" String="The values of this collection shall describe services supported by this computer system."/>
</Property>
in ComputerSystem, you could just not include HostedServices
, or not report the NavigationProperty located inside as StorageServices
That's correct - this object (and this applies to most properties in Redfish) is not required by the schema ("Required" annotation in schema will show these). If your product doesn't implement a storage-focused HostedServices - you should not populate that property.
Agreed; if you have no need to support the HostedStorageServices, then you don't need to implement it.
The error makes sense though since you did in fact create a HostedStorageServices resource, but did not contain the proper value for @odata.type
; Swordfish calls this "#HostedStorageServices.HostedStorageServices" (not #StorageServiceCollection.StorageServiceCollection).
You can either:
1) Remove the resource and the HostedStorageServices property from your ComputerSystem
2) Fix @odata.type
in your HostedStorageServices resource
Since you have no use case for HostedStorageServices, I recommend the first course of action.
Thanks for the response. We are implementing StorageServices and want to show that. Actual Hierarchy is, "HostedServices": { "StorageServices": { "@odata.id": "/redfish/v1/StorageServices" }
When we validate this, we are getting the following issue.
ERROR - HostedServices.StorageServices: Could not get schema file for Entity check
Where we can get the schema file to configure the validator?
It's in the Swordfish schema folder: http://redfish.dmtf.org/schemas/swordfish/v1/HostedStorageServices_v1.xml
We used the Swordfish Schema file given in the above link. Following is the issue we get.
*** /redfish/v1/StorageSystems/FPGA_000 Type (ComputerSystem), GET SUCCESS (time: 0.36414) HostedServices.HostedStorageServices not defined in schema ComputerSystem.v1_3_0 (check version, spelling and casing) ERROR - HostedServices.HostedStorageServices not defined in schema ComputerSystem.v1_3_0 (check version, spelling and casing)
FAIL...
Attached are the schema files and metadata config we are using for the test configuration. Config.zip
Thanks for your help.
Hi Experts, Any insight to this issue?
Regards, Dileep
It's treating the HostedService as if it's contained in ComputerSystem and I don't know why, is the NavigationProperty in this issue pointing to the wrong type of object?
It might be useful to post what properties are you using to access this resource, and what the StorageSystem resourse looks like itself.
@DileepEx would you be able to provide a copy of the ComputerSystem resource with the "HostedServices" property, as well as the "HostedStorageServices" resource referenced within the "HostedServices/StorageServices" property? I think that will help close the gap in our understanding of what's going on.
@mraineri Sorry for the delay in responding. Attached is a file with the definitions. I tried changing definitions to debug this, but that did not help. Please suggest if there is an issue with the definitions. ComputerSystem.txt
This is not the resource payload that would exist under the service URI /redfish/v1/StorageSystem/<system_name>
. You also should not be changing definitions to make them work, that is against redfish specification.
Could you perhaps provide the HTML report associated with your run (I forgot they're embedded in the report)?
Closed due to old issue.
We would like to avoid Implementing HostedStorageServices and defined the hierarchy as follows and getting the compliance issue listed below. Can someone advise on how to avoid this compliance issue?
Schema Hierarchy: "HostedServices": { "type": "object", "properties": { "StorageServices": { "type": "string", "$ref": "#/definitions/odata_4_0_0_id_ref", "description": "A reference to a collection of storage services supported by this computer system." } }, "description": "This object describes services that may be running or installed on the system." },
Error:
ERROR - HostedServices.StorageServices: Could not get schema file for Entity check
WARNING - No such reference StorageServiceCollection in local./SchemaFiles/metadata/ComputerSystem_v1.xml
Debug information: VERBO - ComputerSystem.v1_3_0.HostedServices:StorageServices VERBO - value: OrderedDict([('@odata.id', '/redfish/v1/StorageServices')]) <class 'collections.OrderedDict'> VERBO - has Type: HostedStorageServices.HostedStorageServices entity VERBO - is Optional DEBUG - validateEntity: name = HostedServices.StorageServices DEBUG - (success, uri, status, delay) = (True, '/redfish/v1/StorageServices', 200, 0.16687), (propType, propCollectionType) = ('HostedStorageServices.HostedStorageServices', None), data = OrderedDict([('@odata.context', '/redfish/v1/$metadata#StorageServiceCollection.StorageServiceCollection'), ('@odata.id', '/redfish/v1/StorageServices'), ('@odata.type', '#StorageServiceCollection.StorageServiceCollection'), ('Members', []), ('Members@odata.count', 0), ('Name', 'NVME Subsystems Collection')]) WARNING - No such reference StorageServiceCollection in local./SchemaFiles/metadata/ComputerSystem_v1.xml DEBUG - success = False, currentType = #StorageServiceCollection.StorageServiceCollection, baseLink = include(Namespace='HostedStorageServices', Uri='http://redfish.dmtf.org/schemas/swordfish/v1/HostedStorageServices_v1.xml') ERROR - HostedServices.StorageServices: Could not get schema file for Entity check DEBUG - displayValue: OrderedDict([('@odata.id', '/redfish/v1/StorageServices')]) -> Link: /redfish/v1/StorageServices DEBUG - displayType: (HostedStorageServices.HostedStorageServices, entity) -> link to: HostedStorageServices VERBO - FAIL VERBO - ComputerSystem.v1_3_0.HostedServices:Oem VERBO - value: n/a <class 'str'> VERBO - has Type: Resource.Oem complex VERBO - is Optional VERBO - prop Does not exist, skip... DEBUG - displayType: (Resource.Oem, complex) -> Resource.Oem VERBO - ***out of Complex VERBO - complex Counter({'skipOptional': 1, 'failProp': 1, 'err.HostedStorageServices.HostedStorageServices': 1}) DEBUG - displayType: (ComputerSystem.v1_3_0.HostedServices, complex) -> ComputerSystem.v1_3_0.HostedServices