Jay Xu created OLINGO-1096:
------------------------------

             Summary: Model as Singleton or EntitySet
                 Key: OLINGO-1096
                 URL: https://issues.apache.org/jira/browse/OLINGO-1096
             Project: Olingo
          Issue Type: Question
            Reporter: Jay Xu


In DMTF redfish schema ```ServiceRoot```, it defines 
```
<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm"; 
Namespace="ServiceRoot.v1_1_1">

      <EntityContainer Name="ServiceContainer" 
Extends="ServiceRoot.v1_0_0.ServiceContainer">
        <Singleton Name="StorageSystems" 
Type="StorageSystemCollection.StorageSystemCollection"/>
        <Singleton Name="StorageServices" 
Type="StorageServiceCollection.StorageServiceCollection"/>
        <Singleton Name="Fabrics" Type="FabricCollection.FabricCollection"/>
        <Singleton Name="UpdateService" Type="UpdateService.UpdateService"/>
      </EntityContainer>

      <EntityType Name="ServiceRoot" BaseType="ServiceRoot.v1_1_0.ServiceRoot"/>

    </Schema>
```
Here is the schema definition of StorageSystemCollection:
```
<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm"; 
Namespace="StorageSystemCollection">

      <EntityType Name="StorageSystemCollection" 
BaseType="Resource.v1_0_0.ResourceCollection">
        <Annotation Term="OData.Description" String="A Collection of 
ComputerSystem resource instances that each have an entry in HostingRoles set 
to 'StorageServer'."/>
        <Annotation Term="OData.LongDescription" String="An instance of this 
resource shall reference the set of ComputerSystem resources known in the scope 
of its use and and that has a HostingRoles entry with a value of 
'StorageServer'."/>
        <NavigationProperty Name="Members" 
Type="Collection(ComputerSystem.ComputerSystem)" Nullable="false">
          <Annotation Term="OData.Permissions" 
EnumMember="OData.Permission/Read"/>
          <Annotation Term="OData.Description" String="The value of each member 
references a Storage System resource."/>  
          <Annotation Term="OData.LongDescription" String="The value of each 
member entry shall reference a ComputerSystem resource that shall have a 
HostingRoles entry with a value of 'StorageServer'."/>
          <Annotation Term="OData.AutoExpandReferences"/>
        </NavigationProperty>
      </EntityType>
...
```
It is allowed to have the URL to access the singleton instance and one of its 
members as follow:
/redfish/v1/StorageSystems
/redfish/v1/StorageSystems('Simple')

I tried to model StorageSystems as a singleton, but it is reported by Olingo 
that /redfish/v1/StorageSystem('Simple') is malformed. If I model it as 
EntitySet which type is ComputerSystem, the type info of 
StorageSystemCollection is missing. 

Could you please show me a light on that?




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to