History log of /openbmc/phosphor-inventory-manager/manager.cpp (Results 1 – 25 of 63)
Revision Date Author Comments
# 4858f71f 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: I70b8c852ae068e5d000fbf1fdfcd8a728ade9a16
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: I70b8c852ae068e5d000fbf1fdfcd8a728ade9a16
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 51aff45e 16-Dec-2024 Matt Spinler <spinler@us.ibm.com>

Remove vim mode lines

Editor settings aren't needed in source files.

Change-Id: Ieb0229b6fe0bb14f128b6946a29a3283a53f0b90
Signed-off-by: Matt Spinler <spinler@us.ibm.com>


# d8fba8be 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: I8078c8196a2d5706179dc10bf20c0af1a69ec962
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 7edafe06 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: I657f0cb5283a0b4177332d94a88af660f3de8f11
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 563306f6 22-Jul-2022 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are for:
* bus_t
* exception_t
* manager_t
* match_t
* message_t
* object_t
* slot_t

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

show more ...


# cf5d024b 14-Apr-2022 George Liu <liuxiwei@inspur.com>

logging: switch to lg2

After switching to C++20, it is recommended to use `phosphor::lg2`
to format log, and the correct `CODE_LINE` and `CODE_FUNC` values
can be used in log tracking.

Signed-off-b

logging: switch to lg2

After switching to C++20, it is recommended to use `phosphor::lg2`
to format log, and the correct `CODE_LINE` and `CODE_FUNC` values
can be used in log tracking.

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

show more ...


# 23314a5c 13-Apr-2022 George Liu <liuxiwei@inspur.com>

meson: Eliminate warning messages

Eliminate `[-Werror=unused-parameter]` warning message

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


# 59521e87 11-Feb-2021 Matt Spinler <spinler@us.ibm.com>

associations: Add conditions support

Allow there to be multiple associations files that are selected based on
an inventory property condition specified inside of them. The file(s)
needs to be locat

associations: Add conditions support

Allow there to be multiple associations files that are selected based on
an inventory property condition specified inside of them. The file(s)
needs to be located in the same directory as the default associations
file, but can have any name as long as it ends in .json. If a
conditional associations file is found, the default associations file is
ignored.

For example:
{
"condition":
{
"path": "system/chassis/motherboard",
"interface": "xyz.openbmc_project.Inventory.Decorator.Asset",
"property": "Model",
"values": [
"ModelA",
"ModelB"
]
},
"associations":
[
// The same associations syntax as described above.
]
}

This states that the associations in this file are valid if the
motherboard inventory item has a Model property with a value of either
ModelA or ModelB.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ib0f32815dee718ea268715896b5470ed2f25119e

show more ...


# ee294d68 13-Jan-2021 Brad Bishop <bradleyb@fuzziesquirrel.com>

manager: fix build fail with CREATE_ASSOCIATIONS

Manager doesn't have any "state" member. The correct member is
_status"

Fixes: 23a8d935b326eedc7ae1ff826e6994a0fba0b341
Change-Id: I30497ef9b2dd1c9

manager: fix build fail with CREATE_ASSOCIATIONS

Manager doesn't have any "state" member. The correct member is
_status"

Fixes: 23a8d935b326eedc7ae1ff826e6994a0fba0b341
Change-Id: I30497ef9b2dd1c9f8cf19a50328d5717eb0611ad
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>

show more ...


# 23a8d935 06-Dec-2020 Brad Bishop <bradleyb@fuzziesquirrel.com>

don't emit unnecessary signals

Fix a number of places where DBus signals are emitted when they should
not be:

-Prior to claiming a well known DBus service name
-When using the map-of-properties sdb

don't emit unnecessary signals

Fix a number of places where DBus signals are emitted when they should
not be:

-Prior to claiming a well known DBus service name
-When using the map-of-properties sdbusplus interface constructor

On a system with ~175 inventory interfaces this eliminates 650
PropertiesChanged and ObjectManager signals on PIM startup.

Change-Id: I7b8fa6af69ca3553f5b2ea49e488a75a592a4d0b
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>

show more ...


# 4627a9cc 06-Dec-2020 Brad Bishop <bradleyb@fuzziesquirrel.com>

manager: add status

Add a status field to assist keeping track of manager state.

STARTING - the manager is initializing
RUNNING - the manager event loop is running
STOPPING - the manager is shuttin

manager: add status

Add a status field to assist keeping track of manager state.

STARTING - the manager is initializing
RUNNING - the manager event loop is running
STOPPING - the manager is shutting down

Remove the old _shutdown property and make use of _status == (or !=) STOPPING.

Change-Id: I8326cb164aba32f2d64bbf4fa0753932821571ff
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>

show more ...


# e96f2aa7 06-Dec-2020 Brad Bishop <bradleyb@fuzziesquirrel.com>

manager: explicitly pass deferSignal

Explicitly pass the deferSignal parameter to the dbus bindings to enable
creating objects without emitting signals.

The patch does not introduce any functional

manager: explicitly pass deferSignal

Explicitly pass the deferSignal parameter to the dbus bindings to enable
creating objects without emitting signals.

The patch does not introduce any functional change - only future
capability; the dbus binding argument is defaulted to emit a signal
(deferSignal = false) and that logic is preserved - moved from the
binding call site to higher up the call stack (updateInterfaces).

A careful observer may notice this patch highlights that interfaces are
constructed with the map-of-properties constructor with signals enabled.
This is arguably a bug in the bindings - it would never make sense to
construct an interface in this fashion and send PropertiesChanged
signals while the interface is in the process of being constructed.
This patch retains the current broken behavior, with a fix to be
provided in a later patch.

Change-Id: I0d9ef93651595b751e96cae07d9f1095770c05a6
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>

show more ...


# 104ccba9 06-Dec-2020 Brad Bishop <bradleyb@fuzziesquirrel.com>

associations: explicitly pass deferSignal

Explicitly pass the deferSignal parameter to the dbus bindings to enable
creating associations without emitting signals.

The patch does not introduce any f

associations: explicitly pass deferSignal

Explicitly pass the deferSignal parameter to the dbus bindings to enable
creating associations without emitting signals.

The patch does not introduce any functional change - only future
capability; the dbus binding argument is defaulted to emit a signal
(deferSignal = false) and that logic is preserved - moved from the
binding call site to higher up the call stack (createAssociations).

Change-Id: I6d55237d43c994442d10b899e725ea36c46dc834
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>

show more ...


# 20c9435c 06-Dec-2020 Brad Bishop <bradleyb@fuzziesquirrel.com>

manager: claim busname after startup complete

Idiomatic DBus programming would have us defer claiming a well known bus
name until after all of our startup initialization is done. This avoids
unnece

manager: claim busname after startup complete

Idiomatic DBus programming would have us defer claiming a well known bus
name until after all of our startup initialization is done. This avoids
unnecessary PropertiesChanged or ObjectManager signals during our
startup phase with callbacks that generate dbus activity such as
createObjects or setProperty.

Change-Id: I5f91bbc2a9a5b343e8db214ebadb52bc71b2d459
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>

show more ...


# acaaab6a 06-Dec-2020 Brad Bishop <bradleyb@fuzziesquirrel.com>

manager: remove unused interface

The manager doesn't use the interface being passed in, so remove it.

Change-Id: I1ebb07a7fa109d41a0a06772c5229b896f4352f3
Signed-off-by: Brad Bishop <bradleyb@fuzzi

manager: remove unused interface

The manager doesn't use the interface being passed in, so remove it.

Change-Id: I1ebb07a7fa109d41a0a06772c5229b896f4352f3
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>

show more ...


# a83db30e 06-Dec-2020 Brad Bishop <bradleyb@fuzziesquirrel.com>

style: update clang-format

Pull the most recent OpenBMC style rules and run clang-format.

Change-Id: I11a25ea1e62d6c739010d9dd742a139fb17cc09a
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.co

style: update clang-format

Pull the most recent OpenBMC style rules and run clang-format.

Change-Id: I11a25ea1e62d6c739010d9dd742a139fb17cc09a
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>

show more ...


# 5a71b4c6 12-Nov-2019 Andrew Geissler <geissonator@yahoo.com>

dbus-name: do startup work before registering name

The following commit aggravated an existing issue within OpenBMC
software:

https://gerrit.openbmc-project.xyz/c/openbmc/meta-phosphor/+/26476

A b

dbus-name: do startup work before registering name

The following commit aggravated an existing issue within OpenBMC
software:

https://gerrit.openbmc-project.xyz/c/openbmc/meta-phosphor/+/26476

A busctl pcap of the failure shows mapper trying to introspect the
inventory manager while the inventory manager is trying to restore its
objects from persistent storage. This results in a timeout on the mapper
side and the inventory object never being stored within mapper.

The above commit appears to aggravate this bug by allowing mapper to
start introspecting inventory manager sooner then it normally does.

Tested:
Verified with this fix that the issue, which was 100% recreatable prior
to this change, did not recreate with multiple BMC reboots

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

show more ...


# 852db67b 06-Mar-2019 Matt Spinler <spinler@us.ibm.com>

Add associations::Manager class

This class will handle creating the org.openbmc.Associations
D-Bus interfaces on inventory paths if it has been told to
by a JSON configuration file.

Every time PIM

Add associations::Manager class

This class will handle creating the org.openbmc.Associations
D-Bus interfaces on inventory paths if it has been told to
by a JSON configuration file.

Every time PIM creates a new inventory path, this class will
check to see if any associations need to be created.

This functionality is optional, and is off by default. To
enable it, the --enable-associations configure option needs to
be used.

This commit just introduces the class.

Change-Id: I70045b768f3db683bcfac0c7d4bc9798eb10a5c5
Signed-off-by: Matt Spinler <spinler@us.ibm.com>

show more ...


# e6b21c74 27-Mar-2019 Kun Yi <kunyi731@gmail.com>

cleanup: Use filesystem instead of experimental

With Thud(Yocto 2.6) bumping gcc version, std::filesystem
is available.

Change-Id: I1837df14e52be3e2007b941c3f9c0d3efc687027
Signed-off-by: Kun Yi <k

cleanup: Use filesystem instead of experimental

With Thud(Yocto 2.6) bumping gcc version, std::filesystem
is available.

Change-Id: I1837df14e52be3e2007b941c3f9c0d3efc687027
Signed-off-by: Kun Yi <kunyi731@gmail.com>

show more ...


# 02763c68 12-Dec-2018 Brad Bishop <bradleyb@fuzziesquirrel.com>

manager: switch to refactored internal APIs

Switch the manager over to the new serialization concept API
implementation and the new interface operations API - introduced
previously.

Change-Id: I756

manager: switch to refactored internal APIs

Switch the manager over to the new serialization concept API
implementation and the new interface operations API - introduced
previously.

Change-Id: I756021e4c42c0f61d269dccfd9ff0c489d91c0c7
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>

show more ...


# 25d54b51 21-Nov-2018 Brad Bishop <bradleyb@fuzziesquirrel.com>

Replace std::experimental::any with std::any

This is possible and preferrable now with the switch to c++17.

Change-Id: I0c314ae9a85c8c34274cc971e63b17988db31a2b
Signed-off-by: Brad Bishop <bradleyb

Replace std::experimental::any with std::any

This is possible and preferrable now with the switch to c++17.

Change-Id: I0c314ae9a85c8c34274cc971e63b17988db31a2b
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>

show more ...


# a680d1ef 14-Oct-2018 Patrick Venture <venture@google.com>

formatter: update clang-format and fix-up file(s)

clang-format-6.0 introduced new changes, also then updates to
.clang-format introduce more new changes.

Change-Id: Iec9f84e3a7a5bf254d66eee46cdc9b3

formatter: update clang-format and fix-up file(s)

clang-format-6.0 introduced new changes, also then updates to
.clang-format introduce more new changes.

Change-Id: Iec9f84e3a7a5bf254d66eee46cdc9b3070e06687
Signed-off-by: Patrick Venture <venture@google.com>

show more ...


# 615b2a8f 29-Mar-2018 Brad Bishop <bradleyb@fuzziesquirrel.com>

Enable clang-format

Fix up problems and enable clang-format during CI builds.

Change-Id: Ia5c88281f7090c0aa09ba586d968f1fcd8aba4f1
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>


# b28990f3 08-Aug-2017 Deepak Kodihalli <dkodihal@in.ibm.com>

inventory: implement deserialization

Use Cereal to deserialize inventory information persisted in the
filesystem and restore that to create inventory d-bus objects. Perform
the restore when the app

inventory: implement deserialization

Use Cereal to deserialize inventory information persisted in the
filesystem and restore that to create inventory d-bus objects. Perform
the restore when the app starts.

Change-Id: I0f36a9cbdde223e4bfd9e178e33f5677217ba881
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>

show more ...


# 6620e98d 05-Aug-2017 Deepak Kodihalli <dkodihal@in.ibm.com>

inventory: implement serialization

Use Cereal to serialize and persist inventory items to the filesystem.
Serialize inventory objects as and when they're created/updated via the
notify() API.

Creat

inventory: implement serialization

Use Cereal to serialize and persist inventory items to the filesystem.
Serialize inventory objects as and when they're created/updated via the
notify() API.

Create a template API to perform serialization on the sdbusplus
inventory interface type.

An inventory item path /foo/bar/baz implementing interfaces iface1 and
iface2 would be stored in paths /foo/bar/baz/iface1 and
/foo/bar/baz/iface2.

Change-Id: I9a175185eac1740d6f2ca86a3ee13457edfc8ea9
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>

show more ...


123