fix: extend front/rear port check to modules (#3820)
This commit is contained in:
@@ -8,7 +8,7 @@ front-ports:
|
||||
- name: IN
|
||||
label: IN
|
||||
type: 8p8c
|
||||
rear_port: '1'
|
||||
rear_port: OUT
|
||||
rear_port_position: 1
|
||||
rear-ports:
|
||||
- name: OUT
|
||||
|
||||
@@ -8,7 +8,7 @@ front-ports:
|
||||
- name: IN
|
||||
label: IN
|
||||
type: 8p4c
|
||||
rear_port: '1'
|
||||
rear_port: OUT
|
||||
rear_port_position: 1
|
||||
rear-ports:
|
||||
- name: OUT
|
||||
|
||||
@@ -194,7 +194,7 @@ def test_definitions(file_path, schema, change_type):
|
||||
this_device = ModuleType(definition, file_path, change_type)
|
||||
|
||||
# Validate that front-ports reference existing rear-ports
|
||||
if this_device.isDevice:
|
||||
if any(x in file_path for x in ("device-types", "module-types")):
|
||||
rear_ports = definition.get("rear-ports", []) or []
|
||||
front_ports = definition.get("front-ports", []) or []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user