Return commands key instead of xml in result for junos rm (#62041)
Fixes https://github.com/ansible/ansible/issues/61773 * Change `xml` key name to `commands` key to be in sync with other platform resource modules.
This commit is contained in:
parent
6fb1d56fdc
commit
ff53ca76b8
10 changed files with 15 additions and 15 deletions
|
@ -76,7 +76,7 @@ class Interfaces(ConfigBase):
|
|||
if self._module._diff:
|
||||
result['diff'] = {'prepared': diff}
|
||||
|
||||
result['xml'] = config_xmls
|
||||
result['commands'] = config_xmls
|
||||
|
||||
changed_interfaces_facts = self.get_interfaces_facts()
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ class L2_interfaces(ConfigBase):
|
|||
if self._module._diff:
|
||||
result['diff'] = {'prepared': diff}
|
||||
|
||||
result['xml'] = config_xmls
|
||||
result['commands'] = config_xmls
|
||||
|
||||
changed_l2_interfaces_facts = self.get_l2_interfaces_facts()
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ class L3_interfaces(ConfigBase):
|
|||
if self._module._diff:
|
||||
result['diff'] = {'prepared': diff}
|
||||
|
||||
result['xml'] = config_xmls
|
||||
result['commands'] = config_xmls
|
||||
|
||||
changed_interfaces_facts = self.get_l3_interfaces_facts()
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ class Lacp(ConfigBase):
|
|||
if self._module._diff:
|
||||
result['diff'] = {'prepared': diff}
|
||||
|
||||
result['xml'] = config_xmls
|
||||
result['commands'] = config_xmls
|
||||
|
||||
changed_lacp_facts = self.get_lacp_facts()
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ class Lacp_interfaces(ConfigBase):
|
|||
if self._module._diff:
|
||||
result['diff'] = {'prepared': diff}
|
||||
|
||||
result['xml'] = config_xmls
|
||||
result['commands'] = config_xmls
|
||||
|
||||
changed_lacp_interfaces_facts = self.get_lacp_interfaces_facts()
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ class Lag_interfaces(ConfigBase):
|
|||
if self._module._diff:
|
||||
result['diff'] = {'prepared': diff}
|
||||
|
||||
result['xml'] = config_xmls
|
||||
result['commands'] = config_xmls
|
||||
|
||||
changed_lag_interfaces_facts = self.get_lag_interfaces_facts()
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ class Lldp_global(ConfigBase):
|
|||
if self._module._diff:
|
||||
result['diff'] = {'prepared': diff}
|
||||
|
||||
result['xml'] = config_xmls
|
||||
result['commands'] = config_xmls
|
||||
|
||||
changed_lldp_global_facts = self.get_lldp_global_facts()
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ class Lldp_interfaces(ConfigBase):
|
|||
if self._module._diff:
|
||||
result['diff'] = {'prepared': diff}
|
||||
|
||||
result['xml'] = config_xmls
|
||||
result['commands'] = config_xmls
|
||||
|
||||
changed_lldp_interfaces_facts = self.get_lldp_interfaces_facts()
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ class Vlans(ConfigBase):
|
|||
if self._module._diff:
|
||||
result['diff'] = {'prepared': diff}
|
||||
|
||||
result['xml'] = config_xmls
|
||||
result['commands'] = config_xmls
|
||||
|
||||
changed_vlans_facts = self.get_vlans_facts()
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
- assert:
|
||||
that:
|
||||
- result is changed
|
||||
- "'<nc:address><nc:name>192.168.100.1/24</nc:name></nc:address>' in result.xml[0]"
|
||||
- "'<nc:address><nc:name>10.200.16.20/24</nc:name></nc:address>' in result.xml[0]"
|
||||
- "'<nc:address><nc:name>192.168.100.1/24</nc:name></nc:address>' in result.commands[0]"
|
||||
- "'<nc:address><nc:name>10.200.16.20/24</nc:name></nc:address>' in result.commands[0]"
|
||||
- "result.after[0].name == 'ge-1/0/0'"
|
||||
- "result.after[0].ipv4[0]['address'] == '192.168.100.1/24'"
|
||||
- "result.after[0].ipv4[1]['address'] == '10.200.16.20/24'"
|
||||
|
@ -61,8 +61,8 @@
|
|||
- assert:
|
||||
that:
|
||||
- result is changed
|
||||
- "'<nc:address><nc:name>100.64.0.1/10</nc:name></nc:address>' in result.xml[0]"
|
||||
- "'<nc:address><nc:name>100.64.0.2/10</nc:name></nc:address>' in result.xml[0]"
|
||||
- "'<nc:address><nc:name>100.64.0.1/10</nc:name></nc:address>' in result.commands[0]"
|
||||
- "'<nc:address><nc:name>100.64.0.2/10</nc:name></nc:address>' in result.commands[0]"
|
||||
- "result.after[0].name == 'ge-1/0/0'"
|
||||
- "result.after[0].ipv4[0]['address'] == '192.168.100.1/24'"
|
||||
- "result.after[0].ipv4[1]['address'] == '10.200.16.20/24'"
|
||||
|
@ -79,7 +79,7 @@
|
|||
- assert:
|
||||
that:
|
||||
- result is changed
|
||||
- "'<nc:name>ge-2/0/0</nc:name><nc:unit><nc:name>0</nc:name><nc:family><nc:inet><nc:address delete=\"delete\"/>' in result.xml[0]"
|
||||
- "'<nc:name>ge-2/0/0</nc:name><nc:unit><nc:name>0</nc:name><nc:family><nc:inet><nc:address delete=\"delete\"/>' in result.commands[0]"
|
||||
|
||||
- name: Override all config
|
||||
junos_l3_interfaces:
|
||||
|
@ -96,4 +96,4 @@
|
|||
- assert:
|
||||
that:
|
||||
- result is changed
|
||||
- "'<nc:name>fxp0</nc:name><nc:unit><nc:name>0</nc:name><nc:family><nc:inet><nc:dhcp/></nc:inet>' in result.xml[0]"
|
||||
- "'<nc:name>fxp0</nc:name><nc:unit><nc:name>0</nc:name><nc:family><nc:inet><nc:dhcp/></nc:inet>' in result.commands[0]"
|
||||
|
|
Loading…
Reference in a new issue