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

Changes to the Juniper-related edge_port creation

parent d3a87cad
Branches
Tags
1 merge request!264Feature/nat 1146 edge port junos
Pipeline #93850 passed
......@@ -2,6 +2,8 @@
- name: Perform "{{ verb }}" Edge port on "{{ inventory_hostname }}" [CHECK ONLY][NOKIA]
when: >-
dry_run | ansible.builtin.bool
and
router.vendor == "nokia"
geant.gap_ansible.nokia_netconf_config:
format: xml
default_operation: merge
......@@ -13,6 +15,18 @@
register: output
check_mode: true
- name: Config deploy [CHECK ONLY][JUNIPER]
when: >
dry_run | ansible.builtin.bool
and
router.vendor == "juniper"
junipernetworks.junos.junos_config:
update: 'replace'
src: "{{ play_storage_path }}/edge_port_{{ verb }}.conf"
src_format: set
check_commit: true
diff: true
register: output
- name: Fail if there is any diff
ansible.builtin.fail:
......@@ -26,6 +40,8 @@
- name: Perform "{{ verb }}" Edge port on "{{ inventory_hostname }}" [FOR REAL][NOKIA]
when: >-
not (dry_run | ansible.builtin.bool)
and
router.vendor == "nokia"
geant.gap_ansible.nokia_netconf_config:
format: xml
default_operation: merge
......@@ -36,3 +52,16 @@
diff: true
register: output
check_mode: false
- name: Config deploy [AND COMMIT][JUNIPER]
when: >
not dry_run | ansible.builtin.bool
and
router.vendor == "juniper"
junipernetworks.junos.junos_config:
update: 'replace'
src: "{{ play_storage_path }}/edge_port_{{ verb }}.conf"
src_format: set
comment: "{{ commit_comment }}"
diff: true
......@@ -16,12 +16,10 @@
- name: Include deploy tasks
when: >
verb in verbs
and
router.vendor == 'nokia'
ansible.builtin.include_tasks: deploy.yaml
- name: Skip all for Juniper
when: >
router.vendor == 'juniper'
ansible.builtin.debug:
msg: "Juniper tasks skipped"
# - name: Skip all for Juniper
# when: >
# router.vendor == 'juniper'
# ansible.builtin.debug:
# msg: "Juniper tasks skipped"
......@@ -3,7 +3,7 @@
{% for member in ep.edge_port_ae_members %}
set interfaces {{ member.interface_name }} description "PHY CUSTOMER {{ partner_name }} P_{{ ep.edge_port_name }}{{ ' | '+member.interface_description if member.interface_description is string }}
set interfaces {{ member.interface_name }} description "PHY CUSTOMER {{ partner_name }} P_{{ ep.edge_port_name }}{{ ' | '+member.interface_description if member.interface_description is string }}"
set interfaces {{ member.interface_name }} gigether-options 802.3ad {{ ep.edge_port_name }}
{% endfor %}
{% if removed_ae_members is defined and removed_ae_members|length > 0 %}
......@@ -12,12 +12,12 @@ deactivate {{ member.interface_name }}
{% endfor %}
{% endif %}
set interfaces {{ ep.edge_port_name }} 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 }}
set interfaces {{ ep.edge_port_name }} {% 'flexible-vlan-tagging' if ep.encapsulation == 'qinq' else 'vlan-tagging' %}
set interfaces {{ ep.edge_port_name }} 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 }}"
set interfaces {{ ep.edge_port_name }} {{ 'flexible-vlan-tagging' if ep.encapsulation == 'qinq' else 'vlan-tagging' }}
set interfaces {{ ep.edge_port_name }} mtu 9192
set interfaces {{ ep.edge_port_name }} encapsulation flexible-ethernet-services
set interfaces {{ ep.edge_port_name }} aggregated-ether-options minimum-links {{ ep.minimum-links }}
set interfaces {{ ep.edge_port_name }} aggregated-ether-options link-speed {{ ep.edge_port_ae_members[0].memeber_speed }}
{% if enable_lacp %}
set interfaces {{ ep.edge_port_name }} aggregated-ether-options minimum-links {{ ep.minimum_links }}
set interfaces {{ ep.edge_port_name }} aggregated-ether-options link-speed {{ ep.member_speed | lower }}
{% if ep.enable_lacp %}
set interfaces {{ ep.edge_port_name }} aggregated-ether-options lacp active
{% endif %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment