Add 'connecting' association for Item and Cables
The commit adds a new association to describe the links
between any Inventory Item and Cables.
- Item may be connected to a cable.
- Cable may be connecting one or more Items.
The generic associations of 'containing' and 'contained_by'
are considered.
Signed-off-by: Shantappa Teekappanavar <sbteeks@yahoo.com>
Change-Id: Ibb285643af4c45a9c9a9d668d2027f2fa6da424b
Signed-off-by: Zhenwei Chen <zhenweichen0207@gmail.com>
diff --git a/yaml/xyz/openbmc_project/Inventory/Item.interface.yaml b/yaml/xyz/openbmc_project/Inventory/Item.interface.yaml
index 046e567..68d858f 100644
--- a/yaml/xyz/openbmc_project/Inventory/Item.interface.yaml
+++ b/yaml/xyz/openbmc_project/Inventory/Item.interface.yaml
@@ -110,6 +110,13 @@
reverse_name: protecting
required_endpoint_interfaces:
- xyz.openbmc_project.Inventory.Item.TrustedComponent
+ - name: connected_to
+ description: >
+ Objects that implement Item can optionally implement the
+ 'connected_to' association to provide a link to cables.
+ reverse_name: connecting
+ required_endpoint_interfaces:
+ - xyz.openbmc_project.Inventory.Item.Cable
paths:
- namespace: /xyz/openbmc_project/inventory
diff --git a/yaml/xyz/openbmc_project/Inventory/Item/Cable.interface.yaml b/yaml/xyz/openbmc_project/Inventory/Item/Cable.interface.yaml
index 74d7a56..e179626 100644
--- a/yaml/xyz/openbmc_project/Inventory/Item/Cable.interface.yaml
+++ b/yaml/xyz/openbmc_project/Inventory/Item/Cable.interface.yaml
@@ -17,3 +17,11 @@
user interfaces but this field should not be used for programmatic
interrogation of a cable beyond ignoring the default value of the
empty string.
+associations:
+ - name: connecting
+ description: >
+ Objects that implement Cable can optionally implement the 'connecting'
+ association to provide a link to any inventory items.
+ reverse_name: connected_to
+ required_endpoint_interfaces:
+ - xyz.openbmc_project.Inventory.Item
diff --git a/yaml/xyz/openbmc_project/Inventory/Item/README.md b/yaml/xyz/openbmc_project/Inventory/Item/README.md
index 6712abc..674440a 100644
--- a/yaml/xyz/openbmc_project/Inventory/Item/README.md
+++ b/yaml/xyz/openbmc_project/Inventory/Item/README.md
@@ -27,3 +27,4 @@
- FabricAdapter and Connector.Port: `{connecting, connected_to}`
- Cpu and PCIeSlot: `{connecting, connected_to}`
- Control.Throttle and Item: `{throttling, throttled_by}`
+- Cable and Item: `{connecting, connected_to}`