Skip to content

Commit efa692f

Browse files
authored
fix: extend front/rear port check to modules (#3820)
1 parent 844c68a commit efa692f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

module-types/MikroTik/RBGPOE.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ front-ports:
88
- name: IN
99
label: IN
1010
type: 8p8c
11-
rear_port: '1'
11+
rear_port: OUT
1212
rear_port_position: 1
1313
rear-ports:
1414
- name: OUT

module-types/MikroTik/RBPOE.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ front-ports:
88
- name: IN
99
label: IN
1010
type: 8p4c
11-
rear_port: '1'
11+
rear_port: OUT
1212
rear_port_position: 1
1313
rear-ports:
1414
- name: OUT

tests/definitions_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def test_definitions(file_path, schema, change_type):
194194
this_device = ModuleType(definition, file_path, change_type)
195195

196196
# Validate that front-ports reference existing rear-ports
197-
if this_device.isDevice:
197+
if any(x in file_path for x in ("device-types", "module-types")):
198198
rear_ports = definition.get("rear-ports", []) or []
199199
front_ports = definition.get("front-ports", []) or []
200200

0 commit comments

Comments
 (0)