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

`fw_filters`: remove loading `STANDARD_EDGE` as it was moved into base-config

parent 04fa3e05
No related branches found
No related tags found
1 merge request!292`fw_filters`: remove loading `STANDARD_EDGE` as it was moved into base-config
Pipeline #95432 passed
--- ---
# Prepare FW vars depending on the "service_type" and "custom_filters" # Prepare FW vars depending on the "service_type" and "custom_filters"
- name: Prepare FW vars for NREN L3 Core Service with custom filters # NOTE: STANDARD_EDGE_FW has been moved to base-config
#
- name: Prepare FW vars for NREN L3 Core Service with custom filters in GEANT_GLOBAL
when: true when: true
# when: >-
# subscription.product.product_type == "L3CoreService"
# and
# subscription.product.product_type | upper in l3_service_types.ies or subscription.product.product_type | upper in l3_service_types.vprn
# and
# ap.sbp.custom_firewall_filters | ansible.builtin.bool
block: block:
- name: Merge NREN custom filters if selected - name: Merge NREN custom filters if selected
when: > when: >
...@@ -15,17 +11,9 @@ ...@@ -15,17 +11,9 @@
and and
inv_product_types[gso_product_type].service_placement == 'ies' inv_product_types[gso_product_type].service_placement == 'ies'
ansible.builtin.set_fact: ansible.builtin.set_fact:
custom_edge_fw: "{{ [STANDARD_NREN_FW__to_merge, CUSTOM_NREN_FW] | community.general.lists_mergeby('name', gen_filters: "{{ [STANDARD_NREN_FW__to_merge, CUSTOM_NREN_FW] | community.general.lists_mergeby('name',
recursive=true, list_merge='append') }}" recursive=true, list_merge='append') }}"
- name: Combine Custom and standard EDGE filters
when: >
ap.sbp.custom_firewall_filters | ansible.builtin.bool
and
inv_product_types[gso_product_type].service_placement == 'ies'
ansible.builtin.set_fact:
gen_filters: "{{ [STANDARD_EDGE_FW__to_merge, custom_edge_fw] | community.general.lists_mergeby('name') }}"
- name: Prepare FW vars for NREN L3 Core Service with custom filters in VRRN - name: Prepare FW vars for NREN L3 Core Service with custom filters in VRRN
when: true when: true
block: block:
...@@ -35,7 +23,7 @@ ...@@ -35,7 +23,7 @@
and and
inv_product_types[gso_product_type].service_placement == 'vprn' inv_product_types[gso_product_type].service_placement == 'vprn'
ansible.builtin.set_fact: ansible.builtin.set_fact:
standard_nren_fw: "STANDARD_{{ subscription.product.product_type | upper }}_NREN_FW__to_merge" standard_nren_fw: "STANDARD_{{ gso_product_type }}_NREN_FW__to_merge"
- name: Load Standard NREN FW - name: Load Standard NREN FW
when: > when: >
...@@ -52,20 +40,9 @@ ...@@ -52,20 +40,9 @@
and and
inv_product_types[gso_product_type].service_placement == 'vprn' inv_product_types[gso_product_type].service_placement == 'vprn'
ansible.builtin.set_fact: ansible.builtin.set_fact:
custom_edge_fw: "{{ [CUSTOM_NREN_FW, standard_nren_fw] | community.general.lists_mergeby('name', gen_filters: "{{ [CUSTOM_NREN_FW, standard_nren_fw] | community.general.lists_mergeby('name',
recursive=true, list_merge='append') }}" recursive=true, list_merge='append') }}"
# - name: Print custom FW
# ansible.builtin.debug:
# var: custom_edge_fw
- name: Combine Custom and standard EDGE filters
when: >
ap.sbp.custom_firewall_filters | ansible.builtin.bool
and
inv_product_types[gso_product_type].service_placement == 'vprn'
ansible.builtin.set_fact:
gen_filters: "{{ [STANDARD_EDGE_FW__to_merge, custom_edge_fw] | community.general.lists_mergeby('name') }}"
- name: Prepare FW vars for NREN L3 Core Service with standard filters - name: Prepare FW vars for NREN L3 Core Service with standard filters
when: > when: >
......
--- ---
# Prepare FW vars depending on the "service_type" and "custom_filters" # Prepare FW vars depending on the "service_type" and "custom_filters"
- name: Prepare FW vars for RandE Peer with custom filters # NOTE: STANDARD_EDGE_FW has been moved to base-config
#
- name: Prepare FW vars for RandE Peer with custom filters in GEANT_GLOBAL
when: true when: true
# when: >-
# subscription.product.product_type == "L3CoreService"
# and
# subscription.product.product_type | upper in l3_service_types.ies or subscription.product.product_type | upper in l3_service_types.vprn
# and
# ap.sbp.custom_firewall_filters | ansible.builtin.bool
block: block:
- name: Merge RandE custom filters if selected - name: Merge RandE custom filters if selected
when: > when: >
...@@ -15,16 +11,9 @@ ...@@ -15,16 +11,9 @@
and and
inv_product_types[gso_product_type].service_placement == 'ies' inv_product_types[gso_product_type].service_placement == 'ies'
ansible.builtin.set_fact: ansible.builtin.set_fact:
custom_edge_fw: "{{ [STANDARD_RANDEPEER_FW__to_merge, CUSTOM_RANDE_FW] | community.general.lists_mergeby('name', gen_filters: "{{ [STANDARD_RANDEPEER_FW__to_merge, CUSTOM_RANDE_FW] | community.general.lists_mergeby('name',
recursive=true, list_merge='append') }}" recursive=true, list_merge='append') }}"
- name: Combine Custom and standard EDGE filters
when: >
ap.sbp.custom_firewall_filters | ansible.builtin.bool
and
inv_product_types[gso_product_type].service_placement == 'ies'
ansible.builtin.set_fact:
gen_filters: "{{ [STANDARD_EDGE_FW__to_merge, custom_edge_fw] | community.general.lists_mergeby('name') }}"
- name: Prepare FW vars for RandE Peer with custom filters in VRRN - name: Prepare FW vars for RandE Peer with custom filters in VRRN
when: true when: true
...@@ -47,24 +36,15 @@ ...@@ -47,24 +36,15 @@
- name: Merge RandE custom filters if selected - name: Merge RandE custom filters if selected
# TODO: Check custom FW var name
when: > when: >
ap.sbp.custom_firewall_filters | ansible.builtin.bool ap.sbp.custom_firewall_filters | ansible.builtin.bool
and and
inv_product_types[gso_product_type].service_placement == 'vprn' inv_product_types[gso_product_type].service_placement == 'vprn'
ansible.builtin.set_fact: ansible.builtin.set_fact:
custom_edge_fw: "{{ [CUSTOM_RANDE_FW, standard_rande_fw] | community.general.lists_mergeby('name', gen_filters: "{{ [CUSTOM_RANDE_FW, standard_rande_fw] | community.general.lists_mergeby('name',
recursive=true, list_merge='append') }}" recursive=true, list_merge='append') }}"
- name: Combine Custom and standard EDGE filters
when: >
ap.sbp.custom_firewall_filters | ansible.builtin.bool
and
inv_product_types[gso_product_type].service_placement == 'vprn'
ansible.builtin.set_fact:
gen_filters: "{{ [standard_rande_fw, custom_edge_fw] | community.general.lists_mergeby('name') }}"
- name: Prepare FW vars for RandE Peer with standard filters - name: Prepare FW vars for RandE Peer with standard filters
when: > when: >
not ap.sbp.custom_firewall_filters | ansible.builtin.bool not ap.sbp.custom_firewall_filters | ansible.builtin.bool
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment