Skip to content
Commit 30aacdd8 authored by Nan Zhou's avatar Nan Zhou
Browse files

Google RoT: allign callback style

The current convention:
1. route handler should be named as "handleAbcResouceMethod"
2. prefer inline functions instead of local lambdas

Tested:
1. compiles
2. on Google hardware, the commands in
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/52222/32

 worked

GET: /google/v1/RootOfTrustCollection
{
  "@odata.id": "/google/v1/RootOfTrustCollection",
  "@odata.type": "#RootOfTrustCollection.RootOfTrustCollection",
  "Members": [
    {
      "@odata.id": "/google/v1/RootOfTrustCollection/Hoth"
    }
  ],
  "Members@odata.count": 1
}

GET /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"
    }
  },
  "Description": "Google Root Of Trust",
  "Id": "Hoth",
  "Location": {
    "PartLocation": {
      "LocationType": "Embedded",
      "ServiceLabel": "Hoth"
    }
  },
  "Name": "Hoth",
  "Status": {
    "State": "Enabled"
  }
}

Signed-off-by: default avatarNan Zhou <nanzhoumails@gmail.com>
Change-Id: I0221b4b183579b33d0848d96a20398aee1a211d4
parent c5bb9982
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment