From c2226dd18b9bc3089122198b7f7cc469cba5e3a6 Mon Sep 17 00:00:00 2001 From: Senthil Kumar Ganesan Date: Tue, 27 Mar 2018 01:46:35 -0700 Subject: [PATCH] Purge legacy test modules (#37691) --- test/integration/dellos10.yaml | 13 ---- test/integration/dellos6.yaml | 13 ---- test/integration/dellos9.yaml | 13 ---- test/integration/group_vars/dellos10.yaml | 6 -- .../test_dellos10_command/defaults/main.yaml | 2 - .../test_dellos10_command/tasks/cli.yaml | 14 ---- .../test_dellos10_command/tasks/main.yaml | 2 - .../tests/cli/bad_operator.yaml | 20 ------ .../tests/cli/contains.yaml | 20 ------ .../tests/cli/invalid.yaml | 28 -------- .../tests/cli/output.yaml | 29 -------- .../tests/cli/timeout.yaml | 19 ------ .../test_dellos10_config/defaults/main.yaml | 2 - .../roles/test_dellos10_config/tasks/cli.yaml | 13 ---- .../test_dellos10_config/tasks/main.yaml | 2 - .../templates/basic/config.j2 | 4 -- .../templates/defaults/config.j2 | 3 - .../tests/cli/backup.yaml | 58 ---------------- .../test_dellos10_config/tests/cli/basic.yaml | 42 ------------ .../tests/cli/defaults.yaml | 46 ------------- .../test_dellos10_config/tests/cli/force.yaml | 44 ------------- .../tests/cli/sublevel.yaml | 42 ------------ .../tests/cli/sublevel_block.yaml | 62 ----------------- .../tests/cli/sublevel_exact.yaml | 66 ------------------- .../tests/cli/sublevel_strict.yaml | 63 ------------------ .../tests/cli/toplevel.yaml | 37 ----------- .../tests/cli/toplevel_after.yaml | 44 ------------- .../tests/cli/toplevel_before.yaml | 44 ------------- .../tests/cli/toplevel_nonidempotent.yaml | 39 ----------- .../test_dellos10_facts/defaults/main.yaml | 2 - .../roles/test_dellos10_facts/tasks/cli.yaml | 14 ---- .../roles/test_dellos10_facts/tasks/main.yaml | 2 - .../test_dellos10_facts/tests/cli/facts.yaml | 48 -------------- 33 files changed, 856 deletions(-) delete mode 100755 test/integration/dellos10.yaml delete mode 100644 test/integration/dellos6.yaml delete mode 100644 test/integration/dellos9.yaml delete mode 100755 test/integration/group_vars/dellos10.yaml delete mode 100755 test/integration/roles/test_dellos10_command/defaults/main.yaml delete mode 100755 test/integration/roles/test_dellos10_command/tasks/cli.yaml delete mode 100755 test/integration/roles/test_dellos10_command/tasks/main.yaml delete mode 100755 test/integration/roles/test_dellos10_command/tests/cli/bad_operator.yaml delete mode 100755 test/integration/roles/test_dellos10_command/tests/cli/contains.yaml delete mode 100755 test/integration/roles/test_dellos10_command/tests/cli/invalid.yaml delete mode 100755 test/integration/roles/test_dellos10_command/tests/cli/output.yaml delete mode 100755 test/integration/roles/test_dellos10_command/tests/cli/timeout.yaml delete mode 100755 test/integration/roles/test_dellos10_config/defaults/main.yaml delete mode 100755 test/integration/roles/test_dellos10_config/tasks/cli.yaml delete mode 100755 test/integration/roles/test_dellos10_config/tasks/main.yaml delete mode 100755 test/integration/roles/test_dellos10_config/templates/basic/config.j2 delete mode 100755 test/integration/roles/test_dellos10_config/templates/defaults/config.j2 delete mode 100755 test/integration/roles/test_dellos10_config/tests/cli/backup.yaml delete mode 100755 test/integration/roles/test_dellos10_config/tests/cli/basic.yaml delete mode 100755 test/integration/roles/test_dellos10_config/tests/cli/defaults.yaml delete mode 100755 test/integration/roles/test_dellos10_config/tests/cli/force.yaml delete mode 100755 test/integration/roles/test_dellos10_config/tests/cli/sublevel.yaml delete mode 100755 test/integration/roles/test_dellos10_config/tests/cli/sublevel_block.yaml delete mode 100755 test/integration/roles/test_dellos10_config/tests/cli/sublevel_exact.yaml delete mode 100755 test/integration/roles/test_dellos10_config/tests/cli/sublevel_strict.yaml delete mode 100755 test/integration/roles/test_dellos10_config/tests/cli/toplevel.yaml delete mode 100755 test/integration/roles/test_dellos10_config/tests/cli/toplevel_after.yaml delete mode 100755 test/integration/roles/test_dellos10_config/tests/cli/toplevel_before.yaml delete mode 100755 test/integration/roles/test_dellos10_config/tests/cli/toplevel_nonidempotent.yaml delete mode 100755 test/integration/roles/test_dellos10_facts/defaults/main.yaml delete mode 100755 test/integration/roles/test_dellos10_facts/tasks/cli.yaml delete mode 100755 test/integration/roles/test_dellos10_facts/tasks/main.yaml delete mode 100755 test/integration/roles/test_dellos10_facts/tests/cli/facts.yaml diff --git a/test/integration/dellos10.yaml b/test/integration/dellos10.yaml deleted file mode 100755 index 6ce4bedab5..0000000000 --- a/test/integration/dellos10.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -- hosts: dellos10 - gather_facts: no - connection: local - - vars: - limit_to: "*" - test_items: "" - - roles: - - { role: test_dellos10_command, when: "limit_to in ['*', 'dellos10_command']" } - - { role: test_dellos10_config, when: "limit_to in ['*', 'dellos10_config']" } - - { role: test_dellos10_facts, when: "limit_to in ['*', 'dellos10_facts']" } diff --git a/test/integration/dellos6.yaml b/test/integration/dellos6.yaml deleted file mode 100644 index 1d110f944e..0000000000 --- a/test/integration/dellos6.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -- hosts: dellos6 - gather_facts: no - connection: local - - vars: - limit_to: "*" - debug: false - - roles: - - { role: dellos6_command, when: "limit_to in ['*', 'dellos6_command']" } - - { role: dellos6_config, when: "limit_to in ['*', 'dellos6_config']" } - - { role: dellos6_facts, when: "limit_to in ['*', 'dellos6_facts']" } diff --git a/test/integration/dellos9.yaml b/test/integration/dellos9.yaml deleted file mode 100644 index 5a8f780efd..0000000000 --- a/test/integration/dellos9.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -- hosts: dellos9 - gather_facts: no - connection: local - - vars: - limit_to: "*" - debug: false - - roles: - - { role: dellos9_command, when: "limit_to in ['*', 'dellos9_command']" } - - { role: dellos9_config, when: "limit_to in ['*', 'dellos9_config']" } - - { role: dellos9_facts, when: "limit_to in ['*', 'dellos9_facts']" } diff --git a/test/integration/group_vars/dellos10.yaml b/test/integration/group_vars/dellos10.yaml deleted file mode 100755 index 48a3d59a07..0000000000 --- a/test/integration/group_vars/dellos10.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -cli: - host: "{{ ansible_host }}" - username: "{{ dellos10_cli_user | default('admin') }}" - password: "{{ dellos10_cli_pass | default('admin') }}" - transport: cli diff --git a/test/integration/roles/test_dellos10_command/defaults/main.yaml b/test/integration/roles/test_dellos10_command/defaults/main.yaml deleted file mode 100755 index 5f709c5aac..0000000000 --- a/test/integration/roles/test_dellos10_command/defaults/main.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -testcase: "*" diff --git a/test/integration/roles/test_dellos10_command/tasks/cli.yaml b/test/integration/roles/test_dellos10_command/tasks/cli.yaml deleted file mode 100755 index d70b6ca579..0000000000 --- a/test/integration/roles/test_dellos10_command/tasks/cli.yaml +++ /dev/null @@ -1,14 +0,0 @@ ---- -- 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: "{{ item }}" - with_items: "{{ test_items }}" diff --git a/test/integration/roles/test_dellos10_command/tasks/main.yaml b/test/integration/roles/test_dellos10_command/tasks/main.yaml deleted file mode 100755 index 415c99d8b1..0000000000 --- a/test/integration/roles/test_dellos10_command/tasks/main.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -- { include: cli.yaml, tags: ['cli'] } diff --git a/test/integration/roles/test_dellos10_command/tests/cli/bad_operator.yaml b/test/integration/roles/test_dellos10_command/tests/cli/bad_operator.yaml deleted file mode 100755 index ae77680b41..0000000000 --- a/test/integration/roles/test_dellos10_command/tests/cli/bad_operator.yaml +++ /dev/null @@ -1,20 +0,0 @@ ---- -- debug: msg="START cli/bad_operator.yaml" - -- name: test bad operator - dellos10_command: - commands: - - show version - - show interface ethernet 1/1/1 - wait_for: - - "result[0] contains 'Description : blah'" - provider: "{{ cli }}" - register: result - ignore_errors: yes - -- assert: - that: - - "result.failed == true" - - "result.msg is defined" - -- debug: msg="END cli/bad_operator.yaml" diff --git a/test/integration/roles/test_dellos10_command/tests/cli/contains.yaml b/test/integration/roles/test_dellos10_command/tests/cli/contains.yaml deleted file mode 100755 index c62488b904..0000000000 --- a/test/integration/roles/test_dellos10_command/tests/cli/contains.yaml +++ /dev/null @@ -1,20 +0,0 @@ ---- -- debug: msg="START cli/contains.yaml" - -- name: test contains operator - dellos10_command: - commands: - - show version - - show interface ethernet 1/1/1 - wait_for: - - "result[0] contains OS10-Premium" - - "result[1] contains Ethernet " - provider: "{{ cli }}" - register: result - -- assert: - that: - - "result.changed == false" - - "result.stdout is defined" - -- debug: msg="END cli/contains.yaml" diff --git a/test/integration/roles/test_dellos10_command/tests/cli/invalid.yaml b/test/integration/roles/test_dellos10_command/tests/cli/invalid.yaml deleted file mode 100755 index 14b24b4cbc..0000000000 --- a/test/integration/roles/test_dellos10_command/tests/cli/invalid.yaml +++ /dev/null @@ -1,28 +0,0 @@ ---- -- debug: msg="START cli/invalid.yaml" - -- name: run invalid command - dellos10_command: - commands: ['show foo'] - provider: "{{ cli }}" - register: result - ignore_errors: yes - -- assert: - that: - - "'Error: Unrecognized command' in result.stdout" - -- name: run commands that include invalid command - dellos10_command: - commands: - - show version - - show foo - provider: "{{ cli }}" - register: result - ignore_errors: yes - -- assert: - that: - - "'Error: Unrecognized command' in result.stdout" - -- debug: msg="END cli/invalid.yaml" diff --git a/test/integration/roles/test_dellos10_command/tests/cli/output.yaml b/test/integration/roles/test_dellos10_command/tests/cli/output.yaml deleted file mode 100755 index 4df528a711..0000000000 --- a/test/integration/roles/test_dellos10_command/tests/cli/output.yaml +++ /dev/null @@ -1,29 +0,0 @@ ---- -- debug: msg="START cli/output.yaml" - -- name: get output for single command - dellos10_command: - commands: ['show version'] - provider: "{{ cli }}" - register: result - -- assert: - that: - - "result.changed == false" - - "result.stdout is defined" - -- name: get output for multiple commands - dellos10_command: - commands: - - show version - - show interface Eth 1/1/1 - provider: "{{ cli }}" - register: result - -- assert: - that: - - "result.changed == false" - - "result.stdout is defined" - - "result.stdout | length == 2" - -- debug: msg="END cli/output.yaml" diff --git a/test/integration/roles/test_dellos10_command/tests/cli/timeout.yaml b/test/integration/roles/test_dellos10_command/tests/cli/timeout.yaml deleted file mode 100755 index 50d870a0e5..0000000000 --- a/test/integration/roles/test_dellos10_command/tests/cli/timeout.yaml +++ /dev/null @@ -1,19 +0,0 @@ ---- -- debug: msg="START cli/timeout.yaml" - -- name: test bad condition - dellos10_command: - commands: - - show version - wait_for: - - "result[0] contains bad_value_string" - provider: "{{ cli }}" - register: result - ignore_errors: yes - -- assert: - that: - - "result.failed == true" - - "result.msg is defined" - -- debug: msg="END cli/timeout.yaml" diff --git a/test/integration/roles/test_dellos10_config/defaults/main.yaml b/test/integration/roles/test_dellos10_config/defaults/main.yaml deleted file mode 100755 index 5f709c5aac..0000000000 --- a/test/integration/roles/test_dellos10_config/defaults/main.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -testcase: "*" diff --git a/test/integration/roles/test_dellos10_config/tasks/cli.yaml b/test/integration/roles/test_dellos10_config/tasks/cli.yaml deleted file mode 100755 index 346bdf2d16..0000000000 --- a/test/integration/roles/test_dellos10_config/tasks/cli.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -- 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: "{{ item }}" - with_items: "{{ test_items }}" diff --git a/test/integration/roles/test_dellos10_config/tasks/main.yaml b/test/integration/roles/test_dellos10_config/tasks/main.yaml deleted file mode 100755 index 415c99d8b1..0000000000 --- a/test/integration/roles/test_dellos10_config/tasks/main.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -- { include: cli.yaml, tags: ['cli'] } diff --git a/test/integration/roles/test_dellos10_config/templates/basic/config.j2 b/test/integration/roles/test_dellos10_config/templates/basic/config.j2 deleted file mode 100755 index d820a9ee3a..0000000000 --- a/test/integration/roles/test_dellos10_config/templates/basic/config.j2 +++ /dev/null @@ -1,4 +0,0 @@ -interface loopback999 - shutdown - description basic - diff --git a/test/integration/roles/test_dellos10_config/templates/defaults/config.j2 b/test/integration/roles/test_dellos10_config/templates/defaults/config.j2 deleted file mode 100755 index ad500314d5..0000000000 --- a/test/integration/roles/test_dellos10_config/templates/defaults/config.j2 +++ /dev/null @@ -1,3 +0,0 @@ -interface loopback999 - no shutdown - description default diff --git a/test/integration/roles/test_dellos10_config/tests/cli/backup.yaml b/test/integration/roles/test_dellos10_config/tests/cli/backup.yaml deleted file mode 100755 index fb2d856210..0000000000 --- a/test/integration/roles/test_dellos10_config/tests/cli/backup.yaml +++ /dev/null @@ -1,58 +0,0 @@ ---- -- debug: msg="START cli/backup.yaml" - -- name: setup - dellos10_config: - commands: - - interface loopback 999 - - no interface loopback 999 - match: none - provider: "{{ cli }}" - ignore_errors: yes - -- name: collect any backup files - find: - paths: "{{ role_path }}/backup" - pattern: "{{ inventory_hostname }}_config*" - register: backup_files - delegate_to: localhost - -- name: delete backup files - file: - path: "{{ backupitem.path }}" - state: absent - with_items: "{{ backup_files.files }}" - loop_control: - loop_var: backupitem - -- name: configure device with config - dellos10_config: - src: basic/config.j2 - backup: yes - provider: "{{ cli }}" - register: result - -- assert: - that: - - "result.changed == true" - - "result.updates is defined" - -- name: collect any backup files - find: - paths: "{{ role_path }}/backup" - pattern: "{{ inventory_hostname }}_config*" - register: backup_files - delegate_to: localhost - -- assert: - that: - - "backup_files.files is defined" - -- name: teardown - dellos10_config: - commands: - - no interface loopback999 - match: none - provider: "{{ cli }}" - -- debug: msg="END cli/backup.yaml" diff --git a/test/integration/roles/test_dellos10_config/tests/cli/basic.yaml b/test/integration/roles/test_dellos10_config/tests/cli/basic.yaml deleted file mode 100755 index 5604bb7fb2..0000000000 --- a/test/integration/roles/test_dellos10_config/tests/cli/basic.yaml +++ /dev/null @@ -1,42 +0,0 @@ ---- -- debug: msg="START cli/basic.yaml" - -- name: setup - dellos10_config: - commands: - - interface loopback 999 - - no interface loopback 999 - match: none - provider: "{{ cli }}" - ignore_errors: yes - -- name: configure device with config - dellos10_config: - src: basic/config.j2 - provider: "{{ cli }}" - register: result - -- assert: - that: - - "result.changed == true" - - "result.updates is defined" - -- name: check device with config - dellos10_config: - src: basic/config.j2 - provider: "{{ cli }}" - register: result - -- assert: - that: - - "result.changed == false" - - "result.updates is defined" - -- name: teardown - dellos10_config: - commands: - - no interface loopback999 - match: none - provider: "{{ cli }}" - -- debug: msg="END cli/basic.yaml" diff --git a/test/integration/roles/test_dellos10_config/tests/cli/defaults.yaml b/test/integration/roles/test_dellos10_config/tests/cli/defaults.yaml deleted file mode 100755 index 3e32ba00de..0000000000 --- a/test/integration/roles/test_dellos10_config/tests/cli/defaults.yaml +++ /dev/null @@ -1,46 +0,0 @@ ---- -- debug: msg="START cli/defaults.yaml" - -- name: setup - dellos10_config: - commands: - - interface loopback 999 - - no interface loopback 999 - match: none - provider: "{{ cli }}" - ignore_errors: yes - -- name: configure device with defaults included - dellos10_config: - src: defaults/config.j2 - provider: "{{ cli }}" - register: result - -- debug: var=result - -- assert: - that: - - "result.changed == true" - - "result.updates is defined" - -- name: check device with defaults included - dellos10_config: - src: defaults/config.j2 - provider: "{{ cli }}" - register: result - -- debug: var=result - -- assert: - that: - - "result.changed == false" - - "result.updates is defined" - -- name: teardown - dellos10_config: - commands: - - no interface loopback999 - match: none - provider: "{{ cli }}" - -- debug: msg="END cli/defaults.yaml" diff --git a/test/integration/roles/test_dellos10_config/tests/cli/force.yaml b/test/integration/roles/test_dellos10_config/tests/cli/force.yaml deleted file mode 100755 index 4997c5f45c..0000000000 --- a/test/integration/roles/test_dellos10_config/tests/cli/force.yaml +++ /dev/null @@ -1,44 +0,0 @@ ---- -- debug: msg="START cli/force.yaml" - -- name: setup - dellos10_config: - commands: - - interface loopback 999 - - no interface loopback 999 - match: none - provider: "{{ cli }}" - ignore_errors: yes - -- name: configure device with config - dellos10_config: - src: basic/config.j2 - provider: "{{ cli }}" - match: none - register: result - -- assert: - that: - - "result.changed == true" - - "result.updates is defined" - -- name: check device with config - dellos10_config: - src: basic/config.j2 - provider: "{{ cli }}" - match: none - register: result - -- assert: - that: - - "result.changed == true" - - "result.updates is defined" - -- name: teardown - dellos10_config: - commands: - - no interface loopback999 - match: none - provider: "{{ cli }}" - -- debug: msg="END cli/force.yaml" diff --git a/test/integration/roles/test_dellos10_config/tests/cli/sublevel.yaml b/test/integration/roles/test_dellos10_config/tests/cli/sublevel.yaml deleted file mode 100755 index b465108d61..0000000000 --- a/test/integration/roles/test_dellos10_config/tests/cli/sublevel.yaml +++ /dev/null @@ -1,42 +0,0 @@ ---- -- debug: msg="START cli/sublevel.yaml" - -- name: setup test - dellos10_config: - lines: - - 'no ip access-list test' - provider: "{{ cli }}" - match: none - -- name: configure sub level command - dellos10_config: - lines: ['seq 5 permit ip any any count byte'] - parents: ['ip access-list test'] - provider: "{{ cli }}" - register: result - -- assert: - that: - - "result.changed == true" - - "'ip access-list test' in result.updates" - - "'seq 5 permit ip any any count byte' in result.updates" - -- name: configure sub level command idempotent check - dellos10_config: - lines: ['seq 5 permit ip any any count byte'] - parents: ['ip access-list test'] - provider: "{{ cli }}" - register: result - -- assert: - that: - - "result.changed == false" - -- name: teardown - dellos10_config: - lines: - - 'no ip access-list test' - provider: "{{ cli }}" - match: none - -- debug: msg="END cli/sublevel.yaml" diff --git a/test/integration/roles/test_dellos10_config/tests/cli/sublevel_block.yaml b/test/integration/roles/test_dellos10_config/tests/cli/sublevel_block.yaml deleted file mode 100755 index 9df119a439..0000000000 --- a/test/integration/roles/test_dellos10_config/tests/cli/sublevel_block.yaml +++ /dev/null @@ -1,62 +0,0 @@ ---- -- debug: msg="START cli/sublevel_block.yaml" - -- name: setup - dellos10_config: - lines: - - seq 5 permit ip host 1.1.1.1 any count byte - - seq 10 permit ip host 2.2.2.2 any count byte - - seq 15 permit ip host 3.3.3.3 any count byte - parents: ['ip access-list test'] - before: ['no ip access-list test'] - after: ['exit'] - provider: "{{ cli }}" - match: none - -- name: configure sub level command using block resplace - dellos10_config: - lines: - - seq 5 permit ip host 1.1.1.1 any count byte - - seq 10 permit ip host 2.2.2.2 any count byte - - seq 15 permit ip host 3.3.3.3 any count byte - - seq 20 permit ip host 4.4.4.4 any count byte - parents: ['ip access-list test'] - replace: block - after: ['exit'] - provider: "{{ cli }}" - register: result - -- assert: - that: - - "result.changed == true" - - "'ip access-list test' in result.updates" - - "'seq 5 permit ip host 1.1.1.1 any count byte' in result.updates" - - "'seq 10 permit ip host 2.2.2.2 any count byte' in result.updates" - - "'seq 15 permit ip host 3.3.3.3 any count byte' in result.updates" - - "'seq 20 permit ip host 4.4.4.4 any count byte' in result.updates" - -- name: check sub level command using block replace - dellos10_config: - lines: - - seq 5 permit ip host 1.1.1.1 any count byte - - seq 10 permit ip host 2.2.2.2 any count byte - - seq 15 permit ip host 3.3.3.3 any count byte - - seq 20 permit ip host 4.4.4.4 any count byte - parents: ['ip access-list test'] - replace: block - after: ['exit'] - provider: "{{ cli }}" - register: result - -- assert: - that: - - "result.changed == false" - -- name: teardown - dellos10_config: - lines: - - no ip access-list test - match: none - provider: "{{ cli }}" - -- debug: msg="END cli/sublevel_block.yaml" diff --git a/test/integration/roles/test_dellos10_config/tests/cli/sublevel_exact.yaml b/test/integration/roles/test_dellos10_config/tests/cli/sublevel_exact.yaml deleted file mode 100755 index ad68ed1d1a..0000000000 --- a/test/integration/roles/test_dellos10_config/tests/cli/sublevel_exact.yaml +++ /dev/null @@ -1,66 +0,0 @@ ---- -- debug: msg="START cli/sublevel_exact.yaml" - -- name: setup - dellos10_config: - lines: - - seq 5 permit ip host 1.1.1.1 any count byte - - seq 10 permit ip host 2.2.2.2 any count byte - - seq 15 permit ip host 3.3.3.3 any count byte - - seq 20 permit ip host 4.4.4.4 any count byte - - seq 25 permit ip host 5.5.5.5 any count byte - parents: ['ip access-list test'] - before: ['no ip access-list test'] - after: ['exit'] - provider: "{{ cli }}" - match: none - -- name: configure sub level command using exact match - dellos10_config: - lines: - - seq 5 permit ip host 1.1.1.1 any count byte - - seq 10 permit ip host 2.2.2.2 any count byte - - seq 15 permit ip host 3.3.3.3 any count byte - - seq 20 permit ip host 4.4.4.4 any count byte - parents: ['ip access-list test'] - after: ['exit'] - match: exact - provider: "{{ cli }}" - register: result - -- assert: - that: - - "result.changed == true" - - "'ip access-list test' in result.updates" - - "'seq 5 permit ip host 1.1.1.1 any count byte' in result.updates" - - "'seq 10 permit ip host 2.2.2.2 any count byte' in result.updates" - - "'seq 15 permit ip host 3.3.3.3 any count byte' in result.updates" - - "'seq 20 permit ip host 4.4.4.4 any count byte' in result.updates" - - "'seq 25 permit ip host 5.5.5.5 any count byte' not in result.updates" - -- name: check sub level command using exact match - dellos10_config: - lines: - - seq 5 permit ip host 1.1.1.1 any count byte - - seq 10 permit ip host 2.2.2.2 any count byte - - seq 15 permit ip host 3.3.3.3 any count byte - - seq 20 permit ip host 4.4.4.4 any count byte - - seq 25 permit ip host 5.5.5.5 any count byte - parents: ['ip access-list test'] - after: ['exit'] - match: exact - provider: "{{ cli }}" - register: result - -- assert: - that: - - "result.changed == false" - -- name: teardown - dellos10_config: - lines: - - no ip access-list test - provider: "{{ cli }}" - match: none - -- debug: msg="END cli/sublevel_exact.yaml" diff --git a/test/integration/roles/test_dellos10_config/tests/cli/sublevel_strict.yaml b/test/integration/roles/test_dellos10_config/tests/cli/sublevel_strict.yaml deleted file mode 100755 index 5ce7d7ccba..0000000000 --- a/test/integration/roles/test_dellos10_config/tests/cli/sublevel_strict.yaml +++ /dev/null @@ -1,63 +0,0 @@ ---- -- debug: msg="START cli/sublevel_strict.yaml" - -- name: setup - dellos10_config: - lines: - - seq 5 permit ip host 1.1.1.1 any count byte - - seq 10 permit ip host 2.2.2.2 any count byte - - seq 15 permit ip host 3.3.3.3 any count byte - - seq 20 permit ip host 4.4.4.4 any count byte - - seq 25 permit ip host 5.5.5.5 any count byte - parents: ['ip access-list test'] - before: ['no ip access-list test'] - after: ['exit'] - provider: "{{ cli }}" - match: none - -- name: configure sub level command using strict match - dellos10_config: - lines: - - seq 5 permit ip host 1.1.1.1 any count byte - - seq 10 permit ip host 2.2.2.2 any count byte - - seq 15 permit ip host 3.3.3.3 any count byte - - seq 20 permit ip host 4.4.4.4 any count byte - parents: ['ip access-list test'] - match: strict - provider: "{{ cli }}" - register: result - -- assert: - that: - - "result.changed == false" - -- name: check sub level command using strict match - dellos10_config: - lines: - - seq 5 permit ip host 1.1.1.1 any count byte - - seq 15 permit ip host 3.3.3.3 any count byte - - seq 10 permit ip host 2.2.2.2 any count byte - parents: ['ip access-list test'] - after: ['exit'] - match: strict - provider: "{{ cli }}" - register: result - -- assert: - that: - - "result.changed == true" - - "'ip access-list test' in result.updates" - - "'seq 5 permit ip host 1.1.1.1 any count byte' not in result.updates" - - "'seq 10 permit ip host 2.2.2.2 any count byte' in result.updates" - - "'seq 15 permit ip host 3.3.3.3 any count byte' in result.updates" - - "'seq 20 permit ip host 4.4.4.4 any count byte' not in result.updates" - - "'seq 25 permit ip host 5.5.5.5 any count byte' not in result.updates" - -- name: teardown - dellos10_config: - lines: - - no ip access-list test - provider: "{{ cli }}" - match: none - -- debug: msg="END cli/sublevel_strict.yaml" diff --git a/test/integration/roles/test_dellos10_config/tests/cli/toplevel.yaml b/test/integration/roles/test_dellos10_config/tests/cli/toplevel.yaml deleted file mode 100755 index df5435f3f8..0000000000 --- a/test/integration/roles/test_dellos10_config/tests/cli/toplevel.yaml +++ /dev/null @@ -1,37 +0,0 @@ ---- -- debug: msg="START cli/toplevel.yaml" - -- name: setup - dellos10_config: - lines: ['hostname {{ inventory_hostname }}'] - provider: "{{ cli }}" - match: none - -- name: configure top level command - dellos10_config: - lines: ['hostname foo'] - provider: "{{ cli }}" - register: result - -- assert: - that: - - "result.changed == true" - - "'hostname foo' in result.updates" - -- name: configure top level command idempotent check - dellos10_config: - lines: ['hostname foo'] - provider: "{{ cli }}" - register: result - -- assert: - that: - - "result.changed == false" - -- name: teardown - dellos10_config: - lines: ['hostname {{ inventory_hostname }}'] - provider: "{{ cli }}" - match: none - -- debug: msg="END cli/toplevel.yaml" diff --git a/test/integration/roles/test_dellos10_config/tests/cli/toplevel_after.yaml b/test/integration/roles/test_dellos10_config/tests/cli/toplevel_after.yaml deleted file mode 100755 index 57948bcfc6..0000000000 --- a/test/integration/roles/test_dellos10_config/tests/cli/toplevel_after.yaml +++ /dev/null @@ -1,44 +0,0 @@ ---- -- debug: msg="START cli/toplevel_after.yaml" - -- name: setup - dellos10_config: - lines: - - "snmp-server contact ansible" - - "hostname {{ inventory_hostname }}" - provider: "{{ cli }}" - match: none - -- name: configure top level command with before - dellos10_config: - lines: ['hostname foo'] - after: ['snmp-server contact bar'] - provider: "{{ cli }}" - register: result - -- assert: - that: - - "result.changed == true" - - "'hostname foo' in result.updates" - - "'snmp-server contact bar' in result.updates" - -- name: configure top level command with before idempotent check - dellos10_config: - lines: ['hostname foo'] - after: ['snmp-server contact foo'] - provider: "{{ cli }}" - register: result - -- assert: - that: - - "result.changed == false" - -- name: teardown - dellos10_config: - lines: - - "no snmp-server contact" - - "hostname {{ inventory_hostname }}" - provider: "{{ cli }}" - match: none - -- debug: msg="END cli/toplevel_after.yaml" diff --git a/test/integration/roles/test_dellos10_config/tests/cli/toplevel_before.yaml b/test/integration/roles/test_dellos10_config/tests/cli/toplevel_before.yaml deleted file mode 100755 index 4e0acf604f..0000000000 --- a/test/integration/roles/test_dellos10_config/tests/cli/toplevel_before.yaml +++ /dev/null @@ -1,44 +0,0 @@ ---- -- debug: msg="START cli/toplevel_before.yaml" - -- name: setup - dellos10_config: - lines: - - "snmp-server contact ansible" - - "hostname {{ inventory_hostname }}" - provider: "{{ cli }}" - match: none - -- name: configure top level command with before - dellos10_config: - lines: ['hostname foo'] - before: ['snmp-server contact bar'] - provider: "{{ cli }}" - register: result - -- assert: - that: - - "result.changed == true" - - "'hostname foo' in result.updates" - - "'snmp-server contact bar' in result.updates" - -- name: configure top level command with before idempotent check - dellos10_config: - lines: ['hostname foo'] - before: ['snmp-server contact foo'] - provider: "{{ cli }}" - register: result - -- assert: - that: - - "result.changed == false" - -- name: teardown - dellos10_config: - lines: - - "no snmp-server contact" - - "hostname {{ inventory_hostname }}" - provider: "{{ cli }}" - match: none - -- debug: msg="END cli/toplevel_before.yaml" diff --git a/test/integration/roles/test_dellos10_config/tests/cli/toplevel_nonidempotent.yaml b/test/integration/roles/test_dellos10_config/tests/cli/toplevel_nonidempotent.yaml deleted file mode 100755 index dba70b5a54..0000000000 --- a/test/integration/roles/test_dellos10_config/tests/cli/toplevel_nonidempotent.yaml +++ /dev/null @@ -1,39 +0,0 @@ ---- -- debug: msg="START cli/toplevel_nonidempotent.yaml" - -- name: setup - dellos10_config: - lines: ['hostname {{ inventory_hostname }}'] - provider: "{{ cli }}" - match: none - -- name: configure top level command - dellos10_config: - lines: ['hostname foo'] - provider: "{{ cli }}" - match: strict - register: result - -- assert: - that: - - "result.changed == true" - - "'hostname foo' in result.updates" - -- name: configure top level command idempotent check - dellos10_config: - lines: ['hostname foo'] - provider: "{{ cli }}" - match: strict - register: result - -- assert: - that: - - "result.changed == false" - -- name: teardown - dellos10_config: - lines: ['hostname {{ inventory_hostname }}'] - provider: "{{ cli }}" - match: none - -- debug: msg="END cli/toplevel_nonidempotent.yaml" diff --git a/test/integration/roles/test_dellos10_facts/defaults/main.yaml b/test/integration/roles/test_dellos10_facts/defaults/main.yaml deleted file mode 100755 index 5f709c5aac..0000000000 --- a/test/integration/roles/test_dellos10_facts/defaults/main.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -testcase: "*" diff --git a/test/integration/roles/test_dellos10_facts/tasks/cli.yaml b/test/integration/roles/test_dellos10_facts/tasks/cli.yaml deleted file mode 100755 index d70b6ca579..0000000000 --- a/test/integration/roles/test_dellos10_facts/tasks/cli.yaml +++ /dev/null @@ -1,14 +0,0 @@ ---- -- 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: "{{ item }}" - with_items: "{{ test_items }}" diff --git a/test/integration/roles/test_dellos10_facts/tasks/main.yaml b/test/integration/roles/test_dellos10_facts/tasks/main.yaml deleted file mode 100755 index 415c99d8b1..0000000000 --- a/test/integration/roles/test_dellos10_facts/tasks/main.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -- { include: cli.yaml, tags: ['cli'] } diff --git a/test/integration/roles/test_dellos10_facts/tests/cli/facts.yaml b/test/integration/roles/test_dellos10_facts/tests/cli/facts.yaml deleted file mode 100755 index 9f2d763de0..0000000000 --- a/test/integration/roles/test_dellos10_facts/tests/cli/facts.yaml +++ /dev/null @@ -1,48 +0,0 @@ ---- -- debug: msg="START cli/facts.yaml" - -- name: test all facts - dellos10_facts: - gather_subset: - - all - provider: "{{ cli }}" - register: result - -- assert: - that: - - "result.changed == false" - - "result.ansible_facts is defined" - - "result.ansible_facts.ansible_net_interfaces is defined" - - "result.ansible_facts.ansible_net_memfree_mb is defined" - - "result.ansible_facts.ansible_net_model is defined" - - "result.ansible_facts.ansible_net_servicetag is defined" - - "result.ansible_facts.ansible_net_version is defined" - -- name: test all facts except hardware - dellos10_facts: - gather_subset: - - "!hardware" - provider: "{{ cli }}" - register: result - -- assert: - that: - - "result.changed == false" - - "result.ansible_facts.ansible_net_interfaces is defined" - - "result.ansible_facts.ansible_net_memfree_mb is not defined" - -- name: test interface facts - dellos10_facts: - gather_subset: - - interfaces - provider: "{{ cli }}" - register: result - -- assert: - that: - - "result.changed == false" - - "result.ansible_facts.ansible_net_interfaces is defined" - - "result.ansible_facts.ansible_net_memfree_mb is not defined" - - -- debug: msg="END cli/facts.yaml"