Enforce component properties (#3391)

* Disable additional properties for components

It is not a global option, it needs to be set per-definition.
Enabling it produces a lot of validation errors.

* Update json schema

Add missing fields and value constraints. The `rf_role` enum is
currently not included in the `generated_schema.json` from upstream,
so I "faked" it for now by added it manually.

* Rework custom power source marker

While you could technically have a device that does PoE and serial
console on the same port, this is just one very specific scenario.
Rename the custom property from `poe` to `_is_power_source` to be more
general and better reflect its intention, and properly document it in
the json schema.
Remove the property from device types where it is false, and where it's
unneeded because power-ports exist.

* Fix power draw

In NetBox the PSU modules have a power draw, but not the module-bays you
can put them into; so remove it from those. Plus some minor corrections.

* Fix PoE

Basically fix the casing by renaming from the wrong kebab-case to the
correct snake_case.

* Turn invalid comments into description

Only device types can have `comments`, everything else is limited to
`description`. So turn all invalid comments into descriptions.

* Fix mgmt_only

Console port in NetBox don't have a `mgmt_only` property, because they
are by definition management-only.

* Fix position(s)

Device bays don't have a position, because the child devices are
completely separate and don't share any naming/numbering.

* Miscellaneous fixes

Everything that didn't fit into the prior larger error categories.
Validation now passes again.
This commit is contained in:
m-hau
2025-08-08 23:10:01 +02:00
committed by GitHub
parent eeadf01038
commit 9e6cf8d017
173 changed files with 752 additions and 1037 deletions

View File

@@ -5,10 +5,8 @@ part_number: 186-3010-900
console-ports:
- name: CONSOLE
type: rj-45
mgmt_only: true
- name: USB
type: usb-c
mgmt_only: true
interfaces:
- name: DCN-1
type: 1000base-t

View File

@@ -5,10 +5,8 @@ part_number: 186-1031-900
console-ports:
- name: CONSOLE
type: rj-45
mgmt_only: true
- name: USB
type: usb-c
mgmt_only: true
interfaces:
- name: ILAN-1
type: 1000base-t

View File

@@ -7,26 +7,24 @@ interfaces:
- name: MgmtEth0/RSP{module}/CPU0/0
type: 1000base-t
mgmt_only: true
comments: Out-of-Band Management Interface
description: Out-of-Band Management Interface
- name: MgmtEth0/RSP{module}/CPU0/1
type: 1000base-t
mgmt_only: true
comments: Out-of-Band Management Interface
description: Out-of-Band Management Interface
- name: External USB2 class-A port
type: other
mgmt_only: true
- name: SFP+_00_10GE
type: 10gbase-x-sfpp
comments: Virtualization Cluster Port
description: Virtualization Cluster Port
mgmt_only: true
- name: SFP+_01_10GE
type: 10gbase-x-sfpp
mgmt_only: true
comments: Virtualization Cluster Port
description: Virtualization Cluster Port
console-ports:
- name: Console
type: rj-45
mgmt_only: true
- name: Auxiliary
type: rj-45
mgmt_only: true

View File

@@ -7,26 +7,24 @@ interfaces:
- name: MgmtEth0/RSP{module}/CPU0/0
type: 1000base-t
mgmt_only: true
comments: Out-of-Band Management Interface
description: Out-of-Band Management Interface
- name: MgmtEth0/RSP{module}/CPU0/1
type: 1000base-t
mgmt_only: true
comments: Out-of-Band Management Interface
description: Out-of-Band Management Interface
- name: RSP{module}/External USB2 class-A port
type: other
mgmt_only: true
- name: RSP{module}/SFP+_00_10GE
type: 10gbase-x-sfpp
comments: Virtualization Cluster Port
description: Virtualization Cluster Port
mgmt_only: true
- name: RSP{module}/SFP+_01_10GE
type: 10gbase-x-sfpp
mgmt_only: true
comments: Virtualization Cluster Port
description: Virtualization Cluster Port
console-ports:
- name: con0/RSP{module}/CPU0
type: rj-45
mgmt_only: true
- name: aux0/RSP{module}/CPU0
type: rj-45
mgmt_only: true

View File

@@ -8,26 +8,24 @@ interfaces:
- name: MgmtEth0/RSP{module}/CPU0/0
type: 1000base-t
mgmt_only: true
comments: Out-of-Band Management Interface
description: Out-of-Band Management Interface
- name: MgmtEth0/RSP{module}/CPU0/1
type: 1000base-t
mgmt_only: true
comments: Out-of-Band Management Interface
description: Out-of-Band Management Interface
- name: External USB2 class-A port{module}
type: other
mgmt_only: true
- name: SFP+_00_10GE{module}
type: 10gbase-x-sfpp
comments: Virtualization Cluster Port
description: Virtualization Cluster Port
mgmt_only: true
- name: SFP+_01_10GE{module}
type: 10gbase-x-sfpp
mgmt_only: true
comments: Virtualization Cluster Port
description: Virtualization Cluster Port
console-ports:
- name: console{module}
type: rj-45
mgmt_only: true
- name: Auxiliary{module}
type: rj-45
mgmt_only: true

View File

@@ -7,19 +7,17 @@ description: ASR9K Route Switch Processor with 880G/slot Fabric and 16GB
console-ports:
- name: console{module}
type: rj-45
mgmt_only: true
- name: Auxiliary{module}
type: rj-45
mgmt_only: true
interfaces:
- name: MgmtEth0/RSP{module}/CPU0/0
type: 1000base-t
mgmt_only: true
comments: Out-of-Band Management Port
description: Out-of-Band Management Port
- name: MgmtEth0/RSP{module}/CPU0/1
type: 1000base-t
mgmt_only: true
comments: Out-of-Band Management Port
description: Out-of-Band Management Port
- name: External USB2 class-A port{module}
type: other
mgmt_only: true

View File

@@ -9,34 +9,34 @@ front-ports:
type: lc
rear_port: '{module}1-6'
rear_port_position: 1
comments: Front Port 1 (Strands 1-2)
description: Front Port 1 (Strands 1-2)
- name: '{module}2'
type: lc
rear_port: '{module}1-6'
rear_port_position: 2
comments: Front Port 2 (Strands 3-4)
description: Front Port 2 (Strands 3-4)
- name: '{module}3'
type: lc
rear_port: '{module}1-6'
rear_port_position: 3
comments: Front Port 3 (Strands 5-6)
description: Front Port 3 (Strands 5-6)
- name: '{module}4'
type: lc
rear_port: '{module}1-6'
rear_port_position: 4
comments: Front Port 4 (Strands 7-8)
description: Front Port 4 (Strands 7-8)
- name: '{module}5'
type: lc
rear_port: '{module}1-6'
rear_port_position: 5
comments: Front Port 5 (Strands 9-10)
description: Front Port 5 (Strands 9-10)
- name: '{module}6'
type: lc
rear_port: '{module}1-6'
rear_port_position: 6
comments: Front Port 6 (Strands 11-12)
description: Front Port 6 (Strands 11-12)
rear-ports:
- name: '{module}1-6'
type: mpo
positions: 6
comments: Rear Port MPO connector ports 1-6 (strands 1-12)
description: Rear Port MPO connector ports 1-6 (strands 1-12)

View File

@@ -9,34 +9,34 @@ front-ports:
type: lc
rear_port: '{module}1-6'
rear_port_position: 1
comments: Front Port 1 (Strands 1-2)
description: Front Port 1 (Strands 1-2)
- name: '{module}2'
type: lc
rear_port: '{module}1-6'
rear_port_position: 2
comments: Front Port 2 (Strands 3-4)
description: Front Port 2 (Strands 3-4)
- name: '{module}3'
type: lc
rear_port: '{module}1-6'
rear_port_position: 3
comments: Front Port 3 (Strands 5-6)
description: Front Port 3 (Strands 5-6)
- name: '{module}4'
type: lc
rear_port: '{module}1-6'
rear_port_position: 4
comments: Front Port 4 (Strands 7-8)
description: Front Port 4 (Strands 7-8)
- name: '{module}5'
type: lc
rear_port: '{module}1-6'
rear_port_position: 5
comments: Front Port 5 (Strands 9-10)
description: Front Port 5 (Strands 9-10)
- name: '{module}6'
type: lc
rear_port: '{module}1-6'
rear_port_position: 6
comments: Front Port 6 (Strands 11-12)
description: Front Port 6 (Strands 11-12)
rear-ports:
- name: '{module}1-6'
type: mpo
positions: 6
comments: Rear Port MPO connector ports 1-6 (strands 1-12)
description: Rear Port MPO connector ports 1-6 (strands 1-12)

View File

@@ -9,34 +9,34 @@ front-ports:
type: lc
rear_port: '{module}1-6'
rear_port_position: 1
comments: Front Port 1 (Strands 1-2)
description: Front Port 1 (Strands 1-2)
- name: '{module}2'
type: lc
rear_port: '{module}1-6'
rear_port_position: 2
comments: Front Port 2 (Strands 3-4)
description: Front Port 2 (Strands 3-4)
- name: '{module}3'
type: lc
rear_port: '{module}1-6'
rear_port_position: 3
comments: Front Port 3 (Strands 5-6)
description: Front Port 3 (Strands 5-6)
- name: '{module}4'
type: lc
rear_port: '{module}1-6'
rear_port_position: 4
comments: Front Port 4 (Strands 7-8)
description: Front Port 4 (Strands 7-8)
- name: '{module}5'
type: lc
rear_port: '{module}1-6'
rear_port_position: 5
comments: Front Port 5 (Strands 9-10)
description: Front Port 5 (Strands 9-10)
- name: '{module}6'
type: lc
rear_port: '{module}1-6'
rear_port_position: 6
comments: Front Port 6 (Strands 11-12)
description: Front Port 6 (Strands 11-12)
rear-ports:
- name: '{module}1-6'
type: mpo
positions: 6
comments: Rear Port MPO connector ports 1-6 (strands 1-12)
description: Rear Port MPO connector ports 1-6 (strands 1-12)

View File

@@ -9,34 +9,34 @@ front-ports:
type: lc
rear_port: '{module}1-6'
rear_port_position: 1
comments: Front Port 1 (Strands 1-2)
description: Front Port 1 (Strands 1-2)
- name: '{module}2'
type: lc
rear_port: '{module}1-6'
rear_port_position: 2
comments: Front Port 2 (Strands 3-4)
description: Front Port 2 (Strands 3-4)
- name: '{module}3'
type: lc
rear_port: '{module}1-6'
rear_port_position: 3
comments: Front Port 3 (Strands 5-6)
description: Front Port 3 (Strands 5-6)
- name: '{module}4'
type: lc
rear_port: '{module}1-6'
rear_port_position: 4
comments: Front Port 4 (Strands 7-8)
description: Front Port 4 (Strands 7-8)
- name: '{module}5'
type: lc
rear_port: '{module}1-6'
rear_port_position: 5
comments: Front Port 5 (Strands 9-10)
description: Front Port 5 (Strands 9-10)
- name: '{module}6'
type: lc
rear_port: '{module}1-6'
rear_port_position: 6
comments: Front Port 6 (Strands 11-12)
description: Front Port 6 (Strands 11-12)
rear-ports:
- name: '{module}1-6'
type: mpo
positions: 6
comments: Rear Port MPO connector ports 1-6 (strands 1-12)
description: Rear Port MPO connector ports 1-6 (strands 1-12)

View File

@@ -9,24 +9,24 @@ front-ports:
type: lc
rear_port: '{module}1-4'
rear_port_position: 1
comments: Front Port 1 (Strands 1, 12)
description: Front Port 1 (Strands 1, 12)
- name: '{module}2'
type: lc
rear_port: '{module}1-4'
rear_port_position: 2
comments: Front Port 2 (Strands 2, 11)
description: Front Port 2 (Strands 2, 11)
- name: '{module}3'
type: lc
rear_port: '{module}1-4'
rear_port_position: 3
comments: Front Port 3 (Strands 3, 10)
description: Front Port 3 (Strands 3, 10)
- name: '{module}4'
type: lc
rear_port: '{module}1-4'
rear_port_position: 4
comments: Front Port 4 (Strands 4, 9)
description: Front Port 4 (Strands 4, 9)
rear-ports:
- name: '{module}1-4'
type: mpo
positions: 4
comments: Rear Port MPO connector ports 1-4 (strands 1-12)
description: Rear Port MPO connector ports 1-4 (strands 1-12)

View File

@@ -8,36 +8,36 @@ front-ports:
type: mpo
rear_port: '{module}1'
rear_port_position: 1
comments: Front Port MPO conector port 1 (Strands 1-12)
description: Front Port MPO conector port 1 (Strands 1-12)
- name: '{module}2'
type: mpo
rear_port: '{module}2'
rear_port_position: 1
comments: Front Port MPO conector port 2 (Strands 13-24)
description: Front Port MPO conector port 2 (Strands 13-24)
- name: '{module}3'
type: mpo
rear_port: '{module}3'
rear_port_position: 1
comments: Front Port MPO conector port 3 (Strands 25-36)
description: Front Port MPO conector port 3 (Strands 25-36)
- name: '{module}4'
type: mpo
rear_port: '{module}4'
rear_port_position: 1
comments: Front Port MPO conector port 4 (Strands 37-48)
description: Front Port MPO conector port 4 (Strands 37-48)
rear-ports:
- name: '{module}1'
type: mpo
positions: 1
comments: Rear Port MPO connector port 1 (Strands 1-12)
description: Rear Port MPO connector port 1 (Strands 1-12)
- name: '{module}2'
type: mpo
positions: 1
comments: Rear Port MPO connector port 2 (strands 13-24)
description: Rear Port MPO connector port 2 (strands 13-24)
- name: '{module}3'
type: mpo
positions: 1
comments: Rear Port MPO connector port 3 (strands 25-36)
description: Rear Port MPO connector port 3 (strands 25-36)
- name: '{module}4'
type: mpo
positions: 1
comments: Rear Port MPO connector port 4 (strands 37-48)
description: Rear Port MPO connector port 4 (strands 37-48)

View File

@@ -2,10 +2,10 @@
manufacturer: Dell
model: 450-BCGR
part_number: 450-BCGR
weight: 450
weight_unit: g
comments: '[1400 Watt Redundant Power Supply](https://www.shopblt.com/item/dell-unstructured-storage-cto-450-bcgr-dual/dujr_450bcgr.html)'
power-ports:
- name: PSU{module}
type: iec-60320-c14
maximum_draw: 1400
weight: 450
weight_unit: grams

View File

@@ -7,8 +7,8 @@ interfaces:
- name: EMP{module}/Device
type: other
label: from device
comments: RJ45 connector for RS485/Modbus connection
description: RJ45 connector for RS485/Modbus connection
- name: EMP{module}/Sensors
type: other
label: to sensors
comments: RJ45 connector for RS485/Modbus connection
description: RJ45 connector for RS485/Modbus connection

View File

@@ -8,11 +8,11 @@ interfaces:
type: other
mgmt_only: true
label: Settings
comments: RNDIS (Ethernet over USB) connection with USB Micro-B connector
description: RNDIS (Ethernet over USB) connection with USB Micro-B connector
- name: Sensors
type: other
label: AUX
comments: USB-A connection for USB to RS485/Modbus connection to environmental sensors
description: USB-A connection for USB to RS485/Modbus connection to environmental sensors
- name: mgmt
type: 1000base-t
mgmt_only: true

View File

@@ -11,4 +11,4 @@ console-ports:
- name: CONFIG
type: other
label: CONFIG
comments: Use this port to provide a direct terminal connection to a computer with a terminal emulation program.
description: Use this port to provide a direct terminal connection to a computer with a terminal emulation program.

View File

@@ -10,4 +10,4 @@ interfaces:
power-ports:
- name: dc power terminal
type: dc-terminal
maxiumum draw: 75 W
maximum_draw: 75

View File

@@ -5,62 +5,47 @@ comments: The power card PRWG card uses-48 V DC power and provides power supply
of two power supplies is equal, the two PRWG cards work in load-balance mode.
console-ports:
- name: CLKI1 {module}
comments: The first BITS clock input interface, 75ohm
description: The first BITS clock input interface, 75ohm
type: rj-45
mgmt_only: true
- name: CLKI2 {module}
comments: The second BITS clock input interface, 75ohm
description: The second BITS clock input interface, 75ohm
type: rj-45
mgmt_only: true
- name: CLKO/1PPSO {module}
comments: BITS/1PPS+TOD clock output interface, 75ohm
description: BITS/1PPS+TOD clock output interface, 75ohm
type: rj-45
mgmt_only: true
- name: CLKI1/TIMI1 {module}
comments: The first BITS/1PPS+TOD clock input interface, 120ohm
description: The first BITS/1PPS+TOD clock input interface, 120ohm
type: rj-45
mgmt_only: true
- name: CLKI2/TIMI2 {module}
comments: The second BITS/1PPS+TOD clock input interface, 120ohm
description: The second BITS/1PPS+TOD clock input interface, 120ohm
type: rj-45
mgmt_only: true
- name: CLKO/TIMO {module}
comments: BITS/1PPS+TOD clock output interface, 120ohm
description: BITS/1PPS+TOD clock output interface, 120ohm
type: rj-45
mgmt_only: true
- name: ETH {module}
comments: Out-of-band maintenance network interface
description: Out-of-band maintenance network interface
type: rj-45
mgmt_only: true
- name: COM {module}
comments: Public serial port
description: Public serial port
type: rj-45
mgmt_only: true
- name: TEM {module}
comments: Temperature sensor interface
description: Temperature sensor interface
type: rj-45
mgmt_only: true
- name: HUM
comments: Humid sensor interface
description: Humid sensor interface
type: rj-45
mgmt_only: true
- name: SMO {module}
comments: Smog sensor interface
description: Smog sensor interface
type: rj-45
mgmt_only: true
- name: LIQ {module}
comments: Liquid sensor interface
description: Liquid sensor interface
type: rj-45
mgmt_only: true
- name: DOR {module}
comments: Entrance control sensor interface
description: Entrance control sensor interface
type: rj-45
mgmt_only: true
- name: DIN {module}
comments: Digit input interface, four channels
description: Digit input interface, four channels
type: rj-45
mgmt_only: true
- name: DOT {module}
comments: Digit input interface, four channels
description: Digit input interface, four channels
type: rj-45
mgmt_only: true

View File

@@ -6,10 +6,8 @@ comments: The power card PRWG card uses-48 V DC power and provides power supply
console-ports:
- name: TST1 {module}
type: rj-45
mgmt_only: true
- name: TST2 {module}
type: rj-45
mgmt_only: true
power-ports:
- name: PSU {module}
type: dc-terminal

View File

@@ -12,15 +12,14 @@ interfaces:
- name: xgei_1/{module}/4
type: 10gbase-x-sfpp
- name: gei_1/{module}/5
comments: For out-of-band network management
description: For out-of-band network management
type: 1000base-t
mgmt_only: true
- name: gei_1/{module}/6
comments: For mirroring service traffic
description: For mirroring service traffic
type: 1000base-t
mgmt_only: true
console-ports:
- name: CLI {module}
comments: RS-232 port,for local debugging
description: RS-232 port,for local debugging
type: rj-45
mgmt_only: true