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

@ -1,5 +1,5 @@
---
- debug: msg="START netconf_xml/bad_operator.yaml"
- debug: msg="START netconf_xml/bad_operator.yaml on connection={{ ansible_connection }}"
- name: test bad operator with xml encoding
junos_command:
@ -18,4 +18,4 @@
- "result.failed == true"
- "result.msg is defined"
- debug: msg="END netconf_xml/bad_operator.yaml"
- debug: msg="END netconf_xml/bad_operator.yaml on connection={{ ansible_connection }}"

View file

@ -1,5 +1,5 @@
---
- debug: msg="START netconf_xml/contains.yaml"
- debug: msg="START netconf_xml/contains.yaml on connection={{ ansible_connection }}"
- name: test contains operator with xml encoding
junos_command:
@ -18,4 +18,4 @@
- "result.stdout is defined"
- "result.stdout_lines is defined"
- debug: msg="END netconf_xml/contains.yaml"
- debug: msg="END netconf_xml/contains.yaml on connection={{ ansible_connection }}"

View file

@ -1,5 +1,5 @@
---
- debug: msg="START netconf_xml/equal.yaml"
- debug: msg="START netconf_xml/equal.yaml on connection={{ ansible_connection }}"
- name: test == operator with xml encoding
junos_command:
@ -35,4 +35,4 @@
- "result.stdout is defined"
- "result.stdout_lines is defined"
- debug: msg="END netconf_xml/equal.yaml"
- debug: msg="END netconf_xml/equal.yaml on connection={{ ansible_connection }}"

View file

@ -1,5 +1,5 @@
---
- debug: msg="START netconf_xml/greaterthan.yaml"
- debug: msg="START netconf_xml/greaterthan.yaml on connection={{ ansible_connection }}"
- name: test gt operator
junos_command:
@ -35,4 +35,4 @@
- "result.stdout is defined"
- "result.stdout_lines is defined"
- debug: msg="END netconf_xml/greaterthan.yaml"
- debug: msg="END netconf_xml/greaterthan.yaml on connection={{ ansible_connection }}"

View file

@ -1,5 +1,5 @@
---
- debug: msg="START netconf_xml/greaterthanorequal.yaml"
- debug: msg="START netconf_xml/greaterthanorequal.yaml on connection={{ ansible_connection }}"
- name: test ge operator
junos_command:
@ -35,4 +35,4 @@
- "result.stdout is defined"
- "result.stdout_lines is defined"
- debug: msg="END netconf_xml/greaterthanorequal.yaml"
- debug: msg="END netconf_xml/greaterthanorequal.yaml on connection={{ ansible_connection }}"

View file

@ -1,5 +1,5 @@
---
- debug: msg="START netconf_xml/invalid.yaml"
- debug: msg="START netconf_xml/invalid.yaml on connection={{ ansible_connection }}"
- name: run invalid command
junos_command:
@ -28,4 +28,4 @@
- "result.failed == true"
- "result.msg is defined"
- debug: msg="END netconf_xml/invalid.yaml"
- debug: msg="END netconf_xml/invalid.yaml on connection={{ ansible_connection }}"

View file

@ -1,5 +1,5 @@
---
- debug: msg="START netconf_xml/lessthan.yaml"
- debug: msg="START netconf_xml/lessthan.yaml on connection={{ ansible_connection }}"
- name: test lt operator
junos_command:
@ -35,4 +35,4 @@
- "result.stdout is defined"
- "result.stdout_lines is defined"
- debug: msg="END netconf_xml/lessthan.yaml"
- debug: msg="END netconf_xml/lessthan.yaml on connection={{ ansible_connection }}"

View file

@ -1,5 +1,5 @@
---
- debug: msg="START netconf_xml/lessthanorequal.yaml"
- debug: msg="START netconf_xml/lessthanorequal.yaml on connection={{ ansible_connection }}"
- name: test le operator
junos_command:
@ -35,4 +35,4 @@
- "result.stdout is defined"
- "result.stdout_lines is defined"
- debug: msg="END netconf_xml/lessthanorequal.yaml"
- debug: msg="END netconf_xml/lessthanorequal.yaml on connection={{ ansible_connection }}"

View file

@ -1,5 +1,5 @@
---
- debug: msg="START netconf_xml/notequal.yaml"
- debug: msg="START netconf_xml/notequal.yaml on connection={{ ansible_connection }}"
- name: test neq operator
junos_command:
@ -35,4 +35,4 @@
- "result.stdout is defined"
- "result.stdout_lines is defined"
- debug: msg="END netconf_xml/notequal.yaml"
- debug: msg="END netconf_xml/notequal.yaml on connection={{ ansible_connection }}"

View file

@ -1,5 +1,5 @@
---
- debug: msg="START netconf_xml/output.yaml"
- debug: msg="START netconf_xml/output.yaml on connection={{ ansible_connection }}"
- name: get output for single command
junos_command:
@ -35,6 +35,7 @@
provider:
transport: cli
register: result
connection: network_cli
- assert:
that:
@ -51,6 +52,7 @@
provider:
transport: cli
register: result
connection: network_cli
- assert:
that:
@ -58,4 +60,4 @@
- "result.stdout is defined"
- "result.stdout_lines is defined"
- debug: msg="END netconf_xml/output.yaml"
- debug: msg="END netconf_xml/output.yaml on connection={{ ansible_connection }}"

View file

@ -1,5 +1,5 @@
---
- debug: msg="START netconf_xml/timeout.yaml"
- debug: msg="START netconf_xml/timeout.yaml on connection={{ ansible_connection }}"
- name: test bad condition
junos_command:
@ -16,4 +16,4 @@
- "result.failed == true"
- "result.msg is defined"
- debug: msg="END netconf_xml/timeout.yaml"
- debug: msg="END netconf_xml/timeout.yaml on connection={{ ansible_connection }}"