History log of /openbmc/bmcweb/features/redfish/lib/hypervisor_system.hpp (Results 26 – 50 of 76)
Revision Date Author Comments
# 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 ...


# b2ba3072 12-May-2023 Patrick Williams <patrick@stwcx.xyz>

fix more push vs emplace calls

It seems like clang-tidy doesn't catch every place that an emplace could
be used instead of a push. Use a few grep/sed pairs to find and fix up
some common patterns.

fix more push vs emplace calls

It seems like clang-tidy doesn't catch every place that an emplace could
be used instead of a push. Use a few grep/sed pairs to find and fix up
some common patterns.

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

show more ...


# ad539545 12-May-2023 Patrick Williams <patrick@stwcx.xyz>

use emplace where appropriate per clang-tidy

The clang-tidy warning 'modernize-use-emplace' correctly flags a
few places where emplace should be used over push.

Signed-off-by: Patrick Williams <pat

use emplace where appropriate per clang-tidy

The clang-tidy warning 'modernize-use-emplace' correctly flags a
few places where emplace should be used over push.

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

show more ...


# 89492a15 10-May-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-16 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-16 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: I75f89d2959b0f1338c20d72ad669fbdc1d720835
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# f96597b5 07-Mar-2023 Gunnar Mills <gmills@us.ibm.com>

Update hypervisor todo

https://gerrit.openbmc.org/c/openbmc/bmcweb/+/61237/3 merged. hypervisor
is no longer in its own namespace.

Tested: None.

Change-Id: I3dc3e01a0c3bcfd9a00a060f04505a6bc70860e

Update hypervisor todo

https://gerrit.openbmc.org/c/openbmc/bmcweb/+/61237/3 merged. hypervisor
is no longer in its own namespace.

Tested: None.

Change-Id: I3dc3e01a0c3bcfd9a00a060f04505a6bc70860e6
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# 746b56f3 27-Feb-2023 Asmitha Karunanithi <asmitk01@in.ibm.com>

Fix hypervisor system Get

The reason for this change is that there are two routes defined:
[1] /redfish/v1/Systems/<str> in systems.hpp
[2] /redfish/v1/Systems/hypervisor in hypervisor_system.hpp

W

Fix hypervisor system Get

The reason for this change is that there are two routes defined:
[1] /redfish/v1/Systems/<str> in systems.hpp
[2] /redfish/v1/Systems/hypervisor in hypervisor_system.hpp

Whenever a user does a get on /redfish/v1/Systems/hypervisor, the first
route is hit and that checks if <str> is "system" and if not, bmcweb
returns resource not found error.

```
Error:
ERROR - Members: GET of resource at URI /redfish/v1/Systems/hypervisor returned HTTP error. Check URI.
ERROR - URI did not return resource /redfish/v1/Systems/hypervisor
GET Failure HTTP Code (404)
```

The below upstream commit is causing this issue:
[1] openbmc/bmcweb@22d268c#diff-cddfc26fddb6ba29f3fd81ecf5840fc6d9a8554bbca92f578d81b97db8b14895

To resolve this issue, an if hypervisor is inserted in the
/redfish/v1/Systems/<str> and that calls handleHypervisorSystemGet. The
/redfish/v1/Systems/hypervisor in redfish-core/lib/hypervisor_system.hpp
is removed.

Also fix /redfish/v1/Systems/hypervisor/ResetActionInfo/.

Redfish validator passed.
redfish/v1/Systems/hypervisor looks good.
/redfish/v1/Systems/hypervisor/ResetActionInfo/ looks good.

Change-Id: Ie2d9d19c258236ce86d6552ae4a3bd486e02de01
Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com>
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# 8d8c30c3 07-Mar-2023 Gunnar Mills <gmills@us.ibm.com>

Move hypervisor system to separate method

Similar to the code we've been building elsewhere, move Hypervisor
system to a separate method, and avoid lambdas.

Tested: Code compiles. Tested as part of

Move hypervisor system to separate method

Similar to the code we've been building elsewhere, move Hypervisor
system to a separate method, and avoid lambdas.

Tested: Code compiles. Tested as part of top patch.

Change-Id: Iac49b1d2e216bf785aa0b0aced6d169457ef5a3c
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# f40448e5 07-Mar-2023 Gunnar Mills <gmills@us.ibm.com>

Move hypervisor ethernet to separate methods

Similar to the code we've been building elsewhere, move ethernet Hypervisor
to separate methods, and avoid lambdas.

Tested: Code compiles. Tested as par

Move hypervisor ethernet to separate methods

Similar to the code we've been building elsewhere, move ethernet Hypervisor
to separate methods, and avoid lambdas.

Tested: Code compiles. Tested as part of top patch.

Change-Id: I3f49b3824c212a9b1e8129b99265ed7a470b3e18
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# a5d0cedb 07-Mar-2023 Gunnar Mills <gmills@us.ibm.com>

Move hypervisor reset to separate methods

Similar to the code we've been building elsewhere, move Reset Hypervisor
to separate methods, and avoid lambdas.

Tested: Code compiles. Tested as part of t

Move hypervisor reset to separate methods

Similar to the code we've been building elsewhere, move Reset Hypervisor
to separate methods, and avoid lambdas.

Tested: Code compiles. Tested as part of top patch.

Change-Id: I19ee473908fac42e69985d406c34cdd6da44c2c6
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


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

Remove the redfish hypervisor namespace

This namespace was created due to some conflicts between these two
namespaces. This commit renames the function that's overloaded and
removes the namespace,

Remove the redfish hypervisor namespace

This namespace was created due to some conflicts between these two
namespaces. This commit renames the function that's overloaded and
removes the namespace, along with the TODO.

Tested: No access to hypervisor to test. Inspection only.

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

show more ...


# 5e7e2dc5 16-Feb-2023 Ed Tanous <edtanous@google.com>

Take boost error_code by reference

By convention, we should be following boost here, and passing error_code
by reference, not by value. This makes our code consistent, and removes
the need for a co

Take boost error_code by reference

By convention, we should be following boost here, and passing error_code
by reference, not by value. This makes our code consistent, and removes
the need for a copy in some cases.

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

show more ...


# eddfc437 26-Sep-2022 Willy Tu <wltu@google.com>

Update most resources to use urlFromPieces

Only id in event_service and account_service have not been updated due
to the risk of it breaking the username/id. It will require further
testing to verif

Update most resources to use urlFromPieces

Only id in event_service and account_service have not been updated due
to the risk of it breaking the username/id. It will require further
testing to verify.

Use urlFromPieces wherever that is needed to insert a variable in the
URI. Don't use urlFromPieces when it is hardcoded values. This allow us
to control all resource URIs that is dynamically added and to sync with
the current recommanded method for `@odata.id`. The goal is to have a
common place to manage the url created from dbus-paths in order to
manage/update it easily when needed.

Tested:
RedfishValidtor Passed for all resource including the sensors with the
fragments.

Change-Id: I95cdfaaee58fc7f21c95f5944e1e5c813b3215f2
Signed-off-by: Willy Tu <wltu@google.com>
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...


# 2b73119c 11-Jan-2023 George Liu <liuxiwei@inspur.com>

Add the GetObject method to dbus_utility

There are currently many files that use the GetObject method.
Since they are a general method, they are defined in the
dbus_utility.hpp file and refactors th

Add the GetObject method to dbus_utility

There are currently many files that use the GetObject method.
Since they are a general method, they are defined in the
dbus_utility.hpp file and refactors them.

Tested: Built bmcweb successfully and Validator passes.

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

show more ...


# 3ccb3adb 13-Jan-2023 Ed Tanous <edtanous@google.com>

Fix a boatload of #includes

Most of these missing includes were found by running clang-tidy on all
files, including headers. The existing scripts just run clang-tidy on
source files, which doesn't

Fix a boatload of #includes

Most of these missing includes were found by running clang-tidy on all
files, including headers. The existing scripts just run clang-tidy on
source files, which doesn't catch most of these.

Tested: Code compiles

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

show more ...


# 7a1dbc48 07-Dec-2022 George Liu <liuxiwei@inspur.com>

Refactor GetSubTreePaths method

Since the GetSubTreePaths method has been implemented in dbus_utility
and this commit is to integrate all the places where the
GetSubTreePaths method is called, and u

Refactor GetSubTreePaths method

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

Requires https://gerrit.openbmc.org/c/openbmc/sdbusplus/+/60020 to
build.

Tested: Redfish Validator Passed

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

show more ...


# f8fe53e7 30-Jun-2022 Ed Tanous <edtanous@google.com>

Change variable scopes

cppcheck correctly notes that a lot of our variables can be declared at
more specific scopes, and in every case, it seems to be correct.

Tested: Redfish service validator pas

Change variable scopes

cppcheck correctly notes that a lot of our variables can be declared at
more specific scopes, and in every case, it seems to be correct.

Tested: Redfish service validator passes. Unit test coverage on others.

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

show more ...


# 613dabea 09-Jul-2022 Ed Tanous <edtanous@google.com>

Remove nlohmann brace initialization

There's a few last places (outside of tests) where we still use
nlohmann brace initialization. Per the transforms we've been doing,
move these to constructing t

Remove nlohmann brace initialization

There's a few last places (outside of tests) where we still use
nlohmann brace initialization. Per the transforms we've been doing,
move these to constructing the objects explicitly, using operator[],
nlohmann::object_t and nlohmann::array_t. Theses were found by manual
inspection grepping for all uses of nlohmann::json.

This is done to reduce binary size and reduce the number of intermediate
objects being constructed. This commit saves a trivial amount of size
(~4KB, Half a percent of total) and in addition but makes our
construction consistent.

Tested:
Redfish service validator passes.

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

show more ...


# 188cb629 25-May-2022 Jiaqing Zhao <jiaqing.zhao@intel.com>

ethernet: Bump EthernetInterface schema 1.4.1 -> 1.6.0

EthernetInterface v1.6.0 adds EthernetInterfaceType property indicating
the type (either Physical or Virtual) of an interface. This property
wi

ethernet: Bump EthernetInterface schema 1.4.1 -> 1.6.0

EthernetInterface v1.6.0 adds EthernetInterfaceType property indicating
the type (either Physical or Virtual) of an interface. This property
will be used by the incoming change #53186 which exposes VLAN interface
as EthernetInterface.

Since the "VLANs" property deprecated from v1.7.0 is still needed for
creating/deleting VLAN interfaces, bmcweb won't bump to a newer schema
version until Redfish spec defines a better way for it.

Tested:
Redfish validator passed.

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

show more ...


# 033f1e4d 15-Aug-2022 Ed Tanous <edtanous@google.com>

Move ipv4VerifyIpAndGetBitcount into ip_utils

This is a minor reorganization of helper code from ethernet (which is
redfish specific) into utils. This function is generic, and should be
in ip utils

Move ipv4VerifyIpAndGetBitcount into ip_utils

This is a minor reorganization of helper code from ethernet (which is
redfish specific) into utils. This function is generic, and should be
in ip utils.

Tested: Code compiles. Code move only.

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

show more ...


# 3ba00073 06-Jun-2022 Carson Labrado <clabrado@google.com>

Expose AsyncResp shared_ptr when handling response

For Redfish Aggregation, we need a common point to check the D-Bus
for satellite configs. If they are available then we perform the
aggregation op

Expose AsyncResp shared_ptr when handling response

For Redfish Aggregation, we need a common point to check the D-Bus
for satellite configs. If they are available then we perform the
aggregation operations. The functions in query.hpp are used by all
endpoints making them the logical location. The aggregation code
requires a shared_ptr to the AsyncResp so these functions need to be
able to supply that.

This patch is broken out of a future patch for routing Redfish
Aggregation requests
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/53310

The follow commands can be used to perform most of the replacements:
find . -type f | xargs sed -i 's/setUpRedfishRoute(app, req, asyncResp->res/setUpRedfishRoute(app, req, asyncResp/g'
find . -type f | xargs sed -i 's/setUpRedfishRouteWithDelegation(app, req, asyncResp->res/setUpRedfishRouteWithDelegation(app, req, asyncResp/g'

Signed-off-by: Carson Labrado <clabrado@google.com>
Change-Id: I4f4f9f22cdcfb14a3bd94b9a8f3d64aae34e57bc

show more ...


# 002d39b4 31-May-2022 Ed Tanous <edtanous@google.com>

Try to fix the lambda formatting issue

clang-tidy has a setting, LambdaBodyIndentation, which it says:
"For callback-heavy code, it may improve readability to have the
signature indented two levels

Try to fix the lambda formatting issue

clang-tidy has a setting, LambdaBodyIndentation, which it says:
"For callback-heavy code, it may improve readability to have the
signature indented two levels and to use OuterScope."

bmcweb is very callback heavy code. Try to enable it and see if that
improves things. There are many cases where the length of a lambda call
will change, and reindent the entire lambda function. This is really
bad for code reviews, as it's difficult to see the lines changed. This
commit should resolve it. This does have the downside of reindenting a
lot of functions, which is unfortunate, but probably worth it in the
long run.

All changes except for the .clang-format file were made by the robot.

Tested: Code compiles, whitespace changes only.

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

show more ...


# 1476687d 15-Mar-2022 Ed Tanous <edtanous@google.com>

Remove brace initialization of json objects

Brace initialization of json objects, while quite interesting from an
academic sense, are very difficult for people to grok, and lead to
inconsistencies.

Remove brace initialization of json objects

Brace initialization of json objects, while quite interesting from an
academic sense, are very difficult for people to grok, and lead to
inconsistencies. This patchset aims to remove a majority of them in
lieu of operator[]. Interestingly, this saves about 1% of the binary
size of bmcweb.

This also has an added benefit that as a design pattern, we're never
constructing a new object, then moving it into place, we're always
adding to the existing object, which in the future _could_ make things
like OEM schemas or properties easier, as there's no case where we're
completely replacing the response object.

Tested:
Ran redfish service validator. No new failures.

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

show more ...


# 82695a5b 14-Apr-2022 Jiaqing Zhao <jiaqing.zhao@intel.com>

ethernet: Fix naming conventions

Some variable names in ethernet.hpp does not match naming conventions,
fix'em all.

Tested:
Only variable name changes, build pass.

Change-Id: If275a77364e5ed827a50

ethernet: Fix naming conventions

Some variable names in ethernet.hpp does not match naming conventions,
fix'em all.

Tested:
Only variable name changes, build pass.

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

show more ...


# 45ca1b86 25-Mar-2022 Ed Tanous <edtanous@google.com>

Add setUpRedfishRoute to all nodes in redfish

For better or worse, the series ahead of this is making use of
setUpRedfishRoute to do the common "redfish specified" things that need
to be done for a

Add setUpRedfishRoute to all nodes in redfish

For better or worse, the series ahead of this is making use of
setUpRedfishRoute to do the common "redfish specified" things that need
to be done for a connection, like header checking, filtering, and other
things. In the current model, where BMCWEB_ROUTE is a common function
for all HTTP routes, this means we need to propagate this injection call
into the whole tree ahead of the requests being handled.

In a perfect world, we would invent something like a REDFISH_ROUTE
macro, but because macros are discouraged, the routes take a variadic
template of parameters, and each call to the route has a .privileges()
call in the middle, there's no good way to effect this change in a less
costly manner. This was messaged both in the prior reviews, and on
discord sourcing improvements on this pattern, to which none arose.

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

show more ...


1234