Add active param to junos declarative modules (#26222)

*  active/deactivate configuration capability
*  integration test refactor
This commit is contained in:
Ganesh Nalawade 2017-06-29 10:18:35 +05:30 committed by GitHub
commit 911a7e085e
13 changed files with 561 additions and 331 deletions

View file

@ -15,10 +15,16 @@
provider: "{{ netconf }}"
register: result
- name: Get running configuration
junos_rpc:
rpc: get-configuration
provider: "{{ netconf }}"
register: config
- assert:
that:
- "result.changed == true"
- "'<message>this is my login banner</message>' in result.rpc"
- "'<message>this is my login banner</message>' in config.xml"
- name: Create login banner (idempotent)
net_banner:
@ -39,10 +45,16 @@
provider: "{{ netconf }}"
register: result
- name: Get running configuration
junos_rpc:
rpc: get-configuration
provider: "{{ netconf }}"
register: config
- assert:
that:
- "result.changed == true"
- "'<message delete=\"delete\" />' in result.rpc"
- "'<message>this is my login banner</message>' not in config.xml"
- name: setup - remove motd banner
net_banner:
@ -58,13 +70,16 @@
provider: "{{ netconf }}"
register: result
- debug:
msg: "{{ result }}"
- name: Get running configuration
junos_rpc:
rpc: get-configuration
provider: "{{ netconf }}"
register: config
- assert:
that:
- "result.changed == true"
- "'<announcement>this is my motd banner</announcement>' in result.rpc"
- "'<announcement>this is my motd banner</announcement>' in config.xml"
- name: Create motd banner (idempotent)
net_banner:
@ -85,7 +100,13 @@
provider: "{{ netconf }}"
register: result
- name: Get running configuration
junos_rpc:
rpc: get-configuration
provider: "{{ netconf }}"
register: config
- assert:
that:
- "result.changed == true"
- "'<announcement delete=\"delete\" />' in result.rpc"
- "'<announcement>this is my motd banner</announcement>' not in config.xml"