From 54e568645f37a5095607dca3bf49c9c0765c92ad Mon Sep 17 00:00:00 2001 From: Aleksandr Kurbatov <ak@geant.org> Date: Thu, 16 Jan 2025 10:34:04 +0000 Subject: [PATCH] Edge port - update description in edge_port_create template --- .../edge_port/templates/nokia/edge_port_create.j2 | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/geant/gap_ansible/roles/edge_port/templates/nokia/edge_port_create.j2 b/geant/gap_ansible/roles/edge_port/templates/nokia/edge_port_create.j2 index b6b130a6..2a50c462 100644 --- a/geant/gap_ansible/roles/edge_port/templates/nokia/edge_port_create.j2 +++ b/geant/gap_ansible/roles/edge_port/templates/nokia/edge_port_create.j2 @@ -1,3 +1,5 @@ +{% set gaid_prefix = '$' %} +{% set csn_prefix = '#' %} <config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:alu="urn:ietf:params:xml:ns:netconf:base:1.0"> <configure xmlns="urn:nokia.com:sros:ns:yang:sr:conf"> @@ -5,7 +7,7 @@ <port xmlns="urn:nokia.com:sros:ns:yang:sr:conf" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nokia-attr="urn:nokia.com:sros:ns:yang:sr:attributes" alu:operation="replace"> <port-id>{{ member.interface_name }}</port-id> <admin-state>enable</admin-state> - <description>PHY {{ ep.edge_port_type }} {{ partner_name }} P_{{ ep.edge_port_name }} | {{ member.interface_description }}</description> + <description>PHY {{ ep.edge_port_type }} {{ partner_name }} P_{{ ep.edge_port_name }}{{ ' | '+member.interface_description if member.interface_description is string }}</description> <ethernet> <mode>access</mode> <encap-type>{{ ep.encapsulation }}</encap-type> @@ -39,11 +41,7 @@ <lag-name>{{ ep.edge_port_name | lower }}</lag-name> <admin-state>enable</admin-state> <encap-type>{{ ep.encapsulation }}</encap-type> - {% if ep.ga_id is string %} - <description>LAG {{ ep.edge_port_type }} {{ partner_name }} ${{ ep.ga_id }} |</description> - {% else %} - <description>LAG {{ ep.edge_port_type }} {{ partner_name }} |</description> - {% endif %} + <description>LAG {{ ep.edge_port_type }} {{ partner_name }}{{ ' | '+gaid_prefix+ep.ga_id if ep.ga_id is string }}{{ ' | '+csn_prefix+(ep.custom_service_name | replace("#","")) if ep.custom_service_name is string }}{{ ' | '+ep.edge_port_description if ep.edge_port_description is string }}</description> <mode>access</mode> {% if ep.enable_lacp is true %} <lacp> -- GitLab