summaryrefslogtreecommitdiff
path: root/test/integration/targets/nxos_interface_ospf
diff options
context:
space:
mode:
authorAnsible Core Team <info@ansible.com>2020-03-09 09:40:35 +0000
committerMatt Martz <matt@sivel.net>2020-03-23 11:14:21 -0500
commit3149db08698887fe4581d1fe52a01eed314d2b29 (patch)
tree71f94fa4ed330319cf9152971d49841d8aeb9b4c /test/integration/targets/nxos_interface_ospf
parentae8fb5e371f4ced37237176bc28a6a5c998f319d (diff)
downloadansible-3149db08698887fe4581d1fe52a01eed314d2b29.tar.gz
Migrated to cisco.nxos
Diffstat (limited to 'test/integration/targets/nxos_interface_ospf')
-rw-r--r--test/integration/targets/nxos_interface_ospf/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_interface_ospf/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_interface_ospf/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_interface_ospf/tasks/main.yaml7
-rw-r--r--test/integration/targets/nxos_interface_ospf/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_interface_ospf/tests/common/sanity.yaml286
6 files changed, 0 insertions, 351 deletions
diff --git a/test/integration/targets/nxos_interface_ospf/defaults/main.yaml b/test/integration/targets/nxos_interface_ospf/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_interface_ospf/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_interface_ospf/meta/main.yml b/test/integration/targets/nxos_interface_ospf/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_interface_ospf/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_interface_ospf/tasks/cli.yaml b/test/integration/targets/nxos_interface_ospf/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_interface_ospf/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_interface_ospf/tasks/main.yaml b/test/integration/targets/nxos_interface_ospf/tasks/main.yaml
deleted file mode 100644
index fea9337c14..0000000000
--- a/test/integration/targets/nxos_interface_ospf/tasks/main.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-# 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_interface_ospf/tasks/nxapi.yaml b/test/integration/targets/nxos_interface_ospf/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_interface_ospf/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_interface_ospf/tests/common/sanity.yaml b/test/integration/targets/nxos_interface_ospf/tests/common/sanity.yaml
deleted file mode 100644
index de9f7209f9..0000000000
--- a/test/integration/targets/nxos_interface_ospf/tests/common/sanity.yaml
+++ /dev/null
@@ -1,286 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_interface_ospf sanity test"
-
-- set_fact: testint="{{ nxos_int1 }}"
-
-- name: Setup - Disable features
- nxos_feature:
- feature: "{{ item }}"
- state: disabled
- loop: ['ospf', 'bfd']
- ignore_errors: yes
-
-- name: Setup - Enable features
- nxos_feature:
- feature: "{{ item }}"
- state: enabled
- loop: ['ospf', 'bfd']
-
-- name: "Put interface into default state"
- nxos_config: &intdefault
- lines:
- - "default interface {{ testint }}"
- ignore_errors: yes
-
-- name: "Remove switchport config"
- nxos_config: &removeswitchport
- commands:
- - no switchport
- parents:
- - "interface {{ testint }}"
- ignore_errors: yes
-
-- name: "Remove possibly existing port-channel and loopback ints"
- nxos_config: &removepcandlb
- commands:
- - no interface port-channel10
- - no interface port-channel11
- - no interface loopback55
- - no interface loopback77
- ignore_errors: yes
-
-- block:
- - name: configure ospf interface
- nxos_interface_ospf: &configure
- interface: "{{ nxos_int1|upper }}"
- ospf: 1
- area: 12345678
- bfd: enable
- cost: 55
- passive_interface: true
- hello_interval: 15
- dead_interval: 75
- network: point-to-point
- state: present
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Check Idempotence"
- nxos_interface_ospf: *configure
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: Modify properties
- nxos_interface_ospf: &modify
- interface: "{{ testint }}"
- ospf: 1
- area: 12345678
- cost: 66
- passive_interface: false
- hello_interval: 17
- dead_interval: 70
- network: broadcast
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_interface_ospf: *modify
- register: result
-
- - assert: *false
-
- - name: default properties
- nxos_interface_ospf: &def
- interface: "{{ testint }}"
- ospf: 1
- area: 12345678
- bfd: default
- cost: default
- hello_interval: 10
- dead_interval: default
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_interface_ospf: *def
- register: result
-
- - assert: *false
-
- - name: Message_digest properties
- nxos_interface_ospf: &md
- interface: "{{ testint }}"
- ospf: 1
- area: 12345678
- message_digest: True
- message_digest_key_id: 10
- message_digest_algorithm_type: md5
- message_digest_encryption_type: 3des
- message_digest_password: b69f7bc54725b1bfd1ea93afa7b09400
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_interface_ospf: *md
- register: result
-
- - assert: *false
-
- - name: Message_digest defaults
- nxos_interface_ospf: &mdd
- interface: "{{ testint }}"
- ospf: 1
- area: 12345678
- message_digest: False
- message_digest_key_id: default
- message_digest_algorithm_type: default
- message_digest_encryption_type: default
- message_digest_password: default
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_interface_ospf: *mdd
- register: result
-
- - assert: *false
-
- - name: create port-channel and loopback interfaces
- nxos_config:
- commands:
- - interface port-channel10
- - interface port-channel11
- - interface loopback55
- - interface loopback77
- match: none
-
- - name: "Ensure port-channels are layer3"
- nxos_config:
- commands:
- - no switchport
- parents:
- - "interface {{ item }}"
- with_items:
- - port-channel10
- - port-channel11
-
- - name: configure ospf interface port-channel10
- nxos_interface_ospf: &configurepc
- interface: Port-channel10
- ospf: 1
- area: 429496729
- cost: 55
- passive_interface: true
- hello_interval: 15
- dead_interval: 75
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence for port-channel10"
- nxos_interface_ospf: *configurepc
- register: result
-
- - assert: *false
-
- - name: configure ospf interface port-channel11 using lower case name
- nxos_interface_ospf: &configurepclower
- interface: port-channel11
- ospf: 1
- area: 42949672
- cost: 55
- passive_interface: true
- hello_interval: 15
- dead_interval: 75
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence for port-channel11"
- nxos_interface_ospf: *configurepclower
- register: result
-
- - assert: *false
-
- - name: configure ospf interface loopback55
- nxos_interface_ospf: &configurelb
- interface: LOOPBACK55
- ospf: 1
- area: 192.0.2.4
- cost: 55
- hello_interval: 15
- dead_interval: 75
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence for loopback55"
- nxos_interface_ospf: *configurelb
- register: result
-
- - assert: *false
-
- - name: configure ospf interface loopback77 using lower case name
- nxos_interface_ospf: &configurelblower
- interface: loopback77
- ospf: 1
- area: 429496
- cost: 77
- hello_interval: 45
- dead_interval: 75
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence for loopback77"
- nxos_interface_ospf: *configurelblower
- register: result
-
- - assert: *false
-
- - name: remove ospf interface config
- nxos_interface_ospf: &removeconfig
- interface: "{{ testint }}"
- ospf: 1
- area: 12345678
- bfd: disable
- cost: 55
- passive_interface: true
- hello_interval: 15
- dead_interval: 75
- state: absent
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_interface_ospf: *removeconfig
- register: result
-
- - assert: *false
-
- always:
- - name: Disable features
- nxos_feature:
- feature: "{{ item }}"
- state: disabled
- loop: ['ospf', 'bfd']
- ignore_errors: yes
-
- - name: "Interface cleanup"
- nxos_config: *intdefault
- ignore_errors: yes
-
- - name: "Remove port-channel and loopback ints"
- nxos_config: *removepcandlb
- ignore_errors: yes
-
- - debug: msg="END connection={{ ansible_connection }} nxos_interface_ospf sanity test"