a93e9c77 | 18-Nov-2024 |
Ed Tanous <etanous@nvidia.com> |
Move time_utils to compile unit
There's no reason for these functions to be in a header, and pulling them into a compile unit can reduce compile times overall.
Tested: Unit tests pass (Good coverag
Move time_utils to compile unit
There's no reason for these functions to be in a header, and pulling them into a compile unit can reduce compile times overall.
Tested: Unit tests pass (Good coverage)
Change-Id: Ia6dc50d16bf2967e647a3c7437ba13bd7ab7ca3c Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
9f892fa6 | 12-Nov-2024 |
Jagpal Singh Gill <paligill@gmail.com> |
fix redfish validator error for Update interface
Fix the redfish validator error for BIOS version with redfish-updateservice-use-dbus feature enabled. If there is no host bios version, for example,
fix redfish validator error for Update interface
Fix the redfish validator error for BIOS version with redfish-updateservice-use-dbus feature enabled. If there is no host bios version, for example, in case the flash_bios feature is not enabled, the populateSoftwareInformation shouldn't return an error.
Tested - Before Fix: Redfish Validator failed with errors -
1 err.Bios.Bios errors in /redfish/v1/Systems/system 1 err.Collection(Manager.Manager) errors in /redfish/v1/Systems/system 2 failProp errors in /redfish/v1/Systems/system 2 fails errors in /redfish/v1/Systems/system 1 failGet errors in /redfish/v1/Systems/system/Bios 1 fails errors in /redfish/v1/Systems/system/Bios … err.Bios.Bios: 1 err.Collection(Manager.Manager): 3 err.Collection(Resource.Item): 1 … Validation has failed: 16 problems found
After Fix: Redfish Validator Passed -
Metadata: Namespaces missing from $metadata: set()
Elapsed time: 0:00:33 missingRedfishAlias: 1 pass: 4343 passAction: 16 passGet: 217 passRedfishUri: 208 skipNoSchema: 3 skipOptional: 4001 unvalidated: 1 unverifiedAdditional.complex: 1 warnDeprecated: 5 warningPresent: 6 warnings: 4 Validation has succeeded.
Change-Id: I881c6a780b9f2662fb81a17c258ff09f352668d7 Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
show more ...
|
340d74c8 | 12-Oct-2024 |
Myung Bae <myungbae@us.ibm.com> |
Handling of OutOfRange in ReadJson
Currently readJsonPatch returns `PropertValueNotInList` in case when an input integer is out of range. This change is to return `PropertyValueOutOfRange` for the
Handling of OutOfRange in ReadJson
Currently readJsonPatch returns `PropertValueNotInList` in case when an input integer is out of range. This change is to return `PropertyValueOutOfRange` for the case out-of-range integer input.
Tested:
- Verify PATCH with an out-of-value integer. e.g. ``` $ curl -k -X PATCH https://${bmc}/redfish/v1/EventService/ -H "Content-Type: application/json" -d '{ "DeliveryRetryIntervalSeconds" : 4294967296}' ```
Before the change, its `MessageId` is `PropertyValueNotInList`. ``` "Message": "The value '4294967296' for the property DeliveryRetryIntervalSeconds is not in the list of acceptable values.", "MessageId": "Base.1.19.0.PropertyValueNotInList", "MessageSeverity": "Warning", "Resolution": "Choose a value from the enumeration list that the implementation can support and resubmit the request if the operation failed." ```
After the change, its `MessageId` will be `PropertyValueOutOfRange`.
``` "Message": "The value '4294967296' for the property DeliveryRetryIntervalSeconds is not in the supported range of acceptable values.", "MessageId": "Base.1.19.0.PropertyValueOutOfRange", "MessageSeverity": "Warning", "Resolution": "Correct the value for the property in the request body and resubmit the request if the operation failed." ```
- Redfish Service Validator passes
Change-Id: I0d0c5ecbc9f416b68fa7c0e81a0ea896ec2e50af Signed-off-by: Myung Bae <myungbae@us.ibm.com>
show more ...
|
6fe8751c | 20-Jul-2023 |
George Liu <liuxiwei@inspur.com> |
Implement TemperatureReadingsCelsius property for ThermalMetrics
The ThermalMetrics schema[1] provides for efficient thermal metric gathering for thermal sensors. The schema allows retrieving just t
Implement TemperatureReadingsCelsius property for ThermalMetrics
The ThermalMetrics schema[1] provides for efficient thermal metric gathering for thermal sensors. The schema allows retrieving just the thermal metrics with one Redfish URI. This prevents the additional work required when returning all the sensor data, or multiple Redfish URI calls to retrieve the properties for all of the thermal sensors.
This commit implements the TemperatureReadingsCelsius property of ThermalMetrics[1]. ThermalMetrics is a property of ThermalSubsystem[2]. TemperatureReadingsCelsius is a SensorArrayExcerpt[3].
[1] https://redfish.dmtf.org/schemas/v1/ThermalMetrics.v1_0_1.json [2] https://redfish.dmtf.org/schemas/v1/ThermalSubsystem.v1_3_2.json [3] http://redfish.dmtf.org/schemas/v1/Sensor.v1_9_0.json#/definitions/SensorArrayExcerpt
The temperature sensors are found by finding 'all_sensors' endpoints for specific chassis of D-Bus service /xyz/openbmc_project/sensors/temperature. An entry of SensorArrayExcerpt is built for each temperature sensor retrieved.
Implementation Notes: - Common function sensor_utils::objectPropertiesToJson() is used to fill in sensor excerpt properties. Currently the only excerpt ChassisSubNode is ThermalMetrics. However there are others excerpts defined by Redfish. Right now mostly this is just skipping things, but I'm expecting when other sensor excerpts are implemented that some of the other properties may be added for excerpts as well. I'm expecting the combination of the chassisSubNode and the sensorType will be used to determine which properties are included for a particular call to build a sensor Json representation. - New sensor_utils::objectExcerptToJson() function created. This wraps sensor_utils::objectPropertiesToJson() and builds DataSourceUri for a sensor excerpt. - New sensor_utils::getAllSensorObjects() function created. This builds list of 'all_sensors' association endpoints for specified D-Bus path with specified D-Bus interfaces. Callback function is called with list for handling sensors.
Tested: 1. Redfish Service Validator passed. 2. doGet method: ``` curl -k -H "X-Auth-Token: ${token}" -X GET https://${bmc}/redfish/v1/Chassis/chassis/ThermalSubsystem/ThermalMetrics { "@odata.id": "/redfish/v1/Chassis/chassis/ThermalSubsystem/ThermalMetrics", "@odata.type": "#ThermalMetrics.v1_0_1.ThermalMetrics", "Id": "ThermalMetrics", "Name": "Thermal Metrics", "TemperatureReadingsCelsius": [ { "DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/temperature_ps0_temp0", "Reading": -131072000.0 }, { "DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/temperature_ps0_temp1", "Reading": -131072000.0 }, { "DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/temperature_ps0_temp2", "Reading": -131072000.0 }, { "DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/temperature_ps1_temp0", "Reading": -131072000.0 }, { "DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/temperature_ps1_temp1", "Reading": -131072000.0 }, { "DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/temperature_ps1_temp2", "Reading": -131072000.0 } ], "TemperatureReadingsCelsius@odata.count": 6 } ```
3. Verification of DataSourceUri: ``` curl -k -H "X-Auth-Token: ${token}" -X GET https://${bmc}/redfish/v1/Chassis/chassis/Sensors/temperature_ps1_temp0 { "@odata.id": "/redfish/v1/Chassis/chassis/Sensors/temperature_ps1_temp0", "@odata.type": "#Sensor.v1_2_0.Sensor", "Id": "temperature_ps1_temp0", "Name": "ps1 temp0", "Reading": -131072000.0, "ReadingType": "Temperature", "ReadingUnits": "Cel", "Status": { "Health": "OK", "State": "Enabled" } } ```
4. A bad chassis ID: ``` curl -k -H "X-Auth-Token: ${token}" -X GET https://${bmc}/redfish/v1/Chassis/chassisBAD/ThermalSubsystem/ThermalMetrics { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The requested resource of type Chassis named 'chassisBAD' was not found.", "MessageArgs": [ "Chassis", "chassisBAD" ], "MessageId": "Base.1.18.1.ResourceNotFound", "MessageSeverity": "Critical", "Resolution": "Provide a valid resource identifier and resubmit the request." } ], "code": "Base.1.18.1.ResourceNotFound", "message": "The requested resource of type Chassis named 'chassisBAD' was not found." } } ```
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I6e4ed1f281fd5371c978983b6cc5666badd3752c Signed-off-by: Janet Adkins <janeta@us.ibm.com>
show more ...
|
cd5a898f | 14-Aug-2024 |
Janet Adkins <janeta@us.ibm.com> |
Sensors: Add SpeedRPM property
Changes here are to add support for Redfish for Thermal Equipment[1].
Add the SpeedRPM property for a Rotational fan sensor. This property is part of the Redfish Sens
Sensors: Add SpeedRPM property
Changes here are to add support for Redfish for Thermal Equipment[1].
Add the SpeedRPM property for a Rotational fan sensor. This property is part of the Redfish Sensor schema since version 1_2_0.[2]
This change is so we will always have a property with the RPM. This allows a client (e.g. webui-vue) to always look for the SpeedRPM property.
Note: Redfish defines the Reading property for a fan to be a percentage value. Currently for this type of fan sensor the Reading value is being set to the RPM value. To preserve backwards compatibility the SpeedRPM property is added without altering the Reading value. However this may change in the future to match the expected Redfish implementation. Clients are advised to use the new SpeedRPM value to assure continuing correct function.
[1] https://www.dmtf.org/sites/default/files/standards/documents/DSP2064_1.0.0.pdf [2] http://redfish.dmtf.org/schemas/v1/Sensor.v1_10_0.json#/definitions/Sensor
Implementation Note: The objectPropertiesToJson() has existing else if(sensorType ==) statements. However because the first if() statement is looking at the chassisSubNode these are never visited for sensors when using the /redfish/v1/Chassis/<chassisId>/Sensors/<sensorName> URI. Those existing sensorType comparisons are used for the redfish-allow-deprecated-power-thermal Redfish interfaces.
``` $ curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/Chassis/chassis/Sensors/fantach_fan1_0 { "@odata.id": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan1_0", "@odata.type": "#Sensor.v1_2_0.Sensor", "Id": "fantach_fan1_0", "Name": "fan1 0", "Reading": 18000.0, "ReadingType": "Rotational", "ReadingUnits": "RPM", "SpeedRPM": 18000.0, "Status": { "Health": "OK", "State": "Enabled" } } ```
Tested: - Redfish Validator passes
Change-Id: Icd39fd70d4a24aafab0d9b66fa09c000b97b3199 Signed-off-by: Janet Adkins <janeta@us.ibm.com>
show more ...
|