Improve Validation and fixed issues based on Issue (#3768)
* Update devicetype.json * Update moduletype.json * Update definitions_test.py * Update device_types.py * Update devicetype.json * Update moduletype.json * Update devicetype.json * Update HWG-STE.yml * Update 701BA8PP.yml * Update WS-C2960C-12PC-L.yaml * Update snr-ups-onrt-1000-s24-element-ii.yaml * Update EP-R6.yaml * Update moduletype.json * Fixed issues * Added description limit --------- Co-authored-by: Harry <harry@cadby.co.uk>
This commit is contained in:
@@ -113,27 +113,13 @@ interfaces:
|
|||||||
module-bays:
|
module-bays:
|
||||||
- name: PS A
|
- name: PS A
|
||||||
position: A
|
position: A
|
||||||
description: |
|
description: 170-0310-900 5171 DC or 170-0311-900 5171 AC
|
||||||
170-0310-900 5171, DC PLUGGABLE POWER SUPPLY, -48V
|
|
||||||
170-0311-900 5171, AC PLUGGABLE POWER SUPPLY, WIDE RANGE 120/240V
|
|
||||||
- name: PS B
|
- name: PS B
|
||||||
position: B
|
position: B
|
||||||
description: |
|
description: 170-0310-900 5171 DC or 170-0311-900 5171 AC
|
||||||
170-0310-900 5171, DC PLUGGABLE POWER SUPPLY, -48V
|
|
||||||
170-0311-900 5171, AC PLUGGABLE POWER SUPPLY, WIDE RANGE 120/240V
|
|
||||||
- name: Module 1
|
- name: Module 1
|
||||||
position: '1'
|
position: '1'
|
||||||
description: |
|
description: 170-0312-900 2x100G QSFP28/170-0313-900 2x100G CFP2-DCO/170-0314-900 1x200G CFP2-DCO/170-0315-900 CFP2/QSFP28
|
||||||
Accepts:
|
|
||||||
* 170-0312-900 2x100G QSFP28 FRU supporting up to 100GbE
|
|
||||||
* 170-0313-900 2x100G CFP2-DCO FRU supporting up to 100GbE
|
|
||||||
* 170-0314-900 1x200G CFP2-DCO FRU supporting up to 200GbE
|
|
||||||
* 170-0315-900 CFP2/QSFP28 combo FRU supporting up to 100GbE
|
|
||||||
- name: Module 2
|
- name: Module 2
|
||||||
position: '2'
|
position: '2'
|
||||||
description: |
|
description: 170-0312-900 2x100G QSFP28/170-0313-900 2x100G CFP2-DCO/170-0314-900 1x200G CFP2-DCO/170-0315-900 CFP2/QSFP28
|
||||||
Accepts:
|
|
||||||
* 170-0312-900 2x100G QSFP28 FRU supporting up to 100GbE
|
|
||||||
* 170-0313-900 2x100G CFP2-DCO FRU supporting up to 100GbE
|
|
||||||
* 170-0314-900 1x200G CFP2-DCO FRU supporting up to 200GbE
|
|
||||||
* 170-0315-900 CFP2/QSFP28 combo FRU supporting up to 100GbE
|
|
||||||
|
|||||||
@@ -19,79 +19,19 @@ module-bays:
|
|||||||
description: 186-3010-900 or 186-3011-900
|
description: 186-3010-900 or 186-3011-900
|
||||||
- name: Module 1
|
- name: Module 1
|
||||||
position: '1'
|
position: '1'
|
||||||
description: |
|
description: 186-3100-900/186-3100-901/186-3110-901/186-3101-900/186-3101-901/186-3111-901/186-3102-900/186-3102-901/186-3112-901/186-3160-900/186-3161-900/186-3162-900/186-3171-900/186-3172-900
|
||||||
* Waveserver WL5e 2x800G C-Band Submarine 16xQSFP28/QSFP-DD Module (186-3100-900)
|
|
||||||
* Waveserver WL5e 2x800G C-Band Submarine 16xQSFP28/QSFP-DD Module (186-3100-901)
|
|
||||||
* Waveserver WL5e 2x800G L-Band Submarine 16xQSFP28/QSFP-DD Module (186-3110-901)
|
|
||||||
* Waveserver WL5e 2x800G C-Band Premium 16xQSFP28/QSFP-DD Module (186-3101-900)
|
|
||||||
* Waveserver WL5e 2x800G C-Band Premium 16xQSFP28/QSFP-DD Module (186-3101-901)
|
|
||||||
* Waveserver WL5e 2x800G L-Band Premium 16xQSFP28/QSFP-DD Module (186-3111-901)
|
|
||||||
* Waveserver WL5e 2x800G C-Band Enhanced 16xQSFP28/QSFP-DD Module (186-3102-900)
|
|
||||||
* Waveserver WL5e 2x800G C-Band Enhanced 16xQSFP28/QSFP-DD Module (186-3102-901)
|
|
||||||
* Waveserver WL5e 2x800G L-Band Enhanced 16xQSFP28/QSFP-DD Module (186-3112-901)
|
|
||||||
* Waveserver WL5e 2x800G Encryption C-Band Submarine 16xQSFP28/QSFP-DD Module (186-3160-900)
|
|
||||||
* Waveserver WL5e 2x800G Encryption C-Band Premium 16xQSFP28/QSFP-DD Module (186-3161-900)
|
|
||||||
* Waveserver WL5e 2x800G Encryption C-Band Enhanced 16xQSFP28/QSFP-DD Module (186-3162-900)
|
|
||||||
* Waveserver WL5e 2x800G Encryption L-Band Premium 16xQSFP28/QSFP-DD Module (186-3171-900)
|
|
||||||
* Waveserver WL5e 2x800G Encryption L-Band Enhanced 16xQSFP28/QSFP-DD Module (186-3172-900)
|
|
||||||
- name: Module 3
|
- name: Module 3
|
||||||
position: '3'
|
position: '3'
|
||||||
description: |
|
description: 186-3100-900/186-3100-901/186-3110-901/186-3101-900/186-3101-901/186-3111-901/186-3102-900/186-3102-901/186-3112-901/186-3160-900/186-3161-900/186-3162-900/186-3171-900/186-3172-900
|
||||||
* Waveserver WL5e 2x800G C-Band Submarine 16xQSFP28/QSFP-DD Module (186-3100-900)
|
|
||||||
* Waveserver WL5e 2x800G C-Band Submarine 16xQSFP28/QSFP-DD Module (186-3100-901)
|
|
||||||
* Waveserver WL5e 2x800G L-Band Submarine 16xQSFP28/QSFP-DD Module (186-3110-901)
|
|
||||||
* Waveserver WL5e 2x800G C-Band Premium 16xQSFP28/QSFP-DD Module (186-3101-900)
|
|
||||||
* Waveserver WL5e 2x800G C-Band Premium 16xQSFP28/QSFP-DD Module (186-3101-901)
|
|
||||||
* Waveserver WL5e 2x800G L-Band Premium 16xQSFP28/QSFP-DD Module (186-3111-901)
|
|
||||||
* Waveserver WL5e 2x800G C-Band Enhanced 16xQSFP28/QSFP-DD Module (186-3102-900)
|
|
||||||
* Waveserver WL5e 2x800G C-Band Enhanced 16xQSFP28/QSFP-DD Module (186-3102-901)
|
|
||||||
* Waveserver WL5e 2x800G L-Band Enhanced 16xQSFP28/QSFP-DD Module (186-3112-901)
|
|
||||||
* Waveserver WL5e 2x800G Encryption C-Band Submarine 16xQSFP28/QSFP-DD Module (186-3160-900)
|
|
||||||
* Waveserver WL5e 2x800G Encryption C-Band Premium 16xQSFP28/QSFP-DD Module (186-3161-900)
|
|
||||||
* Waveserver WL5e 2x800G Encryption C-Band Enhanced 16xQSFP28/QSFP-DD Module (186-3162-900)
|
|
||||||
* Waveserver WL5e 2x800G Encryption L-Band Premium 16xQSFP28/QSFP-DD Module (186-3171-900)
|
|
||||||
* Waveserver WL5e 2x800G Encryption L-Band Enhanced 16xQSFP28/QSFP-DD Module (186-3172-900)
|
|
||||||
- name: Module 5
|
- name: Module 5
|
||||||
position: '5'
|
position: '5'
|
||||||
description: |
|
description: 186-3100-900/186-3100-901/186-3110-901/186-3101-900/186-3101-901/186-3111-901/186-3102-900/186-3102-901/186-3112-901/186-3160-900/186-3161-900/186-3162-900/186-3171-900/186-3172-900
|
||||||
* Waveserver WL5e 2x800G C-Band Submarine 16xQSFP28/QSFP-DD Module (186-3100-900)
|
|
||||||
* Waveserver WL5e 2x800G C-Band Submarine 16xQSFP28/QSFP-DD Module (186-3100-901)
|
|
||||||
* Waveserver WL5e 2x800G L-Band Submarine 16xQSFP28/QSFP-DD Module (186-3110-901)
|
|
||||||
* Waveserver WL5e 2x800G C-Band Premium 16xQSFP28/QSFP-DD Module (186-3101-900)
|
|
||||||
* Waveserver WL5e 2x800G C-Band Premium 16xQSFP28/QSFP-DD Module (186-3101-901)
|
|
||||||
* Waveserver WL5e 2x800G L-Band Premium 16xQSFP28/QSFP-DD Module (186-3111-901)
|
|
||||||
* Waveserver WL5e 2x800G C-Band Enhanced 16xQSFP28/QSFP-DD Module (186-3102-900)
|
|
||||||
* Waveserver WL5e 2x800G C-Band Enhanced 16xQSFP28/QSFP-DD Module (186-3102-901)
|
|
||||||
* Waveserver WL5e 2x800G L-Band Enhanced 16xQSFP28/QSFP-DD Module (186-3112-901)
|
|
||||||
* Waveserver WL5e 2x800G Encryption C-Band Submarine 16xQSFP28/QSFP-DD Module (186-3160-900)
|
|
||||||
* Waveserver WL5e 2x800G Encryption C-Band Premium 16xQSFP28/QSFP-DD Module (186-3161-900)
|
|
||||||
* Waveserver WL5e 2x800G Encryption C-Band Enhanced 16xQSFP28/QSFP-DD Module (186-3162-900)
|
|
||||||
* Waveserver WL5e 2x800G Encryption L-Band Premium 16xQSFP28/QSFP-DD Module (186-3171-900)
|
|
||||||
* Waveserver WL5e 2x800G Encryption L-Band Enhanced 16xQSFP28/QSFP-DD Module (186-3172-900)
|
|
||||||
- name: Module 7
|
- name: Module 7
|
||||||
position: '7'
|
position: '7'
|
||||||
description: |
|
description: 186-3100-900/186-3100-901/186-3110-901/186-3101-900/186-3101-901/186-3111-901/186-3102-900/186-3102-901/186-3112-901/186-3160-900/186-3161-900/186-3162-900/186-3171-900/186-3172-900
|
||||||
* Waveserver WL5e 2x800G C-Band Submarine 16xQSFP28/QSFP-DD Module (186-3100-900)
|
|
||||||
* Waveserver WL5e 2x800G C-Band Submarine 16xQSFP28/QSFP-DD Module (186-3100-901)
|
|
||||||
* Waveserver WL5e 2x800G L-Band Submarine 16xQSFP28/QSFP-DD Module (186-3110-901)
|
|
||||||
* Waveserver WL5e 2x800G C-Band Premium 16xQSFP28/QSFP-DD Module (186-3101-900)
|
|
||||||
* Waveserver WL5e 2x800G C-Band Premium 16xQSFP28/QSFP-DD Module (186-3101-901)
|
|
||||||
* Waveserver WL5e 2x800G L-Band Premium 16xQSFP28/QSFP-DD Module (186-3111-901)
|
|
||||||
* Waveserver WL5e 2x800G C-Band Enhanced 16xQSFP28/QSFP-DD Module (186-3102-900)
|
|
||||||
* Waveserver WL5e 2x800G C-Band Enhanced 16xQSFP28/QSFP-DD Module (186-3102-901)
|
|
||||||
* Waveserver WL5e 2x800G L-Band Enhanced 16xQSFP28/QSFP-DD Module (186-3112-901)
|
|
||||||
* Waveserver WL5e 2x800G Encryption C-Band Submarine 16xQSFP28/QSFP-DD Module (186-3160-900)
|
|
||||||
* Waveserver WL5e 2x800G Encryption C-Band Premium 16xQSFP28/QSFP-DD Module (186-3161-900)
|
|
||||||
* Waveserver WL5e 2x800G Encryption C-Band Enhanced 16xQSFP28/QSFP-DD Module (186-3162-900)
|
|
||||||
* Waveserver WL5e 2x800G Encryption L-Band Premium 16xQSFP28/QSFP-DD Module (186-3171-900)
|
|
||||||
* Waveserver WL5e 2x800G Encryption L-Band Enhanced 16xQSFP28/QSFP-DD Module (186-3172-900)
|
|
||||||
- name: PSU-1
|
- name: PSU-1
|
||||||
position: PSU-1
|
position: PSU-1
|
||||||
description: |
|
description: 186-3040-900 AC/186-3041-900 DC
|
||||||
186-3040-900 AC
|
|
||||||
186-3041-900 DC
|
|
||||||
- name: PSU-2
|
- name: PSU-2
|
||||||
position: PSU-2
|
position: PSU-2
|
||||||
description: |
|
description: 186-3040-900 AC/186-3041-900 DC
|
||||||
186-3040-900 AC
|
|
||||||
186-3041-900 DC
|
|
||||||
|
|||||||
@@ -16,38 +16,16 @@ module-bays:
|
|||||||
description: 186-1031-900
|
description: 186-1031-900
|
||||||
- name: Module 1
|
- name: Module 1
|
||||||
position: '1'
|
position: '1'
|
||||||
description: |
|
description: 186-1800-900/186-1601-900/186-1601-902/186-1601-901/186-1603-900/186-1801-900
|
||||||
* Waveserver Ai 2x400G 56GBaud EDFA L-Band 8xQSFP28 Module (186-1800-900)
|
|
||||||
* Waveserver Ai 2x400G 35/56GBaud EDFA C-Band 8xQSFP28 Module (186-1601-900)
|
|
||||||
* Waveserver Ai 2x400G 35/56GBaud EDFA C-Band Standard 8xQSFP28 Module (186-1601-902)
|
|
||||||
* Waveserver Ai 2x400G 35/56GBaud EDFA C-Band Premium 8xQSFP28 Module (186-1601-901)
|
|
||||||
* Waveserver Ai 1x400G 35/56GBaud EDFA C-Band 4xQSFP28 Module (186-1603-900)
|
|
||||||
* Waveserver Ai 2x400G 35/56 GBaud EDFA L-Band 8xQSFP28 Module (186-1801-900)
|
|
||||||
- name: Module 2
|
- name: Module 2
|
||||||
position: '2'
|
position: '2'
|
||||||
description: |
|
description: 186-1800-900/186-1601-900/186-1601-902/186-1601-901/186-1603-900/186-1801-900
|
||||||
* Waveserver Ai 2x400G 56GBaud EDFA L-Band 8xQSFP28 Module (186-1800-900)
|
|
||||||
* Waveserver Ai 2x400G 35/56GBaud EDFA C-Band 8xQSFP28 Module (186-1601-900)
|
|
||||||
* Waveserver Ai 2x400G 35/56GBaud EDFA C-Band Standard 8xQSFP28 Module (186-1601-902)
|
|
||||||
* Waveserver Ai 2x400G 35/56GBaud EDFA C-Band Premium 8xQSFP28 Module (186-1601-901)
|
|
||||||
* Waveserver Ai 1x400G 35/56GBaud EDFA C-Band 4xQSFP28 Module (186-1603-900)
|
|
||||||
* Waveserver Ai 2x400G 35/56 GBaud EDFA L-Band 8xQSFP28 Module (186-1801-900)
|
|
||||||
- name: Module 3
|
- name: Module 3
|
||||||
position: '3'
|
position: '3'
|
||||||
description: |
|
description: 186-1800-900/186-1601-900/186-1601-902/186-1601-901/186-1603-900/186-1801-900
|
||||||
* Waveserver Ai 2x400G 56GBaud EDFA L-Band 8xQSFP28 Module (186-1800-900)
|
|
||||||
* Waveserver Ai 2x400G 35/56GBaud EDFA C-Band 8xQSFP28 Module (186-1601-900)
|
|
||||||
* Waveserver Ai 2x400G 35/56GBaud EDFA C-Band Standard 8xQSFP28 Module (186-1601-902)
|
|
||||||
* Waveserver Ai 2x400G 35/56GBaud EDFA C-Band Premium 8xQSFP28 Module (186-1601-901)
|
|
||||||
* Waveserver Ai 1x400G 35/56GBaud EDFA C-Band 4xQSFP28 Module (186-1603-900)
|
|
||||||
* Waveserver Ai 2x400G 35/56 GBaud EDFA L-Band 8xQSFP28 Module (186-1801-900)
|
|
||||||
- name: PSU-1
|
- name: PSU-1
|
||||||
position: PSU-1
|
position: PSU-1
|
||||||
description: |
|
description: 186-1510-900 AC/186-1511-900 DC
|
||||||
186-1510-900 AC
|
|
||||||
186-1511-900 DC
|
|
||||||
- name: PSU-2
|
- name: PSU-2
|
||||||
position: PSU-2
|
position: PSU-2
|
||||||
description: |
|
description: 186-1510-900 AC/186-1511-900 DC
|
||||||
186-1510-900 AC
|
|
||||||
186-1511-900 DC
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
manufacturer: HW-GROUP
|
manufacturer: HW-Group
|
||||||
model: HWG-STE
|
model: HWG-STE
|
||||||
slug: hw-group-hwg-ste
|
slug: hw-group-hwg-ste
|
||||||
airflow: passive
|
airflow: passive
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
manufacturer: PULTIMO
|
manufacturer: Pultimo
|
||||||
model: 701BA8PP
|
model: 701BA8PP
|
||||||
slug: pultimo-701ba8pp
|
slug: pultimo-701ba8pp
|
||||||
part_number: 701BA8PP
|
part_number: 701BA8PP
|
||||||
|
|||||||
@@ -14,8 +14,7 @@ weight_unit: kg
|
|||||||
front-ports:
|
front-ports:
|
||||||
- name: IN RG45 NET SURGE PROTECTION
|
- name: IN RG45 NET SURGE PROTECTION
|
||||||
type: 8p8c
|
type: 8p8c
|
||||||
rear_port: '1'
|
rear_port: OUT RG45 NET SURGE PROTECTION
|
||||||
rear_port_position: 1
|
|
||||||
rear-ports:
|
rear-ports:
|
||||||
- name: OUT RG45 NET SURGE PROTECTION
|
- name: OUT RG45 NET SURGE PROTECTION
|
||||||
type: 8p8c
|
type: 8p8c
|
||||||
|
|||||||
@@ -26,5 +26,3 @@ interfaces:
|
|||||||
type: 1000base-t
|
type: 1000base-t
|
||||||
- name: eth5
|
- name: eth5
|
||||||
type: 1000base-x-sfp
|
type: 1000base-x-sfp
|
||||||
- name: switch0
|
|
||||||
type: bridge
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
manufacturer: Hammond
|
manufacturer: Hammond
|
||||||
model: dnrr2377hdwb
|
model: dnrr2377hdwb
|
||||||
slug: hammond-dnrr2377hdwb
|
slug: hammond-dnrr2377hdwb
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
manufacturer: Hammond
|
manufacturer: Hammond
|
||||||
model: h13045u48bk
|
model: h13045u48bk
|
||||||
slug: hammond-h13045u48bk
|
slug: hammond-h13045u48bk
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
manufacturer: Hammond
|
manufacturer: Hammond
|
||||||
model: rb-2p77b
|
model: rb-2p77b
|
||||||
slug: hammond-rb-2p77b
|
slug: hammond-rb-2p77b
|
||||||
|
|||||||
@@ -18,7 +18,8 @@
|
|||||||
"$ref": "urn:devicetype-library:generated-schema#/definitions/console-port/properties/type"
|
"$ref": "urn:devicetype-library:generated-schema#/definitions/console-port/properties/type"
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 200
|
||||||
},
|
},
|
||||||
"_is_power_source": {
|
"_is_power_source": {
|
||||||
"$ref": "urn:devicetype-library:reusable#/definitions/_is_power_source"
|
"$ref": "urn:devicetype-library:reusable#/definitions/_is_power_source"
|
||||||
@@ -45,7 +46,8 @@
|
|||||||
"$ref": "urn:devicetype-library:generated-schema#/definitions/console-server-port/properties/type"
|
"$ref": "urn:devicetype-library:generated-schema#/definitions/console-server-port/properties/type"
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 200
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
@@ -77,7 +79,8 @@
|
|||||||
"minimum": 1
|
"minimum": 1
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 200
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
@@ -108,7 +111,8 @@
|
|||||||
"$ref": "urn:devicetype-library:generated-schema#/definitions/power-outlet/properties/feed-leg"
|
"$ref": "urn:devicetype-library:generated-schema#/definitions/power-outlet/properties/feed-leg"
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 200
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
@@ -138,7 +142,8 @@
|
|||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 200
|
||||||
},
|
},
|
||||||
"bridge": {
|
"bridge": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -187,7 +192,8 @@
|
|||||||
"minimum": 1
|
"minimum": 1
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 200
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
@@ -220,7 +226,8 @@
|
|||||||
"minimum": 1
|
"minimum": 1
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 200
|
||||||
},
|
},
|
||||||
"_is_power_source": {
|
"_is_power_source": {
|
||||||
"$ref": "urn:devicetype-library:reusable#/definitions/_is_power_source"
|
"$ref": "urn:devicetype-library:reusable#/definitions/_is_power_source"
|
||||||
@@ -248,7 +255,8 @@
|
|||||||
"maxLength": 30
|
"maxLength": 30
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 200
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
@@ -269,7 +277,8 @@
|
|||||||
"maxLength": 64
|
"maxLength": 64
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 200
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
@@ -297,7 +306,8 @@
|
|||||||
"maxLength": 50
|
"maxLength": 50
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 200
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
|
|||||||
@@ -110,12 +110,23 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 200
|
||||||
},
|
},
|
||||||
"comments": {
|
"comments": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"if": { "required": ["weight"] },
|
||||||
|
"then": { "required": ["weight_unit"] }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"if": { "required": ["weight_unit"] },
|
||||||
|
"then": { "required": ["weight"] }
|
||||||
|
}
|
||||||
|
],
|
||||||
"required": ["manufacturer", "model", "slug", "u_height","is_full_depth"],
|
"required": ["manufacturer", "model", "slug", "u_height","is_full_depth"],
|
||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,12 +73,23 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"maxLength": 200
|
||||||
},
|
},
|
||||||
"comments": {
|
"comments": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"if": { "required": ["weight"] },
|
||||||
|
"then": { "required": ["weight_unit"] }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"if": { "required": ["weight_unit"] },
|
||||||
|
"then": { "required": ["weight"] }
|
||||||
|
}
|
||||||
|
],
|
||||||
"required": ["manufacturer", "model"],
|
"required": ["manufacturer", "model"],
|
||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -225,6 +225,7 @@ def test_definitions(file_path, schema, change_type):
|
|||||||
if this_device.isDevice:
|
if this_device.isDevice:
|
||||||
assert this_device.validate_power(), pytest.fail(this_device.failureMessage, False)
|
assert this_device.validate_power(), pytest.fail(this_device.failureMessage, False)
|
||||||
assert this_device.ensure_no_vga(), pytest.fail(this_device.failureMessage, False)
|
assert this_device.ensure_no_vga(), pytest.fail(this_device.failureMessage, False)
|
||||||
|
assert this_device.validate_child_u_height(), pytest.fail(this_device.failureMessage, False)
|
||||||
|
|
||||||
# Check for images if front_image or rear_image is True
|
# Check for images if front_image or rear_image is True
|
||||||
if (definition.get('front_image') or definition.get('rear_image')):
|
if (definition.get('front_image') or definition.get('rear_image')):
|
||||||
|
|||||||
@@ -71,7 +71,14 @@ class DeviceType:
|
|||||||
# Add the slug to the list of known slugs
|
# Add the slug to the list of known slugs
|
||||||
KNOWN_SLUGS.add((self.slug, self.file_path))
|
KNOWN_SLUGS.add((self.slug, self.file_path))
|
||||||
return True
|
return True
|
||||||
|
def validate_child_u_height(self):
|
||||||
|
subdevice_role = self.definition.get('subdevice_role')
|
||||||
|
u_height = self.definition.get('u_height', None)
|
||||||
|
|
||||||
|
if subdevice_role == "child" and u_height != 0:
|
||||||
|
self.failureMessage = f'{self.file_path} is a child device but has u_height={u_height}. Must be 0.'
|
||||||
|
return False
|
||||||
|
return True
|
||||||
def validate_power(self):
|
def validate_power(self):
|
||||||
CUSTOM_POWER_SOURCE_PROPERTY = '_is_power_source'
|
CUSTOM_POWER_SOURCE_PROPERTY = '_is_power_source'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user