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:
parent
8aec69dd89
commit
ac07c6b5e6
1 changed files with 1 additions and 1 deletions
|
@ -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"):
|
||||
|
|
Loading…
Reference in a new issue