diff --git a/geant/gap_ansible/roles/iptrunk/tasks/deploy_object.yaml b/geant/gap_ansible/roles/iptrunk/tasks/deploy_object.yaml index 81267508d5bdbe4a899fb570540d58a9162ea8c2..511ef67584edb2e79bfa44ffbc22bcd79cf03535 100644 --- a/geant/gap_ansible/roles/iptrunk/tasks/deploy_object.yaml +++ b/geant/gap_ansible/roles/iptrunk/tasks/deploy_object.yaml @@ -39,7 +39,8 @@ geant.gap_ansible.nokia_netconf_config: format: xml default_operation: merge - content: "{{ lookup('ansible.builtin.template', '{{ local_side.iptrunk_side_node.vendor }}/{{ config_object }}.j2') }}" + content: "{{ lookup('ansible.builtin.file', '{{ play_storage_path }}/{{ config_object }}.conf') }}" + # content: "{{ lookup('ansible.builtin.template', '{{ local_side.iptrunk_side_node.vendor }}/{{ config_object }}.j2') }}" commit: true config_mode: private diff: true @@ -65,7 +66,8 @@ geant.gap_ansible.nokia_netconf_config: format: xml default_operation: merge - content: "{{ lookup('ansible.builtin.template', '{{ local_side.iptrunk_side_node.vendor }}/{{ config_object }}.j2') }}" + content: "{{ lookup('ansible.builtin.file', '{{ play_storage_path }}/{{ config_object }}.conf') }}" + # content: "{{ lookup('ansible.builtin.template', '{{ local_side.iptrunk_side_node.vendor }}/{{ config_object }}.j2') }}" commit: true commit_comment: "{{ commit_comment }}" config_mode: private diff --git a/geant/gap_ansible/roles/iptrunk/tasks/main.yml b/geant/gap_ansible/roles/iptrunk/tasks/main.yml index f3f0860e6251ffd94694bdad8e7e3e81705bdc06..9a35724258e403eab82e45670238a776992b9042 100644 --- a/geant/gap_ansible/roles/iptrunk/tasks/main.yml +++ b/geant/gap_ansible/roles/iptrunk/tasks/main.yml @@ -54,6 +54,9 @@ when: ( local_side.iptrunk_side_node.router_access_via_ts | ansible.builtin.bool ) is true +- name: Include setting the trunk version + ansible.builtin.include_tasks: set_trunk_version.yaml + - name: Include compiling the template ansible.builtin.include_tasks: compile_object.yaml when: (verb in verbs) diff --git a/geant/gap_ansible/roles/iptrunk/tasks/set_trunk_version.yaml b/geant/gap_ansible/roles/iptrunk/tasks/set_trunk_version.yaml new file mode 120000 index 0000000000000000000000000000000000000000..6616a24720dcdcefdb215e75b95655375ba10ccf --- /dev/null +++ b/geant/gap_ansible/roles/iptrunk/tasks/set_trunk_version.yaml @@ -0,0 +1 @@ +../../../tasks/set_trunk_version.yaml \ No newline at end of file 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 156b2bcb6611939e35c9813f9a6a93cbf99f10d3..b864b69b5424a3fb342ab01c4e1525a2727f7a2c 100644 --- a/geant/gap_ansible/roles/iptrunk/templates/juniper/trunk_interface.j2 +++ b/geant/gap_ansible/roles/iptrunk/templates/juniper/trunk_interface.j2 @@ -38,8 +38,13 @@ {% if common.trunk_type != "Dark_fiber" %} bfd-liveness-detection { minimum-interval {{ bfd_min_interval }}; + {% if trunk_version | float < 2.0 %} neighbor {{ remote['loopback'] }}; local-address {{local['loopback']}}; + {% else %} + neighbor {{ (remote.ipv4_address | split('/'))[0] }}; + local-address {{ (local.ipv4_address | split('/'))[0] }}; + {% endif %} } {% endif %} {% if (common.minimum_links | int) > 0 %} 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 f34d21e8f2a9ec9d8cd28cd08a191a156a165285..de0db07a23560722cb23510db5c8dd0f3027cfd2 100644 --- a/geant/gap_ansible/roles/iptrunk/templates/nokia/trunk_interface.j2 +++ b/geant/gap_ansible/roles/iptrunk/templates/nokia/trunk_interface.j2 @@ -4,19 +4,19 @@ {##} {% for trunk in trunks %} {% if inventory_hostname == trunk.config.nodeA.name %} - {% set local= trunk.config.nodeA %} - {% set remote= trunk.config.nodeB %} - {% set common= trunk.config.common %} + {% set local = trunk.config.nodeA %} + {% set remote = trunk.config.nodeB %} + {% set common = trunk.config.common %} {% if removed_ae_members is defined %} - {% set side_removed_ae_members= removed_ae_members[0] %} + {% set side_removed_ae_members = removed_ae_members[0] %} {% endif %} {% endif %} {% if inventory_hostname == trunk.config.nodeB.name %} - {% set local= trunk.config.nodeB %} - {% set remote= trunk.config.nodeA %} - {% set common= trunk.config.common %} + {% set local = trunk.config.nodeB %} + {% set remote = trunk.config.nodeA %} + {% set common = trunk.config.common %} {% if removed_ae_members is defined %} - {% set side_removed_ae_members= removed_ae_members[1] %} + {% set side_removed_ae_members = removed_ae_members[1] %} {% endif %} {% endif %} @@ -50,6 +50,13 @@ </tx-tlvs> </dest-mac> </lldp> + {% if trunk_version | float >= 2.0 %} + <network> + <egress> + <queue-policy>GEANT_BASIC</queue-policy> + </egress> + </network> + {% endif %} </ethernet> </port> {% endfor %} @@ -89,8 +96,14 @@ <multiplier>3</multiplier> <receive-interval>{{ bfd_min_interval }}</receive-interval> <transmit-interval>{{ bfd_min_interval }}</transmit-interval> + {% if trunk_version | float < 2.0 %} <local-ip-address>{{ local['loopback'] }}</local-ip-address> <remote-ip-address>{{ remote['loopback'] }}</remote-ip-address> + {% else %} + <bfd-on-distributing-only>true</bfd-on-distributing-only> + <local-ip-address>{{ (local.ipv4_address | split('/'))[0] }}</local-ip-address> + <remote-ip-address>{{ (remote.ipv4_address | split('/'))[0] }}</remote-ip-address> + {% endif %} </ipv4> </bfd-liveness> {% endif %} @@ -101,7 +114,9 @@ <interface-name>{{ local.ae_name | lower }}.0</interface-name> <admin-state>enable</admin-state> <description>SRV_GLOBAL INFRASTRUCTURE BACKBONE #{{ trunk_direction_name_sorted[0] }}-{{ trunk_direction_name_sorted[1] }}{{ trunk_suffix if trunk_suffix is defined }}-IPTRUNK ${{ trunk.id }} | {{ trunk_direction_name_sorted[0] }}-{{ trunk_direction_name_sorted[1] }} | {{ common.description }}</description> + {% if trunk_version | float < 2.0 %} <ip-mtu>{{ mtu_ip }}</ip-mtu> + {% endif %} <port>{{ local.ae_name | lower }}</port> <ipv4> <icmp> diff --git a/geant/gap_ansible/roles/iptrunk/vars/main.yml b/geant/gap_ansible/roles/iptrunk/vars/main.yml index 109ee8902774ee7998fa09f3bfcdfb77eb91a390..d215e9e94ff9589bcae4839796df82d1954685b9 100644 --- a/geant/gap_ansible/roles/iptrunk/vars/main.yml +++ b/geant/gap_ansible/roles/iptrunk/vars/main.yml @@ -39,6 +39,7 @@ trunks: - id: "{{ wfo_trunk.iptrunk.gs_id }}" config: common: + # trunk_version: "{{ wfo_trunk.iptrunk.iptrunk_config_version }}" description: "{{ wfo_trunk.iptrunk.iptrunk_description }}" speed: "{{ wfo_trunk.iptrunk.iptrunk_speed }}" isis_metric: "{{ wfo_trunk.iptrunk.iptrunk_isis_metric }}"