From b6276fe4a4e669e367a18d0cab514b257918a15e Mon Sep 17 00:00:00 2001 From: Ganesh Nalawade Date: Thu, 4 Oct 2018 09:47:19 +0530 Subject: [PATCH] Make default_operation optional in netconf_config module (#46333) Fixes #46257 * As per netconf rfc default-operation value is optional, hence removing the default value for default_operation option. (cherry picked from commit 5e6eb921aed82ddfeaa8b8c791bda04e39ba2a34) * Update changelog --- changelogs/fragments/netconf_config_default_operation.yaml | 3 +++ lib/ansible/modules/network/netconf/netconf_config.py | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/netconf_config_default_operation.yaml diff --git a/changelogs/fragments/netconf_config_default_operation.yaml b/changelogs/fragments/netconf_config_default_operation.yaml new file mode 100644 index 00000000000..f23a4c4caa8 --- /dev/null +++ b/changelogs/fragments/netconf_config_default_operation.yaml @@ -0,0 +1,3 @@ +--- +minor_changes: +- netconf_config - Make default_operation optional in netconf_config module (https://github.com/ansible/ansible/pull/46333) diff --git a/lib/ansible/modules/network/netconf/netconf_config.py b/lib/ansible/modules/network/netconf/netconf_config.py index 2c9f5b45645..f4c97b51945 100644 --- a/lib/ansible/modules/network/netconf/netconf_config.py +++ b/lib/ansible/modules/network/netconf/netconf_config.py @@ -71,7 +71,6 @@ options: option completely replaces the configuration in the C(target) datastore. If the value is none the C(target) datastore is unaffected by the configuration in the config option, unless and until the incoming configuration data uses the C(operation) operation to request a different operation. - default: merge choices: ['merge', 'replace', 'none'] version_added: "2.7" confirm: @@ -231,7 +230,7 @@ def main(): source_datastore=dict(aliases=['source']), format=dict(choices=['xml', 'text'], default='xml'), lock=dict(choices=['never', 'always', 'if-supported'], default='always'), - default_operation=dict(choices=['merge', 'replace', 'none'], default='merge'), + default_operation=dict(choices=['merge', 'replace', 'none']), confirm=dict(type='int', default=0), confirm_commit=dict(type='bool', default=False), error_option=dict(choices=['stop-on-error', 'continue-on-error', 'rollback-on-error'], default='stop-on-error'),