Skip to content
Snippets Groups Projects
Commit ed2f5e99 authored by Aleksandr Kurbatov's avatar Aleksandr Kurbatov
Browse files

pe_promotion - related changes

in templates names, etc
parent 79eef4f1
Branches
Tags
1 merge request!169`promote_p_to_pe` role points to the common `bc_templates` folder
Showing with 38 additions and 14 deletions
<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>
<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>
<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>
{% if router_role == 'pe' %} {% if router_role == 'pe' or is_pe_promotion_wf %}
{% with static_routes_obj=nokia_pe_static_routes %} {% with static_routes_obj=nokia_pe_static_routes %}
{% include 'router/static_routes.j2' %} {% include 'router/static_routes.j2' %}
{% endwith %} {% endwith %}
......
<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"> <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' %} {% with bgp_base_obj=pe_bgp_base, bgp_context='bgp_base' %}
{% include 'router/bgp_base.j2' %} {% include 'router/bgp_base.j2' %}
{% endwith %} {% endwith %}
......
<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 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> <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> <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> <ecmp>{{ pe_bgp_base.ecmp }}</ecmp>
{% endif %} {% 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> <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>
......
...@@ -8,5 +8,7 @@ ...@@ -8,5 +8,7 @@
</md-auto-id> </md-auto-id>
{% include 'router/vprn.j2' %} {% include 'router/vprn.j2' %}
</service> </service>
{#{% include 'ip_prefix_list.j2' %}#} {% if is_pe_promotion_wf %}
{% include 'ip_prefix_list.j2' %}
{% endif %}
...@@ -15,21 +15,21 @@ ...@@ -15,21 +15,21 @@
mode: '0755' mode: '0755'
delegate_to: localhost 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" when: verb == "deploy_pe_base_config"
ansible.builtin.template: ansible.builtin.template:
src: "routers/{{ subscription.router.vendor }}/pe_base_config.j2" src: "routers/{{ subscription.router.vendor }}/pe_promotion_base_config.j2"
dest: "/var/tmp/ansible_run_{{ opid }}/pe_base_config.conf" dest: "/var/tmp/ansible_run_{{ opid }}/pe_promotion_base_config.conf"
lstrip_blocks: true lstrip_blocks: true
trim_blocks: true trim_blocks: true
mode: '0755' mode: '0755'
delegate_to: localhost 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" when: verb == "deploy_routing_instances"
ansible.builtin.template: ansible.builtin.template:
src: "routers/{{ subscription.router.vendor }}/pe_base_vprn.j2" src: "routers/{{ subscription.router.vendor }}/pe_promotion_base_vprn.j2"
dest: "/var/tmp/ansible_run_{{ opid }}/pe_base_vprn.conf" dest: "/var/tmp/ansible_run_{{ opid }}/pe_promotion_base_vprn.conf"
lstrip_blocks: true lstrip_blocks: true
trim_blocks: true trim_blocks: true
mode: '0755' mode: '0755'
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
geant.gap_ansible.nokia_netconf_config: geant.gap_ansible.nokia_netconf_config:
format: xml format: xml
default_operation: merge 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: true
validate: true validate: true
diff: true diff: true
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
geant.gap_ansible.nokia_netconf_config: geant.gap_ansible.nokia_netconf_config:
format: xml format: xml
default_operation: merge 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: true
validate: true validate: true
diff: true diff: true
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
geant.gap_ansible.nokia_netconf_config: geant.gap_ansible.nokia_netconf_config:
format: xml format: xml
default_operation: merge 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: true
commit_comment: "{{ commit_comment }}" commit_comment: "{{ commit_comment }}"
diff: true diff: true
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
geant.gap_ansible.nokia_netconf_config: geant.gap_ansible.nokia_netconf_config:
format: xml format: xml
default_operation: merge 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: true
commit_comment: "{{ commit_comment }}" commit_comment: "{{ commit_comment }}"
diff: true diff: true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment