History log of /openbmc/bmcweb/features/redfish/lib/systems.hpp (Results 26 – 50 of 249)
Revision Date Author Comments
# 539d8c6b 19-Jun-2024 Ed Tanous <ed@tanous.net>

Consistently use generated enumerations

This commit causes all of Redfish to use generated enum values for enum
types. Using generated code prevents problems, and makes it more clear
what types are

Consistently use generated enumerations

This commit causes all of Redfish to use generated enum values for enum
types. Using generated code prevents problems, and makes it more clear
what types are allowed.

Doing this found two places where we had structs that didn't fulfill the
schema. They have been commented, but will be fixed with a breaking
change at some point in the future.

Tested: WIP

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

show more ...


# 1d834d49 12-Jul-2024 Ed Tanous <ed@tanous.net>

OemComputerSystem -> OpenBMCComputerSystem

Rename these and add a version like we've done other places.

Partial fix for #184

Change-Id: I9039974a90f6508bdd474e6363a3df7286b1473c
Signed-off-by: Ed

OemComputerSystem -> OpenBMCComputerSystem

Rename these and add a version like we've done other places.

Partial fix for #184

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

show more ...


# 67b15903 12-Jul-2024 Asmitha Karunanithi <asmitk01@in.ibm.com>

Show hypervisor path on GET of Systems collection

Redfish GET on `/redfish/v1/Systems` is missing to show the hypervisor
resource in its members list, even though hypervisor is available.
This commi

Show hypervisor path on GET of Systems collection

Redfish GET on `/redfish/v1/Systems` is missing to show the hypervisor
resource in its members list, even though hypervisor is available.
This commit fixes missing hypervisor resource in a GET response on
Systems collection. The `Members@odata.count` is retrieved as `uint64_t`
pointer. But the Json library might store this value as "int" or
"size_t". Therefore, directly casting it to uint64_t* might not work
as expected.

Tested By:
Verified "GET https://${bmc}/redfish/v1/Systems" returns the hypervisor
resource

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

show more ...


# e93abac6 14-Jun-2024 Ginu George <ginugeorge@ami.com>

Pass redfishPropertyName earlier argument

It was pointed out that the setDbusProperty method should have an end
that approximately matches dbus-send and busctl set-property in its
arguments, to aid

Pass redfishPropertyName earlier argument

It was pointed out that the setDbusProperty method should have an end
that approximately matches dbus-send and busctl set-property in its
arguments, to aid with debug. This seems reasonable.

Tested: Redfish service validator passes.

Change-Id: Ic20295d93c71c957e3e76704e1eda9da187861b1
Signed-off-by: Ginu George <ginugeorge@ami.com>
Signed-off-by: Ed Tanous <ed@tanous.net>

show more ...


# efff2b5d 18-Jun-2024 Manojkiran Eda <manojkiran.eda@gmail.com>

Fix spelling mistakes using codespell

This commit corrects various spelling mistakes throughout the
repository. The corrections were made automatically using `codespell`[1]
tool.

[1]: https://githu

Fix spelling mistakes using codespell

This commit corrects various spelling mistakes throughout the
repository. The corrections were made automatically using `codespell`[1]
tool.

[1]: https://github.com/codespell-project/codespell

Change-Id: I8751c35ad7246f73ec2e7cd4a04488c25bde3f39
Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# 20fa6a2c 20-May-2024 Ed Tanous <ed@tanous.net>

Remove the last instances of json pattern

In the past, we've tried to erradicate the use of
nlohmann::json(initiatlizer_list<...>) because it bloats binary sizes,
as every type is given a new nlohma

Remove the last instances of json pattern

In the past, we've tried to erradicate the use of
nlohmann::json(initiatlizer_list<...>) because it bloats binary sizes,
as every type is given a new nlohmann constructor.

This commit hunts down the last few places where we call this. There is
still 2 remaining in openbmc_dbus_rest after this, but those are variant
accesses that are difficult to triage, and considering it's a less used
api, they're left as is.

Tested: WIP

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

show more ...


# 253f11b8 16-May-2024 Ed Tanous <ed@tanous.net>

Allow configuring "bmc" and "system"

In the early days of bmcweb, we made two pretty critical assumptions;
First, is that a given platform would only have a single BMC instance
(represented as "bmc"

Allow configuring "bmc" and "system"

In the early days of bmcweb, we made two pretty critical assumptions;
First, is that a given platform would only have a single BMC instance
(represented as "bmc") and a single host instance (represented as
"system").
Second we assumed that, given that Redfish suggests against hardcoding
URIs in client implementation and leaves them freeform, clients would
code to the standard.

Our own webui-vue hardcodes Redfish URIs [1], and the documentation is
littered with examples of hardcoded curl examples of hardcoding these
URIs. That bug was filed in 2020, and the issue has only gotten worse
over time.

This patchset is an attempt to give a target that we can start solving
these issues, without trying to boil the ocean and fix all clients in
parallel.

This commit adds the meson options
redfish-manager-uri-name
and
redfish-system-uri-name

These are used to control the "name" that bmcweb places in the fixed
locations in the ManagerCollection and ComputerSystemCollection schemas.

Note, managers is added, but is not currently testable. It will be
iterated on over time.

Tested:
Changed the URL options to "edsbmc" and "edssystem" in meson options.

Redfish service validator passes.
URLs appear changed when walking the tree.

[1] https://github.com/openbmc/webui-vue/issues/43

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

show more ...


# 25b54dba 17-Apr-2024 Ed Tanous <ed@tanous.net>

Bring consistency to config options

The configuration options that exist in bmcweb are an amalgimation of
CROW options, CMAKE options using #define, pre-bmcweb ifdef mechanisms
and meson options usi

Bring consistency to config options

The configuration options that exist in bmcweb are an amalgimation of
CROW options, CMAKE options using #define, pre-bmcweb ifdef mechanisms
and meson options using a config file. This history has led to a lot of
different ways to configure code in the codebase itself, which has led
to problems, and issues in consistency.

ifdef options do no compile time checking of code not within the branch.
This is good when you have optional dependencies, but not great when
you're trying to ensure both options compile.

This commit moves all internal configuration options to:
1. A namespace called bmcweb
2. A naming scheme matching the meson option. hyphens are replaced with
underscores, and the option is uppercased. This consistent transform
allows matching up option keys with their code counterparts, without
naming changes.
3. All options are bool true = enabled, and any options with _ENABLED or
_DISABLED postfixes have those postfixes removed. (note, there are
still some options with disable in the name, those are left as-is)
4. All options are now constexpr booleans, without an explicit compare.

To accomplish this, unfortunately an option list in config/meson.build
is required, given that meson doesn't provide a way to dump all options,
as is a manual entry in bmcweb_config.h.in, in addition to the
meson_options. This obsoletes the map in the main meson.build, which
helps some of the complexity.

Now that we've done this, we have some rules that will be documented.
1. Runtime behavior changes should be added as a constexpr bool to
bmcweb_config.h
2. Options that require optionally pulling in a dependency shall use an
ifdef, defined in the primary meson.build. (note, there are no
options that currently meet this class, but it's included for
completeness.)

Note, that this consolidation means that at configure time, all options
are printed. This is a good thing and allows direct comparison of
configs in log files.

Tested: Code compiles
Server boots, and shows options configured in the default build. (HTTPS,
log level, etc)

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

show more ...


# 87c44966 04-Apr-2024 Asmitha Karunanithi <asmitk01@in.ibm.com>

Move to Redfish setProperty call

This commit changes sdbusplus setProperty calls (in various files) to
setDbusProperty method in Redfish namespace that handles all DBus
errors in a consistent manner

Move to Redfish setProperty call

This commit changes sdbusplus setProperty calls (in various files) to
setDbusProperty method in Redfish namespace that handles all DBus
errors in a consistent manner.

It also handles and translates additional DBus errors to Redfish
specific errors in dbus_utils file.

Tested By:
Not tested yet

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

show more ...


# 7ac13cc9 01-Apr-2024 Gunnar Mills <gmills@us.ibm.com>

Remove redfish-health-populate

The redfish-health-populate option was scheduled to be removed in 1Q
2024. It is now 2Q, so remove the option. No upstream layers enabled it
and did not find a downstr

Remove redfish-health-populate

The redfish-health-populate option was scheduled to be removed in 1Q
2024. It is now 2Q, so remove the option. No upstream layers enabled it
and did not find a downstream layer that did either.

This was always limited to a few resources. Overall this design was only
half done. A future "HealthRollup" can be proposed.

Some discord discussion:
[1]: https://discord.com/channels/775381525260664832/855566794994221117/1110728560819327069

Commit disabling this (merged 10 months ago):
[2]: https://github.com/openbmc/bmcweb/commit/6f8273e49cffdd347c223b9538558edfb05e818a

Tested: Code compiles

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

show more ...


# 51bd2d8a 01-Apr-2024 Gunnar Mills <gmills@us.ibm.com>

Remove redfish-enable-proccessor-memory-status

The redfish-enable-proccessor-memory-status option was scheduled to be
removed in 1Q 2024. It is now 2Q, so remove the option. No upstream
layers enabl

Remove redfish-enable-proccessor-memory-status

The redfish-enable-proccessor-memory-status option was scheduled to be
removed in 1Q 2024. It is now 2Q, so remove the option. No upstream
layers enabled it and I could not find a downstream layer that did
either.

Redfish deprecated the Processor/Memory Summary Status (state, health,
healthrollup) attributes.

Discussion on discord, when disabling:
[1]: https://discord.com/channels/775381525260664832/855566794994221117/1093939076710793296

Commit disabling this (merged 10 months ago):
[2]: https://github.com/openbmc/bmcweb/commit/5fd0aafb0f14fb3011970e8575647bb608688c7c

Tested: Code builds.

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

show more ...


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

Remove duplicated include

This include exists above.

Tested: code compiles.

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


# d02aad39 13-Feb-2024 Ed Tanous <ed@tanous.net>

Create Redfish specific setProperty call

There are currently 78 sdbusplus::asio::setProperty calls in
redfish-core. The error handler for nearly all of them looks something
like:

```
if (ec)
{

Create Redfish specific setProperty call

There are currently 78 sdbusplus::asio::setProperty calls in
redfish-core. The error handler for nearly all of them looks something
like:

```
if (ec)
{
const sd_bus_error* dbusError = msg.get_error();
if ((dbusError != nullptr) &&
(dbusError->name ==
std::string_view(
"xyz.openbmc_project.Common.Error.InvalidArgument")))
{
BMCWEB_LOG_WARNING("DBUS response error: {}", ec);
messages::propertyValueIncorrect(asyncResp->res, "<PropertyName>", <PropertyValue>);
return;
}
messages::internalError(asyncResp->res);
return;
}
messages::success(asyncResp->res);

```

In some cases there are more errors handled that translate to more error
messages, but the vast majority only handle InvalidArgument. Many of
these, like the ones in account_service.hpp, do the error handling in a
lambda, which causes readability problems. This commit starts to make
things more consistent, and easier for trivial property sets.

This commit invents a setDbusProperty method in the redfish namespace
that tries to handle all DBus errors in a consistent manner. Looking
for input on whether this will work before changing over the other 73
calls. Overall this is less code, fewer inline lambdas, and defaults
that should work for MOST use cases of calling an OpenBMC daemon, and
fall back to more generic errors when calling a "normal" dbus daemon.

As part of this, I've ported over several examples. Some things that
might be up in the air:
1. Do we always return 204 no_content on property sets? Today there's a
mix of 200, with a Base::Success message, and 204, with an empty body.
2. Do all DBus response codes map to the same error? A majority are
covered by xyz.openbmc_project.Common.Error.InvalidArgument, but there
are likely differences. If we allow any daemon to return any return
code, does that cause compatibility problems later?

Tested:
```
curl -k --user "root:0penBmc" -H "Content-Type: application/json" -X PATCH -d '{"HostName":"openbmc@#"}' https://192.168.7.2/redfish/v1/Managers/bmc/EthernetInterfaces/eth0
```

Returns the appropriate error in the response
Base.1.16.0.PropertyValueIncorrect

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

show more ...


# e715d14b 07-Mar-2024 Ed Tanous <ed@tanous.net>

Fix behavior when service is missing

Fix regression as part of 33e1f122b740c5de679dc0350b5f41e8d975499f
AllowedHostTransitions: look for on dbus

I have no idea why checking against .value() matters

Fix behavior when service is missing

Fix regression as part of 33e1f122b740c5de679dc0350b5f41e8d975499f
AllowedHostTransitions: look for on dbus

I have no idea why checking against .value() matters here, but on
systems that doesn't have this daemon present, checking against ec ==
instead of ec.value() == causes this to return 500.

Loaded on qemu, without an implementation of AllowedValues.
```
curl -vvvv -k --user "root:0penBmc" -H "Content-Type: application/json" https://192.168.7.2/redfish/v1/Systems/system/ResetActionInfo
```

Now succeeds.

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

show more ...


# 33e1f122 26-Feb-2024 Andrew Geissler <geissonator@yahoo.com>

AllowedHostTransitions: look for on dbus

Commit [1] introduced a new optional dbus property that OpenBMC
developers can populate to define which
redfish/v1/Systems/system/ResetActionInfo AllowableVa

AllowedHostTransitions: look for on dbus

Commit [1] introduced a new optional dbus property that OpenBMC
developers can populate to define which
redfish/v1/Systems/system/ResetActionInfo AllowableValues are.

Look for that new property on dbus. If not found, hard code the
previous values otherwise utilize the property to fill in the return
value.

Tested:
- Put new property on dbus and confirmed Redfish API returned expected
values:
```
curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Systems/system/ResetActionInfo
{
"@odata.id": "/redfish/v1/Systems/system/ResetActionInfo",
"@odata.type": "#ActionInfo.v1_1_2.ActionInfo",
"Id": "ResetActionInfo",
"Name": "Reset Action Info",
"Parameters": [
{
"AllowableValues": [
"ForceOff",
"PowerCycle",
"Nmi",
"On",
"ForceOn",
"ForceRestart",
"GracefulRestart",
"GracefulShutdown"
],
"DataType": "String",
"Name": "ResetType",
"Required": true
}
]
}
```
- Did not run redfish validator as response was same as previous

[1]: https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/68933

Change-Id: Iecece14e7ff55db98d96df71b106ecc9e3f0ac33
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# 6b9ac4f2 15-Feb-2024 Chris Cain <cjcain@us.ibm.com>

Systems: Add support to read AllowedPowerModes

Instead of hardcodeing the AllowedPowerModes property, the data will be
read from dbus if it exists. If data is empty/not found, the property
will be s

Systems: Add support to read AllowedPowerModes

Instead of hardcodeing the AllowedPowerModes property, the data will be
read from dbus if it exists. If data is empty/not found, the property
will be set to the default value:
[ "MaximumPerformance", "PowerSaving", "Static" ]

Tested on Rainier hardware and Validator passed

When dbus property is empty, it will show default modes:
'''
xyz.openbmc_project.Control.Power.Mode interface - - -
.AllowedPowerModes property as 0 const
.PowerMode property s "xyz.openbmc_project.Control.Power.Mode.PowerMode.MaximumPerformance" emits-change writable

"PowerMode": "MaximumPerformance",
"PowerMode@Redfish.AllowableValues": [
"MaximumPerformance",
"PowerSaving",
"Static"
],
"PowerRestorePolicy": "AlwaysOff",
'''

When dbus property populated with 6 modes:
''' -
xyz.openbmc_project.Control.Power.Mode interface - - -
.AllowedPowerModes property as 6 "xyz.openbmc_project.Control.Power.Mode.PowerMode.BalancedPerformance" "xyz.openbmc_project.Control.Power.Mode.PowerMode.EfficiencyFavorPerformance" "xyz.openbmc_project.Control.Power.Mode.PowerMode.EfficiencyFavorPower" "xyz.openbmc_project.Control.Power.Mode.PowerMode.MaximumPerformance" "xyz.openbmc_project.Control.Power.Mode.PowerMode.PowerSaving" "xyz.openbmc_project.Control.Power.Mode.PowerMode.Static" const
.PowerMode property s "xyz.openbmc_project.Control.Power.Mode.PowerMode.MaximumPerformance" emits-change writable

"PowerMode": "MaximumPerformance",
"PowerMode@Redfish.AllowableValues": [
"BalancedPerformance",
"EfficiencyFavorPerformance",
"EfficiencyFavorPower",
"MaximumPerformance",
"PowerSaving",
"Static"
],
"PowerRestorePolicy": "AlwaysOff",
'''

When dbus property not defined it will show default modes:
'''
xyz.openbmc_project.Control.Power.Mode interface - - -
.PowerMode property s "xyz.openbmc_project.Control.Power.Mode.PowerMode.MaximumPerformance" emits-change writable

"PowerMode": "MaximumPerformance",
"PowerMode@Redfish.AllowableValues": [
"MaximumPerformance",
"PowerSaving",
"Static"
],
"PowerRestorePolicy": "AlwaysOff",
'''

Signed-off-by: Chris Cain <cjcain@us.ibm.com>
Change-Id: Ic9882d2760a39dd1a0ea353624eb3c8575f4c6a0

show more ...


# b6655101 01-Feb-2024 Chris Cain <cjcain@us.ibm.com>

Systems: Add support for new eco power modes

Add support for the following new power modes:
- Efficiency Favor Performance
- Efficiency Favor Power
- Balanced Performance

New modes were added in Co

Systems: Add support for new eco power modes

Add support for the following new power modes:
- Efficiency Favor Performance
- Efficiency Favor Power
- Balanced Performance

New modes were added in ComputerSystem schema to v1.22

Tested on Rainier and passed Validator

'''
GET /redfish/v1/Systems/system:
"@odata.type": "#ComputerSystem.v1_22_0.ComputerSystem",
...
"PowerMode": "EfficiencyFavorPerformance",
"PowerMode@Redfish.AllowableValues": [
"Static",
"MaximumPerformance",
"PowerSaving"
],

PATCH -d '{ "PowerMode":"BalancedPerformance"}' https://$bmc/redfish/v1/Systems/system
"PowerMode": "BalancedPerformance",

PATCH -d '{ "PowerMode":"EfficiencyFavorPerformance"}' https://$bmc/redfish/v1/Systems/system
"PowerMode": "EfficiencyFavorPerformance",

PATCH -d '{ "PowerMode":"EfficiencyFavorPower"}' https://$bmc/redfish/v1/Systems/system
"PowerMode": "EfficiencyFavorPower",

PATCH -d '{ "PowerMode":"MaximumPerformance"}' https://$bmc/redfish/v1/Systems/system
"PowerMode": "MaximumPerformance",

PATCH -d '{ "PowerMode":"NotARealMode"}' https://$bmc/redfish/v1/Systems/system
{
"PowerMode@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The value '\"NotARealMode\"' for the property PowerMode is not in the list of acceptable values.",
"MessageArgs": [
"\"NotARealMode\"",
"PowerMode"
],
"MessageId": "Base.1.13.0.PropertyValueNotInList",
"MessageSeverity": "Warning",
"Resolution": "Choose a value from the enumeration list that the implementation can support and resubmit the request if the operation failed."
}
]
'''

Validator Results:
'''
Type (ComputerSystem.v1_22_0.ComputerSystem), GET SUCCESS (time: 0:00:00.107269)
...
PASS
...
Elapsed time: 0:15:07
invalidPropertyValue: 62
metadataNamespaces: 4324
pass: 14323
passAction: 20
passGet: 1051
passRedfishUri: 1002
skipNoSchema: 3
skipOptional: 25582
unverifiedAdditional.complex: 21
warnDeprecated: 8
warningPresent: 83
warnings: 67
Validation has succeeded.
'''

Change-Id: I56296a524b01d64adccad2d3da1757056900b6db
Signed-off-by: Chris Cain <cjcain@us.ibm.com>

show more ...


# 70c4d545 08-Jun-2023 Lakshmi Yadlapati <lakshmiy@us.ibm.com>

Refactor PCIeDeviceList to use getCollectionMembers

This commit refactors the code in the PCIeDeviceList function to use the
getCollectionMembers function for retrieving collection members.
Addition

Refactor PCIeDeviceList to use getCollectionMembers

This commit refactors the code in the PCIeDeviceList function to use the
getCollectionMembers function for retrieving collection members.
Additionally, a new function getCollectionToKey() is added to
handle the retrieval of collection members with custom key name.

Tested: Validator passed

'''
Test1: Redfish query of PCI devices on a system that does not have
any PCIe devices

curl -k https://$bmc/redfish/v1/Systems/system/PCIeDevices
{
"@odata.id": "/redfish/v1/Systems/system/PCIeDevices",
"@odata.type": "#PCIeDeviceCollection.PCIeDeviceCollection",
"Description": "Collection of PCIe Devices",
"Members": [],
"Members@odata.count": 0,
"Name": "PCIe Device Collection"
}

Test2: Redfish query of PCIe devices on a system that has PCIe devices

curl -k https://$bmc/redfish/v1/Systems/system/PCIeDevices
{
"@odata.id": "/redfish/v1/Systems/system/PCIeDevices",
"@odata.type": "#PCIeDeviceCollection.PCIeDeviceCollection",
"Description": "Collection of PCIe Devices",
"Members": [
{
"@odata.id": "/redfish/v1/Systems/system/PCIeDevices/drive0"
},
.......
{
"@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card1"
},
{
"@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card2"
},
.......
{
"@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card12"
}
],
"Members@odata.count": 22,
"Name": "PCIe Device Collection"
}

Test3: Redfish query of system with PCIe devices
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/drive0"
},
.......
{
"@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card1"
},
....
],
"PCIeDevices@odata.count": 22,
"PartNumber": "",
....
"SubModel": "S0",
"SystemType": "Physical"
}
'''

Change-Id: Icb38945a2c7bc5219ff3917fbbc8a9986c9c6155
Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.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 ...


# a974c132 25-Oct-2023 Lakshmi Yadlapati <lakshmiy@us.ibm.com>

Refactor getComputerSystem

This commit refactors the getComputerSystem function into smaller
functions. There is no functional change in this commit.

Tested: Validator passed

'''
curl -k https://

Refactor getComputerSystem

This commit refactors the getComputerSystem function into smaller
functions. There is no functional change in this commit.

Tested: Validator passed

'''
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"
}
},
"Bios": {
"@odata.id": "/redfish/v1/Systems/system/Bios"
},
"Boot": {
"AutomaticRetryAttempts": 3,
"AutomaticRetryConfig": "RetryAttempts",
"AutomaticRetryConfig@Redfish.AllowableValues": [
"Disabled",
"RetryAttempts"
],
"BootSourceOverrideEnabled": "Disabled",
"BootSourceOverrideMode": "UEFI",
"BootSourceOverrideMode@Redfish.AllowableValues": [
"Legacy",
"UEFI"
],
"BootSourceOverrideTarget": "None",
"BootSourceOverrideTarget@Redfish.AllowableValues": [
"None",
"Pxe",
"Hdd",
"Cd",
"Diags",
"BiosSetup",
"Usb"
],
"RemainingAutomaticRetryAttempts": 3,
"StopBootOnFault": "Never",
"TrustedModuleRequiredToBoot": "Required"
},
"BootProgress": {
"LastState": "None",
"LastStateTime": "1970-01-01T00:00:00.000000+00:00"
},
"Description": "Computer System",
"FabricAdapters": {
"@odata.id": "/redfish/v1/Systems/system/FabricAdapters"
},
"GraphicalConsole": {
"ConnectTypesSupported": [
"KVMIP"
],
"MaxConcurrentSessions": 4,
"ServiceEnabled": true
},
"Id": "system",
"IndicatorLED": "Off",
"LastResetTime": "2023-09-29T13:27:47+00:00",
"Links": {
"Chassis": [
{
"@odata.id": "/redfish/v1/Chassis/chassis"
}
],
"ManagedBy": [
{
"@odata.id": "/redfish/v1/Managers/bmc"
}
]
},
"LocationIndicatorActive": false,
"LogServices": {
"@odata.id": "/redfish/v1/Systems/system/LogServices"
},
"Memory": {
"@odata.id": "/redfish/v1/Systems/system/Memory"
},
"MemorySummary": {
"TotalSystemMemoryGiB": 0.0
},
"Name": "system",
"PCIeDevices": [],
"PCIeDevices@odata.count": 0,
"PowerRestorePolicy": "LastState",
"PowerState": "Off",
"ProcessorSummary": {
"Count": 0
},
"Processors": {
"@odata.id": "/redfish/v1/Systems/system/Processors"
},
"SerialConsole": {
"IPMI": {
"ServiceEnabled": true
},
"MaxConcurrentSessions": 15,
"SSH": {
"HotKeySequenceDisplay": "Press ~. to exit console",
"Port": 2200,
"ServiceEnabled": true
}
},
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Disabled"
},
"Storage": {
"@odata.id": "/redfish/v1/Systems/system/Storage"
},
"SystemType": "Physical"
}
'''

Change-Id: I16a0c054dfff4ace0b43e156a64fd07b3244fbc1
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 ...


# b3e86cb0 31-Aug-2023 Gunnar Mills <gmills@us.ibm.com>

System: Error log level when internalError

In line with
https://github.com/openbmc/bmcweb/blob/master/DEVELOPING.md#logging-levels.
When there is an InternalError, set the logging level to Error.

A

System: Error log level when internalError

In line with
https://github.com/openbmc/bmcweb/blob/master/DEVELOPING.md#logging-levels.
When there is an InternalError, set the logging level to Error.

Added some additional traces to get the EC. Having the EC is really
helpful when debugging.

IBM has bmcweb-logging=error enabled.

Tested: None. Visual only.

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

show more ...


# 3a34b742 28-Jul-2023 Gunnar Mills <gmills@us.ibm.com>

Fix RestorePolicy map

Before this code looked like:

{"xyz.openbmc_project.Control.Power.RestorePolicy.Policy.Restore",
"LastState"},
and that matches the PDI:
https://github.com/openbmc/phosphor-db

Fix RestorePolicy map

Before this code looked like:

{"xyz.openbmc_project.Control.Power.RestorePolicy.Policy.Restore",
"LastState"},
and that matches the PDI:
https://github.com/openbmc/phosphor-dbus-interfaces/blob/d1484a1499bc241316853934e6e8b735166deee2/yaml/xyz/openbmc_project/Control/Power/RestorePolicy.interface.yaml#L33

https://gerrit.openbmc.org/c/openbmc/bmcweb/+/64334/2/redfish-core/lib/systems.hpp#1350
changed this to RestorePolicy.Policy.AlwaysRestore, I think just a copy
mistake.

Pointed out by Patrick Rudolph.

Tested: None. Searching the enum now matches PDI and what was there
before.

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

show more ...


# fc3edfdd 20-Jul-2023 Ed Tanous <edtanous@google.com>

Rename aResp to asyncResp

We enforced this naming convention a while ago, but some new patchsets
seem to have ignored it. Fix the naming convention.

Tested: Code compiles. Trivial find and replac

Rename aResp to asyncResp

We enforced this naming convention a while ago, but some new patchsets
seem to have ignored it. Fix the naming convention.

Tested: Code compiles. Trivial find and replace.

Change-Id: I2921d80d9cdc536f99c2f9e522c60d12f4310a67
Signed-off-by: Ed Tanous <edtanous@google.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 ...


12345678910