From 037401b6e0d5c500774e2a259909e6fa7e3f16e2 Mon Sep 17 00:00:00 2001 From: Xu Yuandong Date: Tue, 17 Sep 2019 14:00:55 +0800 Subject: [PATCH] fix plugins/netconf/ce.py for netconf/capability/exchange (#60569) --- changelogs/fragments/60569-plugins-netconf-ce.yml | 2 ++ lib/ansible/plugins/netconf/ce.py | 3 +++ 2 files changed, 5 insertions(+) create mode 100644 changelogs/fragments/60569-plugins-netconf-ce.yml diff --git a/changelogs/fragments/60569-plugins-netconf-ce.yml b/changelogs/fragments/60569-plugins-netconf-ce.yml new file mode 100644 index 00000000000..9d6ce194173 --- /dev/null +++ b/changelogs/fragments/60569-plugins-netconf-ce.yml @@ -0,0 +1,2 @@ +bugfixes: + - plugins-netconf-ce - to get attribute 'set-id' from rpc-reply. diff --git a/lib/ansible/plugins/netconf/ce.py b/lib/ansible/plugins/netconf/ce.py index 24066b13e02..ef436d5229a 100644 --- a/lib/ansible/plugins/netconf/ce.py +++ b/lib/ansible/plugins/netconf/ce.py @@ -167,6 +167,9 @@ class Netconf(NetconfBase): @ensure_connected def get(self, *args, **kwargs): try: + if_rpc_reply = kwargs.pop('if_rpc_reply', False) + if if_rpc_reply: + return self.m.get(*args, **kwargs).xml return self.m.get(*args, **kwargs).data_xml except RPCError as exc: raise Exception(to_xml(exc.xml))