diff --git a/test/integration/nxos.yaml b/test/integration/nxos.yaml index 7586c642f6..d8dbfb24a0 100644 --- a/test/integration/nxos.yaml +++ b/test/integration/nxos.yaml @@ -78,6 +78,33 @@ failed_modules: "{{ failed_modules }} + [ 'nxos_feature' ]" test_failed: true + - block: + - include_role: + name: nxos_udld + when: "limit_to in ['*', 'nxos_udld']" + rescue: + - set_fact: + failed_modules: "{{ failed_modules }} + [ 'nxos_udld' ]" + test_failed: true + + - block: + - include_role: + name: nxos_udld_interface + when: "limit_to in ['*', 'nxos_udld_interface']" + rescue: + - set_fact: + failed_modules: "{{ failed_modules }} + [ 'nxos_udld_interface' ]" + test_failed: true + + - block: + - include_role: + name: nxos_vxlan_vtep_vni + when: "limit_to in ['*', 'nxos_vxlan_vtep_vni']" + rescue: + - set_fact: + failed_modules: "{{ failed_modules }} + [ 'nxos_vxlan_vtep_vni' ]" + test_failed: true + - block: - include_role: name: nxos_mtu diff --git a/test/integration/targets/nxos_udld/defaults/main.yaml b/test/integration/targets/nxos_udld/defaults/main.yaml new file mode 100644 index 0000000000..5f709c5aac --- /dev/null +++ b/test/integration/targets/nxos_udld/defaults/main.yaml @@ -0,0 +1,2 @@ +--- +testcase: "*" diff --git a/test/integration/targets/nxos_udld/meta/main.yml b/test/integration/targets/nxos_udld/meta/main.yml new file mode 100644 index 0000000000..ae741cbdc7 --- /dev/null +++ b/test/integration/targets/nxos_udld/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - prepare_nxos_tests diff --git a/test/integration/targets/nxos_udld/tasks/cli.yaml b/test/integration/targets/nxos_udld/tasks/cli.yaml new file mode 100644 index 0000000000..d675462dd0 --- /dev/null +++ b/test/integration/targets/nxos_udld/tasks/cli.yaml @@ -0,0 +1,15 @@ +--- +- name: collect all cli test cases + find: + paths: "{{ role_path }}/tests/cli" + patterns: "{{ testcase }}.yaml" + register: test_cases + +- name: set test_items + set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" + +- name: run test case + include: "{{ test_case_to_run }}" + with_items: "{{ test_items }}" + loop_control: + loop_var: test_case_to_run diff --git a/test/integration/targets/nxos_udld/tasks/main.yaml b/test/integration/targets/nxos_udld/tasks/main.yaml new file mode 100644 index 0000000000..fea9337c14 --- /dev/null +++ b/test/integration/targets/nxos_udld/tasks/main.yaml @@ -0,0 +1,7 @@ +--- +# Use block to ensure that both cli and nxapi tests +# will run even if there are failures or errors. +- block: + - { include: cli.yaml, tags: ['cli'] } + always: + - { include: nxapi.yaml, tags: ['nxapi'] } diff --git a/test/integration/targets/nxos_udld/tasks/nxapi.yaml b/test/integration/targets/nxos_udld/tasks/nxapi.yaml new file mode 100644 index 0000000000..ea525379f7 --- /dev/null +++ b/test/integration/targets/nxos_udld/tasks/nxapi.yaml @@ -0,0 +1,28 @@ +--- +- name: collect all nxapi test cases + find: + paths: "{{ role_path }}/tests/nxapi" + patterns: "{{ testcase }}.yaml" + register: test_cases + +- name: set test_items + set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" + +- name: enable nxapi + nxos_config: + lines: + - feature nxapi + - nxapi http port 80 + provider: "{{ cli }}" + +- name: run test case + include: "{{ test_case_to_run }}" + with_items: "{{ test_items }}" + loop_control: + loop_var: test_case_to_run + +- name: disable nxapi + nxos_config: + lines: + - no feature nxapi + provider: "{{ cli }}" diff --git a/test/integration/targets/nxos_udld/tests/cli/sanity.yaml b/test/integration/targets/nxos_udld/tests/cli/sanity.yaml new file mode 100644 index 0000000000..50c7c43faf --- /dev/null +++ b/test/integration/targets/nxos_udld/tests/cli/sanity.yaml @@ -0,0 +1,4 @@ +--- +- set_fact: connection="{{ cli }}" + +- import_tasks: targets/nxos_udld/tests/common/sanity.yaml diff --git a/test/integration/targets/nxos_udld/tests/common/sanity.yaml b/test/integration/targets/nxos_udld/tests/common/sanity.yaml new file mode 100644 index 0000000000..0b20c4b593 --- /dev/null +++ b/test/integration/targets/nxos_udld/tests/common/sanity.yaml @@ -0,0 +1,67 @@ +--- +- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_udld sanity test" + +- set_fact: udld_run="true" +- set_fact: udld_run="false" + when: ((platform | search('N9K-F')) and (imagetag and (imagetag | version_compare('F3', 'lt')))) +- set_fact: udld_run="false" + when: titanium + +- block: + - name: "Enable feature udld" + nxos_feature: + feature: udld + state: enabled + provider: "{{ connection }}" + + - name: Reset udld + nxos_udld: + reset: True + provider: "{{ connection }}" + + - name: Ensure udld agg mode is globally disabled and msg time is 20 + nxos_udld: &conf1 + aggressive: disabled + msg_time: 20 + provider: "{{ connection }}" + register: result + + - assert: &true + that: + - "result.changed == true" + + - name: "Conf1 Idempotence" + nxos_udld: *conf1 + register: result + + - assert: &false + that: + - "result.changed == false" + + + - name: Ensure udld agg mode is globally enabled and msg time is 15 + nxos_udld: &conf2 + aggressive: enabled + msg_time: 15 + provider: "{{ connection }}" + register: result + + - assert: *true + + - name: "conf2 Idempotence" + nxos_udld: *conf2 + register: result + + - assert: *false + + when: udld_run + + always: + - name: "Disable udld" + nxos_feature: + feature: udld + state: disabled + provider: "{{ connection }}" + ignore_errors: yes + +- debug: msg="END TRANSPORT:{{ connection.transport }} nxos_udld sanity test" diff --git a/test/integration/targets/nxos_udld/tests/nxapi/sanity.yaml b/test/integration/targets/nxos_udld/tests/nxapi/sanity.yaml new file mode 100644 index 0000000000..2eecada20d --- /dev/null +++ b/test/integration/targets/nxos_udld/tests/nxapi/sanity.yaml @@ -0,0 +1,4 @@ +--- +- set_fact: connection="{{ nxapi }}" + +- import_tasks: targets/nxos_udld/tests/common/sanity.yaml diff --git a/test/integration/targets/nxos_udld_interface/defaults/main.yaml b/test/integration/targets/nxos_udld_interface/defaults/main.yaml new file mode 100644 index 0000000000..5f709c5aac --- /dev/null +++ b/test/integration/targets/nxos_udld_interface/defaults/main.yaml @@ -0,0 +1,2 @@ +--- +testcase: "*" diff --git a/test/integration/targets/nxos_udld_interface/meta/main.yml b/test/integration/targets/nxos_udld_interface/meta/main.yml new file mode 100644 index 0000000000..ae741cbdc7 --- /dev/null +++ b/test/integration/targets/nxos_udld_interface/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - prepare_nxos_tests diff --git a/test/integration/targets/nxos_udld_interface/tasks/cli.yaml b/test/integration/targets/nxos_udld_interface/tasks/cli.yaml new file mode 100644 index 0000000000..d675462dd0 --- /dev/null +++ b/test/integration/targets/nxos_udld_interface/tasks/cli.yaml @@ -0,0 +1,15 @@ +--- +- name: collect all cli test cases + find: + paths: "{{ role_path }}/tests/cli" + patterns: "{{ testcase }}.yaml" + register: test_cases + +- name: set test_items + set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" + +- name: run test case + include: "{{ test_case_to_run }}" + with_items: "{{ test_items }}" + loop_control: + loop_var: test_case_to_run diff --git a/test/integration/targets/nxos_udld_interface/tasks/main.yaml b/test/integration/targets/nxos_udld_interface/tasks/main.yaml new file mode 100644 index 0000000000..fea9337c14 --- /dev/null +++ b/test/integration/targets/nxos_udld_interface/tasks/main.yaml @@ -0,0 +1,7 @@ +--- +# Use block to ensure that both cli and nxapi tests +# will run even if there are failures or errors. +- block: + - { include: cli.yaml, tags: ['cli'] } + always: + - { include: nxapi.yaml, tags: ['nxapi'] } diff --git a/test/integration/targets/nxos_udld_interface/tasks/nxapi.yaml b/test/integration/targets/nxos_udld_interface/tasks/nxapi.yaml new file mode 100644 index 0000000000..ea525379f7 --- /dev/null +++ b/test/integration/targets/nxos_udld_interface/tasks/nxapi.yaml @@ -0,0 +1,28 @@ +--- +- name: collect all nxapi test cases + find: + paths: "{{ role_path }}/tests/nxapi" + patterns: "{{ testcase }}.yaml" + register: test_cases + +- name: set test_items + set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" + +- name: enable nxapi + nxos_config: + lines: + - feature nxapi + - nxapi http port 80 + provider: "{{ cli }}" + +- name: run test case + include: "{{ test_case_to_run }}" + with_items: "{{ test_items }}" + loop_control: + loop_var: test_case_to_run + +- name: disable nxapi + nxos_config: + lines: + - no feature nxapi + provider: "{{ cli }}" diff --git a/test/integration/targets/nxos_udld_interface/tests/cli/sanity.yaml b/test/integration/targets/nxos_udld_interface/tests/cli/sanity.yaml new file mode 100644 index 0000000000..50cbac8494 --- /dev/null +++ b/test/integration/targets/nxos_udld_interface/tests/cli/sanity.yaml @@ -0,0 +1,4 @@ +--- +- set_fact: connection="{{ cli }}" + +- import_tasks: targets/nxos_udld_interface/tests/common/sanity.yaml diff --git a/test/integration/targets/nxos_udld_interface/tests/common/sanity.yaml b/test/integration/targets/nxos_udld_interface/tests/common/sanity.yaml new file mode 100644 index 0000000000..0db8aa4a9b --- /dev/null +++ b/test/integration/targets/nxos_udld_interface/tests/common/sanity.yaml @@ -0,0 +1,74 @@ +--- +- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_udld_interface sanity test" + +- set_fact: udld_run="true" +- set_fact: udld_run="false" + when: ((platform | search('N9K-F')) and (imagetag and (imagetag | version_compare('F3', 'lt')))) +- set_fact: udld_run="false" + when: titanium + +# Select interface for test +- set_fact: intname="{{ nxos_int1 }}" + +- block: + - name: "Enable feature udld" + nxos_feature: + feature: udld + state: enabled + provider: "{{ connection }}" + + - name: "put the interface into default state" + nxos_config: + commands: + - "default interface {{intname}}" + provider: "{{ connection }}" + match: none + + - name: ensure interface is configured to be in aggressive mode + nxos_udld_interface: &conf1 + interface: "{{ intname }}" + mode: aggressive + state: present + provider: "{{ connection }}" + register: result + + - assert: &true + that: + - "result.changed == true" + + - name: "Conf1 Idempotence" + nxos_udld_interface: *conf1 + register: result + + - assert: &false + that: + - "result.changed == false" + + - name: ensure interface has mode enabled + nxos_udld_interface: &conf2 + interface: "{{ intname }}" + mode: enabled + state: present + provider: "{{ connection }}" + register: result + + - assert: *true + + - name: Remove the config + nxos_udld_interface: &remove + interface: "{{ intname }}" + mode: enabled + state: absent + provider: "{{ connection }}" + + when: udld_run + + always: + - name: "Disable udld" + nxos_feature: + feature: udld + state: disabled + provider: "{{ connection }}" + ignore_errors: yes + +- debug: msg="END TRANSPORT:{{ connection.transport }} nxos_udld_interface sanity test" diff --git a/test/integration/targets/nxos_udld_interface/tests/nxapi/sanity.yaml b/test/integration/targets/nxos_udld_interface/tests/nxapi/sanity.yaml new file mode 100644 index 0000000000..5cfe70cc64 --- /dev/null +++ b/test/integration/targets/nxos_udld_interface/tests/nxapi/sanity.yaml @@ -0,0 +1,4 @@ +--- +- set_fact: connection="{{ nxapi }}" + +- import_tasks: targets/nxos_udld_interface/tests/common/sanity.yaml diff --git a/test/integration/targets/nxos_vxlan_vtep/tasks/platform/n7k/cleanup.yaml b/test/integration/targets/nxos_vxlan_vtep/tasks/platform/n7k/cleanup.yaml new file mode 100644 index 0000000000..8b89e8cc7b --- /dev/null +++ b/test/integration/targets/nxos_vxlan_vtep/tasks/platform/n7k/cleanup.yaml @@ -0,0 +1,24 @@ +--- +- name: "Unconfigure VDC setting limit-resource module-type f3" + nxos_config: + commands: + - 'terminal dont-ask ; vdc {{ vdcid }} ; no limit-resource module-type f3' + match: none + provider: "{{ cli }}" + ignore_errors: yes + +- name: Previous command is asynchronous and can take a while. Allow time for it to complete + pause: + seconds: 45 + +- name: "Configure VDC setting allocate interface unallocated-interfaces" + nxos_config: &allocate + commands: + - 'terminal dont-ask ; vdc {{ vdcid }} ; allocate interface unallocated-interfaces' + match: none + provider: "{{ cli }}" + ignore_errors: yes + +- name: Previous command is asynchronous can take a while. Allow time for it to complete + pause: + seconds: 45 diff --git a/test/integration/targets/nxos_vxlan_vtep/tasks/platform/n7k/setup.yaml b/test/integration/targets/nxos_vxlan_vtep/tasks/platform/n7k/setup.yaml new file mode 100644 index 0000000000..12ab0b204f --- /dev/null +++ b/test/integration/targets/nxos_vxlan_vtep/tasks/platform/n7k/setup.yaml @@ -0,0 +1,32 @@ +--- +- name: "Get default vdc id" + nxos_command: + commands: ['show vdc current-vdc | json'] + provider: "{{ cli }}" + register: vdcout + +- set_fact: vdcid="{{ vdcout.stdout_lines[0].name }}" + +- name: "Configure VDC setting limit-resource module-type f3" + nxos_config: + commands: + - "terminal dont-ask ; vdc {{ vdcid }} ; limit-resource module-type f3" + match: none + provider: "{{ cli }}" + ignore_errors: yes + +- name: Previous command is asynchronous and can take a while. Allow time for it to complete + pause: + seconds: 45 + +- name: "Configure VDC setting allocate interface unallocated-interfaces" + nxos_config: &allocate + commands: + - "terminal dont-ask ; vdc {{ vdcid }} ; allocate interface unallocated-interfaces" + match: none + provider: "{{ cli }}" + ignore_errors: yes + +- name: Previous command is asynchronous and can take a while. Allow time for it to complete + pause: + seconds: 45 diff --git a/test/integration/targets/nxos_vxlan_vtep/tests/common/sanity.yaml b/test/integration/targets/nxos_vxlan_vtep/tests/common/sanity.yaml index fcec0d5a62..00b09c108f 100644 --- a/test/integration/targets/nxos_vxlan_vtep/tests/common/sanity.yaml +++ b/test/integration/targets/nxos_vxlan_vtep/tests/common/sanity.yaml @@ -2,6 +2,10 @@ - - debug: msg="START TRANSPORT:{{ connection.transport }} nxos_vxlan_vtep sanity test" - block: + - name: "Apply N7K specific setup config" + include: targets/nxos_vxlan_vtep/tasks/platform/n7k/setup.yaml + when: platform | match('N7K') + - name: "Enable feature nv overlay" nxos_config: commands: @@ -9,28 +13,56 @@ provider: "{{ connection }}" match: none - - name: configure vxlan_vtep - nxos_vxlan_vtep: &configure - interface: nve1 - description: default - host_reachability: true - source_interface: Loopback0 - source_interface_hold_down_time: 30 - shutdown: true - provider: "{{ connection }}" - register: result + - block: + - name: configure vxlan_vtep + nxos_vxlan_vtep: &configure9 + interface: nve1 + description: default + host_reachability: true + source_interface: Loopback0 + source_interface_hold_down_time: 30 + shutdown: true + provider: "{{ connection }}" + register: result + + - assert: &true + that: + - "result.changed == true" + + - name: "Conf Idempotence" + nxos_vxlan_vtep: *configure9 + register: result - - assert: &true - that: - - "result.changed == true" + - assert: &false + that: + - "result.changed == false" - - name: "Conf Idempotence" - nxos_vxlan_vtep: *configure - register: result + when: (platform | search('N9K')) - - assert: &false - that: - - "result.changed == false" + - block: + - name: configure vxlan_vtep + nxos_vxlan_vtep: &configure7 + interface: nve1 + description: default + host_reachability: true + source_interface: Loopback0 + shutdown: true + provider: "{{ connection }}" + register: result + + - assert: + that: + - "result.changed == true" + + - name: "Conf Idempotence" + nxos_vxlan_vtep: *configure7 + register: result + + - assert: + that: + - "result.changed == false" + + when: (platform | search('N7K')) - name: remove vxlan_vtep nxos_vxlan_vtep: &remove @@ -44,17 +76,25 @@ provider: "{{ connection }}" register: result - - assert: *true + - assert: + that: + - "result.changed == true" - name: "Remove Idempotence" nxos_vxlan_vtep: *remove register: result - - assert: *false + - assert: + that: + - "result.changed == false" - when: (platform | search('N9K')) + when: (platform | search("N7K|N9K")) always: + - name: "Apply N7K specific cleanup config" + include: targets/nxos_vxlan_vtep/tasks/platform/n7k/cleanup.yaml + when: platform | match('N7K') + - name: "Disable feature nv overlay" nxos_feature: feature: nve diff --git a/test/integration/targets/nxos_vxlan_vtep_vni/defaults/main.yaml b/test/integration/targets/nxos_vxlan_vtep_vni/defaults/main.yaml new file mode 100644 index 0000000000..5f709c5aac --- /dev/null +++ b/test/integration/targets/nxos_vxlan_vtep_vni/defaults/main.yaml @@ -0,0 +1,2 @@ +--- +testcase: "*" diff --git a/test/integration/targets/nxos_vxlan_vtep_vni/meta/main.yml b/test/integration/targets/nxos_vxlan_vtep_vni/meta/main.yml new file mode 100644 index 0000000000..ae741cbdc7 --- /dev/null +++ b/test/integration/targets/nxos_vxlan_vtep_vni/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - prepare_nxos_tests diff --git a/test/integration/targets/nxos_vxlan_vtep_vni/tasks/cli.yaml b/test/integration/targets/nxos_vxlan_vtep_vni/tasks/cli.yaml new file mode 100644 index 0000000000..d675462dd0 --- /dev/null +++ b/test/integration/targets/nxos_vxlan_vtep_vni/tasks/cli.yaml @@ -0,0 +1,15 @@ +--- +- name: collect all cli test cases + find: + paths: "{{ role_path }}/tests/cli" + patterns: "{{ testcase }}.yaml" + register: test_cases + +- name: set test_items + set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" + +- name: run test case + include: "{{ test_case_to_run }}" + with_items: "{{ test_items }}" + loop_control: + loop_var: test_case_to_run diff --git a/test/integration/targets/nxos_vxlan_vtep_vni/tasks/main.yaml b/test/integration/targets/nxos_vxlan_vtep_vni/tasks/main.yaml new file mode 100644 index 0000000000..fea9337c14 --- /dev/null +++ b/test/integration/targets/nxos_vxlan_vtep_vni/tasks/main.yaml @@ -0,0 +1,7 @@ +--- +# Use block to ensure that both cli and nxapi tests +# will run even if there are failures or errors. +- block: + - { include: cli.yaml, tags: ['cli'] } + always: + - { include: nxapi.yaml, tags: ['nxapi'] } diff --git a/test/integration/targets/nxos_vxlan_vtep_vni/tasks/nxapi.yaml b/test/integration/targets/nxos_vxlan_vtep_vni/tasks/nxapi.yaml new file mode 100644 index 0000000000..ea525379f7 --- /dev/null +++ b/test/integration/targets/nxos_vxlan_vtep_vni/tasks/nxapi.yaml @@ -0,0 +1,28 @@ +--- +- name: collect all nxapi test cases + find: + paths: "{{ role_path }}/tests/nxapi" + patterns: "{{ testcase }}.yaml" + register: test_cases + +- name: set test_items + set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" + +- name: enable nxapi + nxos_config: + lines: + - feature nxapi + - nxapi http port 80 + provider: "{{ cli }}" + +- name: run test case + include: "{{ test_case_to_run }}" + with_items: "{{ test_items }}" + loop_control: + loop_var: test_case_to_run + +- name: disable nxapi + nxos_config: + lines: + - no feature nxapi + provider: "{{ cli }}" diff --git a/test/integration/targets/nxos_vxlan_vtep_vni/tests/cli/sanity.yaml b/test/integration/targets/nxos_vxlan_vtep_vni/tests/cli/sanity.yaml new file mode 100644 index 0000000000..3cb3ee6c49 --- /dev/null +++ b/test/integration/targets/nxos_vxlan_vtep_vni/tests/cli/sanity.yaml @@ -0,0 +1,4 @@ +--- +- set_fact: connection="{{ cli }}" + +- import_tasks: targets/nxos_vxlan_vtep_vni/tests/common/sanity.yaml diff --git a/test/integration/targets/nxos_vxlan_vtep_vni/tests/common/sanity.yaml b/test/integration/targets/nxos_vxlan_vtep_vni/tests/common/sanity.yaml new file mode 100644 index 0000000000..3119c0b03c --- /dev/null +++ b/test/integration/targets/nxos_vxlan_vtep_vni/tests/common/sanity.yaml @@ -0,0 +1,137 @@ +--- +- debug: msg="START TRANSPORT:{{ connection.transport }} nxos_vxlan_vtep_vni sanity test" + +- block: + - name: "Apply N7K specific setup config" + include: targets/nxos_vxlan_vtep/tasks/platform/n7k/setup.yaml + when: platform | match('N7K') + + - name: "Enable feature nv overlay" + nxos_config: + commands: + - feature nv overlay + provider: "{{ connection }}" + match: none + + - name: configure vxlan_vtep + nxos_vxlan_vtep: + interface: nve1 + host_reachability: True + provider: "{{ connection }}" + + - name: configure vxlan_vtep_vni assoc-vrf + nxos_vxlan_vtep_vni: &conf1 + interface: nve1 + vni: 6000 + assoc_vrf: True + provider: "{{ connection }}" + register: result + + - assert: &true + that: + - "result.changed == true" + + - name: "Conf 1 Idempotence" + nxos_vxlan_vtep_vni: *conf1 + register: result + + - assert: &false + that: + - "result.changed == false" + + - name: remove vxlan_vtep_vni + nxos_vxlan_vtep_vni: + interface: nve1 + vni: 6000 + assoc_vrf: True + state: absent + provider: "{{ connection }}" + + - name: configure vxlan_vtep_vni mcast + nxos_vxlan_vtep_vni: &conf2 + interface: nve1 + vni: 8000 + multicast_group: 224.1.1.1 + provider: "{{ connection }}" + register: result + + - assert: *true + + - name: "Conf 2 Idempotence" + nxos_vxlan_vtep_vni: *conf2 + register: result + + - assert: *false + + - name: "remove config" + nxos_vxlan_vtep_vni: &remove + interface: nve1 + vni: 8000 + state: absent + provider: "{{ connection }}" + + - name: configure vxlan_vtep + nxos_vxlan_vtep: + interface: nve1 + host_reachability: False + provider: "{{ connection }}" + + - block: + - name: configure vxlan_vtep_vni peer-list + nxos_vxlan_vtep_vni: &conf3 + interface: nve1 + vni: 8000 + peer_list: + - 1.1.1.1 + - 2.2.2.2 + - 3.3.3.3 + - 4.4.4.4 + ingress_replication: static + provider: "{{ connection }}" + register: result + + - assert: *true + + - name: "Conf 3 Idempotence" + nxos_vxlan_vtep_vni: *conf3 + register: result + + - assert: *false + + - name: remove vxlan_vtep_vni + nxos_vxlan_vtep_vni: *remove + register: result + + - assert: *true + + - name: "remove Idempotence" + nxos_vxlan_vtep_vni: *remove + register: result + + - assert: *false + + when: (platform | search('N9K')) + + when: (platform | search("N7K|N9K")) + + always: + - name: "Apply N7K specific cleanup config" + include: targets/nxos_vxlan_vtep/tasks/platform/n7k/cleanup.yaml + when: platform | match('N7K') + + - name: remove vxlan_vtep + nxos_vxlan_vtep: + interface: nve1 + shutdown: true + state: absent + provider: "{{ connection }}" + ignore_errors: yes + + - name: "Disable feature nv overlay" + nxos_feature: + feature: nve + state: disabled + provider: "{{ connection }}" + ignore_errors: yes + +- debug: msg="END TRANSPORT:{{ connection.transport }} nxos_vxlan_vtep_vni sanity test" diff --git a/test/integration/targets/nxos_vxlan_vtep_vni/tests/nxapi/sanity.yaml b/test/integration/targets/nxos_vxlan_vtep_vni/tests/nxapi/sanity.yaml new file mode 100644 index 0000000000..1c0c43c5ac --- /dev/null +++ b/test/integration/targets/nxos_vxlan_vtep_vni/tests/nxapi/sanity.yaml @@ -0,0 +1,4 @@ +--- +- set_fact: connection="{{ nxapi }}" + +- import_tasks: targets/nxos_vxlan_vtep_vni/tests/common/sanity.yaml