History log of /openbmc/bmcweb/redfish-core/lib/hypervisor_system.hpp (Results 1 – 25 of 74)
Revision Date Author Comments
# 40e9b92e 10-Sep-2024 Ed Tanous <etanous@nvidia.com>

Use SPDX identifiers

SPDX identifiers are simpler, and reduce the amount of cruft we have in
code files. They are recommended by linux foundation, and therefore we
should do as they allow.

This pa

Use SPDX identifiers

SPDX identifiers are simpler, and reduce the amount of cruft we have in
code files. They are recommended by linux foundation, and therefore we
should do as they allow.

This patchset does not intend to modify any intent on any existing
copyrights or licenses, only to standardize their inclusion.

[1] https://www.linuxfoundation.org/blog/blog/copyright-notices-in-open-source-software-projects

Change-Id: I935c7c0156caa78fc368c929cebd0f068031e830
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...


# 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 ...


# 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 ...


# 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 ...


# 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 ...


# 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 ...


# 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 ...


# 1827b4f1 03-Apr-2024 Asmitha Karunanithi <asmitk01@in.ibm.com>

Move to Redfish Action specific setProperty call

This commit will migrate all the setProperty calls initiated by a
redfish"Action" to "setDbusProperty" method in Redfish namespace that
handles all D

Move to Redfish Action specific setProperty call

This commit will migrate all the setProperty calls initiated by a
redfish"Action" to "setDbusProperty" method in Redfish namespace that
handles all DBuserrors in a consistent manner.

This method will determine if a setProperty is called during redfish
"Action" or just setting of a dbus property and internally call
appropriate methods that handles different set of errors.

All the Redfish action specific errors are defined in error_messages.hpp
file.
This specific change moves setProperty call in hypervisor_system.hpp and
covers errors in the mentioned file only.

Tested-By:
<Yet to test this usecase>

Change-Id: I3da48fbeabcdcf088c4481021232f08a44797c86
Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
Signed-off-by: Ed Tanous <ed@tanous.net>

show more ...


# 8cb2c024 27-Mar-2024 Ed Tanous <ed@tanous.net>

Fix moves/forward

Clang has new checks for std::move/std::forward correctness, which
catches quite a few "wrong" things where we were making copies of
callback handlers.

Unfortunately, the lambda s

Fix moves/forward

Clang has new checks for std::move/std::forward correctness, which
catches quite a few "wrong" things where we were making copies of
callback handlers.

Unfortunately, the lambda syntax of

callback{std::forward<Callback>(callback)}

in a capture confuses it, so change usages to
callback = std::forward<Callback>(callback)

to be consistent.

Tested: Redfish service validator passes.

Change-Id: I7a111ec00cf78ecb7d5f5b102c786c1c14d74384
Signed-off-by: Ed Tanous <ed@tanous.net>

show more ...


# 21fe928b 06-Mar-2024 Ed Tanous <ed@tanous.net>

Clean up hypervisor to use readJson

Use multiple level direct read.

Tested: Visual only. Need help if anyone wants to test.

Change-Id: Ifcf716a2ba93fd565bbf134d4132532e60e3b4f0
Signed-off-by: Ed T

Clean up hypervisor to use readJson

Use multiple level direct read.

Tested: Visual only. Need help if anyone wants to test.

Change-Id: Ifcf716a2ba93fd565bbf134d4132532e60e3b4f0
Signed-off-by: Ed Tanous <ed@tanous.net>

show more ...


# d82b5e1f 28-Mar-2024 Asmitha Karunanithi <asmitk01@in.ibm.com>

hypervisor: Move to setProperty dbus util method

This commit changes sdbusplus setProperty calls in
hypervisor_system.hpp file to "setDbusProperty" method in Redfish
namespace that handles all DBus

hypervisor: Move to setProperty dbus util method

This commit changes sdbusplus setProperty calls in
hypervisor_system.hpp file to "setDbusProperty" method in Redfish
namespace that handles all DBus errors in a consistent manner.

Change-Id: Iebca5eb4e28159d61cd4b13c0343b78efd0f1f39
Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>

show more ...


# 5a39f77a 20-Oct-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-17 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-17 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: I2f9540cf0d545a2da4d6289fc87b754f684bc9a7
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 62598e31 17-Jul-2023 Ed Tanous <ed@tanous.net>

Replace logging with std::format

std::format is a much more modern logging solution, and gives us a lot
more flexibility, and better compile times when doing logging.

Unfortunately, given its level

Replace logging with std::format

std::format is a much more modern logging solution, and gives us a lot
more flexibility, and better compile times when doing logging.

Unfortunately, given its level of compile time checks, it needs to be a
method, instead of the stream style logging we had before. This
requires a pretty substantial change. Fortunately, this change can be
largely automated, via the script included in this commit under
scripts/replace_logs.py. This is to aid people in moving their
patchsets over to the new form in the short period where old patches
will be based on the old logging. The intention is that this script
eventually goes away.

The old style logging (stream based) looked like.

BMCWEB_LOG_DEBUG << "Foo " << foo;

The new equivalent of the above would be:
BMCWEB_LOG_DEBUG("Foo {}", foo);

In the course of doing this, this also cleans up several ignored linter
errors, including macro usage, and array to pointer deconstruction.

Note, This patchset does remove the timestamp from the log message. In
practice, this was duplicated between journald and bmcweb, and there's
no need for both to exist.

One design decision of note is the addition of logPtr. Because the
compiler can't disambiguate between const char* and const MyThing*, it's
necessary to add an explicit cast to void*. This is identical to how
fmt handled it.

Tested: compiled with logging meson_option enabled, and launched bmcweb

Saw the usual logging, similar to what was present before:
```
[Error include/webassets.hpp:60] Unable to find or open /usr/share/www/ static file hosting disabled
[Debug include/persistent_data.hpp:133] Restored Session Timeout: 1800
[Debug redfish-core/include/event_service_manager.hpp:671] Old eventService config not exist
[Info src/webserver_main.cpp:59] Starting webserver on port 18080
[Error redfish-core/include/event_service_manager.hpp:1301] inotify_add_watch failed for redfish log file.
[Info src/webserver_main.cpp:137] Start Hostname Monitor Service...
```
Signed-off-by: Ed Tanous <ed@tanous.net>

Change-Id: I86a46aa2454be7fe80df608cb7e5573ca4029ec8

show more ...


# 8b24275d 27-Jun-2023 Ed Tanous <edtanous@google.com>

Rename all error_code instances to ec

We're not consistent here, which leads to people copying and pasting
code all over, which has lead to a bunch of different names for error
codes.

This commit c

Rename all error_code instances to ec

We're not consistent here, which leads to people copying and pasting
code all over, which has lead to a bunch of different names for error
codes.

This commit changes to coerce them all to "ec", because that's what
boost uses for a naming convention.

Tested: Rename only, code compiles.

Change-Id: I7053cc738faa9f7a82f55fc46fc78618bdf702a5
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...


# 9ae226fa 21-Jun-2023 George Liu <liuxiwei@inspur.com>

Refactor setProperty method

SetProperty is a method we should use more, and use consistently in the
codebase, this commit makes it consistently used from the utility
namespace.

Tested: Refactor. C

Refactor setProperty method

SetProperty is a method we should use more, and use consistently in the
codebase, this commit makes it consistently used from the utility
namespace.

Tested: Refactor. Code compiles.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I5939317d23483e16bd98a8298f53e75604ef374d

show more ...


# 5eb468da 20-Jun-2023 George Liu <liuxiwei@inspur.com>

Refactor getManagedObjects method

Since the getManagedObjects method has been implemented in
dbus_utility and this commit is to integrate all the places where the
GetManagedObjects method is obtaine

Refactor getManagedObjects method

Since the getManagedObjects method has been implemented in
dbus_utility and this commit is to integrate all the places where the
GetManagedObjects method is obtained, and use the method in
dbus_utility uniformly.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Ic13f2bef7b30f805cd3444a75d7df17b031f2eb0

show more ...


# f818b04d 27-Jun-2022 Ed Tanous <edtanous@google.com>

Make propertyValueFormatError more typesafe

Similar to other patches, make propertyValueFormatError accept a
nlohmann::json object, which removes a lot of the unsafe dump code that
we have littered

Make propertyValueFormatError more typesafe

Similar to other patches, make propertyValueFormatError accept a
nlohmann::json object, which removes a lot of the unsafe dump code that
we have littered about.

Tested: No easy to replicate error. Code is identical to previous
patchsets. Inspection and code compilation only.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ic9d0f196b6e198073189f744b738db7ffa2f1b74

show more ...


# 2e8c4bda 27-Jun-2022 Ed Tanous <edtanous@google.com>

Make propertyValueTypeError more typesafe

Similar to the prior patchset in this series, propertyValueTypeError can
be moved to safer constructs. This ensures that we are minimizing how
many places

Make propertyValueTypeError more typesafe

Similar to the prior patchset in this series, propertyValueTypeError can
be moved to safer constructs. This ensures that we are minimizing how
many places we are calling dump() from, and allows us to reduce the
amount of code written for error handling.

Tested:
PATCH /redfish/v1/SessionService {"SessionTimeout": "foo"}

Returns PropertyValueTypeError in the same behavior as prior to this
patch.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Iddff4b787f35c49bf923663d61bba156687f358c

show more ...


# ac106bf6 07-Jun-2023 Ed Tanous <edtanous@google.com>

Consistently name AsyncResp variables

In about half of our code, AsyncResp objects take the name asyncResp,
and in the other half they take the name aResp. While the difference
between them is negl

Consistently name AsyncResp variables

In about half of our code, AsyncResp objects take the name asyncResp,
and in the other half they take the name aResp. While the difference
between them is negligeble and arbitrary, having two naming conventions
makes it more difficult to do automated changes over time via grep.

This commit was generated automtatically with the command:
git grep -l 'aResp' | xargs sed -i 's|aResp|asyncResp|g'

Tested: Code compiles.

Change-Id: Id363437b6a78f51e91cbf60aa0a0c2286f36a037
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...


# 93bbc953 23-Feb-2023 Jiaqing Zhao <jiaqing.zhao@intel.com>

ethernet: Bump EthernetInterface schema 1.6.0 -> 1.9.0

After removing all usages of VLanNetworkInterface that deprecated in
EthernetInterface 1.7.0, time to bump it to 1.9.0 for implementing
the new

ethernet: Bump EthernetInterface schema 1.6.0 -> 1.9.0

After removing all usages of VLanNetworkInterface that deprecated in
EthernetInterface 1.7.0, time to bump it to 1.9.0 for implementing
the new API design.

Tested:
Redfish validator passed.

Change-Id: Ia89d56a1325918c23ce54c9b8c0dde4342e32764
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>

show more ...


# 77179532 28-Feb-2023 Ed Tanous <edtanous@google.com>

Remove flat_set from EthernetInterfaces

None of these are actually used as a set, we should avoid taking the
overhead of using these as a set.

Tested in next commit.

Signed-off-by: Ed Tanous <edta

Remove flat_set from EthernetInterfaces

None of these are actually used as a set, we should avoid taking the
overhead of using these as a set.

Tested in next commit.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I7a7f2c9761a2adc70f6c6ab127facc9d801a2209

show more ...


# ef4c65b7 24-Apr-2023 Ed Tanous <edtanous@google.com>

Boost::urls::format

Boost 1.82 dropped a lovely new toy, boost::urls::format, which is a lot
like our urlFromPieces method, but better in that it makes the resulting
uris more readable, and allows d

Boost::urls::format

Boost 1.82 dropped a lovely new toy, boost::urls::format, which is a lot
like our urlFromPieces method, but better in that it makes the resulting
uris more readable, and allows doing things like fragments in a single
line instead of multiple. We should prefer it in some cases.

Tested:
Redfish service validator passes.
Spot checks of URLs work as expected.
Unit tests pass.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ia7b38f0a95771c862507e7d5b4aa68aa1c98403c

show more ...


123