diff --git a/device-types/Ciena/5171-platform.yaml b/device-types/Ciena/5171-platform.yaml index db0d6728..c2222585 100644 --- a/device-types/Ciena/5171-platform.yaml +++ b/device-types/Ciena/5171-platform.yaml @@ -113,27 +113,13 @@ interfaces: module-bays: - name: PS A position: A - description: | - 170-0310-900 5171, DC PLUGGABLE POWER SUPPLY, -48V - 170-0311-900 5171, AC PLUGGABLE POWER SUPPLY, WIDE RANGE 120/240V + description: 170-0310-900 5171 DC or 170-0311-900 5171 AC - name: PS B position: B - description: | - 170-0310-900 5171, DC PLUGGABLE POWER SUPPLY, -48V - 170-0311-900 5171, AC PLUGGABLE POWER SUPPLY, WIDE RANGE 120/240V + description: 170-0310-900 5171 DC or 170-0311-900 5171 AC - name: Module 1 position: '1' - description: | - 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 + description: 170-0312-900 2x100G QSFP28/170-0313-900 2x100G CFP2-DCO/170-0314-900 1x200G CFP2-DCO/170-0315-900 CFP2/QSFP28 - name: Module 2 position: '2' - description: | - 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 + description: 170-0312-900 2x100G QSFP28/170-0313-900 2x100G CFP2-DCO/170-0314-900 1x200G CFP2-DCO/170-0315-900 CFP2/QSFP28 diff --git a/device-types/Ciena/waveserver-5.yaml b/device-types/Ciena/waveserver-5.yaml index 7b273559..cdf58314 100644 --- a/device-types/Ciena/waveserver-5.yaml +++ b/device-types/Ciena/waveserver-5.yaml @@ -19,79 +19,19 @@ module-bays: description: 186-3010-900 or 186-3011-900 - name: Module 1 position: '1' - description: | - * 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) + 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 - name: Module 3 position: '3' - description: | - * 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) + 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 - name: Module 5 position: '5' - description: | - * 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) + 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 - name: Module 7 position: '7' - description: | - * 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) + 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 - name: PSU-1 position: PSU-1 - description: | - 186-3040-900 AC - 186-3041-900 DC + description: 186-3040-900 AC/186-3041-900 DC - name: PSU-2 position: PSU-2 - description: | - 186-3040-900 AC - 186-3041-900 DC + description: 186-3040-900 AC/186-3041-900 DC diff --git a/device-types/Ciena/waveserver-ai.yaml b/device-types/Ciena/waveserver-ai.yaml index 597b59b7..3a2bce6e 100644 --- a/device-types/Ciena/waveserver-ai.yaml +++ b/device-types/Ciena/waveserver-ai.yaml @@ -16,38 +16,16 @@ module-bays: description: 186-1031-900 - name: Module 1 position: '1' - description: | - * 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) + description: 186-1800-900/186-1601-900/186-1601-902/186-1601-901/186-1603-900/186-1801-900 - name: Module 2 position: '2' - description: | - * 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) + description: 186-1800-900/186-1601-900/186-1601-902/186-1601-901/186-1603-900/186-1801-900 - name: Module 3 position: '3' - description: | - * 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) + description: 186-1800-900/186-1601-900/186-1601-902/186-1601-901/186-1603-900/186-1801-900 - name: PSU-1 position: PSU-1 - description: | - 186-1510-900 AC - 186-1511-900 DC + description: 186-1510-900 AC/186-1511-900 DC - name: PSU-2 position: PSU-2 - description: | - 186-1510-900 AC - 186-1511-900 DC + description: 186-1510-900 AC/186-1511-900 DC diff --git a/device-types/HW-Group/HWG-STE.yml b/device-types/HW-Group/HWG-STE.yml index 6d9bd140..de579206 100644 --- a/device-types/HW-Group/HWG-STE.yml +++ b/device-types/HW-Group/HWG-STE.yml @@ -1,5 +1,5 @@ --- -manufacturer: HW-GROUP +manufacturer: HW-Group model: HWG-STE slug: hw-group-hwg-ste airflow: passive diff --git a/device-types/Pultimo/701BA8PP.yml b/device-types/Pultimo/701BA8PP.yml index 5093fcfc..5bfc5d2b 100644 --- a/device-types/Pultimo/701BA8PP.yml +++ b/device-types/Pultimo/701BA8PP.yml @@ -1,5 +1,5 @@ --- -manufacturer: PULTIMO +manufacturer: Pultimo model: 701BA8PP slug: pultimo-701ba8pp part_number: 701BA8PP diff --git a/device-types/SNR/snr-ups-onrt-1000-s24-element-ii.yaml b/device-types/SNR/snr-ups-onrt-1000-s24-element-ii.yaml index 9c736f88..7bf71f2b 100644 --- a/device-types/SNR/snr-ups-onrt-1000-s24-element-ii.yaml +++ b/device-types/SNR/snr-ups-onrt-1000-s24-element-ii.yaml @@ -14,8 +14,7 @@ weight_unit: kg front-ports: - name: IN RG45 NET SURGE PROTECTION type: 8p8c - rear_port: '1' - rear_port_position: 1 + rear_port: OUT RG45 NET SURGE PROTECTION rear-ports: - name: OUT RG45 NET SURGE PROTECTION type: 8p8c diff --git a/device-types/Ubiquiti/EP-R6.yaml b/device-types/Ubiquiti/EP-R6.yaml index b7376f93..11d0e191 100644 --- a/device-types/Ubiquiti/EP-R6.yaml +++ b/device-types/Ubiquiti/EP-R6.yaml @@ -26,5 +26,3 @@ interfaces: type: 1000base-t - name: eth5 type: 1000base-x-sfp - - name: switch0 - type: bridge diff --git a/rack-types/Hammond/DNRR2377HDWB.yaml b/rack-types/Hammond/DNRR2377HDWB.yaml index c5faa04b..77197e81 100644 --- a/rack-types/Hammond/DNRR2377HDWB.yaml +++ b/rack-types/Hammond/DNRR2377HDWB.yaml @@ -1,3 +1,4 @@ +--- manufacturer: Hammond model: dnrr2377hdwb slug: hammond-dnrr2377hdwb diff --git a/rack-types/Hammond/H13045U48BK.yaml b/rack-types/Hammond/H13045U48BK.yaml index f350fcfd..5d5b7a61 100644 --- a/rack-types/Hammond/H13045U48BK.yaml +++ b/rack-types/Hammond/H13045U48BK.yaml @@ -1,3 +1,4 @@ +--- manufacturer: Hammond model: h13045u48bk slug: hammond-h13045u48bk diff --git a/rack-types/Hammond/RB-2P77B.yaml b/rack-types/Hammond/RB-2P77B.yaml index f0e13531..168f94e7 100644 --- a/rack-types/Hammond/RB-2P77B.yaml +++ b/rack-types/Hammond/RB-2P77B.yaml @@ -1,3 +1,4 @@ +--- manufacturer: Hammond model: rb-2p77b slug: hammond-rb-2p77b diff --git a/schema/components.json b/schema/components.json index 2327946f..8fc95aef 100644 --- a/schema/components.json +++ b/schema/components.json @@ -18,7 +18,8 @@ "$ref": "urn:devicetype-library:generated-schema#/definitions/console-port/properties/type" }, "description": { - "type": "string" + "type": "string", + "maxLength": 200 }, "_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" }, "description": { - "type": "string" + "type": "string", + "maxLength": 200 } }, "required": [ @@ -77,7 +79,8 @@ "minimum": 1 }, "description": { - "type": "string" + "type": "string", + "maxLength": 200 } }, "required": [ @@ -108,7 +111,8 @@ "$ref": "urn:devicetype-library:generated-schema#/definitions/power-outlet/properties/feed-leg" }, "description": { - "type": "string" + "type": "string", + "maxLength": 200 } }, "required": [ @@ -138,7 +142,8 @@ "type": "boolean" }, "description": { - "type": "string" + "type": "string", + "maxLength": 200 }, "bridge": { "type": "string", @@ -187,7 +192,8 @@ "minimum": 1 }, "description": { - "type": "string" + "type": "string", + "maxLength": 200 } }, "required": [ @@ -220,7 +226,8 @@ "minimum": 1 }, "description": { - "type": "string" + "type": "string", + "maxLength": 200 }, "_is_power_source": { "$ref": "urn:devicetype-library:reusable#/definitions/_is_power_source" @@ -248,7 +255,8 @@ "maxLength": 30 }, "description": { - "type": "string" + "type": "string", + "maxLength": 200 } }, "required": [ @@ -269,7 +277,8 @@ "maxLength": 64 }, "description": { - "type": "string" + "type": "string", + "maxLength": 200 } }, "required": [ @@ -297,7 +306,8 @@ "maxLength": 50 }, "description": { - "type": "string" + "type": "string", + "maxLength": 200 } }, "required": [ diff --git a/schema/devicetype.json b/schema/devicetype.json index ec292222..9f8ef3ea 100644 --- a/schema/devicetype.json +++ b/schema/devicetype.json @@ -110,12 +110,23 @@ } }, "description": { - "type": "string" + "type": "string", + "maxLength": 200 }, "comments": { "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"], "additionalProperties": false } diff --git a/schema/moduletype.json b/schema/moduletype.json index 7eb34eaf..0312dbfc 100644 --- a/schema/moduletype.json +++ b/schema/moduletype.json @@ -73,12 +73,23 @@ } }, "description": { - "type": "string" + "type": "string", + "maxLength": 200 }, "comments": { "type": "string" } }, + "allOf": [ + { + "if": { "required": ["weight"] }, + "then": { "required": ["weight_unit"] } + }, + { + "if": { "required": ["weight_unit"] }, + "then": { "required": ["weight"] } + } + ], "required": ["manufacturer", "model"], "additionalProperties": false } diff --git a/tests/definitions_test.py b/tests/definitions_test.py index 51d26e6a..09cae823 100644 --- a/tests/definitions_test.py +++ b/tests/definitions_test.py @@ -225,6 +225,7 @@ def test_definitions(file_path, schema, change_type): if this_device.isDevice: 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.validate_child_u_height(), pytest.fail(this_device.failureMessage, False) # Check for images if front_image or rear_image is True if (definition.get('front_image') or definition.get('rear_image')): diff --git a/tests/device_types.py b/tests/device_types.py index 24919397..0d967fd8 100644 --- a/tests/device_types.py +++ b/tests/device_types.py @@ -71,7 +71,14 @@ class DeviceType: # Add the slug to the list of known slugs KNOWN_SLUGS.add((self.slug, self.file_path)) 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): CUSTOM_POWER_SOURCE_PROPERTY = '_is_power_source'