Skip to content

Commit 2b018d7

Browse files
committed
feat: add power details to hardware device types
Added power details so that we can compute expected power consumption to our hardware device type definitions.
1 parent 1ac4f76 commit 2b018d7

File tree

3 files changed

+90
-0
lines changed

3 files changed

+90
-0
lines changed

docs/design-guide/device-types.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ Device types may include:
4545
* `name`: Interface identifier (e.g., "iDRAC", "eth0", "mgmt")
4646
* `type`: Physical interface type (e.g., "1000base-t", "10gbase-x-sfp+")
4747
* `mgmt_only`: Boolean flag indicating management-only interfaces
48+
* **power-ports**: Power inlet specifications for the device. Each power port has:
49+
* `name`: Power port identifier (e.g., "psu1", "psu2")
50+
* `type`: Power port connector type (e.g., "iec-60320-c14", "iec-60320-c20") - see [Nautobot PowerPortTypeChoices](https://github.com/nautobot/nautobot/blob/develop/nautobot/dcim/choices.py#L507) for valid values
51+
* `maximum_draw`: Maximum power draw in watts (optional)
4852
* **resource_class**: Array of resource class configurations (required for
4953
`class: server`)
5054

@@ -89,6 +93,15 @@ interfaces:
8993
type: 1000base-t
9094
mgmt_only: true
9195

96+
# Power inlet specifications
97+
power-ports:
98+
- name: psu1
99+
type: iec-60320-c14
100+
maximum_draw: 750
101+
- name: psu2
102+
type: iec-60320-c14
103+
maximum_draw: 750
104+
92105
resource_class:
93106
- name: m1.small
94107
cpu:

docs/operator-guide/device-types.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,36 @@ interfaces:
6969
**Note**: General-purpose network ports for workload traffic are specified
7070
using `nic_count` in the resource class definition, not here.
7171

72+
### 3a. Add Power Ports (Optional)
73+
74+
Define power inlet specifications for accurate power capacity planning and
75+
monitoring:
76+
77+
```yaml
78+
power-ports:
79+
- name: psu1
80+
type: iec-60320-c14
81+
maximum_draw: 750
82+
- name: psu2
83+
type: iec-60320-c14
84+
maximum_draw: 750
85+
```
86+
87+
Each power port specification includes:
88+
89+
* `name`: Power supply identifier (e.g., "psu1", "psu2", "PSU-A")
90+
* `type`: Power connector type - see [Nautobot PowerPortTypeChoices](https://github.com/nautobot/nautobot/blob/develop/nautobot/dcim/choices.py#L507) for valid values (e.g., "iec-60320-c14", "iec-60320-c20")
91+
* `maximum_draw`: Maximum power draw in watts (optional)
92+
93+
Common power port types:
94+
95+
* `iec-60320-c14`: Standard 15A power inlet (most common for servers)
96+
* `iec-60320-c20`: High-current 20A power inlet (used for high-power servers)
97+
* `iec-60309-p-n-e-6h`: Industrial 3-phase power connectors
98+
99+
**Note**: Power port information helps with capacity planning and can be
100+
synchronized to Nautobot for power feed calculations.
101+
72102
### 4. Define Resource Classes
73103

74104
For server-class devices, specify one or more resource class configurations.
@@ -402,6 +432,14 @@ interfaces:
402432
- name: NIC2
403433
type: 10gbase-x-sfp+
404434
435+
power-ports:
436+
- name: psu1
437+
type: iec-60320-c14
438+
maximum_draw: 800
439+
- name: psu2
440+
type: iec-60320-c14
441+
maximum_draw: 800
442+
405443
resource_class:
406444
- name: compute-standard
407445
cpu:
@@ -435,6 +473,14 @@ interfaces:
435473
- name: Ethernet1/2
436474
type: 100gbase-x-qsfp28
437475
# ... additional 34 100G QSFP28 ports
476+
477+
power-ports:
478+
- name: ps1
479+
type: iec-60320-c14
480+
maximum_draw: 450
481+
- name: ps2
482+
type: iec-60320-c14
483+
maximum_draw: 450
438484
```
439485

440486
### Firewall Device Type
@@ -460,4 +506,12 @@ interfaces:
460506
- name: ethernet1/5
461507
type: 10gbase-x-sfp+
462508
# ... additional data plane interfaces
509+
510+
power-ports:
511+
- name: psu1
512+
type: iec-60320-c20
513+
maximum_draw: 1440
514+
- name: psu2
515+
type: iec-60320-c20
516+
maximum_draw: 1440
463517
```

schema/device-type.schema.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,29 @@
109109
},
110110
"required": ["name", "type"]
111111
}
112+
},
113+
"power-ports": {
114+
"description": "Power ports",
115+
"type": "array",
116+
"items": {
117+
"type": "object",
118+
"description": "Power port",
119+
"properties": {
120+
"name": {
121+
"type": "string",
122+
"description": "Power port name"
123+
},
124+
"type": {
125+
"type": "string",
126+
"description": "Power port type (valid Nautobot power port type, see https://github.com/nautobot/nautobot/blob/develop/nautobot/dcim/choices.py#L507)"
127+
},
128+
"maximum_draw": {
129+
"type": "integer",
130+
"description": "Maximum power draw in watts"
131+
}
132+
},
133+
"required": ["name", "type"]
134+
}
112135
}
113136
},
114137
"required": [ "class", "manufacturer", "model", "u_height", "is_full_depth" ]

0 commit comments

Comments
 (0)