From 34b4c34306d44e16642111f50246317af7dc30c8 Mon Sep 17 00:00:00 2001 From: Massimo Gervasini Date: Sat, 6 Aug 2016 18:48:26 +0800 Subject: [PATCH] when write_config is no, we should not try to write any configuration changes --- network/a10/a10_server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/network/a10/a10_server.py b/network/a10/a10_server.py index 3c3ab5dbbc7..9716b43efbb 100644 --- a/network/a10/a10_server.py +++ b/network/a10/a10_server.py @@ -257,8 +257,8 @@ def main(): else: result = dict(msg="the server was not present") - # if the config has changed, or we want to force a save, save the config unless otherwise requested - if changed or write_config: + # if the config has changed, save the config unless otherwise requested + if changed and write_config: write_result = axapi_call(module, session_url + '&method=system.action.write_memory') if axapi_failure(write_result): module.fail_json(msg="failed to save the configuration: %s" % write_result['response']['err']['msg'])