Skip to content

Redfish-Service-Validator didn't verify oem uri with oem schema #600

Open
@rick0118

Description

@rick0118

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:

"Oem": {
    "@odata.id": "/redfish/v1/Oem/rick"
}

Here is my OEM service response JSON. I know @odata.type means the verify CSDL XML namespace version:

{
    "@odata.id": "/redfish/v1/Oem/rick",
    "@odata.type": "#rickCollection.v1_0_0.rickCollection",
    "Employee": "rick",
    "Members": [
        {
            "@odata.id": "/redfish/v1/Oem/rick/Virtual_Temp"
        }
    ],
    "[email protected]": 1,
    "Work_ID": 123
}

OEM CSDL name: rickCollection_v1.xml

<?xml version="1.0" encoding="UTF-8"?>
<!---->
<!--################################################################################-->
<!--# Redfish Schema:  rickCollection.v1_0_0                                      -->
<!--#                                                                                -->
<!--# For a detailed change log, see the README file contained in the DSP8010 bundle,-->
<!--# available at http://www.dmtf.org/standards/redfish                             -->
<!--# Copyright 2020 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://redfish.dmtf.org/schemas/v1/Resource_v1.xml">
        <edmx:Include Namespace="Resource.v1_0_0"/>
    </edmx:Reference>
    <edmx:Reference Uri="http://docs.oasis-open.org/odata/odata/v4.0/errata03/csd01/complete/vocabularies/Org.OData.Capabilities.V1.xml">
        <edmx:Include Namespace="Org.OData.Capabilities.V1" Alias="Capabilities"/>
    </edmx:Reference>
    <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:DataServices>
        <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="rickCollection">
            <Annotation Term="Redfish.OwningEntity" String="TBD"/>
            <EntityType Name="rickCollection" BaseType="Resource.v1_0_0.Resource" Abstract="true">
                <Annotation Term="OData.Description" String="Parameters for rickCollection."/>
                <Annotation Term="OData.LongDescription" String="Parameters for rickCollection."/>
                <Annotation Term="Capabilities.InsertRestrictions">
                    <Record>
                        <PropertyValue Property="Insertable" Bool="false"/>
                    </Record>
                </Annotation>
                <Annotation Term="Capabilities.UpdateRestrictions">
                    <Record>
                        <PropertyValue Property="Updatable" Bool="false"/>
                    </Record>
                </Annotation>
                <Annotation Term="Capabilities.DeleteRestrictions">
                    <Record>
                        <PropertyValue Property="Deletable" Bool="false"/>
                    </Record>
                </Annotation>
            </EntityType>
        </Schema>
        <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="rickCollection.v1_0_0">
            <Annotation Term="Redfish.OwningEntity" String="TBD"/>
            <Annotation Term="Redfish.Release" String="TBD"/>
            <EntityType Name="rickCollection" BaseType="rickCollection.rickCollection">
                <Property Name="Employee" Type="rickCollection.v1_0_0.Employee" Nullable="false">
                    <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
                    <Annotation Term="OData.Description" String="TBD"/>
                    <Annotation Term="OData.LongDescription" String="TBD"/>
                </Property>
                <Property Name="Members" Type="Collection(rickCollection.v1_0_0.Members)" Nullable="false">
                    <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
                    <Annotation Term="OData.Description" String="TBD"/>
                    <Annotation Term="OData.LongDescription" String="TBD"/>
                </Property>
                <Property Name="Work_ID" Type="Edm.Int64" Nullable="false">
                    <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
                    <Annotation Term="OData.Description" String="TBD"/>
                    <Annotation Term="OData.LongDescription" String="TBD"/>
                </Property>
            </EntityType>
            <EnumType Name="Employee">
                <Member Name="rick">
                    <Annotation Term="OData.Description" String="TBD"/>
                </Member>
                <Member Name="rose">
                    <Annotation Term="OData.Description" String="TBD"/>
                </Member>
            </EnumType>
            <ComplexType Name="Members">
                <Annotation Term="OData.Description" String="TBD"/>
                <Annotation Term="OData.LongDescription" String="TBD"/>
                <Annotation Term="OData.AdditionalProperties" Bool="false"/>
            </ComplexType>
        </Schema>
    </edmx:DataServices>
</edmx:Edmx>

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.

*** /redfish/v1/JsonSchemas/rickCollection
INFO -     Type (JsonSchemaFile.v1_0_2.JsonSchemaFile), GET SUCCESS (time: 0:00:00.316447)
INFO -     PASS

Can someone help me understand what might be going wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions