0c728b42 | 29-Aug-2024 |
Janet Adkins <janeta@us.ibm.com> |
Sensors: Add enum for chassis sub nodes
Added ChassisSubNode enum for defining the different chassis subNode paths to retrieving sensor data.
Modified path building sensor data to use the enum. Oth
Sensors: Add enum for chassis sub nodes
Added ChassisSubNode enum for defining the different chassis subNode paths to retrieving sensor data.
Modified path building sensor data to use the enum. Other paths were left still using the string. Specifically the paths using SensorsAsyncResp as these primarily use the strings for human readable output.
Added utility functions to convert to/from enum to string value. Added unit tests for new utility functions.
Tested: - Verified sensor paths before and after change had no change: - /redfish/v1/Chassis/chassis/Sensors - /redfish/v1/Chassis/chassis/Thermal - /redfish/v1/Chassis/chassis/Power - Selection of: /redfish/v1/Chassis/chassis/Sensors/<sensor> - /redfish/v1/Chassis/chassis/Sensors?\$expand=* - Redfish Validator passes
Change-Id: I02bb5f3c0c49d85dbd1dff911d9f1a8467d6b1db Signed-off-by: Janet Adkins <janeta@us.ibm.com>
show more ...
|
9d62d126 | 04-Sep-2024 |
Gunnar Mills <gmills@us.ibm.com> |
Correct comment to reflect PrivilegeRegistry
Looking at https://redfish.dmtf.org/registries/Redfish_1.5.0_PrivilegeRegistry.json a "Entity": "LogService", is
"POST": [
Correct comment to reflect PrivilegeRegistry
Looking at https://redfish.dmtf.org/registries/Redfish_1.5.0_PrivilegeRegistry.json a "Entity": "LogService", is
"POST": [ { "Privilege": [ "ConfigureManager"
below it is a SubordinateOverrides for "Targets": [ "ComputerSystem",
with
"POST": [ { "Privilege": [ "ConfigureComponents"
which is what this LogService is. Update the comment to reflect the ConfigureComponents is correct.
Found in review on https://gerrit.openbmc.org/c/openbmc/bmcweb/+/74272/
Tested: Inspection only. Comment change only.
Change-Id: I4ffc7d973bb7146c78a8762dde1a42f4c4203a3c Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
3d45ef66 | 04-Sep-2024 |
Gunnar Mills <gmills@us.ibm.com> |
Fix getLogEntryCollection privilege
This is the LogEntryCollection, fix the privilege to reflect that. This doesn't do anything since both are privilegeSetLogin. [1][2].
[1]: https://github.com/ope
Fix getLogEntryCollection privilege
This is the LogEntryCollection, fix the privilege to reflect that. This doesn't do anything since both are privilegeSetLogin. [1][2].
[1]: https://github.com/openbmc/bmcweb/blob/d193e0082c3fc7d4f4c34dd5fa86e95c036c938d/redfish-core/include/registries/privilege_registry.hpp#L906 [2]: https://github.com/openbmc/bmcweb/blob/d193e0082c3fc7d4f4c34dd5fa86e95c036c938d/redfish-core/include/registries/privilege_registry.hpp#L898
Found in review on https://gerrit.openbmc.org/c/openbmc/bmcweb/+/74274/4
Tested: None. Inspection only.
Change-Id: I1c6f80fe5260a38f4acda31ea43a344d9bc89857 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
7945eeed | 03-Sep-2024 |
Ed Tanous <etanous@nvidia.com> |
Break out host logger into methods
Similar to what we've done elsewhere, break out hostlogger into methods rather than long lambdas.
Tested: Code compiles
Change-Id: I34e31fc92782e98750e475bb6175c
Break out host logger into methods
Similar to what we've done elsewhere, break out hostlogger into methods rather than long lambdas.
Tested: Code compiles
Change-Id: I34e31fc92782e98750e475bb6175c8ea4b665b9f Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
e21126ec | 03-Sep-2024 |
Ed Tanous <etanous@nvidia.com> |
Break out hostlogger
Similar to what we've done elsewhere, break out hostlogger into its own file.
Tested: Code compiles.
Change-Id: Ib9a48577878f57eb7ed4e3cf6b84a58a3ec203f6 Signed-off-by: Ed Tan
Break out hostlogger
Similar to what we've done elsewhere, break out hostlogger into its own file.
Tested: Code compiles.
Change-Id: Ib9a48577878f57eb7ed4e3cf6b84a58a3ec203f6 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
34fe470a | 03-Sep-2024 |
Ed Tanous <etanous@nvidia.com> |
Break out post codes into separate functions
Similar to what we've done other places, break out long inline lambdas into individual functions.
Tested: Refactor. Code compiles.
Change-Id: I55b53dd
Break out post codes into separate functions
Similar to what we've done other places, break out long inline lambdas into individual functions.
Tested: Refactor. Code compiles.
Change-Id: I55b53dd018a18f4d4d431ac471acd1f6c5e5e6d9 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
8d2f868c | 03-Sep-2024 |
Ed Tanous <etanous@nvidia.com> |
Break out post codes
Similar to other patches, break out the post codes log services into their own file. log_services.hpp is far too large.
Change-Id: I3cb644d52a9d3b5f9a15a2f90c1b69c87491e5c8 Si
Break out post codes
Similar to other patches, break out the post codes log services into their own file. log_services.hpp is far too large.
Change-Id: I3cb644d52a9d3b5f9a15a2f90c1b69c87491e5c8 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
3a58c5a8 | 05-Aug-2024 |
Konstantin Aladyshev <aladyshev22@gmail.com> |
Require Inventory.Item.PCIeDevice for PCIe objects
Currently when bmcweb tries to get PCIe device service it checks only path and doesn't limit search by any required interface. This can lead to wro
Require Inventory.Item.PCIeDevice for PCIe objects
Currently when bmcweb tries to get PCIe device service it checks only path and doesn't limit search by any required interface. This can lead to wrong result if the 'xyz.openbmc_project.ObjectMapper' for example have object with the same path. To fix the issue require xyz.openbmc_project.Inventory.Item.PCIeDevice interface to be present in the object.
Tested: Patchest was tested on the system with a DBUS service that has objects with the "xyz.openbmc_project.Inventory.Item.PCIeDevice" interface.
Before the change request to the PCIe device endpoint like /redfish/v1/Systems/system/PCIeDevices/Bus_00_Device_00 outputs internal error message.
After the change request to the PCIe device endpoint like /redfish/v1/Systems/system/PCIeDevices/Bus_00_Device_00 outputs detailed PCIe device info including all the relevant links to its PCIe functions.
Change-Id: I25d60533fa8f7bdda26c81bde1fa0a88c25365f6 Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
show more ...
|
058f54ed | 03-Sep-2024 |
Patrick Williams <patrick@stwcx.xyz> |
meson: switch code dependency to libsystemd
For a while now systemd has packaged a separate `libsystemd`. For meson dependency, `systemd` should be used when looking for systemd service file paths
meson: switch code dependency to libsystemd
For a while now systemd has packaged a separate `libsystemd`. For meson dependency, `systemd` should be used when looking for systemd service file paths and `libsystemd` should be used for `sd_*` functions.
Update the dependency accordingly.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ie797742655ef9af8c93edd279cc162b842a711a2
show more ...
|
4652c640 | 30-Jul-2024 |
Asmitha Karunanithi <asmitk01@in.ibm.com> |
Hypervisor: Fix redfish validator errors
Currently, Redfish validator fails for displaying empty mac address when doing a GET on hypervisor ethernet interfaces.
This commit ensures that the redfish
Hypervisor: Fix redfish validator errors
Currently, Redfish validator fails for displaying empty mac address when doing a GET on hypervisor ethernet interfaces.
This commit ensures that the redfish validator passes by making the macaddress an optional property in EthernetInterfaceData structure and removing the un-implemented "MACAddress" interface check in the hypervisor GET handler method.
The following was the validator error: [1] ERROR - MACAddress: String '' does not match pattern ''^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$''
Tested By: Validator Passed.
Change-Id: Ib3f8085841093647ee97dee5602a0bb78fdd67c5 Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
show more ...
|
739b27b2 | 27-Aug-2024 |
Ravi Teja <raviteja28031990@gmail.com> |
Fix Delete IPv6StaticDefaultGateways
This commit fixes delete operation on IPv6StaticDefaultGateways
Tested by: patch with null deletes IPv6 static default gateways -d '{"IPv6StaticDefaultGateways"
Fix Delete IPv6StaticDefaultGateways
This commit fixes delete operation on IPv6StaticDefaultGateways
Tested by: patch with null deletes IPv6 static default gateways -d '{"IPv6StaticDefaultGateways": [null]}'
This change was missed in the below commit [1] https://github.com/openbmc/bmcweb/commit/ce73d5c8517e0b85d85de345f10c82c24cbb067b
Change-Id: I012ba8f7b4c1c0b78b1b758f60875708a7db6b1d Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
show more ...
|
c9563608 | 28-Aug-2024 |
Janet Adkins <janeta@us.ibm.com> |
Sensors: Move objectPropertiesToJson() to sensor_utils
This commit move objectPropertiesToJson() to the sensor_utils class. This is in preparation for building sensor excerpts using the same code wh
Sensors: Move objectPropertiesToJson() to sensor_utils
This commit move objectPropertiesToJson() to the sensor_utils class. This is in preparation for building sensor excerpts using the same code which builds a sensor. By moving the function into the sensor utility class it should help with compile time by not needing to include all of sensor code by the files implementing the excerpts.
Additional functions and definitions were moved into the sensor_utils class as well due to dependencies from objectPropertiesToJson().
Tested: - Confirmed output unchanged for following URI: - /redfish/v1/Chassis/chassis/Sensors - Selection of: /redfish/v1/Chassis/chassis/Sensors/<sensorId> - /redfish/v1/Chassis/chassis/Sensors?\$expand=* - Redfish Validator passes
Change-Id: I563a560b5b2760e0421c1402d51216101af40be2 Signed-off-by: Janet Adkins <janeta@us.ibm.com>
show more ...
|
ba498310 | 10-Oct-2022 |
Krzysztof Grobelny <krzysztof.grobelny@intel.com> |
Improved telemetry service error handling
By using data that is send in error massage it is possible to report detailed information about error to user. Now instead of performing same validation in
Improved telemetry service error handling
By using data that is send in error massage it is possible to report detailed information about error to user. Now instead of performing same validation in bmcweb and backend it can be performed only in backend and send back detailed error information.
Tested: - Tested with https://gerrit.openbmc.org/c/openbmc/telemetry/+/57177 - All telemetry features are working as before - Error codes in bmcweb are more detailed, for example invalid argument instead of internal error.
Change-Id: I424d91b9c8d70c8320f66b582e110c2e7b906107 Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com> Signed-off-by: Eryk Siejk <erykx.siejk@intel.com> Signed-off-by: Michal Orzel <michalx.orzel@intel.com>
show more ...
|
b4361d63 | 22-Aug-2024 |
Ed Tanous <etanous@nvidia.com> |
Refactor
Reduce the amount of code in handleReportPatch by moving to some of the dependent callbacks.
Tested: Tested in last commit of series
Change-Id: Id4462ce6b29afcdd303db1790793cf68b23f04c3 S
Refactor
Reduce the amount of code in handleReportPatch by moving to some of the dependent callbacks.
Tested: Tested in last commit of series
Change-Id: Id4462ce6b29afcdd303db1790793cf68b23f04c3 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
0eebcefb | 23-Apr-2024 |
Jishnu CM <jishnunambiarcm@duck.com> |
NetworkProtocol: Support NetworkSuppliedServers
This commit re-introduces changes proposed earlier to support NetworkSuppliedServers property in bmcweb. https://gerrit.openbmc.org/c/openbmc/bmcweb/+
NetworkProtocol: Support NetworkSuppliedServers
This commit re-introduces changes proposed earlier to support NetworkSuppliedServers property in bmcweb. https://gerrit.openbmc.org/c/openbmc/bmcweb/+/52671
It helps to differentiate between the static and DHCP assigned NTP servers. Networkd and Dbus has added support for StaticNTPServers to save the static configuration.
Tested by: 1. PATCH /redfish/v1/Managers/bmc/NetworkProtocol -d '{"NTP":{"NTPServers": [<ip>]}}' Verify that this adds the NTPs server to the NetworkProtocol 2. Enable DHCP to fetch NTP servers list from the DHCP server. Verify that they are listed when GET on NetworkProtocol as below "NTP": { "NTPServers": [ <static ntp server ip> ], "NetworkSuppliedServers": [ <dynamic ntp server ip> ], "ProtocolEnabled": true }, 3. Redfish validator run
Change-Id: I22591ad6d49245bf74ef24dd68a51f015f6a8b07 Signed-off-by: Jishnu CM <jishnunambiarcm@duck.com>
show more ...
|
2ccce1f3 | 10-Aug-2024 |
Ravi Teja <raviteja28031990@gmail.com> |
Redfish Session: Implement MFA "Token" property
This commit implements multi-factor authentication "Token" property to create redfish sessions when multi-factor token authentication enabled.
Tested
Redfish Session: Implement MFA "Token" property
This commit implements multi-factor authentication "Token" property to create redfish sessions when multi-factor token authentication enabled.
Tested by:
Verified redfish session and login redfish commands with or without TOTP token for MFA enabled/disabled users.
User authentication with MFA token: POST https://${bmc}/redfish/v1/SessionService/Sessions -d '{"UserName" :"root", "Password": "0penBmc","Token":"510760"}'
User authentication without MFA token: POST https://${bmc}/login -d '{"username" : "newuser", "password" :"0penBmc"}'
POST https://${bmc}/redfish/v1/SessionService/Sessions -d '{"UserName" :"newuser", "Password": "0penBmc"}'
In case of invalid MFA token or password then authentication fails and returns "ResourceAtUriUnauthorized" error message.
Change-Id: I639163dd3d49ff8ed886f72c99ad264317d59c34 Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
show more ...
|
1516c21b | 14-Aug-2024 |
Janet Adkins <janeta@us.ibm.com> |
Sensors: Create utility class for sensors
Create a separate utility class for sensors. The goal is to make these functions easily available for use outside of sensors for paths which need reference
Sensors: Create utility class for sensors
Create a separate utility class for sensors. The goal is to make these functions easily available for use outside of sensors for paths which need reference sensors.
Moved splitSensorNameAndType() into new utility class.
Created new utility function getSensorId(). The Id for a sensor is built from its name and type in a few different locations. These are modified to call the new function. The function has also been simplified to use std::format() to build the Id.
Tested: - Checked before and after results for queries using this function: (Note: I was not able to confirm the setSensorsOverride() caller as it is only being used for redfish-allow-deprecated-power-thermal URI.) ''' - https://${bmc}/redfish/v1/Chassis/chassis/Sensors - https://${bmc}/redfish/v1/Chassis/chassis/Sensors/<str> where <str> was sensors of different types - https://${bmc}/redfish/v1/Chassis/chassis/Sensors?\$expand=* - https://${bmc}/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans - https://${bmc}/redfish/v1/Chassis/chassis/PowerSubsystem/PowerSupplies ''' - Redfish Validator passed
Change-Id: Ifa200b6e63f8e52d47f70c33d350999f5c527bbd Signed-off-by: Janet Adkins <janeta@us.ibm.com>
show more ...
|
dd7090e6 | 30-Jul-2024 |
Gunnar Mills <gmills@us.ibm.com> |
Fix 404 on Hypervisor Reset
/redfish/v1/Systems/hypervisor/Actions/ComputerSystem.Reset was returning a 404. On closer inspection, it was due to hitting the System .Reset Action and not making it to
Fix 404 on Hypervisor Reset
/redfish/v1/Systems/hypervisor/Actions/ComputerSystem.Reset was returning a 404. On closer inspection, it was due to hitting the System .Reset Action and not making it to the Hypervisor specific action. [1].
Remove the Hypervisor specific action and call the method from the System .Reset Action. This is how we do the handleHypervisorSystemGet already.
Believe this was broke by 7f3e84a151. [2] It is only now being discovered due to a recent rebase with upstream.
Follow the commit before and put this behind the new Hypervisor Computer System Option.
[1]: https://github.com/openbmc/bmcweb/blob/cd504a94c827fbc98908b2a712f49ea0adf7aab8/redfish-core/lib/systems.hpp#L3493 [2]: https://github.com/openbmc/bmcweb/commit/7f3e84a151e106d9227d08358e9ee3fd225b34c4
Tested: On Patchset 2, /redfish/v1/Systems/hypervisor/Actions/ComputerSystem.Reset returns a 204.
Change-Id: I3599bb8419604d71684ce61ca992f4b87c1d3fa5 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
68896206 | 21-Aug-2024 |
Gunnar Mills <gmills@us.ibm.com> |
Add a Hypervisor Computer System Option
Today to determine if the hypervisor computer system resource should be added to the System Collection a call to the Settings Manager is made.
Based on discu
Add a Hypervisor Computer System Option
Today to determine if the hypervisor computer system resource should be added to the System Collection a call to the Settings Manager is made.
Based on discussion in https://gerrit.openbmc.org/c/openbmc/bmcweb/+/73203 and to help the multihost stuff move forward, lets move this hypervisor under a meson option which any company that needs can enable. I think IBM is the only one who uses this so the risk of breaking someone should be small.
One day hope to converge at some point, this probably doesn't happen until after the multihost stuff goes in.
This is also better for implementations that don't have this backend because now routes like /redfish/v1/Systems/hypervisor/EthernetInterfaces/ aren't put out. I.e. a call to /redfish/v1/Systems/hypervisor/EthernetInterfaces/ is now going to return 404 instead of 500 on systems without this backend support.
Tested: Enabled this and see the hypervisor system. Without this enabled do not see the hypervisor system. No new validator errors either way.
Change-Id: Ie05e6644dd6f640cf8225f96becb99b9c2d0de20 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
bd79bce8 | 16-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda forma
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda formatting also changed, so we have made changes to the organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style. See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: Iceec1dc95b6c908ec6c21fb40093de9dd18bf11a Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
898f2aa2 | 07-Aug-2024 |
Ed Tanous <etanous@nvidia.com> |
Consolidate LogEntry builders
We have copies of essentially the same code in two places for building a log entry from a given set of dbus interfaces. Consolidate them.
Tested: GET /redfish/v1/Syst
Consolidate LogEntry builders
We have copies of essentially the same code in two places for building a log entry from a given set of dbus interfaces. Consolidate them.
Tested: GET /redfish/v1/Systems/system/LogServices/EventLog/Entries Returns Entries
Get /redfish/v1/Systems/system/LogServices/EventLog/Entries/2 Returns the individual entry, matching the expected result.
Redfish service validator passes for log services. (Other failures present).
Change-Id: I58fb7a4b0af2229416d5efe903ca04771b289962 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
587090cd | 12-Aug-2024 |
Jagpal Singh Gill <paligill@gmail.com> |
update service: use return path for task callback
Currently the update service is using the start update path for monitoring the activation interfaces, but instead it needs to use the object path re
update service: use return path for task callback
Currently the update service is using the start update path for monitoring the activation interfaces, but instead it needs to use the object path returned by start update API. By using the returned path the changes to the activation interface are passed over to the task status. For more details refer to design - https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/65738 https://gerrit.openbmc.org/c/openbmc/docs/+/65739
Tested: Start update with ApplyTime as onReset ``` > curl -k -H "X-Auth-Token: $token" -H "Content-Type:multipart/form-data" -X POST -F UpdateParameters="{\"Targets\":[\"/redfish/v1/UpdateService/FirmwareInventory/3c956be0\"],\"@Redfish.OperationApplyTime\":\"OnReset\"};type=application/json" -F "UpdateFile=@obmc-phosphor-image-romulus-20240529184214.static.mtd.tar;type=application/octet-stream" https://${bmc}/redfish/v1/UpdateService/update { "@odata.id": "/redfish/v1/TaskService/Tasks/0", "@odata.type": "#Task.v1_4_3.Task", "Id": "0", "TaskState": "Running", "TaskStatus": "OK" }
...
> curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/TaskService/Tasks/0 { "@odata.id": "/redfish/v1/TaskService/Tasks/0", "@odata.type": "#Task.v1_4_3.Task", "EndTime": "2024-08-12T07:35:42+00:00", "HidePayload": false, "Id": "0", "Messages": [ ... }, "PercentComplete": 100, "StartTime": "2024-08-12T07:35:15+00:00", "TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/0", "TaskState": "Completed", "TaskStatus": "OK" } ```
Change-Id: Ib17c5da329361fc59b0a1923ace214a8bf9e8371 Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
show more ...
|
b729096d | 07-Aug-2024 |
Ed Tanous <etanous@nvidia.com> |
Refactor large lambda into function
Per Common error #14, large lambdas cause problems. Refactor.
Tested: Inspection Only.
Change-Id: If1e939c55745cfb8c6efb5ec5ba005772e327c63 Signed-off-by: Ed T
Refactor large lambda into function
Per Common error #14, large lambdas cause problems. Refactor.
Tested: Inspection Only.
Change-Id: If1e939c55745cfb8c6efb5ec5ba005772e327c63 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
4e338b23 | 14-Jun-2024 |
Jagpal Singh Gill <paligill@gmail.com> |
update service: remove tftp simple update flow
Remove the flow for tftp simple update as this is an insecure method and there is no active user for this.
Redfish service validator passing: ``` Elap
update service: remove tftp simple update flow
Remove the flow for tftp simple update as this is an insecure method and there is no active user for this.
Redfish service validator passing: ``` Elapsed time: 0:04:33 metadataNamespaces: 3727 pass: 5184 passAction: 16 passGet: 213 passRedfishUri: 205 skipNoSchema: 3 skipOptional: 3535 unvalidated: 1 warnDeprecated: 5 warningPresent: 6 ```
Change-Id: I466dcb09be4ee806451abe91ab86d8b3b001a333 Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
show more ...
|
ab34422d | 07-Aug-2024 |
Ed Tanous <etanous@nvidia.com> |
Fix tabbing on readJsonPatch
Tabbing is wrong. Fix it.
Tested: Whitespace only.
Change-Id: I4ac63a8bdef4e65ff3a4056bc0fe16e55281222d Signed-off-by: Ed Tanous <etanous@nvidia.com> |