Fix junos integration failures (#34571)

*  Add connection=netconf in individual roles for modules that run using netconf connection
plugin
*  Add connection=network_cli for junos_netconf and junos_command
at applicable places
This commit is contained in:
Ganesh Nalawade 2018-01-08 17:58:47 +05:30 committed by GitHub
commit 1c8c51d05c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
69 changed files with 276 additions and 123 deletions

View file

@ -8,8 +8,14 @@
- name: set test_items
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
- name: run test case
include: "{{ test_case_to_run }}"
- name: run test case (connection=netconf)
include: "{{ test_case_to_run }} ansible_connection=netconf"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run
- name: run test case (connection=local)
include: "{{ test_case_to_run }} ansible_connection=local"
with_items: "{{ test_items }}"
loop_control:
loop_var: test_case_to_run

View file

@ -1,5 +1,5 @@
---
- debug: msg="START netconf/backup.yaml"
- debug: msg="START netconf/backup.yaml on connection={{ ansible_connection }}"
- name: setup
junos_config:
@ -44,4 +44,4 @@
that:
- "backup_files.files is defined"
- debug: msg="END netconf/backup.yaml"
- debug: msg="END netconf/backup.yaml on connection={{ ansible_connection }}"

View file

@ -1,5 +1,5 @@
---
- debug: msg="START netconf/bad_action.yaml"
- debug: msg="START netconf/bad_action.yaml on connection={{ ansible_connection }}"
- name: configure single bad_action command
junos_config:
@ -13,4 +13,4 @@
that:
- "result.failed == true"
- debug: msg="END netconf/bad_action.yaml"
- debug: msg="END netconf/bad_action.yaml on connection={{ ansible_connection }}"

View file

@ -1,5 +1,5 @@
---
- debug: msg="START netconf/invalid.yaml"
- debug: msg="START netconf/invalid.yaml on connection={{ ansible_connection }}"
- name: configure single invalid command
junos_config:
@ -26,4 +26,4 @@
that:
- "result.failed == true"
- debug: msg="END netconf/invalid.yaml"
- debug: msg="END netconf/invalid.yaml on connection={{ ansible_connection }}"

View file

@ -1,5 +1,5 @@
---
- debug: msg="START netconf/multiple.yaml"
- debug: msg="START netconf/multiple.yaml on connection={{ ansible_connection }}"
- name: setup
junos_config:
@ -46,4 +46,4 @@
provider: "{{ netconf }}"
register: test
- debug: msg="END netconf/multiple.yaml"
- debug: msg="END netconf/multiple.yaml on connection={{ ansible_connection }}"

View file

@ -1,5 +1,5 @@
---
- debug: msg="START netconf/single.yaml"
- debug: msg="START netconf/single.yaml on connection={{ ansible_connection }}"
# Ensure that when we change the hostname to `localhost` we cause a change
- name: setup
@ -79,4 +79,4 @@
provider: "{{ netconf }}"
- debug: msg="END netconf/single.yaml"
- debug: msg="END netconf/single.yaml on connection={{ ansible_connection }}"

View file

@ -1,5 +1,5 @@
---
- debug: msg="START netconf/src_basic.yaml"
- debug: msg="START netconf/src_basic.yaml on connection={{ ansible_connection }}"
- name: setup
junos_config:
@ -101,4 +101,4 @@
that:
- "result.changed == true"
- debug: msg="END netconf/src_basic.yaml"
- debug: msg="END netconf/src_basic.yaml on connection={{ ansible_connection }}"

View file

@ -1,5 +1,5 @@
---
- debug: msg="START netconf/src_invalid.yaml"
- debug: msg="START netconf/src_invalid.yaml on connection={{ ansible_connection }}"
# Defend https://github.com/ansible/ansible-modules-core/issues/4797
@ -16,4 +16,4 @@
- "result.failed == true"
- "result.msg == 'path specified in src not found'"
- debug: msg="END netconf/src_invalid.yaml"
- debug: msg="END netconf/src_invalid.yaml on connection={{ ansible_connection }}"