History log of /openbmc/bmcweb/features/redfish/include/utils/sw_utils.hpp (Results 1 – 25 of 36)
Revision Date Author Comments
# fa712405 20-Jun-2025 Daniel Hsu <Daniel-Hsu@quantatw.com>

manager: Lower software version log severity

During the transition to using phosphor-settings-defaults-native for
setting the software version, the version field may temporarily be
empty. This chang

manager: Lower software version log severity

During the transition to using phosphor-settings-defaults-native for
setting the software version, the version field may temporarily be
empty. This change lowers the log severity for that case to avoid
unnecessary warnings during expected intermediate states.

'''
Jun 20 02:41:49 bmc bmcwebd[709]: [error_messages.cpp:1248] Internal Error /usr/src/debug/bmcweb/1.0+git/redfish-core/include/utils/sw_utils.hpp(126:32) `void redfish::sw_util::afterGetProperties(const std::shared_ptr<bmcweb::AsyncResp>&, const std::string&, bool, const std::string&, const std::string&, bool, const boost::system::error_code&, const dbus::utility::DBusPropertiesMap&)`:
'''

Change-Id: I9123278f863fcf04107b42a5996ccb725c1bd870
Signed-off-by: Daniel Hsu <Daniel-Hsu@quantatw.com>

show more ...


# c9bd0924 11-Jun-2024 Gunnar Mills <gmills@us.ibm.com>

Software: Add LowestSupportedVersion

A Minimum Version interface was added.[1] This is the minimum software
version that a component must have to operate. Like other interfaces it
is optional. Minim

Software: Add LowestSupportedVersion

A Minimum Version interface was added.[1] This is the minimum software
version that a component must have to operate. Like other interfaces it
is optional. MinimumVersion maps to Redfish's LowestSupportedVersion.[2]

"LowestSupportedVersion": {
"description": "The lowest supported version of this software.",
"longDescription": "This property shall represent the lowest
supported version of this software. This string is formatted using the
same format used for the `Version` property.",
"readonly": true,
"type": [
"string",
"null"
],
"versionAdded": "v1_1_0"

phosphor-bmc-code-mgmt has support for minimum version.[3]

phosphor-bmc-code-mgmt logs a Software Incompatible[4] error if this
minimum version is not met. Mapping this error to a Redfish error is
not done here but could be added later.

This assumes the D-Bus path is /xyz/openbmc_project/software/$id.

phosphor-bmc-code-mgmt moved this interface under $id at 72323[5]. We
assume D-Bus Path /xyz/openbmc_project/software/ + $id for other
properties already.

[1]: https://github.com/openbmc/phosphor-dbus-interfaces/commit/9012243e543abdc5851b7e878c17c991b2a2a8b7
[2]: https://redfish.dmtf.org/schemas/v1/SoftwareInventory.v1_10_2.json
[3]: https://github.com/openbmc/phosphor-bmc-code-mgmt/blob/85c71a13e0938cc4d36caf6b8e735e9740b2e351/meson.options#L100
[4]: https://github.com/openbmc/phosphor-dbus-interfaces/blob/1c140b9766a15d1cbb8546fa02d5050d772a171d/yaml/xyz/openbmc_project/Software/Version.errors.yaml#L1
[5]: https://gerrit.openbmc.org/c/openbmc/phosphor-bmc-code-mgmt/+/72323

Tested: Using an IBM p10bmc see:
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/788d20be",
"@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
"Description": "BMC image",
...
"LowestSupportedVersion": "fw1020.00-39.1",
...

The Redfish Validator has no new errors.

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

show more ...


# fd4f088f 28-May-2025 Myung Bae <myungbae@us.ibm.com>

Suppress SW EBADR message

During the code update, the following EBADR messages may be generated
and they can be suppressed.

During the code update, the following journal messages may be generated
d

Suppress SW EBADR message

During the code update, the following EBADR messages may be generated
and they can be suppressed.

During the code update, the following journal messages may be generated
due to a reason why there is a software version with EBADR because the
software app deleted the old version. The EBADR check already does not
throw an internal error and it shouldn't log to the journal either at
the error based [1].

This commit also cleans up these journal traces because logging both ec
and ec.message is redundant.

```
ay 27 20:17:04.992218 ever28bmc systemd[1]: Starting Delete image a from BMC storage...
May 27 20:17:05.205158 ever28bmc obmc-flash-bmc[2159]: 2048+0 records in
May 27 20:17:05.205158 ever28bmc obmc-flash-bmc[2159]: 2048+0 records out
May 27 20:17:05.391229 ever28bmc obmc-flash-bmc[2161]: 2048+0 records in
May 27 20:17:05.391229 ever28bmc obmc-flash-bmc[2161]: 2048+0 records out

May 27 20:17:05.403161 ever28bmc systemd[1]: obmc-flash-mmc-remove@a.service: Deactivated successfully.
May 27 20:17:05.404485 ever28bmc systemd[1]: Finished Delete image a from BMC storage.
May 27 20:17:07.974923 ever28bmc bmcweb[1176]: [ERROR sw_utils.hpp:148] error_code = Invalid request descriptor [generic:53]
May 27 20:17:07.974923 ever28bmc bmcweb[1176]: [ERROR sw_utils.hpp:150] error msg = Invalid request descriptor
May 27 20:17:07.974923 ever28bmc bmcweb[1176]: [ERROR sw_utils.hpp:148] error_code = Invalid request descriptor [generic:53]
May 27 20:17:07.974923 ever28bmc bmcweb[1176]: [ERROR sw_utils.hpp:150] error msg = Invalid request descriptor
May 27 20:17:07.974923 ever28bmc bmcweb[1176]: [ERROR sw_utils.hpp:148] error_code = Invalid request descriptor [generic:53]
May 27 20:17:07.974923 ever28bmc bmcweb[1176]: [ERROR sw_utils.hpp:150] error msg = Invalid request descriptor
May 27 20:17:07.986380 ever28bmc bmcweb[1176]: [ERROR sw_utils.hpp:148] error_code = Invalid request descriptor [generic:53]
May 27 20:17:07.986380 ever28bmc bmcweb[1176]: [ERROR sw_utils.hpp:150] error msg = Invalid request descriptor
May 27 20:17:07.988780 ever28bmc bmcweb[1176]: [ERROR sw_utils.hpp:148] error_code = Invalid request descriptor [generic:53]
```

[1] https://github.com/openbmc/bmcweb/blob/10cf50dca112b27176dc5734126983ad37ba2c04/DEVELOPING.md?plain=1#L213

Change-Id: I9454e85b299649e1a1e40663fac6256415bbfe7d
Signed-off-by: Myung Bae <myungbae@us.ibm.com>

show more ...


# 177612aa 14-Feb-2025 Ed Tanous <etanous@nvidia.com>

Add async_method_call to utility

Adding async_method_call in dbus utility gives us a place where we can
intercept method call requests from dbus to potentially add
logging/caching.

An example of lo

Add async_method_call to utility

Adding async_method_call in dbus utility gives us a place where we can
intercept method call requests from dbus to potentially add
logging/caching.

An example of logging is in the later commit:
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/78265/

We already do this for setProperty, this moves the method calls to
follow a similar pattern.

Tested: Redfish service validator passes.

Change-Id: I6d2c96e2b6b6a023ed2138106a55faebca161592
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...


# 504af5a0 03-Feb-2025 Patrick Williams <patrick@stwcx.xyz>

clang-format: update latest spec and reformat

Copy the latest format file from the docs repository and apply.

Change-Id: I2f0b9d0fb6e01ed36a2f34c750ba52de3b6d15d1
Signed-off-by: Patrick Williams <p

clang-format: update latest spec and reformat

Copy the latest format file from the docs repository and apply.

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

show more ...


# d7857201 28-Jan-2025 Ed Tanous <etanous@nvidia.com>

Fix includes

Clang-tidy misc-include-cleaner appears to now be enforcing
significantly more headers than previously. That is overall a good
thing, but forces us to fix some issues. This commit is

Fix includes

Clang-tidy misc-include-cleaner appears to now be enforcing
significantly more headers than previously. That is overall a good
thing, but forces us to fix some issues. This commit is largely just
taking the clang-recommended fixes and checking them in. Subsequent
patches will fix the more unique issues.

Note, that a number of new ignores are added into the .clang-tidy file.
These can be cleaned up over time as they're understood. The majority
are places where boost includes a impl/x.hpp and x.hpp, but expects you
to use the later. include-cleaner opts for the impl, but it isn't clear
why.

Change-Id: Id3fdd7ee6df6c33b2fd35626898523048dd51bfb
Signed-off-by: Ed Tanous <etanous@nvidia.com>
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# 40e9b92e 10-Sep-2024 Ed Tanous <etanous@nvidia.com>

Use SPDX identifiers

SPDX identifiers are simpler, and reduce the amount of cruft we have in
code files. They are recommended by linux foundation, and therefore we
should do as they allow.

This pa

Use SPDX identifiers

SPDX identifiers are simpler, and reduce the amount of cruft we have in
code files. They are recommended by linux foundation, and therefore we
should do as they allow.

This patchset does not intend to modify any intent on any existing
copyrights or licenses, only to standardize their inclusion.

[1] https://www.linuxfoundation.org/blog/blog/copyright-notices-in-open-source-software-projects

Change-Id: I935c7c0156caa78fc368c929cebd0f068031e830
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...


# a5f87d48 07-Jan-2025 Gunnar Mills <gmills@us.ibm.com>

SW: Don't log if no association

We define logging levels in DEVELOPING.md[1], an error is "Something
went wrong, and we weren't able to give the expected response. Service
is still operational. "err

SW: Don't log if no association

We define logging levels in DEVELOPING.md[1], an error is "Something
went wrong, and we weren't able to give the expected response. Service
is still operational. "error" should be used for unexpected conditions
that prevented bmcweb from fulfilling the request. "error" shall be used
for 5xx errors.".

This clearly isn't an error since we just ignore not having an
association and move on. Moved these traces to DEBUG. Andrew mentioned
these cluttering the journal when running CI.

[1]: https://github.com/openbmc/bmcweb/blob/master/DEVELOPING.md#logging-levels

Tested: This is changing a Logging Level only.

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

show more ...


# deae6a78 11-Nov-2024 Ed Tanous <etanous@nvidia.com>

Move getProperty calls to utility

Having all dbus calls run through the same utility reduces the amount of
generated code, and more importantly, gives us a place where we can log
the requests and re

Move getProperty calls to utility

Having all dbus calls run through the same utility reduces the amount of
generated code, and more importantly, gives us a place where we can log
the requests and responses to help with debugging.

Tested: Redfish service validator passes.

Change-Id: Ic1bf45130b5069cd57f7af26e12c8d3159c87c67
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...


# f8010a3d 12-Nov-2024 Ed Tanous <etanous@nvidia.com>

Refactor swutils to break down in to functions

Prior to this patch, this is one of the offenders in the bmcweb
codebase for complexity. It does 4 levels of nested lambdas in a single
method, making

Refactor swutils to break down in to functions

Prior to this patch, this is one of the offenders in the bmcweb
codebase for complexity. It does 4 levels of nested lambdas in a single
method, making it basically impossible to read. As a side note, this
came up because of an unrelated refactoring, and clang-format seemed to
have just given up, and formatted this block in a nonsensical way.

Tested: Inspection only. Don't have systems that use this code.

Change-Id: Ica5fa97bae6be2ba1d83d2ad01eeff85bdff6649
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...


# 9f892fa6 12-Nov-2024 Jagpal Singh Gill <paligill@gmail.com>

fix redfish validator error for Update interface

Fix the redfish validator error for BIOS version with
redfish-updateservice-use-dbus feature enabled. If there is no host bios
version, for example,

fix redfish validator error for Update interface

Fix the redfish validator error for BIOS version with
redfish-updateservice-use-dbus feature enabled. If there is no host bios
version, for example, in case the flash_bios feature is not enabled, the
populateSoftwareInformation shouldn't return an error.

Tested -
Before Fix: Redfish Validator failed with errors -

1 err.Bios.Bios errors in /redfish/v1/Systems/system
1 err.Collection(Manager.Manager) errors in /redfish/v1/Systems/system
2 failProp errors in /redfish/v1/Systems/system
2 fails errors in /redfish/v1/Systems/system
1 failGet errors in /redfish/v1/Systems/system/Bios
1 fails errors in /redfish/v1/Systems/system/Bios

err.Bios.Bios: 1
err.Collection(Manager.Manager): 3
err.Collection(Resource.Item): 1

Validation has failed: 16 problems found

After Fix: Redfish Validator Passed -

Metadata: Namespaces missing from $metadata: set()

Elapsed time: 0:00:33
missingRedfishAlias: 1
pass: 4343
passAction: 16
passGet: 217
passRedfishUri: 208
skipNoSchema: 3
skipOptional: 4001
unvalidated: 1
unverifiedAdditional.complex: 1
warnDeprecated: 5
warningPresent: 6
warnings: 4
Validation has succeeded.

Change-Id: I881c6a780b9f2662fb81a17c258ff09f352668d7
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...


# bd79bce8 16-Aug-2024 Patrick Williams <patrick@stwcx.xyz>

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda forma

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.

See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.

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

show more ...


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


# 7f23576a 14-Jun-2024 Jagpal Singh Gill <paligill@gmail.com>

update service: path change for D-Bus interface

Update the path to get software info because of D-Bus interface changes.
For more details refer to design -
https://gerrit.openbmc.org/c/openbmc/phosp

update service: path change for D-Bus interface

Update the path to get software info because of D-Bus interface changes.
For more details refer to design -
https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/65738
https://gerrit.openbmc.org/c/openbmc/docs/+/65739

Tested:
```
> curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Managers/bmc
...
"Links": {
"ActiveSoftwareImage": {
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/3c956be0"
},
...
"SoftwareImages": [
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/3c956be0"
}
],
"SoftwareImages@odata.count": 1
},
...
```

Redfish service validator passing:
```
Elapsed time: 0:04:33
metadataNamespaces: 3727
pass: 5184
passAction: 16
passGet: 213
passRedfishUri: 205
skipNoSchema: 3
skipOptional: 3535
unvalidated: 1
warnDeprecated: 5
warningPresent: 6
```

Change-Id: Ifc41c0ca54c6f5dfae5a9245ab756c21155e816d
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>

show more ...


# c018f705 13-Jun-2024 Jagpal Singh Gill <paligill@gmail.com>

update service: updateable firmware logic change

Update the way a firmware inventory item is considered updateable or not
based on the update D-Bus interface change. For more details refer to
design

update service: updateable firmware logic change

Update the way a firmware inventory item is considered updateable or not
based on the update D-Bus interface change. For more details refer to
design -
https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/65738
https://gerrit.openbmc.org/c/openbmc/docs/+/65739

Tested:
```
> curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/UpdateService/FirmwareInventory/3c956be0
{
"@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/3c956be0",
"@odata.type": "#SoftwareInventory.v1_1_0.SoftwareInventory",
"Description": "BMC image",
"Id": "3c956be0",
"Name": "Software Inventory",
"RelatedItem": [
{
"@odata.id": "/redfish/v1/Managers/bmc"
}
],
"RelatedItem@odata.count": 1,
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
},
"Updateable": true,
"Version": "2.16.0-dev-1063-g57294f9ba2-dirty"
}
```

Redfish service validator passing:
```
Elapsed time: 0:04:33
metadataNamespaces: 3727
pass: 5184
passAction: 16
passGet: 213
passRedfishUri: 205
skipNoSchema: 3
skipOptional: 3535
unvalidated: 1
warnDeprecated: 5
warningPresent: 6
```

Change-Id: If0e652c72866356ba09985b4ad2cfe76bf6a1142
Signed-off-by: Jagpal Singh Gill <paligill@gmail.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 ...


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


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


# 8b24275d 27-Jun-2023 Ed Tanous <edtanous@google.com>

Rename all error_code instances to ec

We're not consistent here, which leads to people copying and pasting
code all over, which has lead to a bunch of different names for error
codes.

This commit c

Rename all error_code instances to ec

We're not consistent here, which leads to people copying and pasting
code all over, which has lead to a bunch of different names for error
codes.

This commit changes to coerce them all to "ec", because that's what
boost uses for a naming convention.

Tested: Rename only, code compiles.

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


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


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


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


# a4eb761a 11-Feb-2023 George Liu <liuxiwei@inspur.com>

Add the getAssociationEndPoints method

There are currently many files that use the get endpoints methods[1].
Since they are general methods, they are defined in the
dbus_utility.hpp file and will be

Add the getAssociationEndPoints method

There are currently many files that use the get endpoints methods[1].
Since they are general methods, they are defined in the
dbus_utility.hpp file and will be further refactored in subsequent
patches.

Since the current endpoints of phosphor-objmgr do not support
object_path and fails in romulus CI[2], so we should revert to
std::string.

Also, Updated the populateSoftwareInformation method of sw_utils.hpp

[1] https://github.com/openbmc/docs/blob/master/architecture/object-mapper.md#associations
[2] https://gerrit.openbmc.org/c/openbmc/bmcweb/+/58924/22/include/dbus_utility.hpp#98

When an object with, for example, an object path of pathA uses
the following values:

["foo", "bar", "pathB"]

The mapper will create 2 new objects:

pathA/foo
pathB/bar

Tested: Built bmcweb successuflly and Validator passes
curl -k -H "X-Auth-Token: $token" -X GET
https://${bmc}/redfish/v1/Managers/bmc
{
"@odata.id": "/redfish/v1/Managers/bmc",
"@odata.type": "#Manager.v1_14_0.Manager",
...
"FirmwareVersion": "2.14.0-dev-95-gea3949e76-dirty",
...
}

Tested: Validator passes

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

show more ...


12