Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove provider option from ios integration test #31037

Merged
merged 1 commit into from
Sep 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
banner: login
state: absent
authorize: yes
provider: "{{ cli }}"

- name: Set login
ios_banner:
Expand All @@ -16,7 +15,6 @@
string
state: present
authorize: yes
provider: "{{ cli }}"
register: result

- debug:
Expand All @@ -36,7 +34,6 @@
string
state: present
authorize: yes
provider: "{{ cli }}"
register: result

- assert:
Expand Down
3 changes: 0 additions & 3 deletions test/integration/targets/ios_banner/tests/cli/basic-motd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
ios_banner:
banner: motd
state: absent
provider: "{{ cli }}"
authorize: yes

- name: Set motd
Expand All @@ -16,7 +15,6 @@
string
state: present
authorize: yes
provider: "{{ cli }}"
register: result

- debug:
Expand All @@ -36,7 +34,6 @@
string
state: present
authorize: yes
provider: "{{ cli }}"
register: result

- assert:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@
over multiple lines
state: present
authorize: yes
provider: "{{ cli }}"

- name: remove login
ios_banner:
banner: login
state: absent
authorize: yes
provider: "{{ cli }}"
register: result

- debug:
Expand All @@ -30,7 +28,6 @@
banner: login
state: absent
authorize: yes
provider: "{{ cli }}"
register: result

- assert:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
commands:
- show version
- show interfaces GigabitEthernet 0/0
authorize: yes
wait_for:
- "result[0] contains 'Description: Foo'"
register: result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
commands:
- show version
- show interface loopback 888
authorize: yes
wait_for:
- "result[0] contains Cisco"
- "result[1] contains Loopback888"
Expand Down
2 changes: 2 additions & 0 deletions test/integration/targets/ios_command/tests/cli/invalid.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- name: run invalid command
ios_command:
commands: show foo
authorize: yes
register: result
ignore_errors: yes

Expand All @@ -16,6 +17,7 @@
commands:
- show version
- show foo
authorize: yes
register: result
ignore_errors: yes

Expand Down
2 changes: 2 additions & 0 deletions test/integration/targets/ios_command/tests/cli/output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
ios_command:
commands:
- show version
authorize: yes
register: result

- assert:
Expand All @@ -17,6 +18,7 @@
commands:
- show version
- show interfaces
authorize: yes
register: result

- assert:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
ios_command:
commands:
- show version
authorize: yes
wait_for:
- "result[0] contains bad_value_string"
register: result
Expand Down
4 changes: 2 additions & 2 deletions test/integration/targets/ios_config/tests/cli/backup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
parents:
- interface Loopback999
match: none
provider: "{{ cli }}"
authorize: yes

- name: collect any backup files
find:
Expand All @@ -28,7 +28,7 @@
ios_config:
src: basic/config.j2
backup: yes
provider: "{{ cli }}"
authorize: yes
register: result

- assert:
Expand Down
6 changes: 3 additions & 3 deletions test/integration/targets/ios_config/tests/cli/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
parents:
- interface Loopback999
match: none
provider: "{{ cli }}"
authorize: yes

- name: configure device with defaults included
ios_config:
src: defaults/config.j2
defaults: yes
provider: "{{ cli }}"
authorize: yes
register: result

- debug: var=result
Expand All @@ -30,7 +30,7 @@
ios_config:
src: defaults/config.j2
defaults: yes
provider: "{{ cli }}"
authorize: yes
register: result

- debug: var=result
Expand Down
6 changes: 3 additions & 3 deletions test/integration/targets/ios_config/tests/cli/save.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
parents:
- interface Loopback999
match: none
provider: "{{ cli }}"
authorize: yes


- name: save config
ios_config:
save: true
provider: "{{ cli }}"
authorize: yes
register: result
# FIXME https://github.com/ansible/ansible-modules-core/issues/5008
ignore_errors: true
Expand All @@ -29,7 +29,7 @@
- name: save should always run
ios_config:
save: true
provider: "{{ cli }}"
authorize: yes
register: result
# FIXME https://github.com/ansible/ansible-modules-core/issues/5008
ignore_errors: true
Expand Down
6 changes: 3 additions & 3 deletions test/integration/targets/ios_config/tests/cli/src_basic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
parents:
- interface Loopback999
match: none
provider: "{{ cli }}"
authorize: yes

- name: configure device with config
ios_config:
src: basic/config.j2
provider: "{{ cli }}"
authorize: yes
register: result

- name: debug, remove me
Expand All @@ -30,7 +30,7 @@
- name: check device with config
ios_config:
src: basic/config.j2
provider: "{{ cli }}"
authorize: yes
register: result

- assert:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- name: configure with invalid src
ios_config:
src: basic/foobar.j2
authorize: yes
register: result
ignore_errors: yes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
parents:
- interface Loopback999
match: none
provider: "{{ cli }}"
authorize: yes

- name: configure device with config
ios_config:
src: basic/config.j2
match: none
provider: "{{ cli }}"
authorize: yes
register: result

- assert:
Expand All @@ -28,7 +28,7 @@
- name: check device with config
ios_config:
src: basic/config.j2
provider: "{{ cli }}"
authorize: yes
register: result

- assert:
Expand Down
8 changes: 4 additions & 4 deletions test/integration/targets/ios_config/tests/cli/sublevel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
- 'no ip access-list extended test'
- 'no ip access-list standard test'
match: none
provider: "{{ cli }}"
authorize: yes

- name: configure sub level command
ios_config:
lines: ['permit ip any any log']
parents: ['ip access-list extended test']
provider: "{{ cli }}"
authorize: yes
register: result

- assert:
Expand All @@ -26,7 +26,7 @@
ios_config:
lines: ['permit ip any any log']
parents: ['ip access-list extended test']
provider: "{{ cli }}"
authorize: yes
register: result

- assert:
Expand All @@ -38,6 +38,6 @@
lines:
- 'no ip access-list extended test'
match: none
provider: "{{ cli }}"
authorize: yes

- debug: msg="END cli/sublevel.yaml"
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
parents: ['ip access-list extended test']
before: ['no ip access-list extended test']
after: ['exit']
provider: "{{ cli }}"
authorize: yes
match: none

- name: configure sub level command using block resplace
Expand All @@ -23,7 +23,7 @@
parents: ['ip access-list extended test']
replace: block
after: ['exit']
provider: "{{ cli }}"
authorize: yes
register: result

- assert:
Expand All @@ -45,7 +45,7 @@
parents: ['ip access-list extended test']
replace: block
after: ['exit']
provider: "{{ cli }}"
authorize: yes
register: result

- assert:
Expand All @@ -57,6 +57,6 @@
lines:
- no ip access-list extended test
match: none
provider: "{{ cli }}"
authorize: yes

- debug: msg="END cli/sublevel_block.yaml"
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
before: no ip access-list extended test
after: exit
match: none
provider: "{{ cli }}"
authorize: yes

- name: configure sub level command using exact match
ios_config:
Expand All @@ -26,7 +26,7 @@
before: no ip access-list extended test
after: exit
match: exact
provider: "{{ cli }}"
authorize: yes
register: result

- assert:
Expand All @@ -48,7 +48,7 @@
- permit ip host 4.4.4.4 any log
parents: ip access-list extended test
match: exact
provider: "{{ cli }}"
authorize: yes
register: result

- assert:
Expand All @@ -60,6 +60,6 @@
lines:
- no ip access-list extended test
match: none
provider: "{{ cli }}"
authorize: yes

- debug: msg="END cli/sublevel_exact.yaml"
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
parents: ip access-list extended test
before: no ip access-list extended test
match: none
provider: "{{ cli }}"
authorize: yes

- name: configure sub level command using strict match
ios_config:
Expand All @@ -23,7 +23,7 @@
- permit ip host 4.4.4.4 any log
parents: ip access-list extended test
match: strict
provider: "{{ cli }}"
authorize: yes
register: result

- assert:
Expand All @@ -39,7 +39,7 @@
parents: ip access-list extended test
after: exit
match: strict
provider: "{{ cli }}"
authorize: yes
register: result

- assert:
Expand All @@ -56,6 +56,6 @@
ios_config:
lines: no ip access-list extended test
match: none
provider: "{{ cli }}"
authorize: yes

- debug: msg="END cli/sublevel_strict.yaml"