#
deae6a78 |
| 11-Nov-2024 |
Ed Tanous <etanous@nvidia.com> |
Move getProperty calls to utility
Having all dbus calls run through the same utility reduces the amount of generated code, and more importantly, gives us a place where we can log the requests and re
Move getProperty calls to utility
Having all dbus calls run through the same utility reduces the amount of generated code, and more importantly, gives us a place where we can log the requests and responses to help with debugging.
Tested: Redfish service validator passes.
Change-Id: Ic1bf45130b5069cd57f7af26e12c8d3159c87c67 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
afc474ae |
| 09-Oct-2024 |
Myung Bae <myungbae@us.ibm.com> |
Format readjson
clang-format may potentially reformat the readJson calls if they may have more keys or key names are longer. This makes formatting in a way that's readable by forcing to break a line
Format readjson
clang-format may potentially reformat the readJson calls if they may have more keys or key names are longer. This makes formatting in a way that's readable by forcing to break a line for each key using an empty-comment (`//`) each line.
It also allows trivially alphabetizing the list such that new additions are less likely to have merge conflicts.
Tested: - Check whitespace only. - Code compiles. - Redfish Service Validator with the same results before this
Change-Id: I3824a8c4faa9fa7c820d5d2fab6b565404926e2c Signed-off-by: Ed Tanous <etanous@nvidia.com> Signed-off-by: Myung Bae <myungbae@us.ibm.com>
show more ...
|
#
6be832e2 |
| 10-Sep-2024 |
Ed Tanous <etanous@nvidia.com> |
Remove duplicated block comments
Static analysis flags that these two comments are redundant[1], which seem to be duplicated a lot in copyright headers. Although there is a larger discussion that c
Remove duplicated block comments
Static analysis flags that these two comments are redundant[1], which seem to be duplicated a lot in copyright headers. Although there is a larger discussion that can likely be had.
[1] https://sonarcloud.io/project/issues?issueStatuses=OPEN%2CCONFIRMED&id=edtanous_bmcweb&open=AY9_HYjgKXKyw1ZFwgVP
Tested: Comment change only. Code compiles.
Change-Id: Ia960317761f558a87842347ca0b5f3da63f8e730 Signed-off-by: Ed Tanous <etanous@nvidia.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 ...
|
#
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>
|
#
539d8c6b |
| 19-Jun-2024 |
Ed Tanous <ed@tanous.net> |
Consistently use generated enumerations
This commit causes all of Redfish to use generated enum values for enum types. Using generated code prevents problems, and makes it more clear what types are
Consistently use generated enumerations
This commit causes all of Redfish to use generated enum values for enum types. Using generated code prevents problems, and makes it more clear what types are allowed.
Doing this found two places where we had structs that didn't fulfill the schema. They have been commented, but will be fixed with a breaking change at some point in the future.
Tested: WIP
Change-Id: I5fdd2f2dfb6ec05606a522e1f4e331f982c8e476 Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
1d834d49 |
| 12-Jul-2024 |
Ed Tanous <ed@tanous.net> |
OemComputerSystem -> OpenBMCComputerSystem
Rename these and add a version like we've done other places.
Partial fix for #184
Change-Id: I9039974a90f6508bdd474e6363a3df7286b1473c Signed-off-by: Ed
OemComputerSystem -> OpenBMCComputerSystem
Rename these and add a version like we've done other places.
Partial fix for #184
Change-Id: I9039974a90f6508bdd474e6363a3df7286b1473c Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
67b15903 |
| 12-Jul-2024 |
Asmitha Karunanithi <asmitk01@in.ibm.com> |
Show hypervisor path on GET of Systems collection
Redfish GET on `/redfish/v1/Systems` is missing to show the hypervisor resource in its members list, even though hypervisor is available. This commi
Show hypervisor path on GET of Systems collection
Redfish GET on `/redfish/v1/Systems` is missing to show the hypervisor resource in its members list, even though hypervisor is available. This commit fixes missing hypervisor resource in a GET response on Systems collection. The `Members@odata.count` is retrieved as `uint64_t` pointer. But the Json library might store this value as "int" or "size_t". Therefore, directly casting it to uint64_t* might not work as expected.
Tested By: Verified "GET https://${bmc}/redfish/v1/Systems" returns the hypervisor resource
Change-Id: If8713fc70663cf72cc555f695b8f4ec6547215a2 Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
show more ...
|
#
e93abac6 |
| 14-Jun-2024 |
Ginu George <ginugeorge@ami.com> |
Pass redfishPropertyName earlier argument
It was pointed out that the setDbusProperty method should have an end that approximately matches dbus-send and busctl set-property in its arguments, to aid
Pass redfishPropertyName earlier argument
It was pointed out that the setDbusProperty method should have an end that approximately matches dbus-send and busctl set-property in its arguments, to aid with debug. This seems reasonable.
Tested: Redfish service validator passes.
Change-Id: Ic20295d93c71c957e3e76704e1eda9da187861b1 Signed-off-by: Ginu George <ginugeorge@ami.com> Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
efff2b5d |
| 18-Jun-2024 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Fix spelling mistakes using codespell
This commit corrects various spelling mistakes throughout the repository. The corrections were made automatically using `codespell`[1] tool.
[1]: https://githu
Fix spelling mistakes using codespell
This commit corrects various spelling mistakes throughout the repository. The corrections were made automatically using `codespell`[1] tool.
[1]: https://github.com/codespell-project/codespell
Change-Id: I8751c35ad7246f73ec2e7cd4a04488c25bde3f39 Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com> Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
#
20fa6a2c |
| 20-May-2024 |
Ed Tanous <ed@tanous.net> |
Remove the last instances of json pattern
In the past, we've tried to erradicate the use of nlohmann::json(initiatlizer_list<...>) because it bloats binary sizes, as every type is given a new nlohma
Remove the last instances of json pattern
In the past, we've tried to erradicate the use of nlohmann::json(initiatlizer_list<...>) because it bloats binary sizes, as every type is given a new nlohmann constructor.
This commit hunts down the last few places where we call this. There is still 2 remaining in openbmc_dbus_rest after this, but those are variant accesses that are difficult to triage, and considering it's a less used api, they're left as is.
Tested: WIP
Change-Id: Iaac24584bb78bb238da69010b511c1d598bd38bc Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
253f11b8 |
| 16-May-2024 |
Ed Tanous <ed@tanous.net> |
Allow configuring "bmc" and "system"
In the early days of bmcweb, we made two pretty critical assumptions; First, is that a given platform would only have a single BMC instance (represented as "bmc"
Allow configuring "bmc" and "system"
In the early days of bmcweb, we made two pretty critical assumptions; First, is that a given platform would only have a single BMC instance (represented as "bmc") and a single host instance (represented as "system"). Second we assumed that, given that Redfish suggests against hardcoding URIs in client implementation and leaves them freeform, clients would code to the standard.
Our own webui-vue hardcodes Redfish URIs [1], and the documentation is littered with examples of hardcoded curl examples of hardcoding these URIs. That bug was filed in 2020, and the issue has only gotten worse over time.
This patchset is an attempt to give a target that we can start solving these issues, without trying to boil the ocean and fix all clients in parallel.
This commit adds the meson options redfish-manager-uri-name and redfish-system-uri-name
These are used to control the "name" that bmcweb places in the fixed locations in the ManagerCollection and ComputerSystemCollection schemas.
Note, managers is added, but is not currently testable. It will be iterated on over time.
Tested: Changed the URL options to "edsbmc" and "edssystem" in meson options.
Redfish service validator passes. URLs appear changed when walking the tree.
[1] https://github.com/openbmc/webui-vue/issues/43
Change-Id: I4b44685067051512bd065da8c2e3db68ae5ce23a Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
25b54dba |
| 17-Apr-2024 |
Ed Tanous <ed@tanous.net> |
Bring consistency to config options
The configuration options that exist in bmcweb are an amalgimation of CROW options, CMAKE options using #define, pre-bmcweb ifdef mechanisms and meson options usi
Bring consistency to config options
The configuration options that exist in bmcweb are an amalgimation of CROW options, CMAKE options using #define, pre-bmcweb ifdef mechanisms and meson options using a config file. This history has led to a lot of different ways to configure code in the codebase itself, which has led to problems, and issues in consistency.
ifdef options do no compile time checking of code not within the branch. This is good when you have optional dependencies, but not great when you're trying to ensure both options compile.
This commit moves all internal configuration options to: 1. A namespace called bmcweb 2. A naming scheme matching the meson option. hyphens are replaced with underscores, and the option is uppercased. This consistent transform allows matching up option keys with their code counterparts, without naming changes. 3. All options are bool true = enabled, and any options with _ENABLED or _DISABLED postfixes have those postfixes removed. (note, there are still some options with disable in the name, those are left as-is) 4. All options are now constexpr booleans, without an explicit compare.
To accomplish this, unfortunately an option list in config/meson.build is required, given that meson doesn't provide a way to dump all options, as is a manual entry in bmcweb_config.h.in, in addition to the meson_options. This obsoletes the map in the main meson.build, which helps some of the complexity.
Now that we've done this, we have some rules that will be documented. 1. Runtime behavior changes should be added as a constexpr bool to bmcweb_config.h 2. Options that require optionally pulling in a dependency shall use an ifdef, defined in the primary meson.build. (note, there are no options that currently meet this class, but it's included for completeness.)
Note, that this consolidation means that at configure time, all options are printed. This is a good thing and allows direct comparison of configs in log files.
Tested: Code compiles Server boots, and shows options configured in the default build. (HTTPS, log level, etc)
Change-Id: I94e79a56bcdc01755036e4e7278c7e69e25809ce Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
87c44966 |
| 04-Apr-2024 |
Asmitha Karunanithi <asmitk01@in.ibm.com> |
Move to Redfish setProperty call
This commit changes sdbusplus setProperty calls (in various files) to setDbusProperty method in Redfish namespace that handles all DBus errors in a consistent manner
Move to Redfish setProperty call
This commit changes sdbusplus setProperty calls (in various files) to setDbusProperty method in Redfish namespace that handles all DBus errors in a consistent manner.
It also handles and translates additional DBus errors to Redfish specific errors in dbus_utils file.
Tested By: Not tested yet
Change-Id: If440774879413754f4c24f9b6572c3c9fa1fd033 Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
show more ...
|
#
7ac13cc9 |
| 01-Apr-2024 |
Gunnar Mills <gmills@us.ibm.com> |
Remove redfish-health-populate
The redfish-health-populate option was scheduled to be removed in 1Q 2024. It is now 2Q, so remove the option. No upstream layers enabled it and did not find a downstr
Remove redfish-health-populate
The redfish-health-populate option was scheduled to be removed in 1Q 2024. It is now 2Q, so remove the option. No upstream layers enabled it and did not find a downstream layer that did either.
This was always limited to a few resources. Overall this design was only half done. A future "HealthRollup" can be proposed.
Some discord discussion: [1]: https://discord.com/channels/775381525260664832/855566794994221117/1110728560819327069
Commit disabling this (merged 10 months ago): [2]: https://github.com/openbmc/bmcweb/commit/6f8273e49cffdd347c223b9538558edfb05e818a
Tested: Code compiles
Change-Id: I4d33c1e674ecdb0fd256df62f3795073454ae7a1 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
#
51bd2d8a |
| 01-Apr-2024 |
Gunnar Mills <gmills@us.ibm.com> |
Remove redfish-enable-proccessor-memory-status
The redfish-enable-proccessor-memory-status option was scheduled to be removed in 1Q 2024. It is now 2Q, so remove the option. No upstream layers enabl
Remove redfish-enable-proccessor-memory-status
The redfish-enable-proccessor-memory-status option was scheduled to be removed in 1Q 2024. It is now 2Q, so remove the option. No upstream layers enabled it and I could not find a downstream layer that did either.
Redfish deprecated the Processor/Memory Summary Status (state, health, healthrollup) attributes.
Discussion on discord, when disabling: [1]: https://discord.com/channels/775381525260664832/855566794994221117/1093939076710793296
Commit disabling this (merged 10 months ago): [2]: https://github.com/openbmc/bmcweb/commit/5fd0aafb0f14fb3011970e8575647bb608688c7c
Tested: Code builds.
Change-Id: I539cd5f384633afa7badf1cecfc6c7a87062f672 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
#
a5a8ac27 |
| 27-Mar-2024 |
Ed Tanous <ed@tanous.net> |
Remove duplicated include
This include exists above.
Tested: code compiles.
Change-Id: I8e5d7bce292486d2f534da1b539212113c1e8d56 Signed-off-by: Ed Tanous <ed@tanous.net>
|
#
d02aad39 |
| 13-Feb-2024 |
Ed Tanous <ed@tanous.net> |
Create Redfish specific setProperty call
There are currently 78 sdbusplus::asio::setProperty calls in redfish-core. The error handler for nearly all of them looks something like:
``` if (ec) {
Create Redfish specific setProperty call
There are currently 78 sdbusplus::asio::setProperty calls in redfish-core. The error handler for nearly all of them looks something like:
``` if (ec) { const sd_bus_error* dbusError = msg.get_error(); if ((dbusError != nullptr) && (dbusError->name == std::string_view( "xyz.openbmc_project.Common.Error.InvalidArgument"))) { BMCWEB_LOG_WARNING("DBUS response error: {}", ec); messages::propertyValueIncorrect(asyncResp->res, "<PropertyName>", <PropertyValue>); return; } messages::internalError(asyncResp->res); return; } messages::success(asyncResp->res);
```
In some cases there are more errors handled that translate to more error messages, but the vast majority only handle InvalidArgument. Many of these, like the ones in account_service.hpp, do the error handling in a lambda, which causes readability problems. This commit starts to make things more consistent, and easier for trivial property sets.
This commit invents a setDbusProperty method in the redfish namespace that tries to handle all DBus errors in a consistent manner. Looking for input on whether this will work before changing over the other 73 calls. Overall this is less code, fewer inline lambdas, and defaults that should work for MOST use cases of calling an OpenBMC daemon, and fall back to more generic errors when calling a "normal" dbus daemon.
As part of this, I've ported over several examples. Some things that might be up in the air: 1. Do we always return 204 no_content on property sets? Today there's a mix of 200, with a Base::Success message, and 204, with an empty body. 2. Do all DBus response codes map to the same error? A majority are covered by xyz.openbmc_project.Common.Error.InvalidArgument, but there are likely differences. If we allow any daemon to return any return code, does that cause compatibility problems later?
Tested: ``` curl -k --user "root:0penBmc" -H "Content-Type: application/json" -X PATCH -d '{"HostName":"openbmc@#"}' https://192.168.7.2/redfish/v1/Managers/bmc/EthernetInterfaces/eth0 ```
Returns the appropriate error in the response Base.1.16.0.PropertyValueIncorrect
Change-Id: If033a1112ba516792c9386c997d090c8f9094f3a Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
e715d14b |
| 07-Mar-2024 |
Ed Tanous <ed@tanous.net> |
Fix behavior when service is missing
Fix regression as part of 33e1f122b740c5de679dc0350b5f41e8d975499f AllowedHostTransitions: look for on dbus
I have no idea why checking against .value() matters
Fix behavior when service is missing
Fix regression as part of 33e1f122b740c5de679dc0350b5f41e8d975499f AllowedHostTransitions: look for on dbus
I have no idea why checking against .value() matters here, but on systems that doesn't have this daemon present, checking against ec == instead of ec.value() == causes this to return 500.
Loaded on qemu, without an implementation of AllowedValues. ``` curl -vvvv -k --user "root:0penBmc" -H "Content-Type: application/json" https://192.168.7.2/redfish/v1/Systems/system/ResetActionInfo ```
Now succeeds.
Change-Id: I05758c3f9fd9d0f1c90830ba005c74bc6f874bd6 Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
33e1f122 |
| 26-Feb-2024 |
Andrew Geissler <geissonator@yahoo.com> |
AllowedHostTransitions: look for on dbus
Commit [1] introduced a new optional dbus property that OpenBMC developers can populate to define which redfish/v1/Systems/system/ResetActionInfo AllowableVa
AllowedHostTransitions: look for on dbus
Commit [1] introduced a new optional dbus property that OpenBMC developers can populate to define which redfish/v1/Systems/system/ResetActionInfo AllowableValues are.
Look for that new property on dbus. If not found, hard code the previous values otherwise utilize the property to fill in the return value.
Tested: - Put new property on dbus and confirmed Redfish API returned expected values: ``` curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Systems/system/ResetActionInfo { "@odata.id": "/redfish/v1/Systems/system/ResetActionInfo", "@odata.type": "#ActionInfo.v1_1_2.ActionInfo", "Id": "ResetActionInfo", "Name": "Reset Action Info", "Parameters": [ { "AllowableValues": [ "ForceOff", "PowerCycle", "Nmi", "On", "ForceOn", "ForceRestart", "GracefulRestart", "GracefulShutdown" ], "DataType": "String", "Name": "ResetType", "Required": true } ] } ``` - Did not run redfish validator as response was same as previous
[1]: https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/68933
Change-Id: Iecece14e7ff55db98d96df71b106ecc9e3f0ac33 Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
#
6b9ac4f2 |
| 15-Feb-2024 |
Chris Cain <cjcain@us.ibm.com> |
Systems: Add support to read AllowedPowerModes
Instead of hardcodeing the AllowedPowerModes property, the data will be read from dbus if it exists. If data is empty/not found, the property will be s
Systems: Add support to read AllowedPowerModes
Instead of hardcodeing the AllowedPowerModes property, the data will be read from dbus if it exists. If data is empty/not found, the property will be set to the default value: [ "MaximumPerformance", "PowerSaving", "Static" ]
Tested on Rainier hardware and Validator passed
When dbus property is empty, it will show default modes: ''' xyz.openbmc_project.Control.Power.Mode interface - - - .AllowedPowerModes property as 0 const .PowerMode property s "xyz.openbmc_project.Control.Power.Mode.PowerMode.MaximumPerformance" emits-change writable
"PowerMode": "MaximumPerformance", "PowerMode@Redfish.AllowableValues": [ "MaximumPerformance", "PowerSaving", "Static" ], "PowerRestorePolicy": "AlwaysOff", '''
When dbus property populated with 6 modes: ''' - xyz.openbmc_project.Control.Power.Mode interface - - - .AllowedPowerModes property as 6 "xyz.openbmc_project.Control.Power.Mode.PowerMode.BalancedPerformance" "xyz.openbmc_project.Control.Power.Mode.PowerMode.EfficiencyFavorPerformance" "xyz.openbmc_project.Control.Power.Mode.PowerMode.EfficiencyFavorPower" "xyz.openbmc_project.Control.Power.Mode.PowerMode.MaximumPerformance" "xyz.openbmc_project.Control.Power.Mode.PowerMode.PowerSaving" "xyz.openbmc_project.Control.Power.Mode.PowerMode.Static" const .PowerMode property s "xyz.openbmc_project.Control.Power.Mode.PowerMode.MaximumPerformance" emits-change writable
"PowerMode": "MaximumPerformance", "PowerMode@Redfish.AllowableValues": [ "BalancedPerformance", "EfficiencyFavorPerformance", "EfficiencyFavorPower", "MaximumPerformance", "PowerSaving", "Static" ], "PowerRestorePolicy": "AlwaysOff", '''
When dbus property not defined it will show default modes: ''' xyz.openbmc_project.Control.Power.Mode interface - - - .PowerMode property s "xyz.openbmc_project.Control.Power.Mode.PowerMode.MaximumPerformance" emits-change writable
"PowerMode": "MaximumPerformance", "PowerMode@Redfish.AllowableValues": [ "MaximumPerformance", "PowerSaving", "Static" ], "PowerRestorePolicy": "AlwaysOff", '''
Signed-off-by: Chris Cain <cjcain@us.ibm.com> Change-Id: Ic9882d2760a39dd1a0ea353624eb3c8575f4c6a0
show more ...
|
#
b6655101 |
| 01-Feb-2024 |
Chris Cain <cjcain@us.ibm.com> |
Systems: Add support for new eco power modes
Add support for the following new power modes: - Efficiency Favor Performance - Efficiency Favor Power - Balanced Performance
New modes were added in Co
Systems: Add support for new eco power modes
Add support for the following new power modes: - Efficiency Favor Performance - Efficiency Favor Power - Balanced Performance
New modes were added in ComputerSystem schema to v1.22
Tested on Rainier and passed Validator
''' GET /redfish/v1/Systems/system: "@odata.type": "#ComputerSystem.v1_22_0.ComputerSystem", ... "PowerMode": "EfficiencyFavorPerformance", "PowerMode@Redfish.AllowableValues": [ "Static", "MaximumPerformance", "PowerSaving" ],
PATCH -d '{ "PowerMode":"BalancedPerformance"}' https://$bmc/redfish/v1/Systems/system "PowerMode": "BalancedPerformance",
PATCH -d '{ "PowerMode":"EfficiencyFavorPerformance"}' https://$bmc/redfish/v1/Systems/system "PowerMode": "EfficiencyFavorPerformance",
PATCH -d '{ "PowerMode":"EfficiencyFavorPower"}' https://$bmc/redfish/v1/Systems/system "PowerMode": "EfficiencyFavorPower",
PATCH -d '{ "PowerMode":"MaximumPerformance"}' https://$bmc/redfish/v1/Systems/system "PowerMode": "MaximumPerformance",
PATCH -d '{ "PowerMode":"NotARealMode"}' https://$bmc/redfish/v1/Systems/system { "PowerMode@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The value '\"NotARealMode\"' for the property PowerMode is not in the list of acceptable values.", "MessageArgs": [ "\"NotARealMode\"", "PowerMode" ], "MessageId": "Base.1.13.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." } ] '''
Validator Results: ''' Type (ComputerSystem.v1_22_0.ComputerSystem), GET SUCCESS (time: 0:00:00.107269) ... PASS ... Elapsed time: 0:15:07 invalidPropertyValue: 62 metadataNamespaces: 4324 pass: 14323 passAction: 20 passGet: 1051 passRedfishUri: 1002 skipNoSchema: 3 skipOptional: 25582 unverifiedAdditional.complex: 21 warnDeprecated: 8 warningPresent: 83 warnings: 67 Validation has succeeded. '''
Change-Id: I56296a524b01d64adccad2d3da1757056900b6db Signed-off-by: Chris Cain <cjcain@us.ibm.com>
show more ...
|
#
70c4d545 |
| 08-Jun-2023 |
Lakshmi Yadlapati <lakshmiy@us.ibm.com> |
Refactor PCIeDeviceList to use getCollectionMembers
This commit refactors the code in the PCIeDeviceList function to use the getCollectionMembers function for retrieving collection members. Addition
Refactor PCIeDeviceList to use getCollectionMembers
This commit refactors the code in the PCIeDeviceList function to use the getCollectionMembers function for retrieving collection members. Additionally, a new function getCollectionToKey() is added to handle the retrieval of collection members with custom key name.
Tested: Validator passed
''' Test1: Redfish query of PCI devices on a system that does not have any PCIe devices
curl -k https://$bmc/redfish/v1/Systems/system/PCIeDevices { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices", "@odata.type": "#PCIeDeviceCollection.PCIeDeviceCollection", "Description": "Collection of PCIe Devices", "Members": [], "Members@odata.count": 0, "Name": "PCIe Device Collection" }
Test2: Redfish query of PCIe devices on a system that has PCIe devices
curl -k https://$bmc/redfish/v1/Systems/system/PCIeDevices { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices", "@odata.type": "#PCIeDeviceCollection.PCIeDeviceCollection", "Description": "Collection of PCIe Devices", "Members": [ { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/drive0" }, ....... { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card1" }, { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card2" }, ....... { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card12" } ], "Members@odata.count": 22, "Name": "PCIe Device Collection" }
Test3: Redfish query of system with PCIe devices curl -k https://$bmc/redfish/v1/Systems/system { "@odata.id": "/redfish/v1/Systems/system", "@odata.type": "#ComputerSystem.v1_16_0.ComputerSystem", "Actions": { "#ComputerSystem.Reset": { "@Redfish.ActionInfo": "/redfish/v1/Systems/system/ResetActionInfo", "target": "/redfish/v1/Systems/system/Actions/ComputerSystem.Reset" } }, ...... "PCIeDevices": [ { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/drive0" }, ....... { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card1" }, .... ], "PCIeDevices@odata.count": 22, "PartNumber": "", .... "SubModel": "S0", "SystemType": "Physical" } '''
Change-Id: Icb38945a2c7bc5219ff3917fbbc8a9986c9c6155 Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com>
show more ...
|