diff options
author | Ansible Core Team <info@ansible.com> | 2020-03-09 09:40:35 +0000 |
---|---|---|
committer | Matt Martz <matt@sivel.net> | 2020-03-23 11:14:21 -0500 |
commit | 3149db08698887fe4581d1fe52a01eed314d2b29 (patch) | |
tree | 71f94fa4ed330319cf9152971d49841d8aeb9b4c /test/integration/targets/nxos_bgp_af | |
parent | ae8fb5e371f4ced37237176bc28a6a5c998f319d (diff) | |
download | ansible-3149db08698887fe4581d1fe52a01eed314d2b29.tar.gz |
Migrated to cisco.nxos
Diffstat (limited to 'test/integration/targets/nxos_bgp_af')
6 files changed, 0 insertions, 384 deletions
diff --git a/test/integration/targets/nxos_bgp_af/defaults/main.yaml b/test/integration/targets/nxos_bgp_af/defaults/main.yaml deleted file mode 100644 index 525b7aab90..0000000000 --- a/test/integration/targets/nxos_bgp_af/defaults/main.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -testcase: "*" -vrfs: - - default - - myvrf diff --git a/test/integration/targets/nxos_bgp_af/meta/main.yml b/test/integration/targets/nxos_bgp_af/meta/main.yml deleted file mode 100644 index ae741cbdc7..0000000000 --- a/test/integration/targets/nxos_bgp_af/meta/main.yml +++ /dev/null @@ -1,2 +0,0 @@ -dependencies: - - prepare_nxos_tests diff --git a/test/integration/targets/nxos_bgp_af/tasks/cli.yaml b/test/integration/targets/nxos_bgp_af/tasks/cli.yaml deleted file mode 100644 index 9b62eaba65..0000000000 --- a/test/integration/targets/nxos_bgp_af/tasks/cli.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -- name: collect common test cases - find: - paths: "{{ role_path }}/tests/common" - patterns: "{{ testcase }}.yaml" - connection: local - register: test_cases - -- name: collect cli test cases - find: - paths: "{{ role_path }}/tests/cli" - patterns: "{{ testcase }}.yaml" - connection: local - register: cli_cases - -- set_fact: - test_cases: - files: "{{ test_cases.files }} + {{ cli_cases.files }}" - -- name: set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" - -- name: run test cases (connection=network_cli) - include: "{{ test_case_to_run }} ansible_connection=network_cli connection={{ cli }}" - with_items: "{{ test_items }}" - loop_control: - loop_var: test_case_to_run diff --git a/test/integration/targets/nxos_bgp_af/tasks/main.yaml b/test/integration/targets/nxos_bgp_af/tasks/main.yaml deleted file mode 100644 index 4b0f8c64d9..0000000000 --- a/test/integration/targets/nxos_bgp_af/tasks/main.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -- { include: cli.yaml, tags: ['cli'] } -- { include: nxapi.yaml, tags: ['nxapi'] } diff --git a/test/integration/targets/nxos_bgp_af/tasks/nxapi.yaml b/test/integration/targets/nxos_bgp_af/tasks/nxapi.yaml deleted file mode 100644 index cbf41b9294..0000000000 --- a/test/integration/targets/nxos_bgp_af/tasks/nxapi.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -- name: collect common test cases - find: - paths: "{{ role_path }}/tests/common" - patterns: "{{ testcase }}.yaml" - connection: local - register: test_cases - -- name: collect nxapi test cases - find: - paths: "{{ role_path }}/tests/nxapi" - patterns: "{{ testcase }}.yaml" - connection: local - register: nxapi_cases - -- set_fact: - test_cases: - files: "{{ test_cases.files }} + {{ nxapi_cases.files }}" - -- name: set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" - -- name: run test cases (connection=httpapi) - include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}" - with_items: "{{ test_items }}" - loop_control: - loop_var: test_case_to_run diff --git a/test/integration/targets/nxos_bgp_af/tests/common/sanity.yaml b/test/integration/targets/nxos_bgp_af/tests/common/sanity.yaml deleted file mode 100644 index 00af4422e5..0000000000 --- a/test/integration/targets/nxos_bgp_af/tests/common/sanity.yaml +++ /dev/null @@ -1,320 +0,0 @@ ---- -- debug: msg="START connection={{ ansible_connection }} nxos_bgp_af sanity test" - -- set_fact: advertise_l2vpn_evpn="true" - when: platform is search('N9K') - -- name: "Enable feature BGP" - nxos_feature: - feature: bgp - state: enabled - ignore_errors: yes - -- name: "Enable feature nv overlay" - nxos_feature: - feature: nv overlay - state: enabled - ignore_errors: yes - -- name: "Setup" - nxos_bgp: &remove - asn: 65535 - state: absent - ignore_errors: yes - -- block: - - name: "Enable nv overlay evpn" - nxos_config: - lines: - - nv overlay evpn - when: platform is search('N9K') - - - name: "Configure BGP_AF 1" - nxos_bgp_af: &configure1 - asn: 65535 - vrf: testing - afi: ipv4 - safi: unicast - advertise_l2vpn_evpn: "{{advertise_l2vpn_evpn|default(omit)}}" - state: present - register: result - - - assert: &true - that: - - "result.changed == true" - - - name: "Check Idempotence" - nxos_bgp_af: *configure1 - register: result - - - assert: &false - that: - - "result.changed == false" - - - name: "Remove BGP" - nxos_bgp_af: &remove_af - asn: 65535 - vrf: testing - afi: ipv4 - safi: unicast - state: absent - register: result - - - assert: *true - - - name: "Configure BGP_AF 2" - nxos_bgp_af: &configure2 - asn: 65535 - vrf: "{{ item }}" - afi: ipv4 - safi: unicast - dampening_state: True - additional_paths_install: true - additional_paths_receive: true - additional_paths_selection: RouteMap - additional_paths_send: true - client_to_client: False - default_information_originate: true - state: present - with_items: "{{ vrfs }}" - register: result - - - assert: *true - - - name: "Check Idempotence" - nxos_bgp_af: *configure2 - with_items: "{{ vrfs }}" - register: result - - - assert: *false - - - name: "Configure BGP_AF def2" - nxos_bgp_af: &configuredef2 - asn: 65535 - vrf: "{{ item }}" - afi: ipv4 - safi: unicast - dampening_state: False - additional_paths_install: False - additional_paths_receive: False - additional_paths_selection: default - additional_paths_send: False - client_to_client: True - default_information_originate: False - state: present - with_items: "{{ vrfs }}" - register: result - - - assert: *true - - - name: "Check Idempotence" - nxos_bgp_af: *configuredef2 - with_items: "{{ vrfs }}" - register: result - - - assert: *false - - - name: "Remove BGP" - nxos_bgp_af: &remove_af_vrf - asn: 65535 - vrf: "{{ item }}" - afi: ipv4 - safi: unicast - state: absent - with_items: "{{ vrfs }}" - register: result - - - assert: *true - - - name: "Configure BGP_AF 3" - nxos_bgp_af: &configure3 - asn: 65535 - vrf: "{{ item }}" - afi: ipv4 - safi: unicast - dampening_routemap: 'abcd' - default_metric: 50 - distance_ebgp: 30 - distance_ibgp: 60 - distance_local: 90 - maximum_paths: 9 - maximum_paths_ibgp: 9 - next_hop_route_map: RouteMap - suppress_inactive: true - table_map: RouteMap - table_map_filter: true - state: present - with_items: "{{ vrfs }}" - register: result - - - assert: *true - - - name: "Check Idempotence" - nxos_bgp_af: *configure3 - with_items: "{{ vrfs }}" - register: result - - - assert: *false - - - name: "Configure BGP_AF def3" - nxos_bgp_af: &configuredef3 - asn: 65535 - vrf: "{{ item }}" - afi: ipv4 - safi: unicast - dampening_routemap: default - default_metric: default - distance_ebgp: default - distance_ibgp: default - distance_local: default - maximum_paths: default - maximum_paths_ibgp: default - next_hop_route_map: default - suppress_inactive: False - table_map: default - table_map_filter: False - state: present - with_items: "{{ vrfs }}" - register: result - - - assert: *true - - - name: "Check Idempotence" - nxos_bgp_af: *configuredef3 - with_items: "{{ vrfs }}" - register: result - - - assert: *false - - - name: "Remove BGP" - nxos_bgp_af: *remove_af_vrf - with_items: "{{ vrfs }}" - register: result - - - assert: *true - - - name: "Configure BGP_AF 4" - nxos_bgp_af: &configure4 - asn: 65535 - vrf: "{{ item }}" - afi: ipv4 - safi: unicast - dampen_igp_metric: 200 - dampening_half_time: 1 - dampening_max_suppress_time: 4 - dampening_reuse_time: 2 - dampening_suppress_time: 3 - inject_map: [['lax_inject_map', 'lax_exist_map'], ['nyc_inject_map', 'nyc_exist_map', 'copy-attributes'], ['fsd_inject_map', 'fsd_exist_map']] - networks: [['10.0.0.0/16', 'routemap_LA'], ['192.168.1.1/32', 'Chicago'], ['192.168.2.0/24'], ['192.168.3.0/24', 'routemap_NYC']] - redistribute: [['direct', 'rm_direct'], ['lisp', 'rm_lisp']] - state: present - with_items: "{{ vrfs }}" - register: result - - - assert: *true - - - name: "Check Idempotence" - nxos_bgp_af: *configure4 - with_items: "{{ vrfs }}" - register: result - - - assert: *false - - - name: "Configure BGP_AF 5" - nxos_bgp_af: &configure5 - asn: 65535 - vrf: "{{ item }}" - afi: ipv4 - safi: unicast - dampen_igp_metric: 300 - dampening_half_time: 10 - dampening_max_suppress_time: 40 - dampening_reuse_time: 20 - dampening_suppress_time: 30 - inject_map: [['fsd_inject_map', 'fsd_exist_map']] - networks: [['192.168.2.0/24']] - redistribute: [['lisp', 'rm_lisp']] - state: present - with_items: "{{ vrfs }}" - register: result - - - assert: *true - - - name: "Check Idempotence" - nxos_bgp_af: *configure5 - with_items: "{{ vrfs }}" - register: result - - - assert: *false - - - name: "Configure BGP_AF def5" - nxos_bgp_af: &configuredef5 - asn: 65535 - vrf: "{{ item }}" - afi: ipv4 - safi: unicast - dampen_igp_metric: default - dampening_half_time: default - dampening_max_suppress_time: default - dampening_reuse_time: default - dampening_suppress_time: default - inject_map: default - networks: default - redistribute: default - state: present - with_items: "{{ vrfs }}" - register: result - - - assert: *true - - - name: "Check Idempotence" - nxos_bgp_af: *configuredef5 - with_items: "{{ vrfs }}" - register: result - - - assert: *false - - - name: "Remove BGP" - nxos_bgp_af: *remove_af_vrf - with_items: "{{ vrfs }}" - register: result - - - assert: *true - - - name: "Check Idempotence" - nxos_bgp_af: *remove_af_vrf - with_items: "{{ vrfs }}" - register: result - - - assert: *false - - rescue: - - name: "Cleanup BGP" - nxos_bgp: *remove - ignore_errors: yes - - always: - - name: "Disable feature bgp" - nxos_feature: &disable_bgp - feature: bgp - state: disabled - - - name: "Disable feature nv overlay" - nxos_feature: &disable_nvoverlay - feature: nv overlay - state: disabled - ignore_errors: yes - - # Some platforms will timeout if the - # 'no nv overlay evpn' command is sent - # too quickly following bgp disablement. - - pause: - seconds: 5 - - - name: "Remove nv overlay evpn" - nxos_config: - lines: - - no nv overlay evpn - when: platform is search('N9K') - - - debug: msg="END connection={{ ansible_connection }} nxos_bgp_af sanity test" |