mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-26 10:10:22 -07:00
Fix multiple issues in junos integration test (#27624)
This commit is contained in:
parent
2233d9aeb2
commit
505f3bfcac
6 changed files with 56 additions and 90 deletions
|
@ -79,7 +79,6 @@
|
|||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- "'<interface>' in config.xml"
|
||||
- "'<name>ge-0/0/1</name>' in config.xml"
|
||||
|
||||
- name: Configure interface attributes
|
||||
|
@ -116,17 +115,10 @@
|
|||
provider: "{{ netconf }}"
|
||||
register: result
|
||||
|
||||
- name: Get running configuration
|
||||
junos_rpc:
|
||||
rpc: get-configuration
|
||||
provider: "{{ netconf }}"
|
||||
register: config
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- "'<disable/>' in config.xml"
|
||||
- "'<name>ge-0/0/1</name>' in config.xml"
|
||||
- result.diff.prepared | search("\+ *disable")
|
||||
|
||||
- name: Enable interface
|
||||
junos_interface:
|
||||
|
@ -136,17 +128,10 @@
|
|||
provider: "{{ netconf }}"
|
||||
register: result
|
||||
|
||||
- name: Get running configuration
|
||||
junos_rpc:
|
||||
rpc: get-configuration
|
||||
provider: "{{ netconf }}"
|
||||
register: config
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- "'[edit interfaces ge-0/0/1]\n- disable;' in result.diff.prepared"
|
||||
- "'<name>ge-0/0/1</name>' in config.xml"
|
||||
- result.diff.prepared | search("\- *disable")
|
||||
|
||||
- name: Delete interface
|
||||
junos_interface:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue