diff --git a/geant/gap_ansible/roles/bc_templates/routers/nokia/pe_promotion_base_config.j2 b/geant/gap_ansible/roles/bc_templates/routers/nokia/pe_promotion_base_config.j2 new file mode 100644 index 0000000000000000000000000000000000000000..363651932f9b214250456758f08c6269a8130f00 --- /dev/null +++ b/geant/gap_ansible/roles/bc_templates/routers/nokia/pe_promotion_base_config.j2 @@ -0,0 +1,12 @@ +<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"> + {% include 'filter_log.j2' %} + {% include 'ip_prefix_list.j2' %} + {% include 'filters/cpm_filters.j2' %} + {% include 'policy_options/policy_options.j2' %} + {% include 'cflowd.j2' %} + {% include 'system/security/security.j2' %} + {% include 'router/router_base.j2' %} + {% include 'sdp_mesh.j2' %} + </configure> +</config> diff --git a/geant/gap_ansible/roles/bc_templates/routers/nokia/pe_promotion_base_vprn.j2 b/geant/gap_ansible/roles/bc_templates/routers/nokia/pe_promotion_base_vprn.j2 new file mode 100644 index 0000000000000000000000000000000000000000..f8467b331828c1df32a19da5ba3d008a6a4126a1 --- /dev/null +++ b/geant/gap_ansible/roles/bc_templates/routers/nokia/pe_promotion_base_vprn.j2 @@ -0,0 +1,5 @@ +<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"> + {% include 'service_vprn.j2' %} + </configure> +</config> diff --git a/geant/gap_ansible/roles/bc_templates/routers/nokia/pe_update_sdp.j2 b/geant/gap_ansible/roles/bc_templates/routers/nokia/pe_update_sdp.j2 new file mode 100644 index 0000000000000000000000000000000000000000..5ffc1bde7a724b448f845b747718a4c5bdcb13ba --- /dev/null +++ b/geant/gap_ansible/roles/bc_templates/routers/nokia/pe_update_sdp.j2 @@ -0,0 +1,5 @@ +<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"> + {% include 'sdp_mesh.j2' %} + </configure> +</config> diff --git a/geant/gap_ansible/roles/bc_templates/routers/nokia/router/base_static_routes.j2 b/geant/gap_ansible/roles/bc_templates/routers/nokia/router/base_static_routes.j2 index 3fc1919ea6b5275211dda574a0b7eb4bb73d8cb8..d7d5ff5e2fff092bef5fa09f3a4d5435c7eae225 100644 --- a/geant/gap_ansible/roles/bc_templates/routers/nokia/router/base_static_routes.j2 +++ b/geant/gap_ansible/roles/bc_templates/routers/nokia/router/base_static_routes.j2 @@ -1,4 +1,4 @@ - {% if router_role == 'pe' %} + {% if router_role == 'pe' or is_pe_promotion_wf %} {% with static_routes_obj=nokia_pe_static_routes %} {% include 'router/static_routes.j2' %} {% endwith %} diff --git a/geant/gap_ansible/roles/bc_templates/routers/nokia/router/bgp.j2 b/geant/gap_ansible/roles/bc_templates/routers/nokia/router/bgp.j2 index cf0811e51d32cda103612fe9a97aac280b29c7f4..f45754dcb21f50975bda15ee8da9e3237e9a1b57 100644 --- a/geant/gap_ansible/roles/bc_templates/routers/nokia/router/bgp.j2 +++ b/geant/gap_ansible/roles/bc_templates/routers/nokia/router/bgp.j2 @@ -1,5 +1,5 @@ <bgp 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"> -{% if router_role == 'pe' %} +{% if router_role == 'pe' or is_pe_promotion_wf %} {% with bgp_base_obj=pe_bgp_base, bgp_context='bgp_base' %} {% include 'router/bgp_base.j2' %} {% endwith %} diff --git a/geant/gap_ansible/roles/bc_templates/routers/nokia/router/router_base.j2 b/geant/gap_ansible/roles/bc_templates/routers/nokia/router/router_base.j2 index 9d3c86932a1769be1dcb609deef12e91866c8291..f067095971fa33c79b5fdd9704909cecb06db937 100644 --- a/geant/gap_ansible/roles/bc_templates/routers/nokia/router/router_base.j2 +++ b/geant/gap_ansible/roles/bc_templates/routers/nokia/router/router_base.j2 @@ -1,7 +1,7 @@ <router 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"> <router-name>Base</router-name> <autonomous-system xmlns="urn:nokia.com:sros:ns:yang:sr:conf" xmlns:nokia-attr="urn:nokia.com:sros:ns:yang:sr:attributes" alu:operation="replace">{{ geant_re_as_number }}</autonomous-system> - {% if router_role == 'pe' and pe_bgp_base.ecmp is defined %} + {% if (router_role == 'pe' or is_pe_promotion_wf) and pe_bgp_base.ecmp is defined %} <ecmp>{{ pe_bgp_base.ecmp }}</ecmp> {% endif %} <router-id xmlns="urn:nokia.com:sros:ns:yang:sr:conf" xmlns:nokia-attr="urn:nokia.com:sros:ns:yang:sr:attributes" alu:operation="replace">{{ lo_ipv4_address }}</router-id> diff --git a/geant/gap_ansible/roles/bc_templates/routers/nokia/service_vprn.j2 b/geant/gap_ansible/roles/bc_templates/routers/nokia/service_vprn.j2 index 4d8a57d9b55922e0098b0e67e37a81b3d0aeec54..b588b730f0ec2ae552edd44345b70f9b2800fd42 100644 --- a/geant/gap_ansible/roles/bc_templates/routers/nokia/service_vprn.j2 +++ b/geant/gap_ansible/roles/bc_templates/routers/nokia/service_vprn.j2 @@ -8,5 +8,7 @@ </md-auto-id> {% include 'router/vprn.j2' %} </service> - {#{% include 'ip_prefix_list.j2' %}#} +{% if is_pe_promotion_wf %} + {% include 'ip_prefix_list.j2' %} +{% endif %} diff --git a/geant/gap_ansible/roles/promote_p_to_pe/tasks/compile.yaml b/geant/gap_ansible/roles/promote_p_to_pe/tasks/compile.yaml index 6208e177c9238a753ba6dd6c08b0d2b5075ec7dd..46a463d115d53af2bf99cbddf6acb4eb5eb019fb 100644 --- a/geant/gap_ansible/roles/promote_p_to_pe/tasks/compile.yaml +++ b/geant/gap_ansible/roles/promote_p_to_pe/tasks/compile.yaml @@ -15,21 +15,21 @@ mode: '0755' delegate_to: localhost -- name: Print the template in "/var/tmp/ansible_run_{{ opid }}/pe_base_config.conf" +- name: Print the template in "/var/tmp/ansible_run_{{ opid }}/pe_promotion_base_config.conf" when: verb == "deploy_pe_base_config" ansible.builtin.template: - src: "routers/{{ subscription.router.vendor }}/pe_base_config.j2" - dest: "/var/tmp/ansible_run_{{ opid }}/pe_base_config.conf" + src: "routers/{{ subscription.router.vendor }}/pe_promotion_base_config.j2" + dest: "/var/tmp/ansible_run_{{ opid }}/pe_promotion_base_config.conf" lstrip_blocks: true trim_blocks: true mode: '0755' delegate_to: localhost -- name: Print the template in "/var/tmp/ansible_run_{{ opid }}/pe_base_vprn.conf" +- name: Print the template in "/var/tmp/ansible_run_{{ opid }}/pe_promotion_base_vprn.conf" when: verb == "deploy_routing_instances" ansible.builtin.template: - src: "routers/{{ subscription.router.vendor }}/pe_base_vprn.j2" - dest: "/var/tmp/ansible_run_{{ opid }}/pe_base_vprn.conf" + src: "routers/{{ subscription.router.vendor }}/pe_promotion_base_vprn.j2" + dest: "/var/tmp/ansible_run_{{ opid }}/pe_promotion_base_vprn.conf" lstrip_blocks: true trim_blocks: true mode: '0755' diff --git a/geant/gap_ansible/roles/promote_p_to_pe/tasks/deploy.yaml b/geant/gap_ansible/roles/promote_p_to_pe/tasks/deploy.yaml index dbae83ee229ad12d4e0d68f717ccaa92aa391079..1533f1345a1369af906e3380d9cfa7caf811186d 100644 --- a/geant/gap_ansible/roles/promote_p_to_pe/tasks/deploy.yaml +++ b/geant/gap_ansible/roles/promote_p_to_pe/tasks/deploy.yaml @@ -5,7 +5,7 @@ geant.gap_ansible.nokia_netconf_config: format: xml default_operation: merge - content: "{{ lookup('ansible.builtin.template', 'routers/{{ subscription.router.vendor }}/pe_base_config.j2') }}" + content: "{{ lookup('ansible.builtin.template', 'routers/{{ subscription.router.vendor }}/pe_promotion_base_config.j2') }}" commit: true validate: true diff: true @@ -19,7 +19,7 @@ geant.gap_ansible.nokia_netconf_config: format: xml default_operation: merge - content: "{{ lookup('ansible.builtin.template', 'routers/{{ subscription.router.vendor }}/pe_base_vprn.j2') }}" + content: "{{ lookup('ansible.builtin.template', 'routers/{{ subscription.router.vendor }}/pe_promotion_base_vprn.j2') }}" commit: true validate: true diff: true @@ -69,7 +69,7 @@ geant.gap_ansible.nokia_netconf_config: format: xml default_operation: merge - content: "{{ lookup('ansible.builtin.template', 'routers/{{ subscription.router.vendor }}/pe_base_config.j2') }}" + content: "{{ lookup('ansible.builtin.template', 'routers/{{ subscription.router.vendor }}/pe_promotion_base_config.j2') }}" commit: true commit_comment: "{{ commit_comment }}" diff: true @@ -82,7 +82,7 @@ geant.gap_ansible.nokia_netconf_config: format: xml default_operation: merge - content: "{{ lookup('ansible.builtin.template', 'routers/{{ subscription.router.vendor }}/pe_base_vprn.j2') }}" + content: "{{ lookup('ansible.builtin.template', 'routers/{{ subscription.router.vendor }}/pe_promotion_base_vprn.j2') }}" commit: true commit_comment: "{{ commit_comment }}" diff: true