From 0cd9da666a4013b6680cb78935b520f6ec085b13 Mon Sep 17 00:00:00 2001 From: Mark90 Date: Fri, 3 Jul 2026 16:02:25 +0200 Subject: [PATCH 1/2] Fix node interface list starting at 1/0 - not supported for nokia --- workflows/node/shared/steps.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/workflows/node/shared/steps.py b/workflows/node/shared/steps.py index 16fd061..fda4c13 100644 --- a/workflows/node/shared/steps.py +++ b/workflows/node/shared/steps.py @@ -40,8 +40,10 @@ def get_node_interface_list(node_name: str) -> List[Tuple[str, str, int]]: :param node_name: name of the node to retrieve interfaces from :return: list of interface tuples with name, type, and speed (kbps) details """ - ten_gig_interfaces = [(f"ethernet-1/{i}", "10gbase-x-xfp", 10000000) for i in range(10)] - hundred_gig_interfaces = [(f"ethernet-1/{i + 10}", "100gbase-x-cfp", 100000000) for i in range(4)] + # SR Linux interface names are 1-indexed (ethernet-1/0 is rejected by the device), + # so numbering starts at 1: ten-gig on 1/1..1/10, hundred-gig on 1/11..1/14. + ten_gig_interfaces = [(f"ethernet-1/{i}", "10gbase-x-xfp", 10000000) for i in range(1, 11)] + hundred_gig_interfaces = [(f"ethernet-1/{i + 11}", "100gbase-x-cfp", 100000000) for i in range(4)] return ten_gig_interfaces + hundred_gig_interfaces From b39980d05c4c7cac8c09b0ec245a6acd7f26ffcd Mon Sep 17 00:00:00 2001 From: Mark90 Date: Fri, 3 Jul 2026 16:02:43 +0200 Subject: [PATCH 2/2] Move netbox token to vars file --- ansible/plays_and_roles/create_core_link.yaml | 5 +++-- ansible/plays_and_roles/create_node.yaml | 4 ++-- ansible/plays_and_roles/create_port.yaml | 5 +++-- ansible/plays_and_roles/delete_core_link.yaml | 5 +++-- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ansible/plays_and_roles/create_core_link.yaml b/ansible/plays_and_roles/create_core_link.yaml index be79cb9..5b06be3 100644 --- a/ansible/plays_and_roles/create_core_link.yaml +++ b/ansible/plays_and_roles/create_core_link.yaml @@ -1,12 +1,13 @@ - name: Deploy config on a nokia node hosts: all + gather_facts: no + vars_files: + - netbox.yml vars: ansible_network_os: nokia.srlinux.srlinux ansible_connection: ansible.netcommon.httpapi ansible_user: admin ansible_password: NokiaSrl1! - netbox_url: "http://netbox:8080" - netbox_token: "e744057d755255a31818bf74df2350c26eeabe54" debug: false tasks: - name: Dump subscripion diff --git a/ansible/plays_and_roles/create_node.yaml b/ansible/plays_and_roles/create_node.yaml index 7cb0191..89fe761 100644 --- a/ansible/plays_and_roles/create_node.yaml +++ b/ansible/plays_and_roles/create_node.yaml @@ -1,13 +1,13 @@ - name: Deploy config on a nokia node hosts: all gather_facts: no + vars_files: + - netbox.yml vars: ansible_network_os: nokia.srlinux.srlinux ansible_connection: ansible.netcommon.httpapi ansible_user: admin ansible_password: NokiaSrl1! - netbox_url: "http://netbox:8080" - netbox_token: "nbt_sDx3hakFeTCZ.lnGwrK42a7z1IelVaigWXqaAB0GKSpbOSZKTrLdb" debug: false tasks: - name: Dump subscripion diff --git a/ansible/plays_and_roles/create_port.yaml b/ansible/plays_and_roles/create_port.yaml index 656237f..3c2ffea 100644 --- a/ansible/plays_and_roles/create_port.yaml +++ b/ansible/plays_and_roles/create_port.yaml @@ -1,12 +1,13 @@ - name: Deploy a port on a nokia node hosts: all + gather_facts: no + vars_files: + - netbox.yml vars: ansible_network_os: nokia.srlinux.srlinux ansible_connection: ansible.netcommon.httpapi ansible_user: admin ansible_password: NokiaSrl1! - netbox_url: "http://netbox:8080" - netbox_token: "e744057d755255a31818bf74df2350c26eeabe54" vlan_tagging: false debug: false tasks: diff --git a/ansible/plays_and_roles/delete_core_link.yaml b/ansible/plays_and_roles/delete_core_link.yaml index 563d487..189cb5c 100644 --- a/ansible/plays_and_roles/delete_core_link.yaml +++ b/ansible/plays_and_roles/delete_core_link.yaml @@ -1,12 +1,13 @@ - name: Deploy config on a nokia node hosts: all + gather_facts: no + vars_files: + - netbox.yml vars: ansible_network_os: nokia.srlinux.srlinux ansible_connection: ansible.netcommon.httpapi ansible_user: admin ansible_password: NokiaSrl1! - netbox_url: "http://netbox:8080" - netbox_token: "e744057d755255a31818bf74df2350c26eeabe54" debug: false tasks: - name: Dump subscripion