From 05e6339c49f198448709dd982420da872a5c59d1 Mon Sep 17 00:00:00 2001 From: xuxiaowei0512 Date: Wed, 5 Jun 2019 22:43:46 +0800 Subject: [PATCH] option is marked as required but specifies a default (#57257) * required and default are conflicting --- lib/ansible/modules/network/cloudengine/ce_reboot.py | 6 +++--- test/sanity/validate-modules/ignore.txt | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/ansible/modules/network/cloudengine/ce_reboot.py b/lib/ansible/modules/network/cloudengine/ce_reboot.py index e8b8cb0f839..040f103b4be 100644 --- a/lib/ansible/modules/network/cloudengine/ce_reboot.py +++ b/lib/ansible/modules/network/cloudengine/ce_reboot.py @@ -34,7 +34,7 @@ options: description: - Safeguard boolean. Set to true if you're sure you want to reboot. type: bool - default: false + required: true save_config: description: - Flag indicating whether to save the configuration. @@ -134,8 +134,8 @@ def main(): """ main """ argument_spec = dict( - confirm=dict(required=True, type='bool', default='false'), - save_config=dict(required=False, type='bool', default='false') + confirm=dict(required=True, type='bool'), + save_config=dict(default=False, type='bool') ) argument_spec.update(ce_argument_spec) diff --git a/test/sanity/validate-modules/ignore.txt b/test/sanity/validate-modules/ignore.txt index 9a0cebac467..cc4fac8b85c 100644 --- a/test/sanity/validate-modules/ignore.txt +++ b/test/sanity/validate-modules/ignore.txt @@ -450,7 +450,6 @@ lib/ansible/modules/network/cloudengine/ce_ntp.py E322 lib/ansible/modules/network/cloudengine/ce_ntp_auth.py E322 lib/ansible/modules/network/cloudengine/ce_ospf.py E322 lib/ansible/modules/network/cloudengine/ce_ospf_vrf.py E322 -lib/ansible/modules/network/cloudengine/ce_reboot.py E317 lib/ansible/modules/network/cloudengine/ce_reboot.py E322 lib/ansible/modules/network/cloudengine/ce_rollback.py E322 lib/ansible/modules/network/cloudengine/ce_sflow.py E322