mirror of
https://github.com/ansible/ansible.git
synced 2025-11-30 23:16:08 +07:00
Remove obsolete incidental_ios_file test (#86086)
This commit is contained in:
@@ -1,2 +0,0 @@
|
||||
shippable/ios/incidental
|
||||
network/ios
|
||||
@@ -1,2 +0,0 @@
|
||||
---
|
||||
testcase: "*"
|
||||
@@ -1,3 +0,0 @@
|
||||
vlan 3
|
||||
name ank_vlan3
|
||||
!
|
||||
Binary file not shown.
@@ -1,17 +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 cases (connection=ansible.netcommon.network_cli)
|
||||
include_tasks: "{{ test_case_to_run }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
tags: connection_network_cli
|
||||
@@ -1,2 +0,0 @@
|
||||
---
|
||||
- { import_tasks: cli.yaml, tags: ['cli'] }
|
||||
@@ -1,52 +0,0 @@
|
||||
---
|
||||
- debug: msg="START ios cli/net_get.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
# Add minimal testcase to check args are passed correctly to
|
||||
# implementation module and module run is successful.
|
||||
|
||||
- name: setup
|
||||
cisco.ios.ios_config:
|
||||
lines:
|
||||
- ip ssh version 2
|
||||
- ip scp server enable
|
||||
- username {{ ansible_ssh_user }} privilege 15
|
||||
match: none
|
||||
|
||||
- name: setup (copy file to be fetched from device)
|
||||
ansible.netcommon.net_put:
|
||||
src: ios1.cfg
|
||||
register: result
|
||||
|
||||
- name: setup (remove file from localhost if present)
|
||||
file:
|
||||
path: ios_{{ inventory_hostname }}.cfg
|
||||
state: absent
|
||||
delegate_to: localhost
|
||||
|
||||
- name: get the file from device with relative destination
|
||||
ansible.netcommon.net_get:
|
||||
src: ios1.cfg
|
||||
dest: 'ios_{{ inventory_hostname }}.cfg'
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result.changed == true
|
||||
|
||||
- name: Idempotency check
|
||||
ansible.netcommon.net_get:
|
||||
src: ios1.cfg
|
||||
dest: 'ios_{{ inventory_hostname }}.cfg'
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result.changed == false
|
||||
|
||||
- name: setup (remove file from localhost if present)
|
||||
file:
|
||||
path: ios_{{ inventory_hostname }}.cfg
|
||||
state: absent
|
||||
delegate_to: localhost
|
||||
|
||||
- debug: msg="END ios cli/net_get.yaml on connection={{ ansible_connection }}"
|
||||
@@ -1,73 +0,0 @@
|
||||
---
|
||||
- debug:
|
||||
msg: "START ios cli/net_put.yaml on connection={{ ansible_connection }}"
|
||||
|
||||
# Add minimal testcase to check args are passed correctly to
|
||||
# implementation module and module run is successful.
|
||||
|
||||
- name: setup
|
||||
cisco.ios.ios_config:
|
||||
lines:
|
||||
- ip ssh version 2
|
||||
- ip scp server enable
|
||||
- username {{ ansible_ssh_user }} privilege 15
|
||||
match: none
|
||||
|
||||
- name: Delete existing files if present on remote host
|
||||
cisco.ios.ios_command:
|
||||
commands: "{{ item }}"
|
||||
loop:
|
||||
- delete /force ios1.cfg
|
||||
- delete /force ios.cfg
|
||||
- delete /force nonascii.bin
|
||||
ignore_errors: true
|
||||
|
||||
- name: copy file from controller to ios + scp (Default)
|
||||
ansible.netcommon.net_put:
|
||||
src: ios1.cfg
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result.changed == true
|
||||
|
||||
- name: Idempotency Check
|
||||
ansible.netcommon.net_put:
|
||||
src: ios1.cfg
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result.changed == false
|
||||
|
||||
- name: copy file from controller to ios + dest specified
|
||||
ansible.netcommon.net_put:
|
||||
src: ios1.cfg
|
||||
dest: ios.cfg
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result.changed == true
|
||||
|
||||
- name: copy file with non-ascii characters to ios in template mode(Fail case)
|
||||
ansible.netcommon.net_put:
|
||||
src: nonascii.bin
|
||||
mode: 'text'
|
||||
register: result
|
||||
ignore_errors: true
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result.failed == true
|
||||
|
||||
- name: copy file with non-ascii characters to ios in default mode(binary)
|
||||
ansible.netcommon.net_put:
|
||||
src: nonascii.bin
|
||||
register: result
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- result.changed == true
|
||||
|
||||
- debug: msg="END ios cli/net_put.yaml on connection={{ ansible_connection }}"
|
||||
Reference in New Issue
Block a user