Add RootOfTrustCollection and RootOfTrust under Google service root.
These are Google only resources powered by Hoth DBus interface.
The ComponentsProtected links is hardcoded for now.
But it will be queried from DBus and interpreted accordingly in the
future.
TEST:
$curl -u root:0penBmc -X GET http://[::1]:$PORT/google/v1/RootOfTrustCollection
{
"@odata.id": "/google/v1/RootOfTrustCollection",
"@odata.type": "#RootOfTrustCollection.RootOfTrustCollection",
"Members": [
{
"@odata.id": "/google/v1/RootOfTrustCollection/Hoth"
}
],
"Members@odata.count": 1
}
$ curl -u root:0penBmc -X GET http://[::1]:$PORT/google/v1/RootOfTrustCollection/Hoth
{
"@odata.id": "/google/v1/RootOfTrustCollection/Hoth",
"@odata.type": "#RootOfTrust.v1_0_0.RootOfTrust",
"Actions": {
"#RootOfTrust.SendCommand": {
"target": "/google/v1/RootOfTrustCollection/Hoth/Actions/RootOfTrust.SendCommand"
}
},
"Id": "Hoth",
"Location": {
"PartLocation": {
"ServiceLabel": "Hoth",
"Locationtype": "Embedded"
}
},
"Name": "RootOfTrust-Hoth",
"Status": {
"State": "Enabled"
}
$ curl -u root:0penBmc -X POST -d @req.json -H "Content-Type: application/json" http://[::1]:$PORT/google/v1/RootOfTrustCollection/Hoth/Actions/RootOfTrust.SendCommand
{
"CommandResponse": "033B0000"
}
Signed-off-by: Vidya Satyamsetti <satyamsetti@google.com>
Change-Id: If64612468bb89e6d9251d848697608b7daf37339
diff --git a/static/google/v1/schema/ServiceRoot_v1.xml b/static/google/v1/schema/ServiceRoot_v1.xml
index 59771b6..09dc8b1 100644
--- a/static/google/v1/schema/ServiceRoot_v1.xml
+++ b/static/google/v1/schema/ServiceRoot_v1.xml
@@ -5,7 +5,7 @@
<!--# -->
<!--################################################################################ -->
<!---->
-<edmx:Edmx Version="1.0">
+<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">
<edmx:DataServices>
@@ -38,6 +38,11 @@
<Annotation Term="OData.LongDescription" String="This property shall contain a link to a Resource Collection of type JsonSchemaFileCollection."/>
<Annotation Term="OData.AutoExpandReferences"/>
</NavigationProperty>
+ <NavigationProperty Name="RootOfTrustCollection" Type="RootOfTrustCollection.RootOfTrustCollection" Nullable="false">
+ <Annotation Term="OData.Permissions" EnumMember="OData.Permission/Read"/>
+ <Annotation Term="OData.Description" String="The link to a Google Root Of Trust collection."/>
+ <Annotation Term="OData.LongDescription" String="This property shall contain a link to a Google RootOfTrust collection."/>
+ </NavigationProperty>
</EntityType>
</Schema>