#
5a80703c |
| 03-Mar-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: I71c8504caaa31ac43ae0f20c002ed081078e3f48 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: I71c8504caaa31ac43ae0f20c002ed081078e3f48 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
b02752f7 |
| 30-Nov-2023 |
Jeff Lin <JeffLin2@quantatw.com> |
topology: Add powered_by topology
bmcweb already support the power supply command, refer to https://gerrit.openbmc.org/c/openbmc/bmcweb/+/57668
Use "PowerPort" to add the powered_by association for
topology: Add powered_by topology
bmcweb already support the power supply command, refer to https://gerrit.openbmc.org/c/openbmc/bmcweb/+/57668
Use "PowerPort" to add the powered_by association for upstream port, so that the PowerSupplyCollection in redfish can get the power supply information.
Tested: Add the following config in mobo.json: ``` { "Name": "Mobo Upstream Port", "Type": "Mobo Upstream Port" }, ``` Add the following config in PSU.json: ``` { "ConnectsToType": "Mobo Upstream Port", "Name": "PSU $BUS Downstream Port", "Type": "DownstreamPort", "PowerPort": true }, ``` Result for association: ``` { "type" : "as", "data" : [ [ "/xyz/openbmc_project/inventory/system/board/PSU_1" ] ] } ``` Result in bmcweb: ``` $ curl -s -k -H "X-Auth-Token: $token" http://${bmc}/redfish/v1/Chassis/Mobo | jq .Links.Contains [ { "@odata.id": "/redfish/v1/Chassis/PSU_1" } ] $ curl -k -H "X-Auth-Token: $token" http://${bmc}/redfish/v1/Chassis/Mobo/PowerSubsystem/PowerSupplies/PSU_1 { "@odata.id": "/redfish/v1/Chassis/Mobo/PowerSubsystem/PowerSupplies/PSU_1", "@odata.type": "#PowerSupply.v1_5_0.PowerSupply", ... } ```
Run unitest for test_topology is PASSED.
Change-Id: Iad10e61417437a41628cf311cdd7893725a5dcde Signed-off-by: Jeff Lin <JeffLin2@quantatw.com>
show more ...
|
#
6eb60972 |
| 14-Aug-2023 |
Matt Spinler <spinler@us.ibm.com> |
phys-topology: Add late add/remove support
The current physical topology code doesn't yet support adding entities late (in a different propertiesChangedCallback call) or removing an entity because:
phys-topology: Add late add/remove support
The current physical topology code doesn't yet support adding entities late (in a different propertiesChangedCallback call) or removing an entity because: - The Topology class is just scoped to postToDbus(), so when that is called again later with new cards it has no concept of existing parent cards so it will miss creating associations.
- There is nothing to tell the class when an entity is removed, so it never attempts to remove the association for that entity.
- When the containing/contained_by association is created it doesn't use the createInterface() function, so if that entity is removed later that association interface will be left on D-Bus.
To add support for entity adds and removes, this commit will: - Make the Topology class have a global scoped lifetime so it can remember entity relationships.
- Now that Topology will outlive postToDbus() calls, pass the getAssocs() method the list of boards being processed in the current postToDbus() incantation so it will only return the new associations.
- Use the createInterface() method when creating the association. This stores the interface in a map with the entity name so that when the entity is removed the interface will be removed along with all the other interfaces.
- When an entity is removed, only the board name is known. So pass the board name into addBoard() so the Topology class knows it, and add a Topology::remove() method and call it so it can remove the removed path from all of the connector maps.
Tested: - All of the containing/contained_by associations still show up on good path.
- Added new unit tests to cover the new functionality.
- When a downstream entity is added after EM does its initial D-Bus publish, the containing/contained_by association is now created.
- On an entity remove, there are no left over interfaces for the removed entity on D-Bus.
- When the removed entity is added back, the association is put back in place.
Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Ie5daaca92c6d2e6e7abc408f3e67e948977581ef
show more ...
|
#
a5d25dcc |
| 26-Jan-2023 |
Andrew Jeffery <andrew@aj.id.au> |
Align source structure away from anti-patterns
The anti-patterns document comments on source structure, specifically on placing internal headers in a parallel subtree[1]. entity-manager is an exampl
Align source structure away from anti-patterns
The anti-patterns document comments on source structure, specifically on placing internal headers in a parallel subtree[1]. entity-manager is an example of violating this anti-pattern, so fix it.
[1]: https://github.com/openbmc/docs/blob/master/anti-patterns.md#placing-internal-headers-in-a-parallel-subtree
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I6c9739d1d532ea670e5ceb30044017c38e49eed3
show more ...
|