docs: Improve powered_by associations example
Provide a more realistic example of how a PSU config file can be written
to provide the powering and powered_by associations.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I877f98eb7114401004bc9afb07db5b7c5015fd31
diff --git a/docs/associations.md b/docs/associations.md
index efcbee6..4dcb167 100644
--- a/docs/associations.md
+++ b/docs/associations.md
@@ -48,14 +48,40 @@
In addition to the `containing` associations, entity-manager will add
`powering`/`powered_by` associations between a power supply and its parent when
-its downstream port is marked as a `PowerPort`:
+its downstream port is marked as a `PowerPort`.
+
+The below example shows two PSU ports on the motherboard, where the `Type`
+fields for those ports match up with the `ConnectsToType` field from the PSUs.
+
+motherboard.json:
```json
{
- "ConnectsToType": "Mobo Upstream Port",
- "Name": "PSU $BUS Downstream Port",
- "Type": "DownstreamPort",
- "PowerPort": true
+ "Exposes": [
+ {
+ "Name": "PSU 1 Port",
+ "Type": "PSU 1 Port"
+ },
+ {
+ "Name": "PSU 2 Port",
+ "Type": "PSU 2 Port"
+ }
+ ]
+}
+```
+
+psu.json:
+
+```json
+{
+ "Exposes": [
+ {
+ "ConnectsToType": "PSU$ADDRESS % 4 + 1 Port",
+ "Name": "PSU Port",
+ "Type": "DownstreamPort",
+ "PowerPort": true
+ }
+ ]
}
```