Fix netconf validate capability check (#71195) (#71252)

*  Use ``:validate`` string to check if the netconf
   server supports validate capability as per netconf RFC

(cherry picked from commit 7635d23cee)
This commit is contained in:
Ganesh Nalawade 2020-08-27 23:22:49 +05:30 committed by GitHub
parent ca118613aa
commit 67b2b8caf1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- Fixed Ansible reporting validate not supported by netconf server when enabled in netconf - (https://github.com/ansible-collections/ansible.netcommon/issues/119).

View file

@ -354,7 +354,7 @@ class NetconfBase(AnsiblePlugin):
operations['supports_startup'] = ':startup' in capabilities operations['supports_startup'] = ':startup' in capabilities
operations['supports_xpath'] = ':xpath' in capabilities operations['supports_xpath'] = ':xpath' in capabilities
operations['supports_writable_running'] = ':writable-running' in capabilities operations['supports_writable_running'] = ':writable-running' in capabilities
operations['supports_validate'] = ':writable-validate' in capabilities operations['supports_validate'] = ':validate' in capabilities
operations['lock_datastore'] = [] operations['lock_datastore'] = []
if operations['supports_writable_running']: if operations['supports_writable_running']: