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


# 3179105b 12-Mar-2021 Sunny Srivastava <sunnsr25@in.ibm.com>

Implementation of FabricAdapter schema in bmcweb

This commit implements FabricAdapter and FabricAdapter collection
schema. This code assumes all FabricAdapters are under
/redfish/v1/Systems/system l

Implementation of FabricAdapter schema in bmcweb

This commit implements FabricAdapter and FabricAdapter collection
schema. This code assumes all FabricAdapters are under
/redfish/v1/Systems/system like we do for Memory and Processors.

The schema can be used to publish inventory properties for FRUs
which can be modelled as Fabric adapters.

As a current use case, this schema is required to link ports on
fabric adapters back to the system.

A FabricAdapter represents the physical fabric adapter capable of
connecting to an interconnect fabric.
Examples include but are not limited to Ethernet, NVMe over Fabrics,
Gen-Z, and SAS fabric adapters.

Tested: Manually tested on the system, Run Redfish validator. Found no
error.

{
"@odata.id": "/redfish/v1/Systems/system/FabricAdapters",
"@odata.type": "#FabricAdapterCollection.FabricAdapterCollection",
"Members": [
{
"@odata.id": "/redfish/v1/Systems/system/FabricAdapters/disk_backplane0"
},
{
"@odata.id": "/redfish/v1/Systems/system/FabricAdapters/disk_backplane1"
},
{
"@odata.id": "/redfish/v1/Systems/system/FabricAdapters/pcie_card0"
},
{
"@odata.id": "/redfish/v1/Systems/system/FabricAdapters/pcie_card3"
},
{
"@odata.id": "/redfish/v1/Systems/system/FabricAdapters/pcie_card4"
},
{
"@odata.id": "/redfish/v1/Systems/system/FabricAdapters/pcie_card8"
},
{
"@odata.id": "/redfish/v1/Systems/system/FabricAdapters/pcie_card10"
},
{
"@odata.id": "/redfish/v1/Systems/system/FabricAdapters/pcie_card11"
}
],
"Members@odata.count": 8,
"Name": "Fabric Adapter Collection"
}

{
"@odata.id": "/redfish/v1/Systems/system/FabricAdapters/pcie_card11",
"@odata.type": "#FabricAdapter.v1_0_0.FabricAdapter",
"Id": "pcie_card11",
"Name": "Fabric Adapter"
}

Signed-off-by: sunny srivastava <sunnsr25@in.ibm.com>
Change-Id: I4d3bc31a6f0036c262c0e30481d0da4aaf59b5ab
Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com>

show more ...


# e99073f5 08-Dec-2022 George Liu <liuxiwei@inspur.com>

Refactor GetSubTree method

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

Refactor GetSubTree method

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

Tested: Redfish Validator Passed

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

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


# b6d5d45c 07-Oct-2022 Hieu Huynh <hieuh@os.amperecomputing.com>

Adds LastStateTime in Redfish BootProgress

The LastStateTime is the last time the BootProgress property was
updated. It is defined by BootProgressUpdate D-bus [1].
This commit is to support this.

[

Adds LastStateTime in Redfish BootProgress

The LastStateTime is the last time the BootProgress property was
updated. It is defined by BootProgressUpdate D-bus [1].
This commit is to support this.

[1] https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml//xyz/openbmc_project/State/Boot/Progress.interface.yaml#L11

Tested:
1. Set boot progress code
# ipmitool raw 0x2c 0x02 0xae 0x01 0x00 0x00 0x00 0x00 0x10 0x01 \
0x00 0x00
2. Check the progress code from the Redfish interface
"BootProgress": {
"LastState": "OEM",
"LastStateTime": "2022-10-10T04:21:08.416796+00:00"
}

Signed-off-by: Hieu Huynh <hieuh@os.amperecomputing.com>
Change-Id: I0834887e159970d5775dbfbf7753196b1e1cec29

show more ...


# 22d268cb 19-May-2022 Ed Tanous <edtanous@google.com>

Make routes start matching Redfish

This is preliminary patch to set up the route handling such that it's
ready for the addition of multiple hosts, multiple managers in the
future. Routes previously

Make routes start matching Redfish

This is preliminary patch to set up the route handling such that it's
ready for the addition of multiple hosts, multiple managers in the
future. Routes previously took the form of

/redfish/v1/Systems/system

which essentially hardcoded the name "system" into a number of places.
As the stack evolves to support multiple systems, this needs to change.

This patchset changes all the ComputerSystem resources to the form:
/redfish/v1/Systems/<str>

and adds 404 checks to each route such that they will be handled
properly still. This means that as we evolve our multi-host support,
each individual route can be moved one at a time to support multi-host.

In the future, moving these to redfish-spec-defined routing would likely
mean that we could generate this code in the future at some point, which
reduces the likelihood that people do it incorrectly.

This patch currently sets the resource id and resource type in the
resourceNotFound message to empty string (""). This handling is still
arguably more correct than what we had before, which just returned 404
with an empty payload, although this will be corrected in the future.

Tested: None yet. RFC to see if this is a pattern we'd like to
propogate

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

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


# 38c8a6f2 01-Sep-2022 Ed Tanous <edtanous@google.com>

Make system handlers inline

This makes our code compile on clang again.

Tested: meson build set up with clang++-13 succeeds.

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

Make system handlers inline

This makes our code compile on clang again.

Tested: meson build set up with clang++-13 succeeds.

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

show more ...


# 382d6475 03-Sep-2021 Ali Ahmed <ama213000@gmail.com>

Move nested dbus calls in getComputerSystem

Dbus calls to dbus objects 'xyz.openbmc_project.Inventory.Item' and
and 'xyz.openbmc_project.State.Decorator.OperationalStatus' are nested
under a call fo

Move nested dbus calls in getComputerSystem

Dbus calls to dbus objects 'xyz.openbmc_project.Inventory.Item' and
and 'xyz.openbmc_project.State.Decorator.OperationalStatus' are nested
under a call for 'xyz.openbmc_project.Inventory.Item.Cpu' properties.
This change seperates these calls for clarity and to minimize variables

Testing:

1. Redfish Validator Testing passed
2. Curl testing:

curl -k -H "X-Auth-Token: $tok" https://$bmc/redfish/v1/Systems/system
...
"ProcessorSummary": {
"CoreCount": 0,
"Count": 2,
"Model": "",
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
}
},
...

Signed-off-by: Ali Ahmed <ama213000@gmail.com>
Change-Id: Id4657836607a2261a188db8d565aaa2b1a414c5a
Signed-off-by: Shantappa Teekappanavar <shantappa.teekappanavar@ibm.com>

show more ...


# dd60b9ed 07-Jul-2022 Ed Tanous <edtanous@google.com>

Add link support to SystemsCollection

Similar to the other patches in the series, add a link header to all
ComputerSystem resources, along with an explicit HEAD operator.

Tested:
All of the below r

Add link support to SystemsCollection

Similar to the other patches in the series, add a link header to all
ComputerSystem resources, along with an explicit HEAD operator.

Tested:
All of the below return a link header
GET /redfish/v1/Systems
HEAD /redfish/v1/Systems
GET /redfish/v1/Systems/system
HEAD /redfish/v1/Systems/system
GET /redfish/v1/Systems/system/ResetActionInfo
HEAD /redfish/v1/Systems/system/ResetActionInfo

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

show more ...


# 0d4befa8 19-Aug-2022 Jiaqing Zhao <jiaqing.zhao@intel.com>

Fix build failure with redfish-provisioning-feature enabled

Commit bc1d29d ("used sdbusplus::unpackPropertiesNoThrow part 3")
introduced a bug due to not passing the properties list to
unpackPropert

Fix build failure with redfish-provisioning-feature enabled

Commit bc1d29d ("used sdbusplus::unpackPropertiesNoThrow part 3")
introduced a bug due to not passing the properties list to
unpackPropertiesNoThrow() in getProvisioningStatus(). This function
is only get compiled when redfish-provisioning-feature is enabled,
since it is not enabled in CI, it passed CI build.

Tested:
Local build with redfish-provisioning-feature enabled passed.

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

show more ...


# bc1d29de 09-Aug-2022 Krzysztof Grobelny <krzysztof.grobelny@intel.com>

used sdbusplus::unpackPropertiesNoThrow part 3

used sdbusplus::unpackPropertiesNoThrow in systems.hpp, also replaced
all usages of "GetAll" with sdbusplus::asio::getAllProperties

bmcweb size: 2

used sdbusplus::unpackPropertiesNoThrow part 3

used sdbusplus::unpackPropertiesNoThrow in systems.hpp, also replaced
all usages of "GetAll" with sdbusplus::asio::getAllProperties

bmcweb size: 2672984 -> 2668888 (-4096)
compressed size: 1128611 -> 1127280 (-1331)

Tested:
Performed get on:
- /redfish/v1/Systems/system
- /redfish/v1/Systems/system/Memory/dimm0

Get result before and after the change was the same

Change-Id: I11ca70bae07bdb17edd1935c539c68814d6ec172
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>

show more ...


# 2b82937e 03-Aug-2022 Ed Tanous <edtanous@google.com>

Move time utils to be in one place

We've accumulated several time utility functions in the http classes.
Time isn't a core HTTP primitive, so http is not where those functions
below.

This commit mo

Move time utils to be in one place

We've accumulated several time utility functions in the http classes.
Time isn't a core HTTP primitive, so http is not where those functions
below.

This commit moves all the time functions from the crow::utility
namespace into the redfish::time_utils namespace, as well as moves the
unit tests.

No code changes where made to the individual functions, with the
exception of changing the namespace on the unit tests.

Tested: Unit tests pass.

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

show more ...


# 1e5b7c88 15-Aug-2022 Jiaqing Zhao <jiaqing.zhao@intel.com>

system: Remove ipsPropertiesType

ipsPropertiesType is identical to dbus::utility::DBusPropertiesMap,
change to the latter one for consistency.

Tested:
Build pass.

Change-Id: Ibe006a252a8eb9c286191

system: Remove ipsPropertiesType

ipsPropertiesType is identical to dbus::utility::DBusPropertiesMap,
change to the latter one for consistency.

Tested:
Build pass.

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

show more ...


# a6669023 10-Aug-2022 Krzysztof Grobelny <krzysztof.grobelny@intel.com>

fix ProcessorSummary.CoreCount

CoreCount was not calculated correctly, it always skipped one processor,
which made result incorrect.

Tested:
Get on /redfish/v1/Systems/system returns correct CoreCo

fix ProcessorSummary.CoreCount

CoreCount was not calculated correctly, it always skipped one processor,
which made result incorrect.

Tested:
Get on /redfish/v1/Systems/system returns correct CoreCount instead of 0
for system with one processor.

"ProcessorSummary": {
"CoreCount": 24,
"Count": 1,
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
}
}

Change-Id: Id227e6c7e99965d614a7756760ef5a41629b34ea
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>

show more ...


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

Fix const correctness issues

cppcheck correctly notes that a lot of variables in the new code can be
const. Make most of them const.

Tested: WIP

Signed-off-by: Ed Tanous <edtanous@google.com>
Cha

Fix const correctness issues

cppcheck correctly notes that a lot of variables in the new code can be
const. Make most of them const.

Tested: WIP

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

show more ...


# 5ef735c8 22-Jun-2022 Nan Zhou <nanzhoumails@gmail.com>

system: don't fail when Boot service isn't there

If the boot service isn't there, we shouldn't fail the response but omit
the Boot property.

Tested:
1. Service Validator passed on system without bo

system: don't fail when Boot service isn't there

If the boot service isn't there, we shouldn't fail the response but omit
the Boot property.

Tested:
1. Service Validator passed on system without boot service
2. Service Validator passed on system with boot service

Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: Id3488f827736aa65d73e4a42082b279ca386ac3e

show more ...


# 8a592810 04-Jun-2022 Ed Tanous <edtanous@google.com>

Fix shadowed variable issues

This patchset is the conclusion of a multi-year effort to try to fix
shadowed variable names. Variables seem to be shadowed all over, and in
most places they exist, the

Fix shadowed variable issues

This patchset is the conclusion of a multi-year effort to try to fix
shadowed variable names. Variables seem to be shadowed all over, and in
most places they exist, there's a "code smell" of things that aren't
doing what the author intended.

This commit attempts to clean up these in several ways by:
1. Renaming variables where appropriate.
2. Preferring to refer to member variables directly when operating
within a class
3. Rearranging code so that pass through variables are handled in the
calling scope, rather than passing them through.

These patterns are applied throughout the codebase, to the point where
-Wshadow can be enabled in meson.build.

Tested: Code compiles, unit tests pass. Still need to run redfish
service validator.

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

show more ...


# eee0013e 14-Jun-2022 Willy Tu <wltu@google.com>

sw_util: Rename all Firmware to Software wherever possible

Rename to Software so we can reuse it for software inventory. This make
is more consistent to the SoftwareVersion dbus interface that is us

sw_util: Rename all Firmware to Software wherever possible

Rename to Software so we can reuse it for software inventory. This make
is more consistent to the SoftwareVersion dbus interface that is used.

Change-Id: I97fb10fccf744a6d6d4cba57f970759431bf4744
Signed-off-by: Willy Tu <wltu@google.com>

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


# 3215e700 01-Jun-2022 Nan Zhou <nanzhoumails@gmail.com>

ComputerSystem: fix ResetActionInfo

There is a regression that "Parameters" in ActionInfo now become an
object rather than an array, as defined in the Schema,
https://redfish.dmtf.org/schemas/Action

ComputerSystem: fix ResetActionInfo

There is a regression that "Parameters" in ActionInfo now become an
object rather than an array, as defined in the Schema,
https://redfish.dmtf.org/schemas/ActionInfo.v1_2_0.json

Tested:
1. on my mock environment,
```
{
"@odata.id": "/redfish/v1/Systems/system/ResetActionInfo",
"@odata.type": "#ActionInfo.v1_1_2.ActionInfo",
"Id": "ResetActionInfo",
"Name": "Reset Action Info",
"Parameters": [
{
"AllowableValues": [
"On",
"ForceOff",
"ForceOn",
"ForceRestart",
"GracefulRestart",
"GracefulShutdown",
"PowerCycle",
"Nmi"
],
"DataType": "String",
"Name": "ResetType",
"Required": true
}
]
}
```
2. Redfish Service Validator Passes
*** /redfish/v1/Systems/system/ResetActionInfo
Attempt 1 of /redfish/v1/Systems/system/ResetActionInfo
Response Time for GET to /redfish/v1/Systems/system/ResetActionInfo: 0.001620268914848566 seconds.
Type (ActionInfo.v1_1_2.ActionInfo), GET SUCCESS (time: 0:00:00.001832)
PASS

Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: I36db7fddaf565a2464378e31b18ecea688254f0e
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...


# aa6d4537 02-Jun-2022 Jiaqing Zhao <jiaqing.zhao@intel.com>

Fix indentation of clang-format off blocks

After applying the new clang-format rule in commit 002d39b ("Try to fix
the lambda formatting issue"), some clang-format off blocks need to be
reindented.

Fix indentation of clang-format off blocks

After applying the new clang-format rule in commit 002d39b ("Try to fix
the lambda formatting issue"), some clang-format off blocks need to be
reindented.

Tested:
Build pass. Just removed some whitespaces.

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

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


# dfababfc 17-May-2022 Nan Zhou <nanzhoumails@gmail.com>

health: take json_ptr instead of reference when filling status

The existing codes populates the health status on the |AsyncResponse| or
a given JSON reference. This doesn't work if we want to popula

health: take json_ptr instead of reference when filling status

The existing codes populates the health status on the |AsyncResponse| or
a given JSON reference. This doesn't work if we want to populates status
on an array of objects, since the array can be resized which changes the
address of each object.

This commit changed the contructor to take a JSON pointer instead.
|HealthPopulate| will populates status on
|AsyncResponse->res.jsonValue|[json_ptr]. If the point can't be resolved
in the |jsonValue|, |HealthPopulate| populates nothing.

Fixed all places where the old reference based constructor is used.

This commit is extremely useful when implementing efficient level-1
expand handler on ResourceCollections. It also prevents issues on
reference lifecycles.

Tested:
1. It builds
2. Tested DIMM/System/Storage health on real hardware, works as expected
3. Tested on Redfish Service Validator, no new failures on health
properties.

Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: I305515522af50b48be92a3f4689d8166f3bc0cc0

show more ...


12345678910