-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redfish-Service-Validator didn't verify oem uri with oem schema #600
Comments
So the
For your usage, you'll need to define the contents of the inner object. I suppose it'll look something like this:
To make the schema file for "#RickServiceRoot.v1_0_0.RickServiceRoot", you can use this example as a template: https://github.com/DMTF/Redfish-Publications/blob/main/mockups/public-oem-examples/Contoso.com/ContosoServiceRoot_v1.xml |
Thank you! That definitely clears things up. I referred to the URL you provided and some forum articles: ContosoServiceRoot.json relative redfishforum with same warning I get the warning about To clarify further, I added an OEM object, RichCompanyServiceRoot, to the Redfish v1 service root. The OEM service root extends the original service root: .
.
.
"Name": "Root Service",
"Oem": {
"RichCompany": {
"@odata.type": "#RichCompanyServiceRoot.v1_0_0.RichCompanyServiceRoot",
"RickLink": {
"@odata.id": "/redfish/v1/Oem/rick"
}
}
}
.
.
. Below is my RichCompanyServiceRoot_v1.xml. I expect it to successfully parse my OEM object and add @odata.id to the path that needs to be verified, but I encountered issues and need your generous help. First, define the necessary XML as references: <?xml version="1.0" encoding="UTF-8"?>
<!---->
<!--################################################################################ -->
<!--# Contoso Schema: RichCompanyServiceRoot.v1_0_0 -->
<!--# -->
<!--# Copyright 2014-2021 DMTF. -->
<!--# For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright -->
<!--################################################################################ -->
<!---->
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">
<edmx:Reference Uri="http://docs.oasis-open.org/odata/odata/v4.0/errata03/csd01/complete/vocabularies/Org.OData.Core.V1.xml">
<edmx:Include Namespace="Org.OData.Core.V1" Alias="OData"/>
</edmx:Reference>
<edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/RedfishExtensions_v1.xml">
<edmx:Include Namespace="RedfishExtensions.v1_0_0" Alias="Redfish"/>
</edmx:Reference>
<edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/Resource_v1.xml">
<edmx:Include Namespace="Resource"/>
</edmx:Reference>
<edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/ServiceRoot_v1.xml">
<edmx:Include Namespace="ServiceRoot.v1_13_0"/>
</edmx:Reference>
<edmx:Reference Uri="http://127.0.0.1/rickCollection_v1.xml">
<edmx:Include Namespace="rickCollection"/>
</edmx:Reference>
<edmx:DataServices>
<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="RichCompanyServiceRoot">
<Annotation Term="Redfish.OwningEntity" String="RichCompany"/>
<Annotation Term="OData.Description" String="RichCompany extensions to the standard service root."/>
</Schema>
<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="RichCompanyServiceRoot.v1_0_0">
<Annotation Term="Redfish.OwningEntity" String="RichCompany"/>
<EntityContainer Name="ServiceContainer" Extends="ServiceRoot.v1_15_0.ServiceRoot">
<Singleton Name="RickLink" Type="rickCollection.rickCollection"/>
</EntityContainer>
<ComplexType Name="ServiceRoot" BaseType="Resource.OemObject">
<NavigationProperty Name="RickLink" Type="rickCollection.rickCollection" Nullable="false">
<Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
<Annotation Term="OData.Description" String="Link to the rickCollection service."/>
<Annotation Term="OData.LongDescription" String="This property shall contain the link to a resource of type rickCollection."/>
<Annotation Term="OData.AutoExpandReferences"/>
</NavigationProperty>
</ComplexType>
</Schema>
</edmx:DataServices>
</edmx:Edmx> I am unsure if the following definitions are correct. When I use <EntityContainer Name="ServiceContainer" Extends="ServiceRoot.v1_15_0.ServiceRoot">
<ComplexType Name="ServiceRoot" BaseType="Resource.OemObject"> I also tested other methods, but the results were similar: <EntityContainer Name="ServiceContainer" Extends="RichCompanyServiceRoot.v1_0_0.ServiceContainer">
<ComplexType Name="ServiceRoot" BaseType="RichCompanyServiceRoot.v1_0_0.ServiceRoot">
I get the warning below. Couldn't get schema for object (?), skipping OemObject RichCompany : 'RichCompanyServiceRoot'
Type (ServiceRoot.v1_15_0.ServiceRoot), GET SUCCESS (time: 0:00:00.208736) Additionally, I noticed that my collectionlimit setting for LogEntry 10 is not being properly enforced. The tool continues to validate even when the limit is exceeded. I have confirmed that I have upgraded to the latest version 2.4.8 of the tool. |
Please file a separate issue for this. I'd likely lose track of this otherwise.
On first review, the syntax for this looks good to me. The EntityContainer portion isn't very relevant. There are some technicalities where it might be needed in a pure OData environment, but for the purposes of making a Redfish extension and having the Redfish tools work, it's not necessary. The service validator won't inspect EntityContainer.
Can you check the contents of the "SchemaFiles/metadata" directory to see if RichCompanyServiceRoot_v1.xml was downloaded and cached? Depending on the starting state, the tool might not download schema files. Can you also run with |
first, Thank you for taking the time to read and reply to this question. In the log, I see that it has downloaded RichCompanyServiceRoot from
Additionally, I just added the following to ServiceRoot_v1.xml, also I know we have oem property format from Resource_v1.xml <edmx:Reference Uri="http://127.0.0.1/RichCompanyServiceRoot_v1.xml">
<edmx:Include Namespace="RichCompanyServiceRoot.v1_0_0"/>
</edmx:Reference> my oem object format, I think that is meet redfish spec
Below are my logs as well as the complete log.txt.
ConformanceLog_08_08_2024_155711.txt RichCompanyServiceRoot_v1.xml <?xml version="1.0" encoding="UTF-8"?>
<!---->
<!--################################################################################ -->
<!--# Contoso Schema: RichCompanyServiceRoot.v1_0_0 -->
<!--# -->
<!--# Copyright 2014-2021 DMTF. -->
<!--# For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright -->
<!--################################################################################ -->
<!---->
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">
<edmx:Reference Uri="http://docs.oasis-open.org/odata/odata/v4.0/errata03/csd01/complete/vocabularies/Org.OData.Core.V1.xml">
<edmx:Include Namespace="Org.OData.Core.V1" Alias="OData"/>
</edmx:Reference>
<edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/RedfishExtensions_v1.xml">
<edmx:Include Namespace="RedfishExtensions.v1_0_0" Alias="Redfish"/>
</edmx:Reference>
<edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/Resource_v1.xml">
<edmx:Include Namespace="Resource"/>
</edmx:Reference>
<edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/ServiceRoot_v1.xml">
<edmx:Include Namespace="ServiceRoot.v1_13_0"/>
</edmx:Reference>
<edmx:Reference Uri="http://127.0.0.1/rickCollection_v1.xml">
<edmx:Include Namespace="rickCollection"/>
</edmx:Reference>
<edmx:DataServices>
<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="RichCompanyServiceRoot">
<Annotation Term="Redfish.OwningEntity" String="RichCompany"/>
<Annotation Term="OData.Description" String="RichCompany extensions to the standard service root."/>
</Schema>
<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="RichCompanyServiceRoot.v1_0_0">
<Annotation Term="Redfish.OwningEntity" String="RichCompany"/>
<EntityContainer Name="ServiceContainer" Extends="ServiceRoot.v1_15_0.ServiceRoot">
<Singleton Name="RickLink" Type="rickCollection.rickCollection"/>
</EntityContainer>
<EntityType Name="ServiceRoot" BaseType="Resource.OemObject">
<NavigationProperty Name="RickLink" Type="rickCollection.rickCollection" Nullable="false">
<Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
<Annotation Term="OData.Description" String="Link to the rickCollection service."/>
<Annotation Term="OData.LongDescription" String="This property shall contain the link to a resource of type rickCollection."/>
<Annotation Term="OData.AutoExpandReferences"/>
</NavigationProperty>
</EntityType>
</Schema>
</edmx:DataServices>
</edmx:Edmx> |
Hi all,
I am a newbie in Redfish. I have an OEM Redfish service, and I tried to write an OEM CSDL schema to verify it. However, the service validator did not show the OEM verification report in the HTML output. Even in the OEM property, it returns a "complex" result.
Here is my workflow:
I wrote the annotated JSON for Redfish-Schema-Creator based on the Redfish service response JSON.
I used the odata-csdl-validator to verify it and then added it to the BMC web Redfish-core/schema.
I was able to see the OEM schema at /redfish/v1/$metadata.
Additionally, I added an OEM URI to the service root:
Here is my OEM service response JSON. I know @odata.type means the verify CSDL XML namespace version:
OEM CSDL name: rickCollection_v1.xml
After that, I ran the Redfish-Service-Validator, but the Redfish Conformance Test Report did not include my OEM Redfish service. However, it did perform the JSON schema validation tests.
Can someone help me understand what might be going wrong?
The text was updated successfully, but these errors were encountered: