History log of /openbmc/bmcweb/features/redfish/lib/systems.hpp (Results 51 – 75 of 249)
Revision Date Author Comments
# dfb2b408 06-Jul-2023 Priyanga Ramasamy <priyanga24@in.ibm.com>

Incorrect value displayed for total system memory

GUI displays 0 as total system memory when the total size is
not exactly divisible by 1024 as the code truncates the
floating point value.

This com

Incorrect value displayed for total system memory

GUI displays 0 as total system memory when the total size is
not exactly divisible by 1024 as the code truncates the
floating point value.

This commit has the fix for it.

Change-Id: I95dc6f5ee9e36bb624315909a264c5d21c054a1d
Signed-off-by: Priyanga Ramasamy <priyanga24@in.ibm.com>

show more ...


# 9dcfe8c1 04-Jul-2021 Albert Zhang <zhanghaodi@inspur.com>

Add support for redfish StopBootOnFault

This commit is added get and set for StopBootOnFault Policy.
The StopBootOnFault is defined in ComputerSystem(boot).
It contains two values "Never" and "AnyFa

Add support for redfish StopBootOnFault

This commit is added get and set for StopBootOnFault Policy.
The StopBootOnFault is defined in ComputerSystem(boot).
It contains two values "Never" and "AnyFault".

ref:https://redfish.dmtf.org/schemas/v1/ComputerSystem.v1_15_0.json

Tested:

1.Validator passes
2.doGet method to get StopBootOnFault.

curl -k -H "X-Auth-Token: $token" -X GET
https://${bmc}/redfish/v1/Systems/system
{
"@odata.id": "/redfish/v1/Systems/system",
"@odata.type": "#ComputerSystem.v1_16_0.ComputerSystem",
...
"Boot": {
...
"StopBootOnFault": "Never"
},
...
}

3.doPatch method set the "StopBootOnFault" property
to AnyFault or Never and report error when set to other values

curl -k -H "X-Auth-Token: $token" -X PATCH -d
'{ "Boot" :{"StopBootOnFault":"AnyFault"}}'
https://${bmc}/redfish/v1/Systems/system

A few seconds later,
curl -k -H "X-Auth-Token: $token" -X GET
https://${bmc}/redfish/v1/Systems/system
{
"@odata.id": "/redfish/v1/Systems/system",
"@odata.type": "#ComputerSystem.v1_16_0.ComputerSystem",
...
"Boot": {
...
"StopBootOnFault": "AnyFault"
},
...
}

Signed-off-by: Albert Zhang <zhanghaodi@inspur.com>
Change-Id: Ib2307deb413081edcbdecba9f234fe18571821a7
Signed-off-by: Gunnar Mills <gmills@us.ibm.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 ...


# 8d69c668 21-Jun-2023 Ed Tanous <edtanous@google.com>

Remove usage of flat_map for enum lookup

This was a common pattern a few years ago that popped up quite a bit.
It's not very efficient because it constructs the map every loop, and
requires larger b

Remove usage of flat_map for enum lookup

This was a common pattern a few years ago that popped up quite a bit.
It's not very efficient because it constructs the map every loop, and
requires larger binaries than a simpler if/else lookup table.

Transform into the existing pattern used elsewhere.

Tested: WIP

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

show more ...


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

Move all ComputerSystem routes to bottom

Similar to what we've done elsewhere, consolidate all the BMCWEB_ROUTE
calls on the bottom of the file. This is a consolidation such that you
no longer have

Move all ComputerSystem routes to bottom

Similar to what we've done elsewhere, consolidate all the BMCWEB_ROUTE
calls on the bottom of the file. This is a consolidation such that you
no longer have to hunt for all the entry points into these handlers.

Tested: Code compiles

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

show more ...


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

Break out ComputerSystem methods

Similar to what we're doing elsewhere, break down the computer system
schemas into appropriate methods.

Tested:

Redfish service validator passes.

Change-Id: I295b

Break out ComputerSystem methods

Similar to what we're doing elsewhere, break down the computer system
schemas into appropriate methods.

Tested:

Redfish service validator passes.

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

show more ...


# 7f3e84a1 28-Dec-2022 Ed Tanous <ed@tanous.net>

Add an option flag for multi-computersystem

A number of discussions have occurred, and it's clear that
multi-computer system is not a transition that can be done in a single
series of commits, and n

Add an option flag for multi-computersystem

A number of discussions have occurred, and it's clear that
multi-computer system is not a transition that can be done in a single
series of commits, and needs to be done incrementally over time. This
commit adds the initial option for multi-computer system support, with
an option flag that can be enabled when the new behavior is desired.
This is to prevent needing a long-lived fork.

This option operatates such that if enabled, all ComputerSystem route
options will now return 404. This is to allow the redfish service
validator to pass, and to be used for incremental development. As the
routes are moved over, they will be enabled, and service validator
re-run.

Per the description in the meson options, this option flag, and all code
beneath of it will be removed on 9/1/23. The expectation is that by
this date, given the appropriate level of effort in implementation,
there will be no code remaining under that option flag. After this
date, code beneath this option flag will be removed.

Tested: No functional changes without option.

With option enabled, /redfish/v1/Systems produces no entries.
Spot check of various routes returns 404.

Redfish service validator passes.

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

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


# 472bd202 22-Mar-2023 Lakshmi Yadlapati <lakshmiy@us.ibm.com>

Move getPCIeDeviceList to pcie_util

Currently, getPCIeDeviceList is only used by systems.hpp to obtain the
list of PCIe devices. However, there are plans to use this function in
other parts of the P

Move getPCIeDeviceList to pcie_util

Currently, getPCIeDeviceList is only used by systems.hpp to obtain the
list of PCIe devices. However, there are plans to use this function in
other parts of the PCIe code as well. To better organize our code and
make the function more reusable, this commit moves getPCIeDeviceList to
pcie_util.hpp, a common location for PCIe-related utilities.

Tested:
'''
curl -k https://$bmc/redfish/v1/Systems/system

{
"@odata.id": "/redfish/v1/Systems/system",
"@odata.type": "#ComputerSystem.v1_16_0.ComputerSystem",
"Actions": {
"#ComputerSystem.Reset": {
"@Redfish.ActionInfo": "/redfish/v1/Systems/system/ResetActionInfo",
"target": "/redfish/v1/Systems/system/Actions/ComputerSystem.Reset"
}
},
.....
.....
"PCIeDevices": [
{
"@odata.id": "/redfish/v1/Systems/system/PCIeDevices/dp0_drive2"
},
{
"@odata.id": "/redfish/v1/Systems/system/PCIeDevices/dp0_drive3"
},
.....
.....
{
"@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card0"
},
{
"@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card1"
},
{
"@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card10"
},
.....
{
"@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card9"
}
],
"PCIeDevices@odata.count": 20,
.....
.....
'''

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

show more ...


# 5fd0aafb 20-Apr-2023 Ninad Palsule <ninadpalsule@us.ibm.com>

Disabled processor and memory summary status

Redfish deprecated the Processor/Memory Summary Status (state, health,
healthrollup) attributes. Please refer to redfish spec for more details:
https://r

Disabled processor and memory summary status

Redfish deprecated the Processor/Memory Summary Status (state, health,
healthrollup) attributes. Please refer to redfish spec for more details:
https://redfish.dmtf.org/schemas/v1/ComputerSystem.v1_20_0.json

Initially I tried to fix the summary status issues,
(https://gerrit.openbmc.org/c/openbmc/bmcweb/+/60663)
But later it was decided that we should also remove these attributes
from the bmcweb code. Here is a link to discussion on discord:
https://discord.com/channels/775381525260664832/855566794994221117/1093939076710793296

This drop hides these attributes under defined
BMCWEB_ENABLE_PROC_MEM_STATUS. This option is disabled by default.

These attributes will be permanently removed from code in 1Q 2024
(in 8-9 months).

Testing:
- Redfish validator passed excepted couple of failures but those are
failing without my changes too.
- Make sure that summary status for memory and processor is not seen
in the output.

Without fix:
------------
'''
$ curl -s -k https://${bmc}/redfish/v1/Systems/system
.....
"MemorySummary": {
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
},
"TotalSystemMemoryGiB": 256
},
.....
"ProcessorSummary": {
"CoreCount": 20,
"Count": 4,
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
}
},
.....
''''

With fix:
---------
'''
"MemorySummary": {
"TotalSystemMemoryGiB": 256
},
.....
"ProcessorSummary": {
"CoreCount": 20,
"Count": 4
},
.....
''''
- Turned on BMCWEB_ALLOW_DEPRECATED_PROC_MEM_STATUS flag and made sure
that properties are shown again.

Change-Id: I1e0ee386bd4f365599afcf46e5d587285af635ad
Signed-off-by: Ninad Palsule <ninadpalsule@us.ibm.com>
Signed-off-by: Ed Tanous <edtanous@google.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 ...


# cf0e004c 18-May-2023 Ninad Palsule <ninadpalsule@us.ibm.com>

Refactor processor/memory state related code

- Moved code around to bring state related code close to each other
- Separated long memory lambda function.

Tested:
- Ran: Compared output of followi

Refactor processor/memory state related code

- Moved code around to bring state related code close to each other
- Separated long memory lambda function.

Tested:
- Ran: Compared output of following command before and after change
and it matched.
$ curl -s -k https://${bmc}/redfish/v1/Systems/system
{
"@odata.id": "/redfish/v1/Systems/system",
"@odata.type": "#ComputerSystem.v1_16_0.ComputerSystem",
"Actions": {
"#ComputerSystem.Reset": {
"@Redfish.ActionInfo": "/redfish/v1/Systems/system/ResetActionInfo",
"target": "/redfish/v1/Systems/system/Actions/ComputerSystem.Reset"
}
},
|
|
"Manufacturer": "",
"Memory": {
"@odata.id": "/redfish/v1/Systems/system/Memory"
},
"MemorySummary": {
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
},
"TotalSystemMemoryGiB": 0
},
|
|
"ProcessorSummary": {
"CoreCount": 32,
"Count": 4,
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
}
},
"Processors": {
"@odata.id": "/redfish/v1/Systems/system/Processors"
},

Change-Id: Ib72f272eca4ff79e26fe29033c989896a5b9154d
Signed-off-by: Ninad Palsule <ninadpalsule@us.ibm.com>

show more ...


# c5091a04 24-May-2023 Anthony <anthonyhkf@google.com>

Update DIMM memorySizeInKB to be in size_t

Following the changes in
https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/41870
where `MemorySizeInKB` type changed from `uint32` to `size`.

Update DIMM memorySizeInKB to be in size_t

Following the changes in
https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/41870
where `MemorySizeInKB` type changed from `uint32` to `size`.

Tested:
On a 64-bit system, MemorySizeInKB has type `t`, which is uint64.
```
.MemorySizeInKB property t 33554432 emits-change writable
```
Before:
```
[ERROR "dbus_utils.hpp":21] DBUS property error in property: MemorySizeInKB, reason: 1
---
~# curl localhost/redfish/v1/Systems/system -s \
| grep -A7 MemorySummary
"MemorySummary": {
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Disabled"
},
"TotalSystemMemoryGiB": 0
},
```
After:
```
~# curl localhost/redfish/v1/Systems/system -s \
| grep -A7 MemorySummary
"MemorySummary": {
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
},
"TotalSystemMemoryGiB": 64
},
```

Change-Id: Ifc66d4cf78ea81629957091bc4f3b407aa96355a
Signed-off-by: Anthony <anthonyhkf@google.com>

show more ...


# 81c4e330 18-May-2023 Ed Tanous <edtanous@google.com>

Capture all boost::system::error_codes by ref

Capturing these possibly overloaded values by reference can avoid a copy
in some cases, and it's good to be consistent.

This change was made automatica

Capture all boost::system::error_codes by ref

Capturing these possibly overloaded values by reference can avoid a copy
in some cases, and it's good to be consistent.

This change was made automatically by grep/sed.

Tested: Code compiles.

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

show more ...


# 63319659 16-May-2023 Gunnar Mills <gmills@us.ibm.com>

Remove done TODO

https://gerrit.openbmc.org/c/openbmc/bmcweb/+/44438/ merged and looks
for obmc-console-ssh and fills the port info out.

Tested: None.

Change-Id: Ie9129af37e8b44bd52c462d9f1e4ff7d5

Remove done TODO

https://gerrit.openbmc.org/c/openbmc/bmcweb/+/44438/ merged and looks
for obmc-console-ssh and fills the port info out.

Tested: None.

Change-Id: Ie9129af37e8b44bd52c462d9f1e4ff7d54dc0e14
Signed-off-by: Gunnar Mills <gmills@us.ibm.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 ...


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


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

systems: remove stray break for clang-tidy

clang-tidy warns as follows:

```
/data0/jenkins/workspace/ci-repository/openbmc/bmcweb/redfish-core/lib/systems.hpp:292:13: error: loop will run at most o

systems: remove stray break for clang-tidy

clang-tidy warns as follows:

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

It seems as though the break is stray so remove it.

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

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


# 797d5dae 26-Apr-2022 Corey Hardesty <corey.hardesty@ibm.com>

Support for configurable host reboot count

ComputerSystem.v1.11 introduced a new property, AutomaticRetryAttempts,
which allows for the amount of automatic retry attempts on host boot
failures to be

Support for configurable host reboot count

ComputerSystem.v1.11 introduced a new property, AutomaticRetryAttempts,
which allows for the amount of automatic retry attempts on host boot
failures to be configured through Redfish. This commit adds support
for this new property.
The added function "setAutomaticRetryAttempts()" allows users to set the
"RetryAttempts" property externally through bmcweb. This property is
documented in D-Bus and has a default value of 3. All implementations
of the interface have this property implemented. The new code preserves
backward compatibility and does not break any existing user-facing
behavior.

Tested:
- Ensured that the new "AutomaticRetryAttempts" property could be
retrieved through bmcweb. Verified that it was accurately
representing its corresponding DBus property, "RetryAttempts".

- Sent curl commands to patch the "AutomaticRetryAttempts" property
which also updates the "AttemptsLeft" DBus property represented as
"RemainingAutomaticRetryAttempts" as expected.

- Verified that changes made to "RetryAttempts" through DBus were
accurately represented in successive "Gets" from bmcweb.

- Passed Redfish Validator

curl -k -H "X-AUTH" -X GET https://${BMC_IP}/redfish/v1/Systems/system/

"Boot": {
"AutomaticRetryAttempts": 3,
"AutomaticRetryConfig": "RetryAttempts",
"AutomaticRetryConfig@Redfish.AllowableValues": [
"Disabled",
"RetryAttempts"
],
"RemainingAutomaticRetryAttempts": 3,
"StopBootOnFault": "Never",
"TrustedModuleRequiredToBoot": "Disabled"
},

curl -k -X PATCH https://${BMC_IP}/redfish/v1/Systems/system/ -d '{"Boot":
{"AutomaticRetryAttempts":4}}'

"Boot": {
"AutomaticRetryAttempts": 4,
"AutomaticRetryConfig": "RetryAttempts",
"AutomaticRetryConfig@Redfish.AllowableValues": [
"Disabled",
"RetryAttempts"
],
"RemainingAutomaticRetryAttempts": 4,
"StopBootOnFault": "Never",
"TrustedModuleRequiredToBoot": "Disabled"
},

Signed-off-by: Corey Hardesty <corey.hardesty@icloud.com>
Change-Id: I034782847a2318e2604bdd0cf33cdf705d224acb
Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com>

show more ...


# 2661b72c 22-Mar-2023 Chris Cain <cjcain@us.ibm.com>

systems: Fix missing EnterDwellTime property

Prior commit missed adding a required property to a rewrite using
sdbusplus::unpackProperties()

Fixes a regression introduced in commit
bc1d29de81216e99

systems: Fix missing EnterDwellTime property

Prior commit missed adding a required property to a rewrite using
sdbusplus::unpackProperties()

Fixes a regression introduced in commit
bc1d29de81216e99d0a73c5fd3b6bb7fd2194ba8

Validator passed:
IdlePowerSaver [JSON Object] ComputerSystem.v1_16_0.IdlePowerSaver Yes complex
IdlePowerSaver.Enabled False boolean Yes PASS
IdlePowerSaver.EnterUtilizationPercent 8 number Yes PASS
IdlePowerSaver.EnterDwellTimeSeconds 240 number Yes PASS
IdlePowerSaver.ExitUtilizationPercent 12 number Yes PASS
IdlePowerSaver.ExitDwellTimeSeconds 10 number Yes PASS

Change-Id: I345c714b71d50d6c8c03120c54bdabe0bd5d0714
Signed-off-by: Chris Cain <cjcain@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 ...


# 5c3e9272 24-Jun-2021 Abhishek Patel <Abhishek.Patel@ibm.com>

Retrieve port info for systems service

In systems.hpp for Serialconsole, SSH service-enabled and its Port
number info is hardcoded. Same for IPMI service-enabled info is also
hardcoded.

Implementat

Retrieve port info for systems service

In systems.hpp for Serialconsole, SSH service-enabled and its Port
number info is hardcoded. Same for IPMI service-enabled info is also
hardcoded.

Implementation:

SSH:
check for obmc-console-ssh@2200.service service is enable or not, and
yes then, on which port number. Retrieve service-related information
and pass that into DMTF for "/redfish/v1/Systems/system/".

IPMI:-
check for phosphor-ipmi-net@eth0.socket service is enable or not, and
pass that info DMTF for "/redfish/v1/Systems/system/".

Tested:
Manually tested on the Witherspoon system, there is no change in output.
Run Redfish validator. No error found.

Before:

"SerialConsole": {
"IPMI": {
"ServiceEnabled": true
},
"MaxConcurrentSessions": 15,
"SSH": {
"HotKeySequenceDisplay": "Press ~. to exit console",
"Port": 2200,
"ServiceEnabled": true
}
}

After:

Note: SSH Info retrieve via Dbus ListUnit API

"SerialConsole": {
"IPMI": {
"ServiceEnabled": true
},
"MaxConcurrentSessions": 15,
"SSH": {
"HotKeySequenceDisplay": "Press ~. to exit console",
"Port": 2200,
"ServiceEnabled": true
}
}

Signed-off-by: Abhishek Patel <Abhishek.Patel@ibm.com>
Change-Id: I70009ee785aab3ca4a61fe0d96fbc5b340831647

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


12345678910