Skip to content

Commit

Permalink
Inventory: Add "containing" Association for Item
Browse files Browse the repository at this point in the history
This Association indicates that an Item (usually a Chassis or Board
object) physically contains other objects.

Also remove the duplicate definition from Cpu and CpuCore since it's now
covered by Item.

Signed-off-by: Benjamin Fair <benjaminfair@google.com>
Change-Id: I6df06b1dddfd9408ff39e8917d269a2cba22668d
  • Loading branch information
BenjaminFair committed Nov 7, 2022
1 parent 484f6c4 commit 36b527a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 21 deletions.
18 changes: 17 additions & 1 deletion yaml/xyz/openbmc_project/Inventory/Item.interface.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,27 @@ properties:
Whether or not the item is present.
associations:
- name: containing
description: >
Any inventory Items (usually Boards or Chassis) can optionally
implement the 'containing' association to provide one or more links
to Items which it physically contains.
reverse_name: contained_by
required_endpoint_interfaces:
- xyz.openbmc_project.Inventory.Item
- name: contained_by
description: >
Any inventory Items can optionally implement the 'contained_by'
association to provide a link to exactly one Item (usually a Board or
Chassis) which physically contains it.
reverse_name: containing
required_endpoint_interfaces:
- xyz.openbmc_project.Inventory.Item
- name: sensors
description: >
Sensors may implement an 'inventory' to 'sensors' association with
the inventory item related to it.
reverse_names:
- inventory
required_endpoint_interfaces:
- xyz.openbmc_project.Sensor.Value
- xyz.openbmc_project.Sensor.Value
9 changes: 0 additions & 9 deletions yaml/xyz/openbmc_project/Inventory/Item/Cpu.interface.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,3 @@ associations:
- upstream_processor
required_endpoint_interfaces:
- xyz.openbmc_project.Inventory.Item.PCIeSlot
- name: containing
description: >
Objects that implement Cpu can optionally implement the
cores association to provide a link to one or more
cores.
reverse_names:
- contained_by
required_endpoint_interfaces:
- xyz.openbmc_project.Inventory.Item.CpuCore
10 changes: 0 additions & 10 deletions yaml/xyz/openbmc_project/Inventory/Item/CpuCore.interface.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,3 @@ properties:
description: >
The microcode information for this processor
default: 0

associations:
- name: contained_by
description: >
Objects that implement CpuCore can optionally implement the
cpus association to provide a link to cpu
reverse_names:
- containing
required_endpoint_interfaces:
- xyz.openbmc_project.Inventory.Item.Cpu
2 changes: 1 addition & 1 deletion yaml/xyz/openbmc_project/Inventory/Item/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ be associated with other inventory objects. Such association can be translated
to Redfish schemas and then indicate the system topology.

Document ObjectMapper association forward and reverse names as follows:
* cpu and core: [containing, contained_by]
* Item and Item: [containing, contained_by]
* Sensor.Value and Bmc: [monitoring, monitored_by]

0 comments on commit 36b527a

Please sign in to comment.