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/$metadata/index.xml b/static/google/v1/$metadata/index.xml
index 57a64af..9cd9c37 100644
--- a/static/google/v1/$metadata/index.xml
+++ b/static/google/v1/$metadata/index.xml
@@ -3,5 +3,13 @@
<edmx:Reference Uri="/google/v1/schema/ServiceRoot_v1.xml">
<edmx:Include Namespace="GoogleServiceRoot"/>
<edmx:Include Namespace="GoogleServiceRoot.v1_0_0"/>
+
+ <edmx:Reference Uri="/google/v1/schema/RootOfTrustCollection_v1.xml">
+ <edmx:Include Namespace="RootOfTrustCollection"/>
+ </edmx:Reference>
+ <edmx:Reference Uri="/google/v1/schema/RootOfTrust_v1.xml">
+ <edmx:Include Namespace="RootOfTrust"/>
+ <edmx:Include Namespace="RootOfTrust.v1_0_0"/>
+ </edmx:Reference>
</edmx:Reference>
</edmx:Edmx>