diff --git a/geant/gap_ansible/roles/iptrunk/templates/juniper/trunk_interface.j2 b/geant/gap_ansible/roles/iptrunk/templates/juniper/trunk_interface.j2 index 651a4436b1c2b70e3eba855940b07a5c87437b5b..f7d17251f41682bf2a5b98e74b719f0e0a3b379e 100644 --- a/geant/gap_ansible/roles/iptrunk/templates/juniper/trunk_interface.j2 +++ b/geant/gap_ansible/roles/iptrunk/templates/juniper/trunk_interface.j2 @@ -25,7 +25,7 @@ {# I need to sort the source and the destination alfabetically #} {% set trunk_direction_name = [ local.name.split(".")[1] | upper, remote.name.split(".")[1] | upper ] %} {% set trunk_direction_name_sorted = trunk_direction_name|sort %} - {% set trunk_suffix = '-'+wfo_trunk.iptrunk.iptrunk_description_suffix if wfo_trunk.iptrunk.iptrunk_description_suffix is string %} + {% set trunk_suffix = '-'+wfo_trunk.iptrunk.iptrunk_description_suffix if wfo_trunk.iptrunk.iptrunk_description_suffix|length > 0 %} {##} interfaces { replace: {{local.ae_name}} { diff --git a/geant/gap_ansible/roles/iptrunk/templates/nokia/trunk_interface.j2 b/geant/gap_ansible/roles/iptrunk/templates/nokia/trunk_interface.j2 index 2659d43b467f78d59346a65e08f1e566dca95717..d567bc22a930fd8e7da2cffa2e6c2fe06ab974ac 100644 --- a/geant/gap_ansible/roles/iptrunk/templates/nokia/trunk_interface.j2 +++ b/geant/gap_ansible/roles/iptrunk/templates/nokia/trunk_interface.j2 @@ -26,7 +26,7 @@ {% set trunk_direction_name = [ local.name.split(".")[1] | upper, remote.name.split(".")[1] | upper ] %} {% set trunk_direction_name_sorted = trunk_direction_name|sort %} - {% set trunk_suffix = '-'+wfo_trunk.iptrunk.iptrunk_description_suffix if wfo_trunk.iptrunk.iptrunk_description_suffix is string %} + {% set trunk_suffix = '-'+wfo_trunk.iptrunk.iptrunk_description_suffix if wfo_trunk.iptrunk.iptrunk_description_suffix|length > 0 %} {##} {% for member in local.members %} <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">