From cbc6306d3f8e46b23b4a741e34dec8d37dbde74e Mon Sep 17 00:00:00 2001
From: Aleksandr Kurbatov <aleksandr.kurbatov@GL1342-AKURBATOV.local>
Date: Tue, 13 Aug 2024 17:38:09 +0100
Subject: [PATCH] iptrunk_checks - optical checks

only check Juniper lanes when the interface is 'et-'.
10g xe- interfaces have different optical output (might be no lanes).
---
 .../roles/iptrunk_checks/tasks/check_optical_levels.yaml     | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/geant/gap_ansible/roles/iptrunk_checks/tasks/check_optical_levels.yaml b/geant/gap_ansible/roles/iptrunk_checks/tasks/check_optical_levels.yaml
index 87170921..c8e2a5eb 100644
--- a/geant/gap_ansible/roles/iptrunk_checks/tasks/check_optical_levels.yaml
+++ b/geant/gap_ansible/roles/iptrunk_checks/tasks/check_optical_levels.yaml
@@ -1,6 +1,9 @@
 ---
 - name: Get Junos attributes for optical levels of interface "{{ item }}"
-  when: local_side.iptrunk_side_node.vendor == "juniper"
+  when: >-
+      local_side.iptrunk_side_node.vendor == "juniper"
+      and
+      ae_member.interface_name is regex("^et-*")
   block:
     - name: Run Juniper Optical info
       junipernetworks.junos.junos_command:
-- 
GitLab