| 7dd2029e | 29-Jul-2025 |
Brad Bishop <bradbish@qti.qualcomm.com> |
build: fix -Wmissing-prototype
This helps make the author's original intent clear. Tested by building and running the unit tests with clang.
Change-Id: If0231ec5634adad0b61e7fcff8ec1e5bcbbb92c1 Si
build: fix -Wmissing-prototype
This helps make the author's original intent clear. Tested by building and running the unit tests with clang.
Change-Id: If0231ec5634adad0b61e7fcff8ec1e5bcbbb92c1 Signed-off-by: Brad Bishop <bradbish@qti.qualcomm.com>
show more ...
|
| e5cb4aec | 15-Jul-2025 |
Brad Bishop <bradbish@qti.qualcomm.com> |
build: fix -Wmissing-variable-declarations
This helps make the author's original intent clear. Tested by building and running the unit tests with clang.
Change-Id: Iaf0aca72b5a8cc931bcb84c27df1c55
build: fix -Wmissing-variable-declarations
This helps make the author's original intent clear. Tested by building and running the unit tests with clang.
Change-Id: Iaf0aca72b5a8cc931bcb84c27df1c55d2f438dda Signed-off-by: Brad Bishop <bradbish@qti.qualcomm.com>
show more ...
|
| 86436ac0 | 15-Jul-2025 |
Brad Bishop <bradbish@qti.qualcomm.com> |
build: fix -Wsuggest-override
suggest-override helps make the original author's intent clear for future readers. For false positives, use a different method name. Tested by building and running the
build: fix -Wsuggest-override
suggest-override helps make the original author's intent clear for future readers. For false positives, use a different method name. Tested by building and running the unit tests with clang.
Change-Id: Icc657bf3c0269e681f26fb5e58c5198aa5aa4a19 Signed-off-by: Brad Bishop <bradbish@qti.qualcomm.com>
show more ...
|
| 069470dc | 29-Jul-2025 |
Brad Bishop <bradbish@qti.qualcomm.com> |
tidy: fix bugprone-unused-local-non-trivial-variable
Tested by building the code and running the unit tests.
Change-Id: I2b50223f59fc53c4a73e3fd5527bc382e319609b Signed-off-by: Brad Bishop <bradbis
tidy: fix bugprone-unused-local-non-trivial-variable
Tested by building the code and running the unit tests.
Change-Id: I2b50223f59fc53c4a73e3fd5527bc382e319609b Signed-off-by: Brad Bishop <bradbish@qti.qualcomm.com>
show more ...
|
| 78585a77 | 29-Jul-2025 |
Brad Bishop <bradbish@qti.qualcomm.com> |
tidy: fix modernize-use-override
Tested by building the code.
Change-Id: I57d44e54c67c7b6b3f5b758107a6d5988d1e47e3 Signed-off-by: Brad Bishop <bradbish@qti.qualcomm.com> |
| 7f900ff9 | 29-Jul-2025 |
Brad Bishop <bradbish@qti.qualcomm.com> |
tidy: fix performance-avoid-endl
Tested by building the code.
Change-Id: I3de027d34b3e91bc08923b47bda16b0b0f4b34b4 Signed-off-by: Brad Bishop <bradbish@qti.qualcomm.com> |
| 93d664fc | 29-Jul-2025 |
Brad Bishop <bradbish@qti.qualcomm.com> |
codespell: run and fix
Fix the misspellings. Tested by building the code and running the unit tests.
Change-Id: I3fb3f1f46fa41bb0c65157ff6e68bc4f1079f280 Signed-off-by: Brad Bishop <bradbish@qti.q
codespell: run and fix
Fix the misspellings. Tested by building the code and running the unit tests.
Change-Id: I3fb3f1f46fa41bb0c65157ff6e68bc4f1079f280 Signed-off-by: Brad Bishop <bradbish@qti.qualcomm.com>
show more ...
|
| 11c0cc3c | 08-Jul-2025 |
Brad Bishop <bradbish@qti.qualcomm.com> |
build: enable and fix -Wshadow
Shadow names can be prone to bugs. Enable the warning to avoid them in the future. Tested by building and running the unit tests.
Change-Id: Ic3227675f4ff40d266ae2a
build: enable and fix -Wshadow
Shadow names can be prone to bugs. Enable the warning to avoid them in the future. Tested by building and running the unit tests.
Change-Id: Ic3227675f4ff40d266ae2a60c66c894f16e5888e Signed-off-by: Brad Bishop <bradbish@qti.qualcomm.com>
show more ...
|
| 1e3f7810 | 25-Mar-2025 |
Myung Bae <myungbae@us.ibm.com> |
Fix SubTreePathsById when given ID is invalid
The commit 7a93d51 makes `getAssociatedSubTreePathsById()` to return empty paths if there are no associated subtrees. However, it also returns empty pa
Fix SubTreePathsById when given ID is invalid
The commit 7a93d51 makes `getAssociatedSubTreePathsById()` to return empty paths if there are no associated subtrees. However, it also returns empty paths as a success, even if the given id is not valid.
This is to check the invalid case and to return NotFound.
For example, currently, this gives the success - GET /redfish/v1/Chassis/INVALID/PowerSubsystem/PowerSupplies
Tested: - GET with the invalid id and check the return condition.
``` busctl call -j "xyz.openbmc_project.ObjectMapper" "/xyz/openbmc_project/object_mapper" \ "xyz.openbmc_project.ObjectMapper" "GetAssociatedSubTreePathsById" ssassas \ "InvalidChassis" \ "/xyz/openbmc_project/inventory" \ 1 "xyz.openbmc_project.Inventory.Item.Chassis" \ "powered_by" \ 1 "xyz.openbmc_project.Inventory.Item.PowerSupply"
--> Call failed: The resource is not found. ```
Change-Id: If4f621e105bc1a5c443c1ec8b7762f57748e1d10 Signed-off-by: Myung Bae <myungbae@us.ibm.com>
show more ...
|
| 2a1ef013 | 03-Mar-2025 |
Patrick Williams <patrick@stwcx.xyz> |
meson: reformat with meson formatter
Apply the `meson format` results.
Change-Id: I5e218b58822e02ead2f37a069da4c0034c5005f5 Signed-off-by: Patrick Williams <patrick@stwcx.xyz> |
| d884cdf7 | 01-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: I555df8382455157bff44671b6f284e3121d5c182 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: I555df8382455157bff44671b6f284e3121d5c182 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| 883a8929 | 22-Jan-2025 |
Benjamin Fair <benjaminfair@google.com> |
associations: fix leak in assocMaps.ifaces
New entries get added to ifaces whenever an object with associations is detected, but the entries are never removed even if all the endpoints are gone, lea
associations: fix leak in assocMaps.ifaces
New entries get added to ifaces whenever an object with associations is detected, but the entries are never removed even if all the endpoints are gone, leading to a memory leak.
Change-Id: Ide5439e4eaab7c70fb0331d59d59753905f45066 Signed-off-by: Benjamin Fair <benjaminfair@google.com> Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
| 7a93d516 | 13-Sep-2024 |
Myung Bae <myungbae@us.ibm.com> |
Return empty paths if no SubTreePathsById is found
`getAssociatedSubTreePaths()` returns the empty paths if there are no associated subtrees, and bmcweb uses it to differentiate from the error.
How
Return empty paths if no SubTreePathsById is found
`getAssociatedSubTreePaths()` returns the empty paths if there are no associated subtrees, and bmcweb uses it to differentiate from the error.
However, `getAssociatedSubTreePathsById()` (which is introduced by [1]) returns NotFound error for the case. It would be more appropriate to match its behavior with `getAssociatedSubTreePaths()`.
Tested: - unit-test is succeeded for good and bad cases
[1] https://gerrit.openbmc.org/c/openbmc/phosphor-objmgr/+/70699
Change-Id: I84680b1b39ba8ade94ea6fdb7dae280505e5c050 Signed-off-by: Myung Bae <myungbae@us.ibm.com>
show more ...
|
| c363323e | 09-Apr-2024 |
Lakshmi Yadlapati <lakshmiy@us.ibm.com> |
mapper: Add GetAssociatedSubTreePathsById and GetAssociatedSubTreeById
dbus-interface change in: https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/69999
This commit implements two new
mapper: Add GetAssociatedSubTreePathsById and GetAssociatedSubTreeById
dbus-interface change in: https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/69999
This commit implements two new methods: GetAssociatedSubTreePathsById and GetAssociatedSubTreeById. These methods retrieve the paths of associated endpoints corresponding to the provided identifier, filtering based on their association with specified endpoint interfaces.
GetAssociatedSubTreePathsById returns the D-Bus paths of associated endpoints, while GetAssociatedSubTreeById retrieves a dictionary of D-Bus paths of associated endpoints mapped to corresponding services associated with the provided identifier.
Tested: ''' busctl call -j "xyz.openbmc_project.ObjectMapper" "/xyz/openbmc_project/object_mapper" \ "xyz.openbmc_project.ObjectMapper" "GetAssociatedSubTreePathsById" ssassas \ "chassis" \ "/xyz/openbmc_project/inventory" \ 1 "xyz.openbmc_project.Inventory.Item.Chassis" \ "powered_by" \ 1 "xyz.openbmc_project.Inventory.Item.PowerSupply" { "type" : "as", "data" : [ [ "/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0", "/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply1", "/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply2", "/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply3" ] ] } '''
Another example.
``` busctl call -j xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/object_mapper \ xyz.openbmc_project.ObjectMapper GetAssociatedSubTreePathsById ssassas \ disk_backplane0 \ /xyz/openbmc_project/inventory \ 1 xyz.openbmc_project.Inventory.Item.FabricAdapter \ connecting \ 1 xyz.openbmc_project.Inventory.Connector.Port { "type" : "as", "data" : [ [ "/xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane0/dp0_connector0", "/xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane0/dp0_connector1", "/xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane0/dp0_connector2", "/xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane0/dp0_connector3", "/xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane0/dp0_connector4", "/xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane0/dp0_connector5" ] ] } ```
Change-Id: Id55a9b41fe70f7204543d92b5396888f6914a1d4 Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com> Signed-off-by: Myung Bae <myungbae@us.ibm.com>
show more ...
|
| 9052ebd3 | 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: Ic68b91e23738cafe198c50f40e46d4163bda02b6 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| 47b68cbc | 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: Ibc0976e16acb6163431698832a461e9fc7335448 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
| 670edd12 | 15-Feb-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: update with latest
Copy the latest clang-format and apply to the repository.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I10a3fe64d4ca77601e6855daf46954579312c7df |
| a99e109c | 03-Feb-2023 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
lint: update .clant-format and run
Change-Id: If9cfc42ca96517a4df2c59c130c2e22a2a443467 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> |
| 58881d0b | 02-Oct-2022 |
Willy Tu <wltu@google.com> |
mapper: Add Associated subtree method definition
dbus-interface change in: https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/57821
Create new mapper function to make subtree call and
mapper: Add Associated subtree method definition
dbus-interface change in: https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/57821
Create new mapper function to make subtree call and association call at the same time. With the association definition, we will have more endpoints to fetch and verify that it is actually the resource that we are looking for. We need to verify that it has the expected interface to confirm that it is right device. In the current workflow this will take two dbus calls to the mapper to get the association and the subtree.
This change aims to reduce that down to one by combining the two operations. It will not significant performance increase for the daemons, but it can help reduce the load on the dbus-broker.service.
Tested: ``` Normal Call: busctl call "xyz.openbmc_project.ObjectMapper" \ "/xyz/openbmc_project/object_mapper" \ "xyz.openbmc_project.ObjectMapper" "GetSubTreePaths" sias \ "/xyz/openbmc_project/inventory" 0 1 \ "xyz.openbmc_project.Inventory.Item.Storage" as 4 "/xyz/openbmc_project/inventory/storage_0" "/xyz/openbmc_project/inventory/storage_1" "/xyz/openbmc_project/inventory/storage_4" "/xyz/openbmc_project/inventory/storage_3"
Associated Call: (Only 0 and 1 is associated to the chassis) busctl call "xyz.openbmc_project.ObjectMapper" \ "/xyz/openbmc_project/object_mapper" \ "xyz.openbmc_project.ObjectMapper" "GetAssociatedSubTreePaths" ssias \ "/xyz/openbmc_project/inventory/chassis_0/storage" \ "/xyz/openbmc_project/inventory" 0 1 "xyz.openbmc_project.Inventory.Item.Storage" as 2 "/xyz/openbmc_project/inventory/storage_0" "/xyz/openbmc_project/inventory/storage_1" ```
Change-Id: Ib532e660cf20b9efc83045fb1cbd9143d0c1841e Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
| aba14d3d | 31-Jan-2023 |
Willy Tu <wltu@google.com> |
test: Add dbus handler unit tests
Created unit tests for all of the object mapper dbus handlers.
Refactor the handlers to handler.cpp to allow unit testing. Also updated to use std::set_intersectio
test: Add dbus handler unit tests
Created unit tests for all of the object mapper dbus handlers.
Refactor the handlers to handler.cpp to allow unit testing. Also updated to use std::set_intersection.
Change-Id: Ib87ab81f949d27f7dab55899d3e8d380e43bda04 Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
| 5b4357da | 12-Oct-2022 |
Kallas, Pawel <pawel.kallas@intel.com> |
add Associations endpoints change delay timer
When multiple associations that point to the same interface are created, each change (adding or removing one) leads to updating "endpoints" property on
add Associations endpoints change delay timer
When multiple associations that point to the same interface are created, each change (adding or removing one) leads to updating "endpoints" property on dbus. This property update is time consuming with many endpoints already present, because each update needs to send the whole list of current elements plus/minus one. With a lot of changes in short time it can cause the service to be unresponsive. This change adds timer to delay updating dbus property. This way many associations updates can be aggregated into single dbus property update.
Tested: Ran on hardware with dbus sensor tester. 4000 created sensors with interfaces are processed within 10 seconds. Time before the change was above 2 minutes.
Signed-off-by: Kallas, Pawel <pawel.kallas@intel.com> Change-Id: I1083c027ab12238249cffc67fb29a8ffef6baf83
show more ...
|
| 1e94e60b | 02-Jun-2022 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
mapper: remove configurable service allowlists
Remove the ability to specify an allow list at runtime. Instead, introspect any DBus service except those that start with org.freedesktop. This remov
mapper: remove configurable service allowlists
Remove the ability to specify an allow list at runtime. Instead, introspect any DBus service except those that start with org.freedesktop. This removes the need for argument parsing code and complex bitbake metadata.
Skip org.freedesktop because applications (OpenBMC or otherwise) should access org.freedesktop services directly and not indirectly via the OpenBMC mapper.
Change-Id: I83038a121580dcde2a2b3b1f994b3066cc9d955f Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|
| 26ed4a1e | 13-Jul-2022 |
Ed Tanous <edtanous@google.com> |
Add boost wrap file
Recent changes make us incompatible with older versions of boost (1.74 in my testing). Like we do elsewhere, add a wrapfile for boost.
At the same time, the tests were missing
Add boost wrap file
Recent changes make us incompatible with older versions of boost (1.74 in my testing). Like we do elsewhere, add a wrapfile for boost.
At the same time, the tests were missing an explicit #include for boost, so even when the above patch was applied, it still doesn't build. Add an explicit dependency.
Tested: meson buildlocal --buildtype=debug && ninja -C buildlocal
Succeeds. Should have no impact to yocto builds.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I20543fd184491dc138a2e145945eb71051c4cd52
show more ...
|
| 964681ca | 08-Jul-2022 |
Ed Tanous <edtanous@google.com> |
Modernize mapper core types
There's a number of best practices that have evolved in our use of flat_maps and flat_sets since this code was originally written.
First, add std::less<> to the Compare
Modernize mapper core types
There's a number of best practices that have evolved in our use of flat_maps and flat_sets since this code was originally written.
First, add std::less<> to the Compare template argument. The default for this is std::less<Key> which limits find() calls (and any lookup for that matter) to only supporting std::string. Using std::less<> allows lookup by std::string_view, which can prevent some copies in some cases.
Next, add std::vector<...> to the types under the AllocatorOrContainer template arg. Per our coding standard, this overrides the default of using boost::vector, and replaces it with std::vector, which, although it has a very similar interface, tends to optimize better, and be better supported overall.
The rest of this patch updates a couple places where the various types were specifically hardcoded, so it moves to using the various using declarations.
Tested: Unit tests; Next patch tests this more fully.
Change-Id: I11e8ecb669f31193c55dda344b25d3fa5d191502 Signed-off-by: Ed Tanous <edtanous@google.com>
show more ...
|
| d554232b | 02-Jun-2022 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
mapper: remove service deny list feature
This feature has existed for years, but remains unused. Drop the dead code.
Change-Id: I1b0b6f7fee0da30a3e36e1d151e70e1039fe2c7b Signed-off-by: Brad Bishop
mapper: remove service deny list feature
This feature has existed for years, but remains unused. Drop the dead code.
Change-Id: I1b0b6f7fee0da30a3e36e1d151e70e1039fe2c7b Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|