Remove xml return for junos declarative modules (#26400)

*  Remove xml return
*  Add diff return
*  Related doc changes
This commit is contained in:
Ganesh Nalawade 2017-07-04 21:49:26 +05:30 committed by GitHub
parent c1ac55147f
commit 1a9b0ae731
13 changed files with 62 additions and 119 deletions

View file

@ -100,17 +100,18 @@ EXAMPLES = """
"""
RETURN = """
rpc:
description: load-configuration RPC send to the device
returned: when configuration is changed on device
diff:
description: Configuration difference before and after applying change.
returned: when configuration is changed.
type: string
sample: >
<interfaces>
<interface>
<name>ge-0/0/0</name>
<description>test interface</description>
</interface>
</interfaces>
[edit system]
+ host-name test;
+ domain-name ansible.com;
+ domain-search redhat.com;
[edit system name-server]
172.26.1.1 { ... }
+ 8.8.8.8;
"""
import collections
@ -190,8 +191,7 @@ def main():
if diff:
result.update({
'changed': True,
'diff': {'prepared': diff},
'rpc': tostring(ele)
'diff': diff,
})
module.exit_json(**result)