diff options
Diffstat (limited to 'test/integration/targets/nxos_bgp')
11 files changed, 0 insertions, 816 deletions
diff --git a/test/integration/targets/nxos_bgp/defaults/main.yaml b/test/integration/targets/nxos_bgp/defaults/main.yaml deleted file mode 100644 index 525b7aab90..0000000000 --- a/test/integration/targets/nxos_bgp/defaults/main.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -testcase: "*" -vrfs: - - default - - myvrf diff --git a/test/integration/targets/nxos_bgp/meta/main.yml b/test/integration/targets/nxos_bgp/meta/main.yml deleted file mode 100644 index ae741cbdc7..0000000000 --- a/test/integration/targets/nxos_bgp/meta/main.yml +++ /dev/null @@ -1,2 +0,0 @@ -dependencies: - - prepare_nxos_tests diff --git a/test/integration/targets/nxos_bgp/tasks/cli.yaml b/test/integration/targets/nxos_bgp/tasks/cli.yaml deleted file mode 100644 index 9b62eaba65..0000000000 --- a/test/integration/targets/nxos_bgp/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/tasks/main.yaml b/test/integration/targets/nxos_bgp/tasks/main.yaml deleted file mode 100644 index 4b0f8c64d9..0000000000 --- a/test/integration/targets/nxos_bgp/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/tasks/nxapi.yaml b/test/integration/targets/nxos_bgp/tasks/nxapi.yaml deleted file mode 100644 index cbf41b9294..0000000000 --- a/test/integration/targets/nxos_bgp/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/tests/common/dis_policy.yaml b/test/integration/targets/nxos_bgp/tests/common/dis_policy.yaml deleted file mode 100644 index dfb1864697..0000000000 --- a/test/integration/targets/nxos_bgp/tests/common/dis_policy.yaml +++ /dev/null @@ -1,77 +0,0 @@ ---- -- debug: msg="START connection={{ ansible_connection }} nxos_bgp parameter test" - -- debug: msg="This bgp_disable_policy is not supported on {{ image_version }}" - when: imagetag is search("A8|D1") -- set_fact: bgp_disable_policy="false" -- set_fact: bgp_disable_policy="true" - when: imagetag is not search("A8|D1") - -- name: "Disable feature BGP" - nxos_feature: - feature: bgp - state: disabled - ignore_errors: yes - -- name: "Enable feature BGP" - nxos_feature: - feature: bgp - state: enabled - ignore_errors: yes - -- block: - - name: "set disable policy" - nxos_bgp: &set1 - asn: 65535 - disable_policy_batching: true - disable_policy_batching_ipv4_prefix_list: v4_p - disable_policy_batching_ipv6_prefix_list: v6_p - register: result - when: bgp_disable_policy - - - assert: &true - that: - - "result.changed == true" - when: bgp_disable_policy - - - name: "Check Idempotence" - nxos_bgp: *set1 - register: result - when: bgp_disable_policy - - - assert: &false - that: - - "result.changed == false" - when: bgp_disable_policy - - - name: "reset disable policy" - nxos_bgp: &reset1 - asn: 65535 - disable_policy_batching: false - disable_policy_batching_ipv4_prefix_list: default - disable_policy_batching_ipv6_prefix_list: default - register: result - when: bgp_disable_policy - - - assert: *true - when: bgp_disable_policy - - - name: "Check Idempotence" - nxos_bgp: *reset1 - register: result - when: bgp_disable_policy - - - assert: *false - when: bgp_disable_policy - - rescue: - - debug: msg="Tests can fail on A8 or helsinki images" - - always: - - name: "Disable feature bgp" - nxos_feature: - feature: bgp - state: disabled - ignore_errors: yes - - - debug: msg="END connection={{ ansible_connection }} nxos_bgp parameter test" diff --git a/test/integration/targets/nxos_bgp/tests/common/hels.yaml b/test/integration/targets/nxos_bgp/tests/common/hels.yaml deleted file mode 100644 index db4f547769..0000000000 --- a/test/integration/targets/nxos_bgp/tests/common/hels.yaml +++ /dev/null @@ -1,95 +0,0 @@ ---- -- debug: msg="START connection={{ ansible_connection }} nxos_bgp parameter test" - -- debug: msg="This test is not supported on {{ image_version }}" - when: imagetag is search("D1") -- set_fact: test_helsinki="false" -- set_fact: test_helsinki="true" - when: imagetag is not search("D1") - -- name: "Disable feature BGP" - nxos_feature: - feature: bgp - state: disabled - ignore_errors: yes - when: test_helsinki - -- name: "Enable feature BGP" - nxos_feature: - feature: bgp - state: enabled - ignore_errors: yes - when: test_helsinki - -- block: - # these tasks will fail on n7k running helsinki - # due to no support - - name: "set helsinki" - nxos_bgp: &set1 - asn: 65535 - vrf: "{{ item }}" - graceful_restart_timers_restart: 130 - graceful_restart_timers_stalepath_time: 310 - neighbor_down_fib_accelerate: true - reconnect_interval: 55 - timer_bgp_hold: 110 - timer_bgp_keepalive: 45 - with_items: "{{ vrfs }}" - register: result - when: test_helsinki - - - assert: &true - that: - - "result.changed == true" - when: test_helsinki - - - name: "Check Idempotence" - nxos_bgp: *set1 - with_items: "{{ vrfs }}" - register: result - when: test_helsinki - - - assert: &false - that: - - "result.changed == false" - when: test_helsinki - - - name: "reset helsinki" - nxos_bgp: &reset1 - asn: 65535 - vrf: "{{ item }}" - graceful_restart: true - graceful_restart_timers_restart: default - graceful_restart_timers_stalepath_time: default - neighbor_down_fib_accelerate: false - reconnect_interval: default - timer_bgp_hold: default - timer_bgp_keepalive: default - with_items: "{{ vrfs }}" - register: result - when: test_helsinki - - - assert: *true - when: test_helsinki - - - name: "Check Idempotence" - nxos_bgp: *reset1 - with_items: "{{ vrfs }}" - register: result - when: test_helsinki - - - assert: *false - when: test_helsinki - - rescue: - - debug: msg="Tests can fail on helsinki images" - - always: - - name: "Disable feature bgp" - nxos_feature: - feature: bgp - state: disabled - ignore_errors: yes - when: test_helsinki - - - debug: msg="END connection={{ ansible_connection }} nxos_bgp parameter test" diff --git a/test/integration/targets/nxos_bgp/tests/common/isolate.yaml b/test/integration/targets/nxos_bgp/tests/common/isolate.yaml deleted file mode 100644 index 0d507f6eea..0000000000 --- a/test/integration/targets/nxos_bgp/tests/common/isolate.yaml +++ /dev/null @@ -1,76 +0,0 @@ ---- -- debug: msg="START connection={{ ansible_connection }} nxos_bgp parameter test" - - -- debug: msg="This bgp_isolate is not supported on {{ image_version }}" - when: imagetag is search("A8") -- set_fact: bgp_isolate="false" -- set_fact: bgp_isolate="true" - when: imagetag is not search("A8") - -- name: "Disable feature BGP" - nxos_feature: - feature: bgp - state: disabled - ignore_errors: yes - -- name: "Enable feature BGP" - nxos_feature: - feature: bgp - state: enabled - ignore_errors: yes - -- block: - # these tasks will fail on n3k running A8 - # due to no support - - name: "set isolate" - nxos_bgp: &set1 - asn: 65535 - isolate: false - register: result - when: bgp_isolate - - - assert: &true - that: - - "result.changed == true" - when: bgp_isolate - - - name: "Check Idempotence" - nxos_bgp: *set1 - register: result - when: bgp_isolate - - - assert: &false - that: - - "result.changed == false" - when: bgp_isolate - - - name: "reset isolate" - nxos_bgp: &reset1 - asn: 65535 - isolate: true - register: result - when: bgp_isolate - - - assert: *true - when: bgp_isolate - - - name: "Check Idempotence" - nxos_bgp: *reset1 - register: result - when: bgp_isolate - - - assert: *false - when: bgp_isolate - - rescue: - - debug: msg="Tests can fail on A8 images" - - always: - - name: "Disable feature bgp" - nxos_feature: - feature: bgp - state: disabled - ignore_errors: yes - - - debug: msg="END connection={{ ansible_connection }} nxos_bgp parameter test" diff --git a/test/integration/targets/nxos_bgp/tests/common/param.yaml b/test/integration/targets/nxos_bgp/tests/common/param.yaml deleted file mode 100644 index fdcd33c5ce..0000000000 --- a/test/integration/targets/nxos_bgp/tests/common/param.yaml +++ /dev/null @@ -1,259 +0,0 @@ ---- -- debug: msg="START connection={{ ansible_connection }} nxos_bgp parameter test" - -- name: "Disable feature BGP" - nxos_feature: - feature: bgp - state: disabled - ignore_errors: yes - -- name: "Enable feature BGP" - nxos_feature: - feature: bgp - state: enabled - ignore_errors: yes - -- block: - - name: "set multi vrf params" - nxos_bgp: &set_multi_vrf - asn: 65535 - vrf: "{{ item }}" - router_id: 192.0.2.1 - bestpath_always_compare_med: true - bestpath_aspath_multipath_relax: true - bestpath_compare_routerid: true - bestpath_cost_community_ignore: true - bestpath_med_confed: true - bestpath_med_missing_as_worst: true - bestpath_med_non_deterministic: true -# grace_restart is failing with error code -32603 only on CLI transport, nxapi ok -# graceful_restart: false - graceful_restart_helper: true - log_neighbor_changes: true - maxas_limit: 50 - with_items: "{{ vrfs }}" - register: result - - - assert: &true - that: - - "result.changed == true" - - - name: "Check Idempotence" - nxos_bgp: *set_multi_vrf - with_items: "{{ vrfs }}" - register: result - - - assert: &false - that: - - "result.changed == false" - - - name: "reset multi vrf params" - nxos_bgp: &reset_multi_vrf - asn: 65535 - vrf: "{{ item }}" - bestpath_always_compare_med: false - bestpath_aspath_multipath_relax: false - bestpath_compare_routerid: false - bestpath_cost_community_ignore: false - bestpath_med_confed: false - bestpath_med_missing_as_worst: false - bestpath_med_non_deterministic: false - graceful_restart_helper: false - log_neighbor_changes: false - maxas_limit: default - router_id: default - with_items: "{{ vrfs }}" - register: result - - - assert: *true - - - name: "Check Idempotence" - nxos_bgp: *reset_multi_vrf - with_items: "{{ vrfs }}" - register: result - - - assert: *false - - - name: "set clusterid" - nxos_bgp: &set_cluster_id - asn: 65535 - vrf: "{{ item }}" - cluster_id: 10.0.0.1 - with_items: "{{ vrfs }}" - register: result - - - assert: *true - - - name: "Check Idempotence" - nxos_bgp: *set_cluster_id - with_items: "{{ vrfs }}" - register: result - - - assert: *false - - - name: "reset cluster_id" - nxos_bgp: &reset_cluster_id - asn: 65535 - vrf: "{{ item }}" - cluster_id: default - with_items: "{{ vrfs }}" - register: result - - - assert: *true - - - name: "Check Idempotence" - nxos_bgp: *reset_cluster_id - with_items: "{{ vrfs }}" - register: result - - - assert: *false - - - name: "set confederation" - nxos_bgp: &set_confederation - asn: 65535 - confederation_id: 99 - confederation_peers: - - 16 - - 22 - - 18 - register: result - - - assert: *true - - - name: "Check Idempotence" - nxos_bgp: *set_confederation - register: result - - - assert: *false - - - name: "reset confederation" - nxos_bgp: &reset_confederation - asn: 65535 - confederation_id: default - confederation_peers: default - register: result - - - assert: *true - - - name: "Check Idempotence" - nxos_bgp: *reset_confederation - register: result - - - assert: *false - - - name: "set confederation_local_as" - nxos_bgp: &set_confederation_la - asn: 65535 - vrf: myvrf - local_as: 33 - confederation_id: 99 - confederation_peers: - - 16 - - 22 - - 18 - register: result - - - assert: *true - - - name: "Check Idempotence" - nxos_bgp: *set_confederation_la - register: result - - - assert: *false - - - name: "reset confederation local_as" - nxos_bgp: &reset_confederation_la - asn: 65535 - vrf: myvrf - local_as: default - confederation_id: default - confederation_peers: default - register: result - - - assert: *true - - - name: "Check Idempotence" - nxos_bgp: *reset_confederation_la - register: result - - - assert: *false - - - name: "set local_as" - nxos_bgp: &set_local_as - asn: 65535 - vrf: myvrf - local_as: 33 - confederation_id: 99 - register: result - - - assert: *true - - - name: "Check Idempotence" - nxos_bgp: *set_local_as - register: result - - - assert: *false - - - name: "reset local_as" - nxos_bgp: &reset_local_as - asn: 65535 - vrf: myvrf - confederation_id: default - local_as: default - register: result - - - assert: *true - - - name: "Check Idempotence" - nxos_bgp: *reset_local_as - register: result - - - assert: *false - - - name: "set default vrf params" - nxos_bgp: &set_def_vrf - asn: 65535 - event_history_cli: size_medium - event_history_detail: size_large - event_history_events: size_medium - event_history_periodic: size_small - enforce_first_as: false - fast_external_fallover: false - flush_routes: true - shutdown: true - register: result - - - assert: *true - - - name: "Check Idempotence" - nxos_bgp: *set_def_vrf - register: result - - - assert: *false - - - name: "reset default vrf params" - nxos_bgp: &reset_def_vrf - asn: 65535 - event_history_detail: default - enforce_first_as: true - fast_external_fallover: true - flush_routes: false - shutdown: false - register: result - - - assert: *true - - - name: "Check Idempotence" - nxos_bgp: *reset_def_vrf - register: result - - - assert: *false - - always: - - name: "Disable feature bgp" - nxos_feature: - feature: bgp - state: disabled - ignore_errors: yes - - - debug: msg="END connection={{ ansible_connection }} nxos_bgp parameter test" diff --git a/test/integration/targets/nxos_bgp/tests/common/sanity.yaml b/test/integration/targets/nxos_bgp/tests/common/sanity.yaml deleted file mode 100644 index 580588144d..0000000000 --- a/test/integration/targets/nxos_bgp/tests/common/sanity.yaml +++ /dev/null @@ -1,132 +0,0 @@ ---- -- debug: msg="START connection={{ ansible_connection }} nxos_bgp sanity test" - -- set_fact: neighbor_down_fib_accelerate="true" - when: (not titanium) and ((imagetag != 'N1') and (imagetag != 'D1')) - -- set_fact: reconnect_interval="55" - when: (not titanium) and ((imagetag != 'N1') and (imagetag != 'D1')) - -- set_fact: isolate="false" - when: platform is not match("N35") - -- name: "Enable feature BGP" - nxos_feature: - feature: bgp - state: enabled - ignore_errors: yes - -- name: "Setup" - nxos_bgp: &remove - asn: 65535 - state: absent - ignore_errors: yes - register: result - -- block: - - name: "Configure BGP defaults" - nxos_bgp: &configure_default - asn: 65535 - router_id: 192.0.2.1 - state: present - register: result - - - assert: &true - that: - - "result.changed == true" - - - name: "Check Idempotence" - nxos_bgp: *configure_default - register: result - - - assert: &false - that: - - "result.changed == false" - - - name: "Remove BGP" - nxos_bgp: *remove - register: result - - - assert: *true - - - name: "Check Idempotence" - nxos_bgp: *remove - register: result - - - assert: *false - - - name: "Configure BGP non defaults" - nxos_bgp: &configure_non_default - asn: 65535 - router_id: 192.0.2.1 - bestpath_always_compare_med: true - bestpath_aspath_multipath_relax: true - bestpath_compare_routerid: true - bestpath_cost_community_ignore: true - bestpath_med_confed: true - bestpath_med_missing_as_worst: true - bestpath_med_non_deterministic: true - cluster_id: 10.0.0.1 - confederation_id: 99 - disable_policy_batching: true - enforce_first_as: false - fast_external_fallover: false - flush_routes: true - graceful_restart_helper: true - graceful_restart_timers_restart: 130 - graceful_restart_timers_stalepath_time: 310 - isolate: "{{isolate|default(omit)}}" - log_neighbor_changes: true - maxas_limit: 50 - neighbor_down_fib_accelerate: "{{neighbor_down_fib_accelerate|default(omit)}}" - reconnect_interval: "{{reconnect_interval|default(omit)}}" - shutdown: true - timer_bestpath_limit: 255 - timer_bgp_hold: 110 - timer_bgp_keepalive: 45 - event_history_cli: size_medium - event_history_detail: size_large - event_history_events: size_medium - event_history_periodic: size_small - suppress_fib_pending: true - state: present - register: result - - - assert: *true - - - name: "Check Idempotence" - nxos_bgp: *configure_non_default - register: result - - - assert: *false - - - name: "Remove BGP" - nxos_bgp: *remove - register: result - - - assert: *true - - - name: "Check Idempotence" - nxos_bgp: *remove - register: result - - - assert: *false - - - name: "Disable feature bgp" - nxos_feature: - feature: bgp - state: disabled - - rescue: - - name: "Cleanup BGP" - nxos_bgp: *remove - ignore_errors: yes - - - name: "Disable feature bgp" - nxos_feature: - feature: bgp - state: disabled - ignore_errors: yes - - always: - - debug: msg="END connection={{ ansible_connection }} nxos_bgp sanity test" diff --git a/test/integration/targets/nxos_bgp/tests/common/supp_fib.yaml b/test/integration/targets/nxos_bgp/tests/common/supp_fib.yaml deleted file mode 100644 index d9fdbdb3ef..0000000000 --- a/test/integration/targets/nxos_bgp/tests/common/supp_fib.yaml +++ /dev/null @@ -1,113 +0,0 @@ ---- -- debug: msg="START connection={{ ansible_connection }} nxos_bgp parameter test" - -- set_fact: bgp_best_path_limit="false" -- set_fact: bgp_best_path_limit="true" - when: imagetag is not search("I2") - -- set_fact: bgp_suppress_fib_supported="false" -- set_fact: bgp_suppress_fib_supported="true" - when: imagetag is not search("A8|D1|I2|I4") - -- name: "Disable feature BGP" - nxos_feature: - feature: bgp - state: disabled - ignore_errors: yes - -- name: "Enable feature BGP" - nxos_feature: - feature: bgp - state: enabled - ignore_errors: yes - -- block: - # this task will fail on n9k running I2 - # due to no support - - name: "set bestpath limit" - nxos_bgp: &set1 - asn: 65535 - vrf: "{{ item }}" - timer_bestpath_limit: 255 - with_items: "{{ vrfs }}" - register: result - - - assert: &true - that: - - "result.changed == true" - - - name: "Check Idempotence" - nxos_bgp: *set1 - with_items: "{{ vrfs }}" - register: result - - - assert: &false - that: - - "result.changed == false" - - - name: "reset bestpath limit" - nxos_bgp: &reset1 - asn: 65535 - vrf: "{{ item }}" - timer_bestpath_limit: default - with_items: "{{ vrfs }}" - register: result - - - assert: *true - - - name: "Check Idempotence" - nxos_bgp: *reset1 - with_items: "{{ vrfs }}" - register: result - when: bgp_best_path_limit - - - assert: *false - when: bgp_best_path_limit - - # Property does not nvgen on some images - # still try and set it but don't check idempotence - - name: "set suppress fib" - nxos_bgp: &set2 - asn: 65535 - suppress_fib_pending: false - register: result - - - assert: *true - when: bgp_suppress_fib_supported - - - name: "Check Idempotence" - nxos_bgp: *set2 - register: result - when: bgp_suppress_fib_supported - - - assert: *false - when: bgp_suppress_fib_supported - - - name: "reset suppress fib" - nxos_bgp: &reset2 - asn: 65535 - suppress_fib_pending: true - register: result - - - assert: *true - when: bgp_suppress_fib_supported - - - name: "Check Idempotence" - nxos_bgp: *reset2 - register: result - when: bgp_suppress_fib_supported - - - assert: *false - when: bgp_suppress_fib_supported - - rescue: - - debug: msg="Tests can fail on I2/I4/A8/Fretta or helsinki images" - - always: - - name: "Disable feature bgp" - nxos_feature: - feature: bgp - state: disabled - ignore_errors: yes - - - debug: msg="END connection={{ ansible_connection }} nxos_bgp parameter test" |