commit | 98eafce542480892f19862182008f62014f5afd1 | [log] [tgz] |
---|---|---|
author | George Liu <liuxiwei@inspur.com> | Sat Oct 03 16:46:04 2020 +0800 |
committer | George Liu <liuxiwei@ieisystem.com> | Fri Jun 06 00:21:34 2025 +0000 |
tree | 0d6972ff766161c16d29d26873b95c15e19fcfe7 | |
parent | 4f8b4152b146dd0cb772ccc2efe90c16c597bf87 [diff] |
Implement LocationIndicatorActive for CPU resource Implement LocationIndicatorActive for Processor schema to set and get the status of the location LED for a CPU.[1] A client uses the `LocationIndicatorActive` property to physically identify or locate the processor. Uses the utility functions getLocationIndicatorActive() and setLocationIndicatorActive() to follow the association and get or set the LED value. [1] https://redfish.dmtf.org/schemas/v1/Processor.v1_20_1.json Tested: - Validator passes - Tested on p10bmc hardware simulator: 1. Get LocationIndicatorActive ``` curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Systems/system/Processors/cpu0 { "@odata.id": "/redfish/v1/Systems/system/Processors/cpu0", "@odata.type": "#Processor.v1_18_0.Processor", "Id": "cpu0", ... "LocationIndicatorActive": false, ... } ``` 2. Set LocationIndicatorActive to true ``` curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X PATCH -d '{"LocationIndicatorActive":true}' https://${bmc}/redfish/v1/Systems/system/Processors/cpu0 curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Systems/system/Processors/cpu0 { "@odata.id": "/redfish/v1/Systems/system/Processors/cpu0", "@odata.type": "#Processor.v1_18_0.Processor", "Id": "cpu0", ... "LocationIndicatorActive": true, ... } ``` 3. Set LocationIndicatorActive to false ``` curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X PATCH -d '{"LocationIndicatorActive":false}' https://${bmc}/redfish/v1/Systems/system/Processors/cpu0 curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Systems/system/Processors/cpu0 { "@odata.id": "/redfish/v1/Systems/system/Processors/cpu0", "@odata.type": "#Processor.v1_18_0.Processor", "Id": "cpu0", ... "LocationIndicatorActive": false, ... } ``` 4. Error returned when trying to set the value to non-boolean ``` curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X PATCH -d '{"LocationIndicatorActive":"badvalue"}' https://${bmc}/redfish/v1/Systems/system/Processors/cpu0 { "LocationIndicatorActive@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The value '\"badvalue\"' for the property LocationIndicatorActive is not a type that the property can accept.", "MessageArgs": [ "\"badvalue\"", "LocationIndicatorActive" ], "MessageId": "Base.1.19.PropertyValueTypeError", "MessageSeverity": "Warning", "Resolution": "Correct the value for the property in the request body and resubmit the request if the operation failed." } ] } ``` 5. Error returned when specifying an unknown CPU resource ``` curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Systems/system/Processors/cpu100 { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The requested resource of type Processor named 'cpu100' was not found.", "MessageArgs": [ "Processor", "cpu100" ], "MessageId": "Base.1.19.ResourceNotFound", "MessageSeverity": "Critical", "Resolution": "Provide a valid resource identifier and resubmit the request." } ], "code": "Base.1.19.ResourceNotFound", "message": "The requested resource of type Processor named 'cpu100' was not found." } } curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X PATCH -d '{"LocationIndicatorActive":true}' https://${bmc}/redfish/v1/Systems/system/Processors/cpu100 { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The requested resource of type Processor named 'cpu100' was not found.", "MessageArgs": [ "Processor", "cpu100" ], "MessageId": "Base.1.19.ResourceNotFound", "MessageSeverity": "Critical", "Resolution": "Provide a valid resource identifier and resubmit the request." } ], "code": "Base.1.19.ResourceNotFound", "message": "The requested resource of type Processor named 'cpu100' was not found." } } ``` Signed-off-by: George Liu <liuxiwei@inspur.com> Signed-off-by: Janet Adkins <janeta@us.ibm.com> Change-Id: I511dc9ee0373c227c171d87e0475296eb326741e
This component attempts to be a "do everything" embedded webserver for OpenBMC.
The webserver implements a few distinct interfaces:
bmcweb at a protocol level supports http and https. TLS is supported through OpenSSL.
Bmcweb supports multiple authentication protocols:
Each of these types of authentication is able to be enabled or disabled both via runtime policy changes (through the relevant Redfish APIs) or via configure time options. All authentication mechanisms supporting username/password are routed to libpam, to allow for customization in authentication implementations.
All authorization in bmcweb is determined at routing time, and per route, and conform to the Redfish PrivilegeRegistry.
*Note: Non-Redfish functions are mapped to the closest equivalent Redfish privilege level.
bmcweb is configured per the meson build files. Available options are documented in meson_options.txt
meson setup builddir ninja -C builddir
If any of the dependencies are not found on the host system during configuration, meson will automatically download them via its wrap dependencies mentioned in bmcweb/subprojects
.
bmcweb relies on some on-system data for storage of persistent data that is internal to the process. Details on the exact data stored and when it is read/written can seen from the persistent_data
namespace.
When SSL support is enabled and a usable certificate is not found, bmcweb will generate a self-signed a certificate before launching the server. Please see the bmcweb source code for details on the parameters this certificate is built with.
bmcweb is capable of aggregating resources from satellite BMCs. Refer to AGGREGATION.md for more information on how to enable and use this feature.