#
37bbf98c
|
| 20-Sep-2021 |
Chris Cain <cjcain@us.ibm.com> |
Systems: Add IdlePowerSave support
Idle power saver is a system wide mode that will reduce the power usage when the system reaches an idle state. The system will also exit idle power save once the
Systems: Add IdlePowerSave support
Idle power saver is a system wide mode that will reduce the power usage when the system reaches an idle state. The system will also exit idle power save once the performance increases to a specified utilization.
The idle state is defined as when the processor utilization drops to EnterUtilizationPercent for EnterDwellTimeSeconds. Once the utilization increases to ExitUtilizationPercent for ExitDwellTimeSeconds, the system will return to normal (non-idle) state.
Ran Validator on hardware and all /redfish/v1/Systems/system tests passed.
Tested: I manually tested retrieving and setting the PowerMode property on a Rainier system (with good and bad values)
$ curl -s -k -X GET https://$bmc/redfish/v1/Systems/system | grep -A6 IdlePowerSaver "IdlePowerSaver": { "Enabled": false, "EnterDwellTimeSeconds": 240, "EnterUtilizationPercent": 8, "ExitDwellTimeSeconds": 10, "ExitUtilizationPercent": 12 },
$ curl -k -X PATCH -d '{"IdlePowerSaver":{"Enabled":true}}' https://$bmc/redfish/v1/Systems/system
$ curl -k -X PATCH -d '{"IdlePowerSaver":{"Enabled":false,"EnterUtilizationPercent":8,"EnterDwellTimeSeconds":240,"ExitUtilizationPercent":12,"ExitDwellTimeSeconds":10}}' https://$bmc/redfish/v1/Systems/system
Signed-off-by: Chris Cain <cjcain@us.ibm.com> Change-Id: Icdc948f133959dce4297ab9774c2e9c8acb620e3
show more ...
|
#
03fbed92
|
| 03-Sep-2021 |
Ali Ahmed <ama213000@gmail.com> |
Add CoreCount to ProcessorSummary
In Redfish ComputerSystem schema, the ProcessorSummary parameter lists summary information of the Processors on the system. This commit adds the 'CoreCount' propert
Add CoreCount to ProcessorSummary
In Redfish ComputerSystem schema, the ProcessorSummary parameter lists summary information of the Processors on the system. This commit adds the 'CoreCount' property to ProcessorSummary.
Testing:
1. Redfish Validator Testing successfully passed. 2. Curl testing:
curl -k -H "X-Auth-Token: $tok" https://$bmc/redfish/v1/Systems/system
... "ProcessorSummary": { "CoreCount": 24, "Count": 2, "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Disabled" } }, ...
Signed-off-by: Ali Ahmed <ama213000@gmail.com> Change-Id: Idda4f20bd1bb3f5002791ad20787979c632ed5f0
show more ...
|
#
ac7e1e0b
|
| 15-Sep-2021 |
Ali Ahmed <ama213000@gmail.com> |
Move TPMRequiredToBoot under Boot for PATCH call
TrustedModuleRequiredToBoot is a sub-parameter of the 'Boot' parameter. Edits the patch code to make sure the patch happens under '{"Boot":{"TrustedM
Move TPMRequiredToBoot under Boot for PATCH call
TrustedModuleRequiredToBoot is a sub-parameter of the 'Boot' parameter. Edits the patch code to make sure the patch happens under '{"Boot":{"TrustedModuleRequiredToBoot": false}}', instead of current: '{"TrustedModuleRequiredToBoot":false}'.
Testing:
1) Curl testing:
curl -k -H "X-Auth-Token: $token" -X PATCH \ -d '{"Boot":{"TrustedModuleRequiredToBoot": true}}' \ https://${bmc}/redfish/v1/Systems/system
curl -k -H "X-Auth-Token: $token" \ https://${bmc}/redfish/v1/Systems/system
{ ... "Boot": { "AutomaticRetryAttempts": 3, "AutomaticRetryConfig": "Disabled", "AutomaticRetryConfig@Redfish.AllowableValues": [ "Disabled", "RetryAttempts" ], "BootSourceOverrideEnabled": "Disabled", "BootSourceOverrideTarget": "BiosSetup", "BootSourceOverrideTarget@Redfish.AllowableValues": [ "None", "Pxe", "Hdd", "Cd", "Diags", "BiosSetup", "Usb" ], "TrustedModuleRequiredToBoot": "Required" }, ... }
Signed-off-by: Ali Ahmed <ama213000@gmail.com> Change-Id: I70b26a8e3c7282fa628dcc149d1328a8dc9f0b8b
show more ...
|
#
a1978347
|
| 31-Aug-2021 |
Ali Ahmed <ama213000@gmail.com> |
Have ProcessorSummary correctly set Status
Remove unnecessary condition, and correctly get Status from Present and Functional properties.
Removal of if, else code: 1. If condition never evaluates t
Have ProcessorSummary correctly set Status
Remove unnecessary condition, and correctly get Status from Present and Functional properties.
Removal of if, else code: 1. If condition never evaluates to false ('else' branch is never taken) Properties size will always be 7 as that's how it's defined here [1]
Context: The 'if' code branch was originally there for a company that was NOT following the d-bus interfaces. See commit 57e8c9b [2] & gerrit [3]. Later, properties were added to the Inventory.Item.Cpu interface, so now everyone is hitting this 'if' branch. See commit 259f49e [4].
The code in the 'else' condition uses Inventory.Item Present and State.Decorator.OperationalStatus Function to determine Redfish "Count", "Status""State", "Status""Health", since this is the correct way to determine Redfish Status.
Summary: 1) Removes the if/else condition, and 2) Retains the code that was in the else condition
[1] https://github.com/openbmc/phosphor-dbus-interfaces/blob/master /yaml/xyz/openbmc_project/Inventory/Item/Cpu.interface.yaml
[2] https://github.com/openbmc/bmcweb/commit/57e8c9b
[3] https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/20572/4
[4] https://github.com/openbmc/phosphor-dbus-interfaces/commit/259f49e
Tested:
curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/Systems/system Before: ... "ProcessorSummary": { "Count": 0, "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Disabled" } }, ...
After: ... "ProcessorSummary": { "Count": 2, "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" } }, ...
Signed-off-by: Ali Ahmed <ama213000@gmail.com> Change-Id: I1a38086b87f4f1e2ebbfa3b5058d95158d29002a
show more ...
|
#
1c05dae3
|
| 29-Jun-2021 |
Ali Ahmed <ama213000@gmail.com> |
Add TrustedModuleRequiredToBoot setter function
TrustedModuleRequiredToBoot is a Redfish ComputerSystem v1_14_0 property, determining if a working TPM is required in order to boot the host. The TPM
Add TrustedModuleRequiredToBoot setter function
TrustedModuleRequiredToBoot is a Redfish ComputerSystem v1_14_0 property, determining if a working TPM is required in order to boot the host. The TPM Required property is mapped to the "TPMEnable" D-Bus property. The possible values for the Redfish property are "Required" and "Disabled".
This commit will add the PATCH operations to the TrustedModuleRequiredToBoot Redfish property. (See https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/43930 for the GET operations for this property).
Testing:
1) Curl Testing: I manually tested retrieving the property: *Default value of TrustedModuleRequiredToBoot is ??Required??
curl -k -H "X-Auth-Token: $token" -X PATCH -d \ '{"TrustedModuleRequiredToBoot":false}' \ https://${bmc}/redfish/v1/Systems/system
curl -k -H "X-Auth-Token: $token" \ https://${bmc}/redfish/v1/Systems/system { "@odata.id": "/redfish/v1/Systems/system", "@odata.type": "#ComputerSystem.v1_14_0.ComputerSystem", ... "Boot": { "AutomaticRetryAttempts": 3, ?? "RemainingAutomaticRetryAttempts": 3, "TrustedModuleRequiredToBoot": "Disabled" }, ...
On HW: D-Bus TPMEnable shows up correctly as 'false' '# busctl get-property xyz.openbmc_project.Settings \ /xyz/openbmc_project/control/host0/TPMEnable \ xyz.openbmc_project.Control.TPM.Policy TPMEnable' b false
2) Redfish Validator Testing: Tested on ComputerSystem v1_14_0 schema Validator Test everything passed and 0 failures.
Signed-off-by: Ali Ahmed <ama213000@gmail.com> Change-Id: Ie96a6afca179e45bef35813a3fa9c8a10cdf234e
show more ...
|
#
c21865c4
|
| 21-Jun-2021 |
Konstantin Aladyshev <aladyshev22@gmail.com> |
Support new boot override setting design
Add support for the new boot override setting design that was pushed in the commit: "phosphor-settings-manager: redesign boot setting override feature" (open
Support new boot override setting design
Add support for the new boot override setting design that was pushed in the commit: "phosphor-settings-manager: redesign boot setting override feature" (openbmc/openbmc/+/44226). The new design not only simplifies boot override settings handling, but also removes interdependency between BootType/BootSource/ BootMode parameters that was present in the handling code.
In the old design there wasn't any place to encode boot override disabled state on a Dbus. Therefore bmcweb used implicit mapping of boot parameters to address the problem of encoding disabled override state: "BootSourceOverrideEnabled=Disabled" = "BootSourceOverrideMode=UEFI" + "BootSourceOverrideTarget=None" But with this approach if you set: "BootSourceOverrideEnabled=Once" "BootSourceOverrideMode=UEFI" "BootSourceOverrideTarget=None" You would later read: "BootSourceOverrideEnabled=Disabled" "BootSourceOverrideMode=UEFI" "BootSourceOverrideTarget=None" Which is not what is expected.
Also this interdependency between boot parameters complicates the code. For example if we only try to set the boot mode, we need also to check the boot target and probably set the boot enabled state. If we only try to read boot enabled, we also need to check boot mode and boot target. This is also not good.
In the new design there is a specific Dbus interface that is used to store overall override enabled state. With it is possible to remove the implicit mapping of boot parameters to disabled state and remove the unnecessary interdependency between the boot override parameters.
Also now with the help of "Support all parameter combinations in Redfish boot tests" (openbmc-test-automation/+/44225) it it possible to test for all combinations of boot override parameters.
Tested with the openbmc-test-automation with the aforementioned patch applied (openbmc-test-automation/+/44225) with "boot_type" feature present: robot -v PLATFORM_ARCH_TYPE:x86 \ -v OPENBMC_HOST:<BMC IP> \ redfish/systems/test_boot_devices.robot
Also tested with the openbmc-test-automation with the aforementioned patch applied (openbmc-test-automation/+/44225) without "boot_type" feature present: robot -v OPENBMC_HOST:<BMC IP> \ redfish/systems/test_boot_devices.robot
More information about boot source override design differences can be found at the mailing list discussions: https://lists.ozlabs.org/pipermail/openbmc/2021-May/026533.html and https://lists.ozlabs.org/pipermail/openbmc/2021-June/026759.html
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Change-Id: Id0b24b37a4519a2efbb97da597858c295d7c6c27 Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
show more ...
|
#
cd9a4666
|
| 26-Feb-2021 |
Konstantin Aladyshev <aladyshev22@gmail.com> |
Add support for the BootSourceOverrideMode
BootSourceOverrideMode is the BIOS boot mode to use when the system boots from the BootSourceOverrideTarget boot source.
Possible values are: -Legacy - Th
Add support for the BootSourceOverrideMode
BootSourceOverrideMode is the BIOS boot mode to use when the system boots from the BootSourceOverrideTarget boot source.
Possible values are: -Legacy - The system boots in non-UEFI boot mode to the boot source override target -UEFI - The system boots in UEFI boot mode to the boot source override target
For the architectures that don't implement Legacy/UEFI boot mode property (for example POWER), don't publish BootSourceOverrideMode interface at all.
Redfish validator has been executed on this change and no new error was found.
Also tested with the help of the openbmc-test-automation framework. When the Legacy/UEFI boot mode is present in the system command for testing is: robot -v PLATFORM_ARCH_TYPE:x86 \ -v OPENBMC_HOST:<BMC IP> \ redfish/systems/test_boot_devices.robot
When the Legacy/UEFI boot mode is not present in the system command for testing is: robot -v OPENBMC_HOST:<BMC IP> \ redfish/systems/test_boot_devices.robot
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com> Change-Id: Id64e428752b820d481ce15d56566dd7b06738ec0
show more ...
|
#
4f48d5f6
|
| 21-Jun-2021 |
Ed Tanous <edtanous@google.com> |
Make code compile with clang-13
Clang-13 rightfully warns that the hasWebuiRoute variable isn't declared as static. This commit resolves that, and adds the static keyword so it can be used in multi
Make code compile with clang-13
Clang-13 rightfully warns that the hasWebuiRoute variable isn't declared as static. This commit resolves that, and adds the static keyword so it can be used in multiple compile units. It also adds the static keyword to the privilege registry, and the inline keyword to many methods that now need it.
clang-format is also updated to version 12 in parse_registies.py, as that's what CI uses, and what most people have installed.
Tested: Followed clang-tidy instructions in README.md "bitbake bmcweb" step now succeeds.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Id43b13606754cb37a404799fce155599ac3a3240
show more ...
|
#
ed398213
|
| 09-Jun-2021 |
Ed Tanous <edtanous@google.com> |
Automate PrivilegeRegistry to code
This commit attempts to automate the creation of our privileges structures from the redfish privilege registry. It accomplishes this by updating parse_registries.
Automate PrivilegeRegistry to code
This commit attempts to automate the creation of our privileges structures from the redfish privilege registry. It accomplishes this by updating parse_registries.py to also pull down the privilege registry from DMTF. The script then generates privilege_registry.hpp, which include const defines for all the privilege registry entries in the same format that the Privileges struct accepts. This allows new clients to simply reference the variable to these privilege structures, instead of having to manually (ie error pronely) put the privileges in themselves.
This commit updates all the routes.
For the moment, override and OEM schemas are not considered. Today we don't have any OEM-specific Redfish routes, so the existing ones inherit their parents schema. Overrides have other issues, and are already incorrect as Redfish defines them.
Binary size remains unchanged after this patchset.
Tested: Ran redfish service validator
Ran test case from f9a6708c4c6490257e2eb6a8c04458f500902476 to ensure that the new privileges constructor didn't cause us to regress the brace construction initializer.
Checked binary size with: gzip -c $BBPATH/tmp/work/s7106-openbmc-linux-gnueabi/obmc-phosphor-image/1.0-r0/rootfs/usr/bin/bmcweb | wc -c 1244048
(tested on previous patchset)
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ideede3d5b39d50bffe7fe78a0848bdbc22ac387f
show more ...
|
#
3a2d0424
|
| 28-May-2021 |
Chris Cain <cjcain@us.ibm.com> |
Systems: Add PowerMode support
The computer system power mode defines the behavior of a system based on the performance and power saving requirements. For example, a system could be set to MaximumPe
Systems: Add PowerMode support
The computer system power mode defines the behavior of a system based on the performance and power saving requirements. For example, a system could be set to MaximumPerformance to run as fast as possible without regard to power consumption. A system could also be configured to run in PowerSaving mode which would be running at slower speeds to try to save power. More information can be found at https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/38786
This commit will allow GET / PATCH operations to the PowerMode property
PowerMode was added in Redfish Release 2021.1: https://www.dmtf.org/content/redfish-release-20211-now-available
Tested: I manually tested retrieving and setting the PowerMode property on a Rainier system (with good and bad values): # curl -k https://$bmc/redfish/v1/Systems/system { "@odata.id": "/redfish/v1/Systems/system", "@odata.type": "#ComputerSystem.v1_15_0.ComputerSystem ... "PartNumber": "", "PowerMode": "MaximumPerformance", "PowerMode@Redfish.AllowableValues": [ "Static", "MaximumPerformance", "PowerSaving" ], "PowerRestorePolicy": "AlwaysOff", ... # curl -k https://$bmc/xyz/openbmc_project/control/host0/power_mode { "data": { "PowerMode": "xyz.openbmc_project.Control.Power.Mode.PowerMode.MaximumPerformance" }, "message": "200 OK", "status": "ok" } # curl -k -X PATCH -d '{ "PowerMode":"Static"}' https://$bmc/redfish/v1/Systems/system curl -k https://$bmc/xyz/openbmc_project/control/host0/power_mode { "data": { "PowerMode": "xyz.openbmc_project.Control.Power.Mode.PowerMode.Static" }, "message": "200 OK", "status": "ok" } Ran Validator on hardware and all tests passed: Elapsed time: 0:05:07 Counter({'skipOptional': 7128, 'pass': 6020, 'metadataNamespaces': 2217, 'passGet': 315, 'warnDeprecated': 212, 'serviceNamespaces': 79, 'warningPresent': 47, 'warnTrailingSlashLink': 24, 'invalidPropertyValue': 18, 'passAction': 14, 'optionalAction': 11, 'repeat': 3, 'unverifiedComplexAdditional': 1}) Validation has succeeded.
Signed-off-by: Chris Cain <cjcain@us.ibm.com> Change-Id: I5523a0ebe4a2a77ea4709a14863bff7b55f0303d
show more ...
|
#
1981771b
|
| 29-Jun-2021 |
Ali Ahmed <ama213000@gmail.com> |
Add TrustedModuleRequiredToBoot getter function
TrustedModuleRequiredToBoot is a Redfish ComputerSystem v1_14_0 property, determining if a working TPM is required in order to boot the host. The TPM
Add TrustedModuleRequiredToBoot getter function
TrustedModuleRequiredToBoot is a Redfish ComputerSystem v1_14_0 property, determining if a working TPM is required in order to boot the host. The TPM Required property is mapped to the "TPMEnable" D-Bus property. The possible values for the Redfish property are "Required" and "Disabled".
This commit will add the GET operations to the TrustedModuleRequiredToBoot Redfish property. (See https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/44044 for the PATCH operations for this property).
Testing:
1) Tested on HW: I manually tested retrieving the property: $ curl -k https://${bmc}/redfish/v1/Systems/system { "@odata.id": "/redfish/v1/Systems/system", "@odata.type": "#ComputerSystem.v1_14_0.ComputerSystem", ... "Boot": { "AutomaticRetryAttempts": 3, "AutomaticRetryConfig": "RetryAttempts", "AutomaticRetryConfig@Redfish.AllowableValues": [ "Disabled", "RetryAttempts" ], "BootSourceOverrideEnabled": "Disabled", "BootSourceOverrideMode": "Legacy", "BootSourceOverrideTarget": "None", "BootSourceOverrideTarget@Redfish.AllowableValues": [ "None", "Pxe", "Hdd", "Cd", "Diags", "BiosSetup", "Usb" ], "RemainingAutomaticRetryAttempts": 3, "TrustedModuleRequiredToBoot": "Required" }, ...
TrustedModuleRequiredToBoot switches between 'Required' and 'Disabled' values when the relevant dbus property is changed. (D-Bus Interface: xyz.openbmc_project.Control.TPM.Policy) (D-Bus Property: TPMEnable)
2) Redfish Validator Testing: Tested on ComputerSystem v1_14_0 schema Validator Test everything passed and 0 failures.
Signed-off-by: Ali Ahmed <ama213000@gmail.com> Change-Id: I7d0b9430e592d6d8ec95cd9090551fab802d8f54
show more ...
|
#
0e8ac5e7
|
| 06-Nov-2020 |
Gunnar Mills <gmills@us.ibm.com> |
Move Consoles to ComputerSystem
2020.3 moved SerialConsole and GraphicalConsole to ComputerSystem.
More information can be found on: http://www.dmtf.org/sites/default/files/Redfish_Release_2020.3_O
Move Consoles to ComputerSystem
2020.3 moved SerialConsole and GraphicalConsole to ComputerSystem.
More information can be found on: http://www.dmtf.org/sites/default/files/Redfish_Release_2020.3_Overview.pdf
These Consoles are readonly properties and were recently added. Figured no clients are looking for them, but the OCP profile does require SerialConsole so left them in Manager.
The OCP profile has not released a new version in 18 months. Filed the following issue with the profile: https://github.com/opencomputeproject/OCP-Profiles/issues/23
After we remove from manager the following validator warning will go away: "SerialConsole: The given property is deprecated by revision: This property has been deprecated in favor of the SerialConsole property in the ComputerSystem resource."
Tested: Passes Validator. "GraphicalConsole": { "ConnectTypesSupported": [ "KVMIP" ], "MaxConcurrentSessions": 4, "ServiceEnabled": true },
"SerialConsole": { "IPMI": { "ServiceEnabled": true }, "MaxConcurrentSessions": 15, "SSH": { "HotKeySequenceDisplay": "Press ~. to exit console", "Port": 2200, "ServiceEnabled": true } },
Change-Id: I1cc41c0da67e0d4123678f645828dfe1856d7a8f Signed-off-by: Gunnar Mills <gmills@us.ibm.com> Signed-off-by: Abhishek Patel <Abhishek.Patel@ibm.com>
show more ...
|
#
432a890c
|
| 14-Jun-2021 |
Ed Tanous <edtanous@google.com> |
Remove ambiguous privileges constructor
There are a number of endpoints that assume that a given routes privileges are governed by a single set of privileges, instead of multiple sets ORed together.
Remove ambiguous privileges constructor
There are a number of endpoints that assume that a given routes privileges are governed by a single set of privileges, instead of multiple sets ORed together. To handle this, there were two overloads of the privileges() method, one that took a vector of Privileges, and one that took an initializer_list of const char*. Unfortunately, this leads some code in AccountService to pick the wrong overload when it's called like this .privileges( {{"ConfigureUsers"}, {"ConfigureManager"}, {"ConfigureSelf"}})
This is supposed to be "User must have ConfigureUsers, or ConfigureManager, or ConfigureSelf". Currently, because it selects the wrong overload, it computes to "User must have ConfigureUsers AND ConfigureManager AND ConfigureSelf.
The double braces are supposed to cause this to form a vector of Privileges, but it appears that the initializer list gets consumed, and the single invocation of initializer list is called. Interestingly, trying to put in a privileges overload of intializer_list<initializer_list<const char*>> causes the compilation to fail with an ambiguous call error, which is what I would've expected to see previously in this case, but alas, I'm only a novice when it comes to how the C++ standard works in these edge cases. This is likely due in part to the fact that they were templates of an unused template param (seemingly copied from the previous method) and SFINAE rules around templates.
This commit functionally removes one of the privileges overloads, and adds a second set of braces to every privileges call that previously had a single set of braces. Previous code will not compile now, which is IMO a good thing.
This likely popped up in the Node class removal, because the Node class explicitly constructs a vector of Privilege objects, ensuing it can hit the right overload
Tested: Ran Redfish service validator
Tested the specific use case outlined on discord with: Creating a new user with operator privilege: ``` redfishtool -S Always -u root -p 0penBmc -vvvvvvvvv -r 192.168.7.2 AccountService adduser foo mysuperPass1 Operator ```
Then attempting to list accounts: ``` curl -vvvv --insecure --user foo:mysuperPass1 https://192.168.7.2/redfish/v1/AccountService/Accounts/foo ```
Which succeeded and returned the account in question.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I83e62b70e97f56dc57d43b9081f333a02fe85495
show more ...
|
#
7e860f15
|
| 08-Apr-2021 |
John Edward Broadbent <jebr@google.com> |
Remove Redfish Node class
Reduces the total number of lines and will allow for easier testing of the redfish responses.
A main purpose of the node class was to set app.routeDynamic(). However now a
Remove Redfish Node class
Reduces the total number of lines and will allow for easier testing of the redfish responses.
A main purpose of the node class was to set app.routeDynamic(). However now app.routeDynamic can handle the complexity that was once in critical to node. The macro app.routeDynamic() provides a shorter cleaner interface to the unerlying app.routeDyanic call. The old pattern set permissions for 6 interfaces (get, head, patch, put, delete_, and post) even if only one interface is created. That pattern creates unneeded code that can be safely removed with no effect. Unit test for the responses would have to mock the node the class in order to fully test responses.
see https://github.com/openbmc/bmcweb/issues/181
The following files still need node to be extracted.
virtual_media.hpp account_service.hpp redfish_sessions.hpp ethernet.hpp
The files above use a pattern that is not trivial to address. Often their responses call an async lambda capturing the inherited class. ie (https://github.com/openbmc/bmcweb/blob/ffed87b5ad1797ca966d030e7f979770 28d258fa/redfish-core/lib/account_service.hpp#L1393) At a later point I plan to remove node from the files above.
Tested: I ran the docker unit test with the following command. WORKSPACE=$(pwd) UNIT_TEST_PKG=bmcweb ./openbmc-build-scripts/run-unit-test-docker.sh
I ran the validator and this change did not create any issues. python3 RedfishServiceValidator.py -c config.ini
Signed-off-by: John Edward Broadbent <jebr@google.com> Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I147a0289c52cb4198345b1ad9bfe6fdddf57f3df
show more ...
|
#
15c27bf8
|
| 27-Apr-2021 |
Noah Brewer <noah.t.brewer@gmail.com> |
Redfish: Update Powering On Status State
If the HostState is TransitioningToRunning, Redfish response should indicate Starting.
Tested: - Changed HostState to TransitioningToRunning via busctl and
Redfish: Update Powering On Status State
If the HostState is TransitioningToRunning, Redfish response should indicate Starting.
Tested: - Changed HostState to TransitioningToRunning via busctl and get redfish/v1/Systems/system and verified Status State as "Starting" - Docker unit test passed - Redfish validator passed
Signed-off-by: Noah Brewer <noah.t.brewer@gmail.com> Change-Id: I69719fdbb32247fd31327be9ad39068e2898c2db
show more ...
|
#
601af5ed
|
| 15-Apr-2021 |
Chicago Duan <duanzhijia01@inspur.com> |
Redfish : Return after InternalError instead of Continue
"After setting response to internal error you should stop adding more content to response. Try to return instead of continuing a loop"
https
Redfish : Return after InternalError instead of Continue
"After setting response to internal error you should stop adding more content to response. Try to return instead of continuing a loop"
https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/39970/9/redfish-core/lib/pcie_slots.hpp#169
Signed-off-by: Chicago Duan <duanzhijia01@inspur.com> Change-Id: Iadd3062ba7fef31ba61eea1e79eb3a903716b9e9
show more ...
|
#
8d1b46d7
|
| 31-Mar-2021 |
zhanghch05 <zhanghch05@inspur.com> |
Using AsyncResp everywhere
Get the core using AsyncResp everywhere, and not have each individual handler creating its own object.We can call app.handle() without fear of the response getting ended a
Using AsyncResp everywhere
Get the core using AsyncResp everywhere, and not have each individual handler creating its own object.We can call app.handle() without fear of the response getting ended after the first tree is done populating. Don't use res.end() anymore.
Tested: 1. Validator passed.
Signed-off-by: zhanghaicheng <zhanghch05@inspur.com> Change-Id: I867367ce4a0caf8c4b3f4e07e06c11feed0782e8
show more ...
|
#
4e69c904
|
| 05-Jan-2021 |
Gunnar Mills <gmills@us.ibm.com> |
Fix Power Restore Policy not valid enum error
When the client passes a value that is not in list of accepted values use propertyValueNotInList.
Tested: curl -k -X PATCH -d '{"PowerRestorePolicy":"
Fix Power Restore Policy not valid enum error
When the client passes a value that is not in list of accepted values use propertyValueNotInList.
Tested: curl -k -X PATCH -d '{"PowerRestorePolicy":"badvalue"}'\ https://${bmc}/redfish/v1/Systems/system { "PowerRestorePolicy@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The value badvalue for the property PowerRestorePolicy is not in the list of acceptable values.", "MessageArgs": [ "badvalue", "PowerRestorePolicy" ], "MessageId": "Base.1.8.1.PropertyValueNotInList",
Change-Id: Icfa910c9f79aa6ff0a87f748b55ad52d8ad411d8 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
#
1a2a1437
|
| 06-Jan-2021 |
Andrew Geissler <geissonator@yahoo.com> |
transition support for system state
The following commit defined two new values for the host state: https://github.com/openbmc/phosphor-dbus-interfaces/commit/9f65dfeaa5ab22cae03db45c9916868da9864f8
transition support for system state
The following commit defined two new values for the host state: https://github.com/openbmc/phosphor-dbus-interfaces/commit/9f65dfeaa5ab22cae03db45c9916868da9864f83
These new state values, TransitioningToOff and TransitioningToRunning, map quite well to the Redfish system PowerState values of PoweringOff and PoweringOn.
There have been requests from external users of our Redfish interfaces to know this level of detail, especially in the PoweringOff path due to the length of time it can take (up to 2 hours is allowed for the host to shut itself down gracefully).
Tested: - Put host state D-Bus property in each of new states and verified Redfish API returned expected results.
Change-Id: I0c43dc2fa8b057beea48bc6f3dcde80d094ccfdb Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
show more ...
|
#
37ec9072
|
| 05-Jan-2021 |
Gunnar Mills <gmills@us.ibm.com> |
Fix Power Restore Policy to match D-Bus
The D-Bus Power Restore Policies are AlwaysOn, AlwaysOff, and Restore. https://github.com/openbmc/phosphor-dbus-interfaces/blob/32304979b404c24e32f195d08c667e
Fix Power Restore Policy to match D-Bus
The D-Bus Power Restore Policies are AlwaysOn, AlwaysOff, and Restore. https://github.com/openbmc/phosphor-dbus-interfaces/blob/32304979b404c24e32f195d08c667e65b9b34695/xyz/openbmc_project/Control/Power/RestorePolicy.interface.yaml#L23
The Redfish states are AlwaysOn, AlwaysOff, and LastState.
Tested: Validator passes. curl -v -k -X PATCH -d '{"PowerRestorePolicy":"LastState"}' \ https://${bmc}/redfish/v1/Systems/system ... < HTTP/1.1 204 No Content
curl -k https://${bmc}/redfish/v1/Systems/system { "@odata.id": "/redfish/v1/Systems/system", "@odata.type": "#ComputerSystem.v1_13_0.ComputerSystem", ... "Name": "system", "PowerRestorePolicy": "LastState", "PowerState": "Off", "ProcessorSummary": { "Count": 0,
Change-Id: I4d91bd4480f626467e3bb9804fa0392bbafcc891 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
#
d6aa0093
|
| 25-Nov-2020 |
Gunnar Mills <gmills@us.ibm.com> |
IndicatorLED: Add a deprecated warning header
Added a warning header when IndicatorLED is patched telling the client it is deprecated and pointing to LocationIndicatorActive.
Used the warning synta
IndicatorLED: Add a deprecated warning header
Added a warning header when IndicatorLED is patched telling the client it is deprecated and pointing to LocationIndicatorActive.
Used the warning syntax from https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Warning
Tested: curl -X PATCH -v -d '{ "IndicatorLED":"Off"}' \ -k https://$bmc/redfish/v1/Systems/system ... < HTTP/1.1 204 No Content < Warning: 299 - "IndicatorLED is deprecated. Use LocationIndicatorActive instead." < Strict-Transport-Security: max-age=31536000; includeSubdomains; preload < X-Frame-Options: DENY
Change-Id: Ic25a02508b0a1bcada1fa71ffa413c493fad00c4 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
#
978b8803
|
| 19-Nov-2020 |
Andrew Geissler <geissonator@yahoo.com> |
boot-progress: support LastState property
This commit provides initial support for the LastState property within the Redfish BootProgress object.
The design details of OpenBMC's implementation of t
boot-progress: support LastState property
This commit provides initial support for the LastState property within the Redfish BootProgress object.
The design details of OpenBMC's implementation of this can be found here: https://github.com/openbmc/docs/blob/master/designs/boot-progress.md
Tested: - Set each possible value for the D-Bus BootProgress property and verified the Redfish API returned the expected value. This includes setting it to MotherboardInit and verifying "None" was returned because this does not have a mapping to the new Redfish enumeration. - Verified Redfish Validator passed
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I8bc6e7012f4afc3152a0af2c5ebf8a55b1112773
show more ...
|
#
94bda602
|
| 19-Nov-2020 |
Tim Lee <timlee660101@gmail.com> |
systems: fix Members@odata.count is incorrect even Members have contents
Issue symptom: Run automation test "Verify_Systems_Defaults" then we got ERROR as below. Verify Systems Defaults :: Verify sy
systems: fix Members@odata.count is incorrect even Members have contents
Issue symptom: Run automation test "Verify_Systems_Defaults" then we got ERROR as below. Verify Systems Defaults :: Verify systems defaults. | FAIL | **ERROR** Invalid variable value: systems['Members@odata.count']: 0 <int>
Root cause: In Systems, doGet() didn't calculate count after ifaceArray.push_back({{"@odata.id", "/redfish/v1/Systems/system"}})
Solution: Increase count by ifaceArray.size() after ifaceArray.push_back() in Systems
Tested: 1. Verified robot -t Verify_Systems_Defaults redfish/service_root/test_sessions_management.robot Verify Systems Defaults :: Verify systems defaults. | PASS |
2. Verified system detail from Redfish. Get https://<BMC-IP>/redfish/v1/Systems Response: { "@odata.id": "/redfish/v1/Systems", "@odata.type": "#ComputerSystemCollection.ComputerSystemCollection", "Members": [ { "@odata.id": "/redfish/v1/Systems/system" } ], "Members@odata.count": 1, "Name": "Computer System Collection" }
Signed-off-by: Tim Lee <timlee660101@gmail.com> Change-Id: I9cdb5dac9e16851112085048bc674808511a4845
show more ...
|
#
9f8bfa7c
|
| 28-Sep-2020 |
Gunnar Mills <gmills@us.ibm.com> |
Add new Location Indicator property
In ComputerSystem 1.13 and Chassis 1.14 as well as in many other schemas IndicatorLED is replaced with LocationIndicatorActive.
LocationIndicatorActive is a bool
Add new Location Indicator property
In ComputerSystem 1.13 and Chassis 1.14 as well as in many other schemas IndicatorLED is replaced with LocationIndicatorActive.
LocationIndicatorActive is a bool while IndicatorLED had 3 states: Lit, Blink, and off. Map Lit and Blink both to LocationIndicatorActive true.
led.hpp was calling both enclosure_identify_blink and enclosure_identify, continue this.
Keep the deprecated IndicatorLED and implement the new LocationIndicatorActive property. Have both properties for the time being. This new property makes the same calls.
This does add a new Redfish warning for the deprecated IndicatorLED. Other warning are there today.
Tested: Validator passes Could use help testing on Chassis. Our systems don't have a IndicatorLED on chassis. See chassis bumped. curl -k https://$bmc/redfish/v1/Systems/system { "@odata.id": "/redfish/v1/Systems/system", "@odata.type": "#ComputerSystem.v1_13_0.ComputerSystem", ... "IndicatorLED": "Off", "LastResetTime": "2020-10-29T09:01:03+00:00", "Links": { "Chassis": [ { "@odata.id": "/redfish/v1/Chassis/chassis" } ], "ManagedBy": [ { "@odata.id": "/redfish/v1/Managers/bmc" } ] }, "LocationIndicatorActive": false,
curl -X PATCH -d '{ "LocationIndicatorActive":true}' -k \ https://$bmc/redfish/v1/Systems/system
curl -X PATCH -d '{ "IndicatorLED":"Off"}' -k \ https://$bmc/redfish/v1/Systems/system
Change-Id: I105bed5794912c575aa9a00e0442461bfdee6180 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
#
98e386ec
|
| 30-Oct-2020 |
Gunnar Mills <gmills@us.ibm.com> |
AssetTag: Add PATCH support
Use the same AssetTag logic from the GET. Look for xyz.openbmc_project.Inventory.Item.System interface then call that service and path to set the AssetTag.
This assumes
AssetTag: Add PATCH support
Use the same AssetTag logic from the GET. Look for xyz.openbmc_project.Inventory.Item.System interface then call that service and path to set the AssetTag.
This assumes there is 1 "Item.System". Considered something like "if (!boost::ends_with(path, "system")) continue; " but no where else does bmcweb check that the Item.System is named "system" i.e. that /redfish/v1/Systems/system is actually named "system" on D-Bus.
Considered looking that the service had the interface if not move to the next service but the GET code does not so just followed it.
Tested: curl -k-X PATCH -d '{"AssetTag": "Paramo"}' https://${bmc}/redfish/v1/Systems/system/ curl -k https://${bmc}/redfish/v1/Systems/system/ { "@odata.id": "/redfish/v1/Systems/system", "@odata.type": "#ComputerSystem.v1_12_0.ComputerSystem", "Actions": { "#ComputerSystem.Reset": { "@Redfish.ActionInfo": "/redfish/v1/Systems/system/ResetActionInfo", "target": "/redfish/v1/Systems/system/Actions/ComputerSystem.Reset" } }, "AssetTag": "Paramo", ... Validator passes.
Change-Id: I45f80a8a69457f76e6e83ad2333856abe61de933 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|