|
Post by AMI_Mani on Jul 17, 2018 17:20:27 GMT
Hi All, I'm referring Telemetry Schema( DSP-IS0002_0.9a\schema) for MetricDefinitionCollection and it seems like post, patch, delete is allowed as per below
<EntityType Name="MetricDefinitionCollection" BaseType="Resource.v1_0_0.ResourceCollection">
<Annotation Term="Capabilities.InsertRestrictions">
<Record>
<PropertyValue Property="Insertable" Bool="true"/>
</Record>
</Annotation>
<Annotation Term="Capabilities.UpdateRestrictions">
<Record>
<PropertyValue Property="Updatable" Bool="true"/>
</Record>
</Annotation>
<Annotation Term="Capabilities.DeleteRestrictions">
<Record>
<PropertyValue Property="Deletable" Bool="true"/>
</Record>
</Annotation> Same applies for MetricReportCollection_v1.xml, MetricReportDefinitionCollection_v1.xml I would like to confirm whether post, patch, delete is allowed for MetricDefinitionCollection, MetricReportCollection, MetricReportDefinitionCollection
Thanks, Mani
|
|
|
Post by mraineri on Jul 31, 2018 18:17:07 GMT
Hi Mani,
Those values in the collection schemas are not correct; these are the correct values: - MetricReportDefinitionCollection --> Insertable is true, Updatable and Deletable are false - MetricDefinitionCollection --> Insertable is true, Updatable and Deletable are false - TriggersCollection --> Insertable is true, Updatable and Deletable are false - MetricReportCollection --> All terms are false
We will be making this fix when we publish the Telemetry model as part of the standard.
Thanks.
-Mike
|
|
|
Post by AMI_Mani on Oct 23, 2018 16:49:13 GMT
Hi Mike, Thanks for clarifying the details. Can we use Capabilities Annotation(Copied Annotation at end) to confirm supported operations like below Capabilities.InsertRestrictions true means Post allowed Capabilities.UpdateRestrictions true means Patch is allowed Capabilities.DeleteRestrictions true means delete allowed
Can we use OData.Permissions Annotation to confirm whether attribute is patchable. If ReadWrite means it can be patched <Annotation Term="OData.Permissions" EnumMember="OData.Permission/ReadWrite"/>
<Annotation Term="Capabilities.InsertRestrictions">
<Record>
<PropertyValue Property="Insertable" Bool="true"/>
</Record>
</Annotation>
<Annotation Term="Capabilities.UpdateRestrictions">
<Record>
<PropertyValue Property="Updatable" Bool="true"/>
</Record>
</Annotation>
<Annotation Term="Capabilities.DeleteRestrictions">
<Record>
<PropertyValue Property="Deletable" Bool="true"/>
</Record>
</Annotation>
Thanks, Mani
|
|
|
Post by mraineri on Oct 23, 2018 18:01:28 GMT
You're assumption about the Capabilities.X term and mapping it to an HTTP operation is correct. You're also correct in that you can use the value of OData.Permissions to determine what properties are PATCHable.
Keep in mind though, the Redfish Schema describes a super-set of the capabilities. Implementations may only support a subset of the operations. For example, even if Capabilities.UpdateRestrictions is set to true on a given schema, a particular implementation may only allow GET operations on it. The same holds true for writable properties; some implementations may not allow for a property to be a PATCHed by a client, even if allowed by the schema.
|
|