Inventory: Add "containing" Association for Item
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
diff --git a/yaml/xyz/openbmc_project/Inventory/Item.interface.yaml b/yaml/xyz/openbmc_project/Inventory/Item.interface.yaml
index 73172cf..0326595 100644
--- a/yaml/xyz/openbmc_project/Inventory/Item.interface.yaml
+++ b/yaml/xyz/openbmc_project/Inventory/Item.interface.yaml
@@ -17,6 +17,22 @@
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
@@ -24,4 +40,4 @@
reverse_names:
- inventory
required_endpoint_interfaces:
- - xyz.openbmc_project.Sensor.Value
\ No newline at end of file
+ - xyz.openbmc_project.Sensor.Value
diff --git a/yaml/xyz/openbmc_project/Inventory/Item/Cpu.interface.yaml b/yaml/xyz/openbmc_project/Inventory/Item/Cpu.interface.yaml
index 465bae7..74f5671 100644
--- a/yaml/xyz/openbmc_project/Inventory/Item/Cpu.interface.yaml
+++ b/yaml/xyz/openbmc_project/Inventory/Item/Cpu.interface.yaml
@@ -99,12 +99,3 @@
- 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
diff --git a/yaml/xyz/openbmc_project/Inventory/Item/CpuCore.interface.yaml b/yaml/xyz/openbmc_project/Inventory/Item/CpuCore.interface.yaml
index 9eed466..2639d71 100644
--- a/yaml/xyz/openbmc_project/Inventory/Item/CpuCore.interface.yaml
+++ b/yaml/xyz/openbmc_project/Inventory/Item/CpuCore.interface.yaml
@@ -6,13 +6,3 @@
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
diff --git a/yaml/xyz/openbmc_project/Inventory/Item/README.md b/yaml/xyz/openbmc_project/Inventory/Item/README.md
index 9064309..5f4fa9e 100644
--- a/yaml/xyz/openbmc_project/Inventory/Item/README.md
+++ b/yaml/xyz/openbmc_project/Inventory/Item/README.md
@@ -17,5 +17,5 @@
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]