From efa692f1fead603772ef46722237f9f0fec17eaf Mon Sep 17 00:00:00 2001 From: Marcin Zieba <49913098+marcinpsk@users.noreply.github.com> Date: Sat, 27 Dec 2025 23:14:24 +0100 Subject: [PATCH] fix: extend front/rear port check to modules (#3820) --- module-types/MikroTik/RBGPOE.yaml | 2 +- module-types/MikroTik/RBPOE.yaml | 2 +- tests/definitions_test.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module-types/MikroTik/RBGPOE.yaml b/module-types/MikroTik/RBGPOE.yaml index 8a6e1bcd..a356fab5 100644 --- a/module-types/MikroTik/RBGPOE.yaml +++ b/module-types/MikroTik/RBGPOE.yaml @@ -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 diff --git a/module-types/MikroTik/RBPOE.yaml b/module-types/MikroTik/RBPOE.yaml index 2915c965..cd0703c2 100644 --- a/module-types/MikroTik/RBPOE.yaml +++ b/module-types/MikroTik/RBPOE.yaml @@ -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 diff --git a/tests/definitions_test.py b/tests/definitions_test.py index f7f47996..5871d57e 100644 --- a/tests/definitions_test.py +++ b/tests/definitions_test.py @@ -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 []