nxos: Removing local-nxapi plugin and related parameters' usage from the integration tests. (#65068)

* nxos_integration_tests: Removing obsolete provider parameter

* nxos: removing support for local-nxapi plugin

* nxos: removing LocalNxapi plugin implementation

* nxos_nxapi: removing local plugin usage

* REVERT - nxos: removing LocalNxapi plugin implementation

* Addressing yamllint issues

* Removing the condition on the debug messages

* Restoring changes done to nxos_nxapi* tests

* Retaining timeout of 500 on nxos_smoke test

* Some cleanup

* Addressing latest comments

* Restoring the nxos_smoke and removing timeout from nxos_config and nxos_rollback
pull/66272/head
nkshrishail 5 years ago committed by Nilashish Chakraborty
parent 45713aa38f
commit 01e4c41be4

@ -41,7 +41,7 @@ class ActionModule(ActionNetworkModule):
self._config_module = True if module_name == 'nxos_config' else False
persistent_connection = self._play_context.connection.split('.')[-1]
if (persistent_connection == 'httpapi' or self._task.args.get('provider', {}).get('transport') == 'nxapi') \
if (self._play_context.connection in ('httpapi', 'local') or self._task.args.get('provider', {}).get('transport') == 'nxapi') \
and module_name in ('nxos_file_copy', 'nxos_nxapi'):
return {'failed': True, 'msg': "Transport type 'nxapi' is not valid for '%s' module." % (module_name)}

@ -24,10 +24,4 @@
include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: run test cases (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
loop_var: test_case_to_run

@ -1,7 +1,5 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_aaa_server radius.yaml sanity test"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
- name: "Setup"
nxos_aaa_server: &remove
@ -9,7 +7,6 @@
deadtime: default
server_timeout: default
directed_request: default
provider: "{{ connection }}"
state: default
ignore_errors: yes
@ -17,7 +14,6 @@
- name: "Configure radius server defaults"
nxos_aaa_server: &configure_default_radius
server_type: radius
provider: "{{ connection }}"
state: present
register: result
@ -35,7 +31,6 @@
server_timeout: 9
deadtime: 20
directed_request: enabled
provider: "{{ connection }}"
state: present
register: result
@ -60,7 +55,6 @@
server_type: radius
encrypt_type: 7
global_key: test_key
provider: "{{ connection }}"
state: present
register: result
@ -79,7 +73,6 @@
server_timeout: default
global_key: default
directed_request: default
provider: "{{ connection }}"
state: default
register: result

@ -1,12 +1,9 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_aaa_server tacacs.yaml sanity test"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
- name: "Enable feature tacacs+"
nxos_feature:
feature: tacacs+
provider: "{{ connection }}"
state: enabled
- name: "Setup"
@ -15,7 +12,6 @@
deadtime: default
server_timeout: default
directed_request: default
provider: "{{ connection }}"
state: default
ignore_errors: yes
@ -23,7 +19,6 @@
- name: "Configure tacacs server defaults"
nxos_aaa_server: &configure_default_tacacs
server_type: tacacs
provider: "{{ connection }}"
state: present
register: result
@ -41,7 +36,6 @@
server_timeout: 9
deadtime: 20
directed_request: enabled
provider: "{{ connection }}"
state: present
register: result
@ -66,7 +60,6 @@
server_type: tacacs
encrypt_type: 7
global_key: test_key
provider: "{{ connection }}"
state: present
register: result
@ -85,7 +78,6 @@
server_timeout: default
global_key: default
directed_request: default
provider: "{{ connection }}"
state: default
register: result
@ -110,7 +102,6 @@
- name: "Disable feature tacacs+"
nxos_feature:
feature: tacacs+
provider: "{{ connection }}"
state: disabled
- debug: msg="END connection={{ ansible_connection }} nxos_aaa_server tacacs.yaml sanity test"

@ -24,10 +24,4 @@
include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: run test cases (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
loop_var: test_case_to_run

@ -1,13 +1,10 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_aaa_server_host radius.yaml sanity test"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
- name: "Setup"
nxos_aaa_server_host: &remove
server_type: radius
address: 8.8.8.8
provider: "{{ connection }}"
state: absent
ignore_errors: yes
@ -16,7 +13,6 @@
nxos_aaa_server_host: &configure_default_radius
server_type: radius
address: 8.8.8.8
provider: "{{ connection }}"
state: present
register: result
@ -51,7 +47,6 @@
host_timeout: 25
auth_port: 2083
acct_port: 2084
provider: "{{ connection }}"
state: present
register: result
@ -70,7 +65,6 @@
host_timeout: default
auth_port: 1000
acct_port: default
provider: "{{ connection }}"
state: present
register: result
@ -91,7 +85,6 @@
acct_port: 2084
encrypt_type: 0
key: hello
provider: "{{ connection }}"
state: present
register: result
@ -118,7 +111,6 @@
acct_port: 2084
encrypt_type: 7
key: hello
provider: "{{ connection }}"
state: present
register: result
@ -139,7 +131,6 @@
acct_port: 2084
encrypt_type: 7
key: helloback
provider: "{{ connection }}"
state: present
register: result
@ -163,7 +154,6 @@
acct_port: default
encrypt_type: 7
key: default
provider: "{{ connection }}"
state: present
register: result
@ -183,7 +173,6 @@
auth_port: default
acct_port: default
key: default
provider: "{{ connection }}"
state: present
register: result

@ -1,19 +1,15 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_aaa_server_host tacacs.yaml sanity test"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
- name: "Enable feature tacacs+"
nxos_feature:
feature: tacacs+
provider: "{{ connection }}"
state: enabled
- name: "Setup"
nxos_aaa_server_host: &remove
server_type: tacacs
address: 8.8.8.8
provider: "{{ connection }}"
state: absent
ignore_errors: yes
@ -23,7 +19,6 @@
nxos_aaa_server_host: &configure_default_tacacs
server_type: tacacs
address: 8.8.8.8
provider: "{{ connection }}"
state: present
register: result
@ -57,7 +52,6 @@
address: 8.8.8.8
host_timeout: 25
tacacs_port: 89
provider: "{{ connection }}"
state: present
register: result
@ -75,7 +69,6 @@
address: 8.8.8.8
host_timeout: default
tacacs_port: 100
provider: "{{ connection }}"
state: present
register: result
@ -95,7 +88,6 @@
tacacs_port: default
encrypt_type: 0
key: hello
provider: "{{ connection }}"
state: present
register: result
@ -121,7 +113,6 @@
tacacs_port: 89
encrypt_type: 7
key: hello
provider: "{{ connection }}"
state: present
register: result
@ -141,7 +132,6 @@
tacacs_port: 89
encrypt_type: 7
key: helloback
provider: "{{ connection }}"
state: present
register: result
@ -164,7 +154,6 @@
tacacs_port: 89
encrypt_type: 7
key: default
provider: "{{ connection }}"
state: present
register: result
@ -183,7 +172,6 @@
host_timeout: default
tacacs_port: default
key: default
provider: "{{ connection }}"
state: present
register: result
@ -208,7 +196,6 @@
- name: "Disable feature tacacs+"
nxos_feature:
feature: tacacs+
provider: "{{ connection }}"
state: disabled
- debug: msg="END connection={{ ansible_connection }} nxos_aaa_server_host tacacs.yaml sanity test"

@ -24,10 +24,4 @@
include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: run test cases (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
loop_var: test_case_to_run

@ -1,7 +1,5 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_acl sanity test"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
- set_fact: time_range="ans-range"
when: platform is not search('N35|N5K|N6K')
@ -10,7 +8,6 @@
nxos_acl: &remove
name: TEST_ACL
seq: 10
provider: "{{ connection }}"
state: delete_acl
ignore_errors: yes
@ -37,7 +34,6 @@
rst: 'enable'
syn: 'enable'
time_range: "{{time_range|default(omit)}}"
provider: "{{ connection }}"
state: present
register: result
@ -76,7 +72,6 @@
rst: 'enable'
syn: 'enable'
time_range: "{{time_range|default(omit)}}"
provider: "{{ connection }}"
state: present
register: result
@ -94,7 +89,6 @@
seq: 20
action: remark
remark: test_remark
provider: "{{ connection }}"
state: present
register: result
@ -112,7 +106,6 @@
seq: 20
action: remark
remark: changed_remark
provider: "{{ connection }}"
state: present
register: result
@ -134,7 +127,6 @@
dest: any
fragments: enable
precedence: network
provider: "{{ connection }}"
state: present
register: result
@ -155,7 +147,6 @@
src: any
dest: any
precedence: network
provider: "{{ connection }}"
state: present
register: result
@ -178,7 +169,6 @@
src_port1: 1200
dest: any
precedence: network
provider: "{{ connection }}"
state: present
register: result
@ -199,7 +189,6 @@
src: any
dest: any
precedence: network
provider: "{{ connection }}"
state: present
register: result
@ -215,7 +204,6 @@
nxos_acl: &remace30
name: TEST_ACL
seq: 30
provider: "{{ connection }}"
state: absent
register: result

@ -24,10 +24,4 @@
include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: run test cases (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
loop_var: test_case_to_run

@ -1,7 +1,5 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_acl_interface sanity test"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
# Select interface for test
- set_fact: intname="{{ nxos_int1 }}"
@ -13,7 +11,6 @@
nxos_config: &default
lines:
- "default interface {{ intname }}"
provider: "{{ connection }}"
ignore_errors: yes
- name: "Setup: Put interface into no switch port mode"
@ -23,14 +20,12 @@
parents:
- "interface {{ intname }}"
match: none
provider: "{{ connection }}"
ignore_errors: yes
- name: "Setup: Cleanup possibly existing acl"
nxos_acl: &remove
name: ANSIBLE_ACL
seq: 10
provider: "{{ connection }}"
state: delete_acl
ignore_errors: yes
@ -42,7 +37,6 @@
proto: tcp
src: 192.0.2.1/24
dest: any
provider: "{{ connection }}"
- block:
- name: Configure acl interface egress
@ -50,7 +44,6 @@
name: ANSIBLE_ACL
interface: "{{ intname }}"
direction: egress
provider: "{{ connection }}"
state: present
register: result
@ -71,7 +64,6 @@
name: ANSIBLE_ACL
interface: "{{ intname }}"
direction: ingress
provider: "{{ connection }}"
state: present
register: result
@ -88,7 +80,6 @@
name: ANSIBLE_ACL
interface: "{{ intname }}"
direction: egress
provider: "{{ connection }}"
state: absent
register: result
@ -105,7 +96,6 @@
name: ANSIBLE_ACL
interface: "{{ intname }}"
direction: ingress
provider: "{{ connection }}"
state: absent
register: result

@ -24,10 +24,4 @@
include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: run test cases (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
loop_var: test_case_to_run

@ -1,7 +1,5 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_banner sanity test"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
- set_fact: banner_exec_image_ok
# N5K/N6K/N9K-F support banner exec but have image defects

@ -25,9 +25,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: run test cases (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

@ -1,7 +1,5 @@
---
- debug: msg="START connection={{ ansible_connection }}/sanity.yaml"
- debug: msg="Using provider={{ connection.transport }}/sanity.yaml"
when: ansible_connection == "local"
- block:
- name: update role to priv-14

@ -1,7 +1,5 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_bfd_global sanity test"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
- name: set facts common
# nd_* vars are "non-default" values
@ -81,7 +79,6 @@
- name: Setup
nxos_feature: &setup_teardown
feature: bfd
provider: "{{ connection }}"
state: disabled
ignore_errors: yes
@ -117,7 +114,6 @@
fabricpath_interval: "{{ nd_fab_interval | default(omit) }}"
fabricpath_slow_timer: "{{ nd_fab_slow | default(omit) }}"
fabricpath_vlan: "{{ nd_fab_vlan | default(omit) }}"
provider: "{{ connection }}"
register: result
- assert: &true
@ -148,7 +144,6 @@
fabricpath_interval: "{{ fab_interval | default(omit) }}"
fabricpath_slow_timer: "{{ fab_slow | default(omit) }}"
fabricpath_vlan: "{{ fab_vlan | default(omit) }}"
provider: "{{ connection }}"
register: result
- assert: *true

@ -25,9 +25,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: run test cases (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

@ -1,7 +1,5 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_bgp parameter test"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
- debug: msg="This bgp_disable_policy is not supported on {{ image_version }}"
when: imagetag is search("A8|D1")
@ -12,14 +10,12 @@
- name: "Disable feature BGP"
nxos_feature:
feature: bgp
provider: "{{ connection }}"
state: disabled
ignore_errors: yes
- name: "Enable feature BGP"
nxos_feature:
feature: bgp
provider: "{{ connection }}"
state: enabled
ignore_errors: yes
@ -30,7 +26,6 @@
disable_policy_batching: true
disable_policy_batching_ipv4_prefix_list: v4_p
disable_policy_batching_ipv6_prefix_list: v6_p
provider: "{{ connection }}"
register: result
when: bgp_disable_policy
@ -55,7 +50,6 @@
disable_policy_batching: false
disable_policy_batching_ipv4_prefix_list: default
disable_policy_batching_ipv6_prefix_list: default
provider: "{{ connection }}"
register: result
when: bgp_disable_policy
@ -77,7 +71,6 @@
- name: "Disable feature bgp"
nxos_feature:
feature: bgp
provider: "{{ connection }}"
state: disabled
ignore_errors: yes

@ -1,7 +1,5 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_bgp parameter test"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
- debug: msg="This test is not supported on {{ image_version }}"
when: imagetag is search("D1")
@ -12,7 +10,6 @@
- name: "Disable feature BGP"
nxos_feature:
feature: bgp
provider: "{{ connection }}"
state: disabled
ignore_errors: yes
when: test_helsinki
@ -20,7 +17,6 @@
- name: "Enable feature BGP"
nxos_feature:
feature: bgp
provider: "{{ connection }}"
state: enabled
ignore_errors: yes
when: test_helsinki
@ -38,7 +34,6 @@
reconnect_interval: 55
timer_bgp_hold: 110
timer_bgp_keepalive: 45
provider: "{{ connection }}"
with_items: "{{ vrfs }}"
register: result
when: test_helsinki
@ -70,7 +65,6 @@
reconnect_interval: default
timer_bgp_hold: default
timer_bgp_keepalive: default
provider: "{{ connection }}"
with_items: "{{ vrfs }}"
register: result
when: test_helsinki
@ -94,7 +88,6 @@
- name: "Disable feature bgp"
nxos_feature:
feature: bgp
provider: "{{ connection }}"
state: disabled
ignore_errors: yes
when: test_helsinki

@ -1,7 +1,5 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_bgp parameter test"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
- debug: msg="This bgp_isolate is not supported on {{ image_version }}"
@ -13,14 +11,12 @@
- name: "Disable feature BGP"
nxos_feature:
feature: bgp
provider: "{{ connection }}"
state: disabled
ignore_errors: yes
- name: "Enable feature BGP"
nxos_feature:
feature: bgp
provider: "{{ connection }}"
state: enabled
ignore_errors: yes
@ -31,7 +27,6 @@
nxos_bgp: &set1
asn: 65535
isolate: false
provider: "{{ connection }}"
register: result
when: bgp_isolate
@ -54,7 +49,6 @@
nxos_bgp: &reset1
asn: 65535
isolate: true
provider: "{{ connection }}"
register: result
when: bgp_isolate
@ -76,7 +70,6 @@
- name: "Disable feature bgp"
nxos_feature:
feature: bgp
provider: "{{ connection }}"
state: disabled
ignore_errors: yes

@ -1,19 +1,15 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_bgp parameter test"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
- name: "Disable feature BGP"
nxos_feature:
feature: bgp
provider: "{{ connection }}"
state: disabled
ignore_errors: yes
- name: "Enable feature BGP"
nxos_feature:
feature: bgp
provider: "{{ connection }}"
state: enabled
ignore_errors: yes
@ -35,7 +31,6 @@
graceful_restart_helper: true
log_neighbor_changes: true
maxas_limit: 50
provider: "{{ connection }}"
with_items: "{{ vrfs }}"
register: result
@ -67,7 +62,6 @@
log_neighbor_changes: false
maxas_limit: default
router_id: default
provider: "{{ connection }}"
with_items: "{{ vrfs }}"
register: result
@ -85,7 +79,6 @@
asn: 65535
vrf: "{{ item }}"
cluster_id: 10.0.0.1
provider: "{{ connection }}"
with_items: "{{ vrfs }}"
register: result
@ -103,7 +96,6 @@
asn: 65535
vrf: "{{ item }}"
cluster_id: default
provider: "{{ connection }}"
with_items: "{{ vrfs }}"
register: result
@ -124,7 +116,6 @@
- 16
- 22
- 18
provider: "{{ connection }}"
register: result
- assert: *true
@ -140,7 +131,6 @@
asn: 65535
confederation_id: default
confederation_peers: default
provider: "{{ connection }}"
register: result
- assert: *true
@ -161,7 +151,6 @@
- 16
- 22
- 18
provider: "{{ connection }}"
register: result
- assert: *true
@ -179,7 +168,6 @@
local_as: default
confederation_id: default
confederation_peers: default
provider: "{{ connection }}"
register: result
- assert: *true
@ -196,7 +184,6 @@
vrf: myvrf
local_as: 33
confederation_id: 99
provider: "{{ connection }}"
register: result
- assert: *true
@ -213,7 +200,6 @@
vrf: myvrf
confederation_id: default
local_as: default
provider: "{{ connection }}"
register: result
- assert: *true
@ -235,7 +221,6 @@
fast_external_fallover: false
flush_routes: true
shutdown: true
provider: "{{ connection }}"
register: result
- assert: *true
@ -254,7 +239,6 @@
fast_external_fallover: true
flush_routes: false
shutdown: false
provider: "{{ connection }}"
register: result
- assert: *true
@ -269,7 +253,6 @@
- name: "Disable feature bgp"
nxos_feature:
feature: bgp
provider: "{{ connection }}"
state: disabled
ignore_errors: yes

@ -1,7 +1,5 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_bgp sanity test"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
- set_fact: neighbor_down_fib_accelerate="true"
when: (not titanium) and ((imagetag != 'N1') and (imagetag != 'D1'))
@ -15,14 +13,12 @@
- name: "Enable feature BGP"
nxos_feature:
feature: bgp
provider: "{{ connection }}"
state: enabled
ignore_errors: yes
- name: "Setup"
nxos_bgp: &remove
asn: 65535
provider: "{{ connection }}"
state: absent
ignore_errors: yes
register: result
@ -32,7 +28,6 @@
nxos_bgp: &configure_default
asn: 65535
router_id: 192.0.2.1
provider: "{{ connection }}"
state: present
register: result
@ -94,7 +89,6 @@
event_history_events: size_medium
event_history_periodic: size_small
suppress_fib_pending: true
provider: "{{ connection }}"
state: present
register: result
@ -121,7 +115,6 @@
- name: "Disable feature bgp"
nxos_feature:
feature: bgp
provider: "{{ connection }}"
state: disabled
rescue:
@ -132,7 +125,6 @@
- name: "Disable feature bgp"
nxos_feature:
feature: bgp
provider: "{{ connection }}"
state: disabled
ignore_errors: yes

@ -1,7 +1,5 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_bgp parameter test"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
- set_fact: bgp_best_path_limit="false"
- set_fact: bgp_best_path_limit="true"
@ -14,14 +12,12 @@
- name: "Disable feature BGP"
nxos_feature:
feature: bgp
provider: "{{ connection }}"
state: disabled
ignore_errors: yes
- name: "Enable feature BGP"
nxos_feature:
feature: bgp
provider: "{{ connection }}"
state: enabled
ignore_errors: yes
@ -33,7 +29,6 @@
asn: 65535
vrf: "{{ item }}"
timer_bestpath_limit: 255
provider: "{{ connection }}"
with_items: "{{ vrfs }}"
register: result
@ -55,7 +50,6 @@
asn: 65535
vrf: "{{ item }}"
timer_bestpath_limit: default
provider: "{{ connection }}"
with_items: "{{ vrfs }}"
register: result
@ -76,7 +70,6 @@
nxos_bgp: &set2
asn: 65535
suppress_fib_pending: false
provider: "{{ connection }}"
register: result
- assert: *true
@ -94,7 +87,6 @@
nxos_bgp: &reset2
asn: 65535
suppress_fib_pending: true
provider: "{{ connection }}"
register: result
- assert: *true
@ -115,7 +107,6 @@
- name: "Disable feature bgp"
nxos_feature:
feature: bgp
provider: "{{ connection }}"
state: disabled
ignore_errors: yes

@ -25,9 +25,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: run test cases (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

@ -1,7 +1,5 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_bgp_af sanity test"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
- set_fact: advertise_l2vpn_evpn="true"
when: platform is search('N9K')
@ -9,21 +7,18 @@
- name: "Enable feature BGP"
nxos_feature:
feature: bgp
provider: "{{ connection }}"
state: enabled
ignore_errors: yes
- name: "Enable feature nv overlay"
nxos_feature:
feature: nv overlay
provider: "{{ connection }}"
state: enabled
ignore_errors: yes
- name: "Setup"
nxos_bgp: &remove
asn: 65535
provider: "{{ connection }}"
state: absent
ignore_errors: yes
@ -41,7 +36,6 @@
afi: ipv4
safi: unicast
advertise_l2vpn_evpn: "{{advertise_l2vpn_evpn|default(omit)}}"
provider: "{{ connection }}"
state: present
register: result
@ -63,7 +57,6 @@
vrf: testing
afi: ipv4
safi: unicast
provider: "{{ connection }}"
state: absent
register: result
@ -82,7 +75,6 @@
additional_paths_send: true
client_to_client: False
default_information_originate: true
provider: "{{ connection }}"
state: present
with_items: "{{ vrfs }}"
register: result
@ -109,7 +101,6 @@
additional_paths_send: False
client_to_client: True
default_information_originate: False
provider: "{{ connection }}"
state: present
with_items: "{{ vrfs }}"
register: result
@ -129,7 +120,6 @@
vrf: "{{ item }}"
afi: ipv4
safi: unicast
provider: "{{ connection }}"
state: absent
with_items: "{{ vrfs }}"
register: result
@ -153,7 +143,6 @@
suppress_inactive: true
table_map: RouteMap
table_map_filter: true
provider: "{{ connection }}"
state: present
with_items: "{{ vrfs }}"
register: result
@ -184,7 +173,6 @@
suppress_inactive: False
table_map: default
table_map_filter: False
provider: "{{ connection }}"
state: present
with_items: "{{ vrfs }}"
register: result
@ -219,7 +207,6 @@
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']]
provider: "{{ connection }}"
state: present
with_items: "{{ vrfs }}"
register: result
@ -247,7 +234,6 @@
inject_map: [['fsd_inject_map', 'fsd_exist_map']]
networks: [['192.168.2.0/24']]
redistribute: [['lisp', 'rm_lisp']]
provider: "{{ connection }}"
state: present
with_items: "{{ vrfs }}"
register: result
@ -275,7 +261,6 @@
inject_map: default
networks: default
redistribute: default
provider: "{{ connection }}"
state: present
with_items: "{{ vrfs }}"
register: result
@ -312,13 +297,11 @@
- name: "Disable feature bgp"
nxos_feature: &disable_bgp
feature: bgp
provider: "{{ connection }}"
state: disabled
- name: "Disable feature nv overlay"
nxos_feature: &disable_nvoverlay
feature: nv overlay
provider: "{{ connection }}"
state: disabled
ignore_errors: yes

@ -25,9 +25,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: run test cases (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

@ -1,7 +1,5 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_bgp_neighbor sanity test"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
- set_fact: intname="{{ nxos_int1 }}"
@ -21,7 +19,6 @@
- name: "Setup: Disable features"
nxos_feature:
feature: "{{ item }}"
provider: "{{ connection }}"
state: disabled
loop: ['bgp', 'bfd']
ignore_errors: yes
@ -29,7 +26,6 @@
- name: "Setup: Enable features"
nxos_feature:
feature: "{{ item }}"
provider: "{{ connection }}"
state: enabled
loop: ['bgp', 'bfd']
@ -54,7 +50,6 @@
description: "just a description"
update_source: "{{ intname.capitalize() }}"
shutdown: true
provider: "{{ connection }}"
state: present
with_items: "{{ vrfs }}"
register: result
@ -92,7 +87,6 @@
description: default
update_source: default
shutdown: False
provider: "{{ connection }}"
state: present
with_items: "{{ vrfs }}"
register: result
@ -111,7 +105,6 @@
asn: 65535
neighbor: 192.0.2.3/32
vrf: "{{ item }}"
provider: "{{ connection }}"
state: absent
with_items: "{{ vrfs }}"
register: result
@ -132,7 +125,6 @@
vrf: "{{ item }}"
description: "tested by ansible"
remove_private_as: "{{remove_private_asa|default(omit)}}"
provider: "{{ connection }}"
state: present
with_items: "{{ vrfs }}"
register: result
@ -153,7 +145,6 @@
vrf: "{{ item }}"
description: "tested by ansible"
remove_private_as: "{{remove_private_asr|default(omit)}}"
provider: "{{ connection }}"
state: present
with_items: "{{ vrfs }}"
register: result
@ -291,7 +282,6 @@
asn: 65535
neighbor: 192.0.2.3
vrf: "{{ item }}"
provider: "{{ connection }}"
state: absent
with_items: "{{ vrfs }}"
register: result
@ -310,7 +300,6 @@
asn: 65535
neighbor: 192.168.1.1
bfd: enable
provider: "{{ connection }}"
state: present
register: result
@ -327,7 +316,6 @@
asn: 65535
neighbor: 192.168.1.1
bfd: disable
provider: "{{ connection }}"
state: present
register: result
@ -343,7 +331,6 @@
- name: "Teardown: Disable features"
nxos_feature:
feature: "{{ item }}"
provider: "{{ connection }}"
state: disabled
loop: ['bgp', 'bfd']
ignore_errors: yes

@ -25,9 +25,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: run test cases (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

@ -1,7 +1,5 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_bgp_neighbor_af sanity test"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
- set_fact: soft_reconfiguration_ina="always"
when: imagetag is not search("D1|N1")
@ -9,14 +7,12 @@
- name: "Disable feature BGP"
nxos_feature: &disable_bgp
feature: bgp
provider: "{{ connection }}"
state: disabled
ignore_errors: yes
- name: "Enable feature BGP"
nxos_feature:
feature: bgp
provider: "{{ connection }}"
state: enabled
ignore_errors: yes
@ -47,7 +43,6 @@
suppress_inactive: True
unsuppress_map: 'unsup_map'
weight: '30'
provider: "{{ connection }}"
state: present
register: result
@ -89,7 +84,6 @@
suppress_inactive: False
unsuppress_map: default
weight: default
provider: "{{ connection }}"
state: present
register: result
@ -107,7 +101,6 @@
neighbor: '192.0.2.3'
afi: ipv4
safi: unicast
provider: "{{ connection }}"
state: absent
register: result
@ -133,7 +126,6 @@
max_prefix_threshold: 50
route_map_in: 'rm_in'
route_map_out: 'rm_out'
provider: "{{ connection }}"
state: present
register: result
@ -159,7 +151,6 @@
max_prefix_threshold: default
route_map_in: default
route_map_out: default
provider: "{{ connection }}"
state: present
register: result
@ -189,7 +180,6 @@
vrf: 'blue'
neighbor: '192.0.2.3'
remote_as: 2
provider: "{{ connection }}"
- name: "Configure BGP neighbor 3"
nxos_bgp_neighbor_af: &configure3
@ -205,7 +195,6 @@
soft_reconfiguration_in: "{{soft_reconfiguration_ina|default(omit)}}"
soo: '3:3'
next_hop_third_party: True
provider: "{{ connection }}"
state: present
register: result
@ -229,7 +218,6 @@
as_override: False
send_community: default
soo: default
provider: "{{ connection }}"
state: present
register: result
@ -244,7 +232,6 @@
- name: "Setup: Remove BGP config"
nxos_bgp: &remove
asn: 65535
provider: "{{ connection }}"
state: absent
register: result
@ -255,7 +242,6 @@
asn: 65535
neighbor: '192.0.2.2'
remote_as: 65535
provider: "{{ connection }}"
- name: "Configure BGP neighbor 4"
nxos_bgp_neighbor_af: &configure4
@ -264,7 +250,6 @@
afi: ipv4
safi: unicast
route_reflector_client: 'true'
provider: "{{ connection }}"
register: result
- assert: *true
@ -282,7 +267,6 @@
afi: ipv4
safi: unicast
route_reflector_client: False
provider: "{{ connection }}"
register: result
- assert: *true

@ -25,9 +25,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: run test cases (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

@ -8,7 +8,6 @@
- show interface mgmt0 | json
wait_for:
- "result[1].TABLE_interface.ROW_interface.state foo up"
provider: "{{ connection }}"
register: result
ignore_errors: yes

@ -8,7 +8,6 @@
- show interface mgmt0 | json
wait_for:
- "result[1].TABLE_interface.ROW_interface.state eq up"
provider: "{{ connection }}"
register: result
- assert:
@ -22,7 +21,6 @@
- show interface mgmt0 | json
wait_for:
- "result[1].TABLE_interface.ROW_interface.state == up"
provider: "{{ connection }}"
register: result
- assert:

@ -8,7 +8,6 @@
- show interface mgmt0 | json
wait_for:
- "result[1].TABLE_interface.ROW_interface.eth_ip_mask gt 0"
provider: "{{ connection }}"
register: result
- assert:
@ -22,7 +21,6 @@
- show interface mgmt0 | json
wait_for:
- "result[1].TABLE_interface.ROW_interface.eth_ip_mask > 0"
provider: "{{ connection }}"
register: result
- assert:

@ -8,7 +8,6 @@
- show interface mgmt0 | json
wait_for:
- "result[1].TABLE_interface.ROW_interface.eth_ip_mask ge 0"
provider: "{{ connection }}"
register: result
- assert:
@ -22,7 +21,6 @@
- show interface mgmt0 | json
wait_for:
- "result[1].TABLE_interface.ROW_interface.eth_ip_mask >= 0"
provider: "{{ connection }}"
register: result
- assert:

@ -4,7 +4,6 @@
- name: run invalid command
nxos_command:
commands: ['show foo']
provider: "{{ connection }}"
register: result
ignore_errors: yes
@ -17,7 +16,6 @@
commands:
- show version
- show foo
provider: "{{ connection }}"
register: result
ignore_errors: yes

@ -8,7 +8,6 @@
- show interface mgmt0 | json
wait_for:
- "result[1].TABLE_interface.ROW_interface.eth_ip_mask lt 33"
provider: "{{ connection }}"
register: result
- assert:
@ -22,7 +21,6 @@
- show interface mgmt0 | json
wait_for:
- "result[1].TABLE_interface.ROW_interface.eth_ip_mask lt 33"
provider: "{{ connection }}"
register: result
- assert:

@ -8,7 +8,6 @@
- show interface mgmt0 | json
wait_for:
- "result[1].TABLE_interface.ROW_interface.eth_ip_mask le 32"
provider: "{{ connection }}"
register: result
- assert:
@ -22,7 +21,6 @@
- show interface mgmt0 | json
wait_for:
- "result[1].TABLE_interface.ROW_interface.eth_ip_mask <= 32"
provider: "{{ connection }}"
register: result
- assert:

@ -8,7 +8,6 @@
- show interface mgmt0 | json
wait_for:
- "result[1].TABLE_interface.ROW_interface.state neq down"
provider: "{{ connection }}"
register: result
- assert:
@ -23,7 +22,6 @@
- show interface mgmt0 | json
wait_for:
- "result[1].TABLE_interface.ROW_interface.state != down"
provider: "{{ connection }}"
register: result
- assert:

@ -4,7 +4,6 @@
- name: get output for single command
nxos_command:
commands: ['show version']
provider: "{{ connection }}"
register: result
- assert:
@ -16,7 +15,6 @@
commands:
- show version
- show interface
provider: "{{ connection }}"
register: result
- assert:

@ -7,7 +7,6 @@
- show version
wait_for:
- "result[0] contains bad_value_string"
provider: "{{ connection }}"
register: result
ignore_errors: yes

@ -9,7 +9,6 @@
wait_for:
- "result[0] contains NX-OS"
- "result[1].TABLE_interface.ROW_interface.interface contains mgmt"
provider: "{{ connection }}"
register: result
- assert:

@ -4,7 +4,6 @@
- name: "Disable feature BGP"
nxos_feature:
feature: bgp
provider: "{{ connection }}"
state: disabled
- block:
@ -22,14 +21,12 @@
- name: "Enable feature BGP"
nxos_feature:
feature: bgp
provider: "{{ connection }}"
state: enabled
- name: "Configure BGP defaults"
nxos_bgp: &configure_default
asn: 65535
router_id: 192.0.2.1
provider: "{{ connection }}"
state: present
register: result
@ -64,7 +61,6 @@
- name: "Disable feature bgp"
nxos_feature:
feature: bgp
provider: "{{ connection }}"
state: disabled
- debug: msg="END nxapi/sanity.yaml on connection={{ ansible_connection }}"

@ -12,7 +12,6 @@
parents:
- "interface {{ intname }}"
match: none
provider: "{{ connection }}"
- name: collect any backup files
find: &backups
@ -35,7 +34,6 @@
parents:
- "interface {{ intname }}"
backup: yes
provider: "{{ connection }}"
register: result
- assert:

@ -12,7 +12,6 @@
parents:
- "interface {{ intname }}"
match: none
provider: "{{ connection }}"
- name: configure device with defaults included
nxos_config:
@ -22,7 +21,6 @@
parents:
- "interface {{ intname }}"
defaults: yes
provider: "{{ connection }}"
register: result
- debug: var=result
@ -40,7 +38,6 @@
parents:
- "interface {{ intname }}"
defaults: yes
provider: "{{ connection }}"
register: result
- debug: var=result

@ -5,7 +5,6 @@
nxos_config:
lines: ip access-list test
match: none
provider: "{{ connection }}"
- name: "nxos_config sanity test"
nxos_config:
@ -18,7 +17,6 @@
parents: ip access-list test
before: no ip access-list test
match: exact
provider: "{{ connection }}"
- name: "nxos_config sanity test - replace block"
nxos_config:
@ -30,13 +28,11 @@
parents: ip access-list test
before: no ip access-list test
replace: block
provider: "{{ connection }}"
- name: teardown
nxos_config:
lines: no ip access-list test
match: none
provider: "{{ connection }}"
- debug: msg='Verify https://github.com/ansible/ansible/issues/50635'
@ -44,14 +40,12 @@
nxos_config:
lines:
- "default interface {{ nxos_int1 }}"
provider: "{{ connection }}"
- name: MAKE INTERFACE A SWITCHPORT
nxos_config:
lines:
- switchport
parents: "interface {{ nxos_int1 }}"
provider: "{{ connection }}"
- name: CONFIGURE EDGE TRUNK TYPE
nxos_config: &config
@ -60,7 +54,6 @@
- switchport access vlan 3333
- spanning-tree port type edge
parents: "interface {{ nxos_int1 }}"
provider: "{{ connection }}"
register: result
- assert:

@ -12,12 +12,10 @@
parents:
- "interface {{ intname }}"
match: none
provider: "{{ connection }}"
- name: save config
nxos_config:
save_when: always
provider: "{{ connection }}"
register: result
- assert:
@ -27,7 +25,6 @@
- name: save should always run
nxos_config:
save_when: always
provider: "{{ connection }}"
register: result
- assert:

@ -11,12 +11,10 @@
parents:
- "interface {{ intname }}"
match: none
provider: "{{ connection }}"
- name: configure device with config
nxos_config:
src: basic/config.j2
provider: "{{ connection }}"
defaults: yes
register: result
@ -29,7 +27,6 @@
- name: check device with config
nxos_config:
src: basic/config.j2
provider: "{{ connection }}"
register: result
- assert:

@ -6,7 +6,6 @@
- name: configure with invalid src
nxos_config:
src: basic/foobar.j2
provider: "{{ connection }}"
register: result
ignore_errors: yes

@ -12,7 +12,6 @@
parents:
- "interface {{ intname }}"
match: none
provider: "{{ connection }}"
- name: configure device with config
nxos_config:
@ -23,7 +22,6 @@
- "interface {{ intname }}"
match: none
defaults: yes
provider: "{{ connection }}"
register: result
- assert:
@ -40,7 +38,6 @@
parents:
- "interface {{ intname }}"
defaults: yes
provider: "{{ connection }}"
register: result
- assert:

@ -5,7 +5,6 @@
nxos_config: &clear
lines: no ip access-list test
match: none
provider: "{{ connection }}"
ignore_errors: yes
- name: configure sub level command using block replace
@ -17,7 +16,6 @@
- 40 permit ip 192.0.2.4/32 any log
parents: ip access-list test
replace: block
provider: "{{ connection }}"
register: result
- assert:
@ -38,7 +36,6 @@
- 40 permit ip 192.0.2.4/32 any log
parents: ip access-list test
replace: block
provider: "{{ connection }}"
register: result
- assert:

@ -5,12 +5,10 @@
nxos_config:
lines: hostname switch
match: none
provider: "{{ connection }}"
- name: configure top level command
nxos_config:
lines: hostname foo
provider: "{{ connection }}"
register: result
- assert:
@ -21,7 +19,6 @@
- name: configure top level command idempotent check
nxos_config:
lines: hostname foo
provider: "{{ connection }}"
register: result
- assert:
@ -32,6 +29,5 @@
nxos_config:
lines: hostname switch
match: none
provider: "{{ connection }}"
- debug: msg='END common/toplevel.yaml on connection={{ ansible_connection }}'

@ -5,13 +5,11 @@
nxos_config:
lines: hostname switch
match: none
provider: "{{ connection }}"
- name: configure top level command
nxos_config:
lines: hostname foo
match: strict
provider: "{{ connection }}"
register: result
- assert:
@ -23,7 +21,6 @@
nxos_config:
lines: hostname foo
match: strict
provider: "{{ connection }}"
register: result
- assert:
@ -34,6 +31,5 @@
nxos_config:
lines: hostname switch
match: none
provider: "{{ connection }}"
- debug: msg="END common/nonidempotent.yaml on connection={{ ansible_connection }}"

@ -5,7 +5,6 @@
nxos_config:
lines: feature bgp
match: none
provider: "{{ connection }}"
- name: configure multi level command
nxos_config:
@ -13,7 +12,6 @@
parents:
- router bgp 1
- address-family ipv4 unicast
provider: "{{ connection }}"
register: result
- assert:
@ -29,7 +27,6 @@
parents:
- router bgp 1
- address-family ipv4 unicast
provider: "{{ connection }}"
register: result
- assert:
@ -40,6 +37,5 @@
nxos_config:
lines: no feature bgp
match: none
provider: "{{ connection }}"
- debug: msg="END nxapi/mulitlevel.yaml"

@ -5,14 +5,12 @@
nxos_config:
lines: no ip access-list test
match: none
provider: "{{ connection }}"
ignore_errors: yes
- name: configure sub level command
nxos_config:
lines: 10 permit ip any any log
parents: ip access-list test
provider: "{{ connection }}"
register: result
- assert:
@ -25,7 +23,6 @@
nxos_config:
lines: 10 permit ip any any log
parents: ip access-list test
provider: "{{ connection }}"
register: result
- assert:
@ -36,6 +33,5 @@
nxos_config:
lines: no ip access-list test
match: none
provider: "{{ connection }}"
- debug: msg="END nxapi/sublevel.yaml"

@ -11,7 +11,6 @@
- 50 permit ip 192.0.2.5/32 any log
parents: ip access-list test
match: none
provider: "{{ connection }}"
ignore_errors: yes
- name: configure sub level command using exact match
@ -25,7 +24,6 @@
before: no ip access-list test
match: exact
replace: block
provider: "{{ connection }}"
register: result
- assert:
@ -47,7 +45,6 @@
- 40 permit ip 192.0.2.4/32 any log
parents: ip access-list test
match: exact
provider: "{{ connection }}"
register: result
- assert:
@ -58,6 +55,5 @@
nxos_config:
lines: no ip access-list test
match: none
provider: "{{ connection }}"
- debug: msg="END nxapi/sublevel_exact.yaml"

@ -11,7 +11,6 @@
- 50 permit ip 192.0.2.5/32 any log
parents: ip access-list test
match: none
provider: "{{ connection }}"
- name: configure sub level command using strict match
nxos_config:
@ -24,7 +23,6 @@
before: no ip access-list test
match: strict
replace: block
provider: "{{ connection }}"
register: result
- assert:
@ -46,7 +44,6 @@
- 40 permit ip 192.0.2.4/32 any log
parents: ip access-list test
match: strict
provider: "{{ connection }}"
register: result
- assert:
@ -57,6 +54,5 @@
nxos_config:
lines: no ip access-list test
match: none
provider: "{{ connection }}"
- debug: msg="END nxapi/sublevel_strict.yaml"

@ -6,14 +6,12 @@
lines:
- "snmp-server contact ansible"
- "hostname switch"
provider: "{{ connection }}"
match: none
- name: configure top level command with before
nxos_config:
lines: hostname foo
after: snmp-server contact bar
provider: "{{ connection }}"
register: result
- assert:
@ -26,7 +24,6 @@
nxos_config:
lines: hostname foo
after: snmp-server contact foo
provider: "{{ connection }}"
register: result
- assert:
@ -39,6 +36,5 @@
- "no snmp-server contact ansible"
- "hostname switch"
match: none
provider: "{{ connection }}"
- debug: msg="END nxapi/toplevel_after.yaml"

@ -7,13 +7,11 @@
- "snmp-server contact ansible"
- "hostname switch"
match: none
provider: "{{ connection }}"
- name: configure top level command with before
nxos_config:
lines: hostname foo
before: snmp-server contact bar
provider: "{{ connection }}"
register: result
- assert:
@ -26,7 +24,6 @@
nxos_config:
lines: hostname foo
before: snmp-server contact foo
provider: "{{ connection }}"
register: result
- assert:
@ -39,6 +36,5 @@
- "no snmp-server contact ansible"
- "hostname switch"
match: none
provider: "{{ connection }}"
- debug: msg="END nxapi/toplevel_before.yaml"

@ -25,9 +25,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: run test cases (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

@ -1,7 +1,5 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_evpn_global sanity test"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
- name: "Setup"
nxos_config: &remove_evpn_config
@ -12,7 +10,6 @@
- name: "Disable feature nv overlay"
nxos_feature: &disable_feature_nv_overlay
feature: nv overlay
provider: "{{ connection }}"
state: disabled
ignore_errors: yes
@ -20,7 +17,6 @@
- name: "Enable feature nv overlay"
nxos_feature: &enable_feature_nv_overlay
feature: nv overlay
provider: "{{ connection }}"
state: enabled
ignore_errors: yes

@ -25,9 +25,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: run test cases (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

@ -1,7 +1,5 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_evpn_vni sanity test"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
- set_fact: nvoe_supported="{{ platform is not search('N3K|N3L|N35')}}"
@ -9,7 +7,6 @@
nxos_config: &remove_evpn
lines: no nv overlay evpn
match: none
provider: "{{ connection }}"
ignore_errors: yes
when: nvoe_supported
@ -17,14 +14,12 @@
- name: "Enable feature BGP"
nxos_feature:
feature: bgp
provider: "{{ connection }}"
state: enabled
- name: "Enable nv overlay evpn"
nxos_config:
lines: nv overlay evpn
match: none
provider: "{{ connection }}"
- name: "Configure nxos_evpn_vni"
nxos_evpn_vni: &evpn_vni
@ -38,7 +33,6 @@
- auto
- "5000:10"
- "192.0.2.1:43"
provider: "{{ connection }}"
register: result
- assert: &true
@ -59,7 +53,6 @@
route_distinguisher: "50:20"
route_target_import: auto
route_target_export: auto
provider: "{{ connection }}"
register: result
- assert: *true
@ -76,7 +69,6 @@
route_distinguisher: default
route_target_import: default
route_target_export: default
provider: "{{ connection }}"
register: result
- assert: *true
@ -90,7 +82,6 @@
- name: "remove nxos_evpn_vni"
nxos_evpn_vni: &rvni
vni: 6000
provider: "{{ connection }}"
state: absent
register: result
@ -114,7 +105,6 @@
- name: "Disable feature bgp"
nxos_feature:
feature: bgp
provider: "{{ connection }}"
state: disabled
ignore_errors: yes
when: nvoe_supported

@ -1,13 +1,10 @@
---
- debug: msg="START connection={{ ansible_connection }}/all_facts.yaml"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
- name: test getting all facts
nxos_facts:
gather_subset:
- all
provider: "{{ connection }}"
register: result
- assert:

@ -1,11 +1,8 @@
---
- debug: msg="START connection={{ ansible_connection }}/default_facts.yaml"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
- name: test getting default facts
nxos_facts:
provider: "{{ connection }}"
register: result
- assert:

@ -1,13 +1,10 @@
---
- debug: msg="START connection={{ ansible_connection }}/invalid_subset.yaml"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
- name: test invalid subset (foobar)
nxos_facts:
gather_subset:
- "foobar"
provider: "{{ connection }}"
register: result
ignore_errors: true

@ -1,13 +1,10 @@
---
- debug: msg="START connection={{ ansible_connection }}/not_hardware_facts.yaml"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
- name: test not hardware
nxos_facts:
gather_subset:
- "!hardware"
provider: "{{ connection }}"
register: result
- assert:

@ -1,12 +1,9 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_facts sanity test"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
- name: "nxos_facts gather hardware facts"
nxos_facts:
gather_subset: hardware
provider: "{{ connection }}"
register: result
- assert:
@ -31,7 +28,6 @@
- name: "nxos_facts gather config facts"
nxos_facts:
gather_subset: config
provider: "{{ connection }}"
register: result
- assert:
@ -54,7 +50,6 @@
gather_subset:
- hardware
- config
provider: "{{ connection }}"
register: result
- assert:
@ -80,7 +75,6 @@
- name: "nxos_facts gather features facts"
nxos_facts:
gather_subset: features
provider: "{{ connection }}"
register: result
- assert:

@ -25,9 +25,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: run test cases (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

@ -5,12 +5,10 @@
nxos_config:
lines: no feature bgp
match: none
provider: "{{ connection }}"
- name: enable bgp
nxos_feature:
feature: bgp
provider: "{{ connection }}"
state: enabled
register: result
@ -21,7 +19,6 @@
- name: verify bgp
nxos_feature:
feature: bgp
provider: "{{ connection }}"
state: enabled
register: result
@ -32,7 +29,6 @@
- name: disable bgp
nxos_feature:
feature: bgp
provider: "{{ connection }}"
state: disabled
register: result
@ -43,7 +39,6 @@
- name: verify bgp
nxos_feature:
feature: bgp
provider: "{{ connection }}"
state: disabled
register: result
@ -55,6 +50,5 @@
nxos_config:
lines: no feature bgp
match: none
provider: "{{ connection }}"
- debug: msg="END connection={{ ansible_connection }}/configure.yaml"

@ -4,7 +4,6 @@
- name: configure invalid feature name
nxos_feature:
feature: invalid
provider: "{{ connection }}"
register: result
ignore_errors: yes

@ -25,9 +25,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: run test cases (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

@ -6,7 +6,6 @@
local_file: "./network-integration.cfg"
file_system: "bootflash:"
connect_ssh_port: "{{ ansible_ssh_port }}"
provider: "{{ nxapi }}"
register: result
ignore_errors: yes

@ -25,9 +25,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: run test cases (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

@ -1,7 +1,5 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_gir sanity test"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
- set_fact: gir_run="true"
- set_fact: gir_run="false"
@ -9,14 +7,12 @@
#- name: "Setup"
# nxos_gir: &setup
# system_mode_maintenance: false
# provider: "{{ connection }}"
# ignore_errors: yes
- block:
- name: "Put system in maintenance mode with reload reset reason"
nxos_gir: &reset_reason
system_mode_maintenance_on_reload_reset_reason: manual_reload
provider: "{{ connection }}"
register: result
- assert: &true
@ -35,7 +31,6 @@
nxos_gir: &remove_reason
system_mode_maintenance_on_reload_reset_reason: manual_reload
state: absent
provider: "{{ connection }}"
register: result
- assert: *true
@ -49,7 +44,6 @@
- name: "Put system in maintenance mode with timeout"
nxos_gir: &mtime
system_mode_maintenance_timeout: 30
provider: "{{ connection }}"
register: result
- assert: *true
@ -64,7 +58,6 @@
nxos_gir: &remove_timeout
system_mode_maintenance_timeout: 30
state: absent
provider: "{{ connection }}"
register: result
- assert: *true
@ -78,7 +71,6 @@
# - name: "Put system in maintenance mode"
# nxos_gir: &configure_system_mode_maintenance
# system_mode_maintenance: true
# provider: "{{ connection }}"
# register: result
#
# - assert: *true
@ -94,21 +86,18 @@
- name: "Remove snapshots"
nxos_snapshot:
action: delete_all
provider: "{{ connection }}"
ignore_errors: yes
- name: "Remove other config1"
nxos_config:
lines: no configure maintenance profile normal-mode
match: none
provider: "{{ connection }}"
ignore_errors: yes
- name: "Remove other config2"
nxos_config:
lines: no configure maintenance profile maintenance-mode
match: none
provider: "{{ connection }}"
ignore_errors: yes
# - name: "Put system back in normal mode"

@ -25,9 +25,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: run test cases (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

@ -1,26 +1,21 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_gir_profile_management sanity test"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
- name: "Setup - Remove maintenace mode profiles"
nxos_gir_profile_management: &remove_maintenance
mode: maintenance
provider: "{{ connection }}"
state: absent
ignore_errors: yes
- name: "Setup - Remove normal mode profiles"
nxos_gir_profile_management: &remove_normal
mode: normal
provider: "{{ connection }}"
state: absent
ignore_errors: yes
- name: "Setup - Turn on feature eigrp"
nxos_feature:
feature: eigrp
provider: "{{ connection }}"
state: enabled
ignore_errors: yes
@ -31,7 +26,6 @@
commands:
- router eigrp 11
- isolate
provider: "{{ connection }}"
state: present
register: result
@ -53,7 +47,6 @@
commands:
- router eigrp 11
- isolate
provider: "{{ connection }}"
state: present
register: result
@ -106,7 +99,6 @@
- name: "Turn off feature eigrp"
nxos_feature:
feature: eigrp
provider: "{{ connection }}"
state: disabled
- debug: msg="END connection={{ ansible_connection }} nxos_gir_profile_management sanity test"

@ -25,9 +25,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: run test cases (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

@ -1,7 +1,5 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_hsrp sanity test"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
# Select interface for test
- set_fact: intname1="{{ nxos_int1 }}"
@ -11,7 +9,6 @@
- name: "Enable feature hsrp"
nxos_feature:
feature: hsrp
provider: "{{ connection }}"
state: enabled
- name: "change int1 mode"
@ -21,7 +18,6 @@
parents:
- "interface {{ intname1 }}"
match: none
provider: "{{ connection }}"
- name: "change int2 mode"
nxos_config:
@ -30,7 +26,6 @@
parents:
- "interface {{ intname2 }}"
match: none
provider: "{{ connection }}"
- name: "configure nxos_hsrp"
nxos_hsrp: &conf1000
@ -42,7 +37,6 @@
preempt: enabled
auth_type: md5
auth_string: "7 1234"
provider: "{{ connection }}"
register: result
- assert: &true
@ -67,7 +61,6 @@
preempt: enabled
auth_type: md5
auth_string: "0 1234"
provider: "{{ connection }}"
register: result
- assert: *true
@ -88,7 +81,6 @@
preempt: disabled
auth_type: md5
auth_string: "0 1234"
provider: "{{ connection }}"
register: result
- assert: *true
@ -107,7 +99,6 @@
interface: "{{ intname2 }}"
auth_type: text
auth_string: "1234"
provider: "{{ connection }}"
register: result
- assert: *true
@ -126,7 +117,6 @@
interface: "{{ intname2 }}"
auth_type: text
auth_string: default
provider: "{{ connection }}"
register: result
- assert: *true
@ -141,7 +131,6 @@
nxos_hsrp: &remove
group: 1000
interface: "{{ intname1 }}"
provider: "{{ connection }}"
state: absent
register: result
@ -157,7 +146,6 @@
- name: "Disable feature hsrp"
nxos_feature:
feature: hsrp
provider: "{{ connection }}"
state: disabled
ignore_errors: yes

@ -25,9 +25,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: run test cases (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

@ -1,7 +1,5 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_igmp sanity test"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
- set_fact: restart="true"
when: platform is not match("N35")
@ -13,7 +11,6 @@
flush_routes: true
enforce_rtr_alert: true
restart: false
provider: "{{ connection }}"
state: present
register: result
@ -34,7 +31,6 @@
flush_routes: false
enforce_rtr_alert: false
restart: "{{restart|default(omit)}}"
provider: "{{ connection }}"
state: present
register: result
@ -52,7 +48,6 @@
- name: Configure igmp state as values
nxos_igmp: &sdefault
provider: "{{ connection }}"
state: default
register: result

@ -25,9 +25,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: run test cases (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

@ -1,7 +1,5 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_igmp_interface sanity test"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
# Select interface for test
- set_fact: intname="{{ nxos_int1 }}"
@ -12,7 +10,6 @@
- name: "Enable feature PIM"
nxos_feature:
feature: pim
provider: "{{ connection }}"
state: enabled
ignore_errors: yes
@ -21,7 +18,6 @@
commands:
- "default interface {{ intname }}"
match: none
provider: "{{ connection }}"
ignore_errors: yes
- block:
@ -34,7 +30,6 @@
parents:
- "interface {{ intname }}"
match: none
provider: "{{ connection }}"
- name: Configure igmp interface with non-default values
nxos_igmp_interface: &non-default
@ -54,7 +49,6 @@
# deprecated
oif_prefix: 239.255.255.2
oif_source: 192.0.2.1
provider: "{{ connection }}"
state: present
register: result
@ -87,7 +81,6 @@
- {'prefix': '238.2.2.6'}
- {'prefix': '238.2.2.5'}
- {'source': '192.0.2.1', 'prefix': '238.2.2.5'}
provider: "{{ connection }}"
state: present
register: result
@ -103,13 +96,11 @@
nxos_igmp_interface: &restart
interface: "{{ intname }}"
restart: "{{restart|default(omit)}}"
provider: "{{ connection }}"
- name: Configure igmp interface with default oif_ps
nxos_igmp_interface: &defoif
interface: "{{ intname }}"
oif_ps: default
provider: "{{ connection }}"
state: present
register: result
@ -129,7 +120,6 @@
startup_query_count: 5
robustness: 6
oif_routemap: abcd
provider: "{{ connection }}"
state: present
register: result
@ -144,7 +134,6 @@
- name: Configure igmp interface with default state
nxos_igmp_interface: &default
interface: "{{ intname }}"
provider: "{{ connection }}"
state: default
register: result
@ -159,7 +148,6 @@
- name: Configure igmp interface with absent state
nxos_igmp_interface: &absent
interface: "{{ intname }}"
provider: "{{ connection }}"
state: absent
register: result
@ -181,12 +169,10 @@
commands:
- "default interface {{ intname }}"
match: none
provider: "{{ connection }}"
- name: "Disable feature PIM"
nxos_feature:
feature: pim
provider: "{{ connection }}"
state: disabled
ignore_errors: yes

@ -25,9 +25,3 @@
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: run test cases (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

@ -1,7 +1,5 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_igmp_snooping sanity test"
- debug: msg="Using provider={{ connection.transport }}"
when: ansible_connection == "local"
- meta: end_host
# show ip igmp snooping | json does not work on some platforms
@ -16,7 +14,6 @@
- name: Setup
nxos_igmp_snooping: &default
provider: "{{ connection }}"
state: default
- block:
@ -27,7 +24,6 @@
link_local_grp_supp: false
report_supp: false
v3_report_supp: true
provider: "{{ connection }}"
state: present
register: result
@ -49,7 +45,6 @@
nxos_igmp_snooping:
snooping: false
group_timeout: "{{group_timeout|default(omit)}}"
provider: "{{ connection }}"
state: present
ignore_errors: yes
register: result
@ -63,7 +58,6 @@
nxos_igmp_snooping: &non-defgt
snooping: true
group_timeout: "{{group_timeout|default(omit)}}"
provider: "{{ connection }}"
state: present
register: result
@ -79,7 +73,6 @@
- name: Configure igmp snooping with default group timeout
nxos_igmp_snooping: &defgt
group_timeout: "{{def_group_timeout|default(omit)}}"
provider: "{{ connection }}"
state: present
register: result

@ -5,6 +5,4 @@
# Upgrade using NX-API
- include: httpapi.yaml
when: ansible_connection == 'httpapi'
- include: nxapi.yaml
when: ansible_connection == 'local'
when: ansible_connection == 'httpapi'

@ -1,16 +0,0 @@
---
- name: collect common test cases
find:
paths: "{{ role_path }}/tests/common"
patterns: "{{ testcase }}.yaml"
connection: local
register: test_cases
- name: set test_items
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
- name: run test cases (ansible_connection=local transport=nxapi)
include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

@ -8,7 +8,6 @@
- name: 'Remove SSH known_hosts file before scp of image file'
nxos_command:
commands: 'run bash rm /var/home/admin/.ssh/known_hosts'
provider: "{{ connection }}"
ignore_errors: yes
- name: "Copy {{ si }} to bootflash"

@ -6,6 +6,5 @@
- allow delete boot-image
- "delete {{ item }}"
match: none
provider: "{{ connection }}"
ignore_errors: yes
with_items: "{{ delete_image_list }}"

@ -3,4 +3,3 @@
nxos_feature:
feature: scp-server
state: enabled
provider: "{{ connection }}"

@ -19,7 +19,6 @@
- name: "Check installed OS for newly installed version {{ tv }}"
nxos_command:
commands: ['show version | json']
provider: "{{ connection }}"
register: output
- debug: msg="Version detected {{ output['stdout_lines'][0]['kickstart_ver_str'] }}"

@ -4,7 +4,6 @@
nxos_install_os:
system_image_file: "{{ si }}"
issu: "{{ issu }}"
provider: "{{ connection }}"
register: result
when: not force
@ -15,7 +14,6 @@
- no boot kickstart
- no boot system
match: line
provider: "{{ connection }}"
ignore_errors: yes
when: force
@ -25,7 +23,6 @@
- "boot nxos bootflash:{{ si }}"
- copy run start
match: line
provider: "{{ connection }}"
when: force
- name: "Boot image {{ si }} using reload"
@ -33,7 +30,6 @@
lines:
- 'terminal dont-ask'
- 'reload'
provider: "{{ connection }}"
ignore_errors: yes
when: force

@ -5,7 +5,6 @@
system_image_file: "{{ si }}"
kickstart_image_file: "{{ ki }}"
issu: "{{ issu }}"
provider: "{{ connection }}"
register: result
when: not force
@ -18,13 +17,11 @@
- "boot system bootflash:{{ si }}"
- copy run start
match: line
provider: "{{ connection }}"
when: force
- name: "Boot image {{ si }} using reload"
nxos_command:
commands: 'terminal dont-ask ; reload'
provider: "{{ connection }}"
ignore_errors: yes
when: force

@ -1,6 +1,5 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
- debug: msg="Using provider={{ connection.transport }}"
when: connection is defined
- set_fact: image_dir='/Users/mwiebe/Projects/nxos_ansible/images/'

@ -1,6 +1,5 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
- debug: msg="Using provider={{ connection.transport }}"
when: connection is defined
# Set directory pointer to software images

@ -1,6 +1,5 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
- debug: msg="Using provider={{ connection.transport }}"
when: connection is defined
# Set directory pointer to software images

@ -1,6 +1,5 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
- debug: msg="Using provider={{ connection.transport }}"
when: connection is defined
# Set directory pointer to software images

@ -1,6 +1,5 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
- debug: msg="Using provider={{ connection.transport }}"
when: connection is defined
# Set directory pointer to software images

@ -1,6 +1,5 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
- debug: msg="Using provider={{ connection.transport }}"
when: connection is defined
# Set directory pointer to software images

@ -1,6 +1,5 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
- debug: msg="Using provider={{ connection.transport }}"
when: connection is defined
# Set directory pointer to software images

@ -1,6 +1,5 @@
---
- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
- debug: msg="Using provider={{ connection.transport }}"
when: connection is defined
# Set directory pointer to software images

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save