Delete targets/ops_command as module no longer exists (#28868)

This commit is contained in:
John R Barker 2017-08-31 11:11:32 +01:00 committed by GitHub
parent 07acc579db
commit 5dae6a6392
8 changed files with 0 additions and 136 deletions

View file

@ -1,3 +0,0 @@
---
testcase: "*"
test_cases: []

View file

@ -1,15 +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: "{{ test_case_to_run }}"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

View file

@ -1,2 +0,0 @@
---
- { include: cli.yaml, tags: ['cli'] }

View file

@ -1,20 +0,0 @@
---
- debug: msg="START cli/bad_operator.yaml"
- name: test bad operator
ops_command:
commands:
- show version
- show interfaces
wait_for:
- result[0] contains 'Description: Foo'
provider: "{{ cli }}"
register: result
ignore_errors: yes
- assert:
that:
- "result.failed == true"
- "result.msg is defined"
- debug: msg="END cli/bad_operator.yaml"

View file

@ -1,20 +0,0 @@
---
- debug: msg="START cli/contains.yaml"
- name: test contains operator
ops_command:
commands:
- show version
- show interface eth1
wait_for:
- "result[0] contains OpenSwitch"
- "result[1] contains 'Interface eth1'"
provider: "{{ cli }}"
register: result
- assert:
that:
- "result.changed == false"
- "result.stdout is defined"
- debug: msg="END cli/contains.yaml"

View file

@ -1,28 +0,0 @@
---
- debug: msg="START cli/invalid.yaml"
- name: run invalid command
ops_command:
commands: ['show foo']
provider: "{{ cli }}"
register: result
ignore_errors: yes
- assert:
that:
- "result.failed"
- name: run commands that include invalid command
ops_command:
commands:
- show version
- show foo
provider: "{{ cli }}"
register: result
ignore_errors: yes
- assert:
that:
- "result.failed"
- debug: msg="END cli/invalid.yaml"

View file

@ -1,29 +0,0 @@
---
- debug: msg="START cli/output.yaml"
- name: get output for single command
ops_command:
commands: ['show version']
provider: "{{ cli }}"
register: result
- assert:
that:
- "result.changed == false"
- "result.stdout is defined"
- name: get output for multiple commands
ops_command:
commands:
- show version
- show interface
provider: "{{ cli }}"
register: result
- assert:
that:
- "result.changed == false"
- "result.stdout is defined"
- "result.stdout | length == 2"
- debug: msg="END cli/output.yaml"

View file

@ -1,19 +0,0 @@
---
- debug: msg="START cli/timeout.yaml"
- name: test bad condition
ops_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"