From 0f554f9208de4ae249b33c428abcc915adec2b12 Mon Sep 17 00:00:00 2001 From: Nathaniel Case Date: Thu, 9 Aug 2018 12:46:38 -0400 Subject: Remove unnecessary features from cli_command (#43829) * Remove wait_for & associated params * Upgrade command dict to top-level, remove more wait_for accessories * We don't need all this anymore * Update docs * Update tests to new argspec * Be a little more explicit about sendonly Also remove reference to the word provider. * Add example of prompt and answer --- .../integration/targets/junos_smoke/tasks/cli.yaml | 16 ------------ .../targets/junos_smoke/tasks/main.yaml | 1 - .../junos_smoke/tests/cli/cli_commmand.yaml | 29 ---------------------- 3 files changed, 46 deletions(-) delete mode 100644 test/integration/targets/junos_smoke/tasks/cli.yaml delete mode 100644 test/integration/targets/junos_smoke/tests/cli/cli_commmand.yaml (limited to 'test/integration/targets/junos_smoke') diff --git a/test/integration/targets/junos_smoke/tasks/cli.yaml b/test/integration/targets/junos_smoke/tasks/cli.yaml deleted file mode 100644 index 3f93a4f369..0000000000 --- a/test/integration/targets/junos_smoke/tasks/cli.yaml +++ /dev/null @@ -1,16 +0,0 @@ ---- -- name: collect all cli test cases - find: - paths: "{{ role_path }}/tests/cli" - patterns: "{{ testcase }}.yaml" - register: test_cases - delegate_to: localhost - -- name: set test_items - set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}" - -- name: run test case (connection=network_cli) - include: "{{ test_case_to_run }} ansible_connection=network_cli" - with_items: "{{ test_items }}" - loop_control: - loop_var: test_case_to_run diff --git a/test/integration/targets/junos_smoke/tasks/main.yaml b/test/integration/targets/junos_smoke/tasks/main.yaml index f0d6ea992f..cc27f174fd 100644 --- a/test/integration/targets/junos_smoke/tasks/main.yaml +++ b/test/integration/targets/junos_smoke/tasks/main.yaml @@ -1,3 +1,2 @@ --- - { include: netconf.yaml, tags: ['netconf'] } -- { include: cli.yaml, tags: ['cli'] } diff --git a/test/integration/targets/junos_smoke/tests/cli/cli_commmand.yaml b/test/integration/targets/junos_smoke/tests/cli/cli_commmand.yaml deleted file mode 100644 index b23b81c462..0000000000 --- a/test/integration/targets/junos_smoke/tests/cli/cli_commmand.yaml +++ /dev/null @@ -1,29 +0,0 @@ ---- -- debug: - msg: "START cli/cli_command.yaml on connection={{ ansible_connection }}" - -- name: get output for single command - cli_command: - commands: - - show version - register: result - -- assert: - that: - - "result.changed == false" - - "result.stdout is defined" - -- name: get output for multiple commands - cli_command: - commands: - - show version - - show interfaces - register: result - -- assert: - that: - - "result.changed == false" - - "result.stdout is defined" - - "result.stdout | length == 2" - -- debug: msg="END cli/cli_command.yaml on connection={{ ansible_connection }}" -- cgit v1.2.1