History log of /openbmc/bmcweb/features/redfish/lib/chassis.hpp (Results 26 – 50 of 145)
Revision Date Author Comments
# e5ae9c1c 15-Nov-2021 George Liu <liuxiwei@inspur.com>

Update indicator LED verification

Extend the hasIndicatorLed array and add
xyz.openbmc_project.Inventory.Item.Chassis interface.

Tested:
```
curl -k https://$bmc/redfish/v1/Chassis/chassis
{
"@od

Update indicator LED verification

Extend the hasIndicatorLed array and add
xyz.openbmc_project.Inventory.Item.Chassis interface.

Tested:
```
curl -k https://$bmc/redfish/v1/Chassis/chassis
{
"@odata.id": "/redfish/v1/Chassis/chassis",
"@odata.type": "#Chassis.v1_22_0.Chassis",
"Actions": {
"#Chassis.Reset": {
"@Redfish.ActionInfo": "/redfish/v1/Chassis/chassis/ResetActionInfo",
"target": "/redfish/v1/Chassis/chassis/Actions/Chassis.Reset"
}
},
"ChassisType": "RackMount",
"Id": "chassis",
"Links": {
"ComputerSystems": [
{
"@odata.id": "/redfish/v1/Systems/system"
}
],
"ManagedBy": [
{
"@odata.id": "/redfish/v1/Managers/bmc"
}
]
},
"Location": {
"PartLocation": {
"ServiceLabel": "U78DA.ND0.WZS004K"
}
},
"IndicatorLED": "Off",
"LocationIndicatorActive": false,
"Manufacturer": "",
"Model": "23",
"Name": "chassis",
"PCIeDevices": {
"@odata.id": "/redfish/v1/Systems/system/PCIeDevices"
},
"PartNumber": "",
"Power": {
"@odata.id": "/redfish/v1/Chassis/chassis/Power"
},
"PowerState": "Off",
"Sensors": {
"@odata.id": "/redfish/v1/Chassis/chassis/Sensors"
},
"SerialNumber": "",
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "StandbyOffline"
},
"Thermal": {
"@odata.id": "/redfish/v1/Chassis/chassis/Thermal"
}
}
```

Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: I02e77d56e555f9aee3f76015baeebbf1f4a292ab

show more ...


# ad622676 07-Sep-2022 Sunny Srivastava <sunnsr25@in.ibm.com>

Remove link from Chassis to PCIeDevice

The commit removes current support that assumes 1:1 system:Chassis for
Chassis/PCIeDevices.
Current implementation populates the same collection of PCIeDevices

Remove link from Chassis to PCIeDevice

The commit removes current support that assumes 1:1 system:Chassis for
Chassis/PCIeDevices.
Current implementation populates the same collection of PCIeDevices
with chassis and with system.
Since the path is /redfish/v1/Systems/system/PCIeDevices and we already
have a link from /redfish/v1/Systems/system/, removing the link here in
Chassis.
The link from Chassis to /redfish/v1/Systems/system/PCIeDevices is
unexpected.
For systems with multiple chassis the current assumption does not hold
true. It breaks there, as it assumes all PCIeDevices are in all Chassis.

This is just a link and since another link from system resource already
exists. The case of walking the whole tree isn't broke.
And so, this should not break clients.


Validator has been executed with no new errors.

Signed-off-by: Sunny Srivastava <sunnsr25@in.ibm.com>
Change-Id: Id3af01ec99708c36b5fff2a63f04ffd722f6c3a2
Signed-off-by: Alpana Kumari <alpankum@in.ibm.com>

show more ...


# b4d593f1 16-Feb-2024 Carson Labrado <clabrado@google.com>

Chassis: Add support for Version property

Add support for the Version property of Chassis resources. That
property was added in Chassis schema v1.21.0.

This makes use of the "xyz.openbmc_project.I

Chassis: Add support for Version property

Add support for the Version property of Chassis resources. That
property was added in Chassis schema v1.21.0.

This makes use of the "xyz.openbmc_project.Inventory.Decorator.Revision"
interface that is already defined by phosphor-dbus-interfaces.

Tested:
Validator passed and Version property was correctly populated. No
issues on other Chassis resources which do not have a Version property.

I added this to an entity-manager json config:

"xyz.openbmc_project.Inventory.Decorator.Revision": {
"Version": "$PRODUCT_VERSION"
}

The PRODUCT_VERSION field from a given FRU eeprom was picked up by
FruDevice and it was exposed under the associated Chassis resource:

busctl get-property xyz.openbmc_project.FruDevice \
/xyz/openbmc_project/FruDevice/Test \
xyz.openbmc_project.FruDevice PRODUCT_VERSION
s "V1.0"

curl -s 'localhost/redfish/v1/Chassis/TestChassis'
{
"@odata.id": "/redfish/v1/Chassis/TestChassis",
...
"Version": "V1.0"
}

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

show more ...


# 8ece0e45 02-Jan-2024 Ed Tanous <ed@tanous.net>

Fix spelling mistakes

These were found with:
codespell -w $(git ls-files | grep "\.[hc]\(pp\)\?$")

At some point in the future, we might want to get this enabled in CI.

Change-Id: Iccb57b2adfd06a2

Fix spelling mistakes

These were found with:
codespell -w $(git ls-files | grep "\.[hc]\(pp\)\?$")

At some point in the future, we might want to get this enabled in CI.

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

show more ...


# 7164bc62 15-Oct-2023 Chau Ly <chaul@amperecomputing.com>

chassis: Tidy up lambda funcs in get chassis

This commit tries to avoid the cumbersomeness of lambda functions used
directly or indirectly by handleChassisGet method. Lengthy lambda
functions are re

chassis: Tidy up lambda funcs in get chassis

This commit tries to avoid the cumbersomeness of lambda functions used
directly or indirectly by handleChassisGet method. Lengthy lambda
functions are replaced by or involve normal functions. There's no
functional change in this commit.

Change-Id: I67e028cdab3ea4407dafde0a510b37a160497f48
Signed-off-by: Chau Ly <chaul@amperecomputing.com>

show more ...


# 59a17e4f 07-Oct-2022 George Liu <liuxiwei@inspur.com>

Rename getLocationIndicatorActive/setLocationIndicatorActive

This commit renames
getLocationIndicatorActive/setLocationIndicatorActive
No functional changes.

Tested: built bmcweb successfully and V

Rename getLocationIndicatorActive/setLocationIndicatorActive

This commit renames
getLocationIndicatorActive/setLocationIndicatorActive
No functional changes.

Tested: built bmcweb successfully and Validator passes

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I0c5d538c1dd9f0d8dd1e6ae4d8ba4f606b804373
Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.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 ...


# 36b5f1ed 26-Sep-2023 Lakshmi Yadlapati <lakshmiy@us.ibm.com>

Refactor getCollectionMembers

This commit refactors the getCollectionMembers function into smaller
functions. Additionally, the 'subtree' parameter is no longer a
default parameter but is explicitl

Refactor getCollectionMembers

This commit refactors the getCollectionMembers function into smaller
functions. Additionally, the 'subtree' parameter is no longer a
default parameter but is explicitly required in the function. All
calls to getCollectionMembers have been updated to pass the 'subtree'
parameter.

Tested: Validator passed

'''
curl -k https://$bmc/redfish/v1/Systems/system/Storage
{
"@odata.id": "/redfish/v1/Systems/system/Storage",
"@odata.type": "#StorageCollection.StorageCollection",
"Members": [
{
"@odata.id": "/redfish/v1/Systems/system/Storage/1"
}
],
"Members@odata.count": 1,
"Name": "Storage Collection"
}

curl -k https://$bmc/redfish/v1/Cables
{
"@odata.id": "/redfish/v1/Cables",
"@odata.type": "#CableCollection.CableCollection",
"Description": "Collection of Cable Entries",
"Members": [
{
"@odata.id": "/redfish/v1/Cables/dp0_cable0"
},
{
"@odata.id": "/redfish/v1/Cables/dp0_cable1"
},
{
"@odata.id": "/redfish/v1/Cables/dp0_cable2"
},
{
"@odata.id": "/redfish/v1/Cables/dp0_cable3"
}
],
"Members@odata.count": 4,
"Name": "Cable Collection"
}

curl -k https://$bmc/redfish/v1/Chassis

{
"@odata.id": "/redfish/v1/Chassis",
"@odata.type": "#ChassisCollection.ChassisCollection",
"Members": [
{
"@odata.id": "/redfish/v1/Chassis/chassis"
}
],
"Members@odata.count": 1,
"Name": "Chassis Collection"
}

curl -k https://$bmc/redfish/v1/Systems/system/Memory
{
"@odata.id": "/redfish/v1/Systems/system/Memory",
"@odata.type": "#MemoryCollection.MemoryCollection",
"Members": [
{
"@odata.id": "/redfish/v1/Systems/system/Memory/dimm0"
},
{
"@odata.id": "/redfish/v1/Systems/system/Memory/dimm1"
},
......
{
"@odata.id": "/redfish/v1/Systems/system/Memory/dimm31"
}
],
"Members@odata.count": 32,
"Name": "Memory Module Collection"
}
'''

Change-Id: If5091431b548f371bff03b2897fd0aaf8b0ef203
Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com>

show more ...


# 3544d2a7 06-Aug-2023 Ed Tanous <edtanous@google.com>

Use ranges

C++20 brought us std::ranges for a lot of algorithms. Most of these
conversions were done using comby, similar to:

```
comby -verbose 'std::lower_bound(:[a].begin(),:[b].end(),:[c])' 's

Use ranges

C++20 brought us std::ranges for a lot of algorithms. Most of these
conversions were done using comby, similar to:

```
comby -verbose 'std::lower_bound(:[a].begin(),:[b].end(),:[c])' 'std::ranges::lower_bound(:[a], :[c])' $(git ls-files | grep "\.[hc]\(pp\)\?$") -in-place
```

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

show more ...


# 630adcdc 20-Feb-2023 Chau Ly <chaul@amperecomputing.com>

chassis: Change intrusion sensor look up method

This commit changes to using the interface
"xyz.openbmc_project.Chassis.Intrusion" to look up for the chassis
intrusion sensor's DBus object path unde

chassis: Change intrusion sensor look up method

This commit changes to using the interface
"xyz.openbmc_project.Chassis.Intrusion" to look up for the chassis
intrusion sensor's DBus object path under "/xyz/openbmc_project" path,
instead of specifying the complete object path. This helps remove the
dependence on the object path and relies on the interface name instead.

Change-Id: I046d1d2825f65f49b225c29239647c423b67242e
Signed-off-by: Chau Ly <chaul@amperecomputing.com>

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


# a5617496 29-Jun-2021 Jie Yang <jjy@google.com>

Add topology links for Chassis

Implement the physical topology design[0] for Chassis resources to
report which Chassis contain or are contained by other Chassis.

Query this information from the obj

Add topology links for Chassis

Implement the physical topology design[0] for Chassis resources to
report which Chassis contain or are contained by other Chassis.

Query this information from the object mapper using associations
defined in phosphor-dbus-interfaces[1] and make it available in the
Links section of the Redfish result.

[0] https://gerrit.openbmc.org/c/openbmc/docs/+/54205
[1] https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/58441

Tested:
Built for evb-ast2600 with example JSON configs and ran in QEMU

Ran Redfish Service Validator with no new warnings

Sample output:
'''
curl -k -u root:0penBmc -X GET https://127.0.0.1:60443/redfish/v1/Chassis/Subchassis
{
"@odata.id": "/redfish/v1/Chassis/Subchassis",
"@odata.type": "#Chassis.v1_16_0.Chassis",
...
"Id": "Subchassis",
"Links": {
"ComputerSystems": [
{
"@odata.id": "/redfish/v1/Systems/system"
}
],
"ContainedBy": {
"@odata.id": "/redfish/v1/Chassis/Superchassis"
},
"ManagedBy": [
{
"@odata.id": "/redfish/v1/Managers/bmc"
}
]
},
...
}

curl -k -u root:0penBmc -X GET https://127.0.0.1:60443/redfish/v1/Chassis/Superchassis
{
"@odata.id": "/redfish/v1/Chassis/Superchassis",
"@odata.type": "#Chassis.v1_16_0.Chassis",
...
"Id": "Superchassis",
"Links": {
"ComputerSystems": [
{
"@odata.id": "/redfish/v1/Systems/system"
}
],
"Contains": [
{
"@odata.id": "/redfish/v1/Chassis/Subchassis"
}
],
"Contains@odata.count": 1,
"ManagedBy": [
{
"@odata.id": "/redfish/v1/Managers/bmc"
}
]
},
...
}
'''

Signed-off-by: Jie Yang <jjy@google.com>
Signed-off-by: Zhenwei Chen <zhenweichen0207@gmail.com>
Signed-off-by: Benjamin Fair <benjaminfair@google.com>
Change-Id: Idc4c3e99b8269bcc5f94112e977a89970abd0bf3

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


# d4b054c1 12-Jun-2023 Willy Tu <wltu@google.com>

chassis: Pass ec by reference

Remove passing ec by value for getProperty.

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


# 5e577bc1 25-Jul-2022 Willy Tu <wltu@google.com>

storage: add support for multiple storages

Updated Storage resource to `#Storage.v1_9_1.Storage` to support the
change.

Follow the Swordfish spec to setup the Storage relationship[1].

There will n

storage: add support for multiple storages

Updated Storage resource to `#Storage.v1_9_1.Storage` to support the
change.

Follow the Swordfish spec to setup the Storage relationship[1].

There will now be two Storage Collection `/redfish/v1/Stroage` and
`/redfish/v1/Systems/system/Storage`. The storage in `/Storage` will be
treated as a subsystem and only link to the `/Systems/system/Storage`
under `Links/StorageServices` resource.

The `/Storage` won't contain Drives or StorageControllers.

Tested:
Passed Redfish Validator for related resources.
```
*** /redfish/v1/Storage/storage_1
INFO - Type (Storage.v1_7_1.Storage), GET SUCCESS (time: 0)
WARNING - StorageControllers: The given property is deprecated: This property has been deprecated in favor of Controllers to allow for storage controllers to be represented as their own resources.
INFO - Attempt 1 of /redfish/v1/Chassis/chassis0/Drives/drive0
INFO - Response Time for GET to /redfish/v1/Chassis/chassis_0/Drives/drive_0: 0.07591272401623428 seconds.
INFO - PASS
INFO -
```

Chassis
```
wget -qO- http://localhost:80/redfish/v1/Chassis/chassis0
{
"@odata.id": "/redfish/v1/Chassis/chassis0",
"@odata.type": "#Chassis.v1_14_0.Chassis",
"Id": "chassis0",
"Links": {
"Storage": [
{
"@odata.id": "/redfish/v1/Systems/system/Storage/storage0"
}
],
"Storage@odata.count": 1
},
"Name": "chassis0",
}}
```

Storage Collection
```
wget -qO- http://localhost:80/redfish/v1/Storage
{
"@odata.id": "/redfish/v1/Storage",
"@odata.type": "#StorageCollection.StorageCollection",
"Members": [
{
"@odata.id": "/redfish/v1/Storage/storage0"
}
],
"Members@odata.count": 1,
"Name": "Storage Collection"
}

wget -qO- http://localhost:80/redfish/v1/Systems/system/Storage
{
"@odata.id": "/redfish/v1/Systems/system/Storage",
"@odata.type": "#StorageCollection.StorageCollection",
"Members": [
{
"@odata.id": "/redfish/v1/Systems/system/Storage/storage0"
}
],
"Members@odata.count": 1,
"Name": "Storage Collection"
}
```

Storage
```
wget -qO- http://localhost:80/redfish/v1/Storage/storage0
{
"@odata.id": "/redfish/v1/Storage/storage0",
"@odata.type": "#Storage.v1_9_1.Storage",
"Id": "storage0",
"Links": {
"StorageServices": [
{
"@odata.id": "/redfish/v1/Systems/system/Storage/storage0"
}
],
"StorageServices@odata.count": 1
},
"Name": "Storage",
"Status": {
"State": "Enabled"
}
}

wget -qO- http://localhost:80/redfish/v1/Systems/system/Storage/storage0
{
"@odata.id": "/redfish/v1/Systems/system/Storage/storage0",
"@odata.type": "#Storage.v1_9_1.Storage",
"Drives": [
{
"@odata.id": "/redfish/v1/Chassis/chassis0/Drives/drive0"
}
],
"Drives@odata.count": 1,
"Id": "storage0",
"Name": "Storage",[1]
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
},
"StorageControllers": [
{
"@odata.id": "/redfish/v1/Systems/system/Storage/storage0#/StorageControllers/0",
"@odata.type": "#Storage.v1_7_0.StorageController",
"MemberId": "controller",
"Name": "controller",
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
}
}
]
}
```

[1] https://www.snia.org/sites/default/files/technical-work/swordfish/draft/v1.2.2/pdf/Swordfish_v1.2.2_NVMeMappingGuide.pdf#page=17

Change-Id: Ib81b68e7f61b817d4dfa4ed2f27afd6e74e8ce58
Signed-off-by: Tom Tung <shes050117@gmail.com>
Signed-off-by: Willy Tu <wltu@google.com>
Signed-off-by: Ed Tanous <edtanous@google.com>

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


# fc903b3d 31-May-2023 Andrew Geissler <geissonator@yahoo.com>

bmc-ready: provide special error return on BMCNotReady

A new feature has been proposed[1] and implemented[2] which can be
optionally enabled on a system to not allow a chassis or host power on
opera

bmc-ready: provide special error return on BMCNotReady

A new feature has been proposed[1] and implemented[2] which can be
optionally enabled on a system to not allow a chassis or host power on
operation when the BMC is not in a "Ready" state.

In those situations, if a power on operation is requested, the D-Bus
error response will be a specific BMCNotReady error. In those
situations, respond to the user with a more targeted error asking them
to retry in 10 seconds. The 10s retry is based on my experience with
OpenBMC based systems, the longest time between bmcweb being up and
running and BMC Ready is around 30s.

Tested:
- Enabled BMC Ready feature, manually put BMC in NotReady state,
and requested a:
```
/redfish/v1/Chassis/chassis/Actions/Chassis.Reset -d '{"ResetType": "PowerCycle"}'
```
- Confirmed new response message:
```
"Message": "The service is temporarily unavailable. Retry in 10 seconds."
```
- Stopped Chassis state service and verified expected "internal service
error" on same request
- Ran similar test with Systems/system/Actions/ComputerSystem.Reset API
- Confirmed good paths still worked as expected

[1]: https://lists.ozlabs.org/pipermail/openbmc/2023-May/033383.html
[2]: https://gerrit.openbmc.org/q/topic:bmc-ready-check

Change-Id: I6a6e5774c96b4f37c794ba49a5e06d3e51156d09
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>

show more ...


# 51dab2a7 30-May-2023 Andrew Geissler <geissonator@yahoo.com>

chassis: consistently log error on internal fails

Debugging internalError responses from bmcweb has been a consistent
pain point for us. It does help to at least have the boost error code
logged to

chassis: consistently log error on internal fails

Debugging internalError responses from bmcweb has been a consistent
pain point for us. It does help to at least have the boost error code
logged to the journal. Ensure the error code is logged to the journal
consistently within the chassis file.

If this commit makes sense to the maintainers then I will work on making
this consistent in other files at a later date.

Tested:
- Verified it compiled and one of the error paths traced the appropriate
boost error code.

Change-Id: I76b7644bc18e76fff69595fb5f1bc23d257563e9
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>

show more ...


# 13451e39 24-May-2023 Willy Tu <wltu@google.com>

health: Add option to disable health-populate

The Health populate calls GetManagedObjects at `/` which can take a lot
of time. Add the option to disable to improve performance if it is not
needed.

health: Add option to disable health-populate

The Health populate calls GetManagedObjects at `/` which can take a lot
of time. Add the option to disable to improve performance if it is not
needed.

Tested:
```
$ meson build -Dhealth-populate=disabled
...
User defined options
backend : ninja
health-populate : disabled
```

Build passed.

Health Status removed. Some resource still create HealthPopulate, but
does not populate. It will require further refactoring to clean it out.

Testing on `/redfish/v1/Chassis?$expand=.($levels=1)`

On 14 chassis, from about 2.5 seconds to 400 ms. :)

Before:
```
Getting times for chassis
Getting good line count with wget -q -O- localhost:80/redfish/v1/Chassis?$expand=.($levels=1)
Line count: 980
17:05:56: real 0m2.908s user 0m0.000s sys 0m0.030s
17:05:59: real 0m2.414s user 0m0.010s sys 0m0.010s
17:05:03: real 0m3.410s user 0m0.000s sys 0m0.020s
17:05:09: real 0m2.372s user 0m0.000s sys 0m0.010s
17:05:13: real 0m3.407s user 0m0.010s sys 0m0.000s
17:05:19: real 0m2.420s user 0m0.010s sys 0m0.000s
17:05:23: real 0m3.463s user 0m0.010s sys 0m0.000s
17:05:29: real 0m2.414s user 0m0.000s sys 0m0.010s
17:05:33: real 0m2.843s user 0m0.010s sys 0m0.010s
17:05:38: real 0m2.512s user 0m0.000s sys 0m0.020s
17:05:42: real 0m2.474s user 0m0.000s sys 0m0.010s
17:05:47: real 0m2.557s user 0m0.010s sys 0m0.010s
17:05:52: real 0m2.439s user 0m0.020s sys 0m0.000s
17:05:56: real 0m3.127s user 0m0.010s sys 0m0.000s
17:05:01: real 0m2.563s user 0m0.020s sys 0m0.000s
17:05:06: real 0m2.392s user 0m0.020s sys 0m0.020s
17:05:10: real 0m2.405s user 0m0.020s sys 0m0.000s
17:05:15: real 0m2.514s user 0m0.010s sys 0m0.010s
17:05:19: real 0m2.809s user 0m0.020s sys 0m0.010s
17:05:24: real 0m2.944s user 0m0.010s sys 0m0.010s
17:05:29: real 0m2.537s user 0m0.010s sys 0m0.000s
17:05:34: real 0m3.290s user 0m0.000s sys 0m0.000s
17:05:39: real 0m2.601s user 0m0.040s sys 0m0.000s
17:05:43: real 0m2.398s user 0m0.010s sys 0m0.040s
17:05:48: real 0m2.664s user 0m0.000s sys 0m0.020s
17:05:53: real 0m2.323s user 0m0.010s sys 0m0.000s
17:05:57: real 0m3.033s user 0m0.000s sys 0m0.010s
17:05:02: real 0m3.243s user 0m0.000s sys 0m0.010s
17:05:07: real 0m2.604s user 0m0.010s sys 0m0.010s
17:05:12: real 0m2.813s user 0m0.010s sys 0m0.010s
17:05:17: real 0m2.325s user 0m0.020s sys 0m0.000s
17:05:21: real 0m2.577s user 0m0.010s sys 0m0.000s
17:05:26: real 0m2.882s user 0m0.030s sys 0m0.000s
17:05:31: real 0m2.572s user 0m0.000s sys 0m0.020s
17:05:35: real 0m2.678s user 0m0.010s sys 0m0.010s
17:05:40: real 0m2.656s user 0m0.010s sys 0m0.010s
17:05:45: real 0m2.921s user 0m0.020s sys 0m0.000s
17:05:49: real 0m2.723s user 0m0.000s sys 0m0.020s
17:05:54: real 0m2.910s user 0m0.010s sys 0m0.010s
17:05:59: real 0m2.601s user 0m0.020s sys 0m0.000s
17:05:04: real 0m2.615s user 0m0.000s sys 0m0.000s
```

After:
```
Getting times for chassis
Getting good line count with wget -q -O- localhost:80/redfish/v1/Chassis?$expand=.($levels=1)
Line count: 980
16:04:43: real 0m0.188s user 0m0.020s sys 0m0.000s
16:04:43: real 0m0.195s user 0m0.010s sys 0m0.000s
16:04:45: real 0m0.219s user 0m0.010s sys 0m0.000s
16:04:48: real 0m0.226s user 0m0.020s sys 0m0.000s
16:04:50: real 0m0.208s user 0m0.020s sys 0m0.010s
16:04:52: real 0m0.226s user 0m0.010s sys 0m0.010s
16:04:54: real 0m0.419s user 0m0.000s sys 0m0.010s
16:04:57: real 0m0.222s user 0m0.010s sys 0m0.020s
16:04:59: real 0m0.194s user 0m0.000s sys 0m0.010s
16:04:01: real 0m0.191s user 0m0.010s sys 0m0.010s
16:04:04: real 0m0.276s user 0m0.010s sys 0m0.020s
16:04:06: real 0m0.183s user 0m0.020s sys 0m0.000s
16:04:08: real 0m0.193s user 0m0.040s sys 0m0.000s
16:04:10: real 0m0.406s user 0m0.020s sys 0m0.010s
16:04:13: real 0m0.317s user 0m0.000s sys 0m0.000s
16:04:15: real 0m0.442s user 0m0.005s sys 0m0.005s
16:04:18: real 0m0.226s user 0m0.010s sys 0m0.000s
16:04:20: real 0m0.217s user 0m0.020s sys 0m0.000s
16:04:22: real 0m0.200s user 0m0.010s sys 0m0.030s
16:04:24: real 0m0.423s user 0m0.010s sys 0m0.010s
16:04:27: real 0m0.203s user 0m0.020s sys 0m0.010s
16:04:29: real 0m0.433s user 0m0.000s sys 0m0.000s
16:04:31: real 0m0.318s user 0m0.020s sys 0m0.000s
16:04:34: real 0m1.206s user 0m0.000s sys 0m0.010s
16:04:37: real 0m0.403s user 0m0.000s sys 0m0.020s
16:04:39: real 0m0.353s user 0m0.010s sys 0m0.000s
16:04:42: real 0m0.291s user 0m0.000s sys 0m0.030s
16:04:44: real 0m0.742s user 0m0.020s sys 0m0.010s
16:04:47: real 0m0.369s user 0m0.010s sys 0m0.000s
16:04:49: real 0m0.215s user 0m0.020s sys 0m0.000s
16:04:52: real 0m0.204s user 0m0.000s sys 0m0.010s
16:04:54: real 0m0.418s user 0m0.000s sys 0m0.000s
16:04:56: real 0m0.215s user 0m0.000s sys 0m0.010s
16:04:58: real 0m0.202s user 0m0.010s sys 0m0.010s
16:04:01: real 0m0.202s user 0m0.010s sys 0m0.010s
16:04:03: real 0m0.212s user 0m0.010s sys 0m0.000s
16:04:05: real 0m0.694s user 0m0.010s sys 0m0.010s
16:04:08: real 0m0.201s user 0m0.010s sys 0m0.010s
16:04:10: real 0m0.230s user 0m0.000s sys 0m0.020s
16:04:12: real 0m0.206s user 0m0.010s sys 0m0.010s
16:04:15: real 0m0.446s user 0m0.010s sys 0m0.010s
```

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

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


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


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

chassis: fix clang-tidy warning

```
/data0/jenkins/workspace/ci-repository/openbmc/bmcweb/redfish-core/lib/chassis.hpp:130:13: error: loop will run at most once (loop increment never executed) [clan

chassis: fix clang-tidy warning

```
/data0/jenkins/workspace/ci-repository/openbmc/bmcweb/redfish-core/lib/chassis.hpp:130:13: error: loop will run at most once (loop increment never executed) [clang-diagnostic-unreachable-code-loop-increment,-warnings-as-errors]
for (const auto& service : object.second)
```

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

show more ...


# 523d4868 24-Jan-2023 Logananth Sundararaj <logananth_s@hcl.com>

Add HotPluggable support in Redfish

HotPluggable is an indication of whether this component can be
inserted or removed while the equipment is in operation.

HotPluggable is a property can read from

Add HotPluggable support in Redfish

HotPluggable is an indication of whether this component can be
inserted or removed while the equipment is in operation.

HotPluggable is a property can read from the Entity manager under
the xyz.openbmc_project.Inventory.Decorator.Replaceable interface.

Tested: Tested and verified in YosemiteV2 platform and
Redfish validator has passed.

Change-Id: I7b2203b1843fa3cbdbef7803b598d113346c0682
Signed-off-by: Logananth Sundararaj <logananth_s@hcl.com>

show more ...


# 6c3e9451 02-Mar-2023 George Liu <liuxiwei@inspur.com>

Refactor getAssociationEndPoints method

Since the getAssociationEndPoints method has been implemented in
dbus_utility and this commit is to integrate all the places where the
endpoints attribute is

Refactor getAssociationEndPoints method

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

Tested:
1. Redfish Validator Passed
2. For all the endpoints we changed, we got the same result as before

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

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


123456