mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
Fix netconf plugin dispatch response (#54326)
Fixes #53236 * If dispatch() rpc response has data element return the xml string from `<data>` element else return the complete xml string from `<rpc-reply>`.
This commit is contained in:
@@ -211,7 +211,7 @@ class NetconfBase(AnsiblePlugin):
|
||||
raise ValueError('rpc_command value must be provided')
|
||||
req = fromstring(rpc_command)
|
||||
resp = self.m.dispatch(req, source=source, filter=filter)
|
||||
return resp.data_xml if hasattr(resp, 'data_xml') else resp.xml
|
||||
return resp.data_xml if resp.data_ele else resp.xml
|
||||
|
||||
@ensure_connected
|
||||
def lock(self, target="candidate"):
|
||||
|
||||
Reference in New Issue
Block a user