]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/deepsea: use empty strings rather than None for option defaults
authorTim Serong <tserong@suse.com>
Thu, 14 Mar 2019 10:10:38 +0000 (21:10 +1100)
committerSebastian Wagner <sebastian.wagner@suse.com>
Tue, 2 Apr 2019 14:24:38 +0000 (16:24 +0200)
This makes the _config_valid() function work properly; the option
defaults are being strinified somewhere, so we need to use empty
strings rather than None (which becomes "None"), in order to check
if they're set or not.

Signed-off-by: Tim Serong <tserong@suse.com>
(cherry picked from commit e81f109bf93317b998d3ea31d64381d9f491a6ef)

src/pybind/mgr/deepsea/module.py

index c108fea8aa6098db53364e9727c98a304775fb63..8fdb4e4fb4d85dcd971291fdbc600bd3d39fa305 100644 (file)
@@ -47,7 +47,7 @@ class DeepSeaOrchestrator(MgrModule, orchestrator.Orchestrator):
     MODULE_OPTIONS = [
         {
             'name': 'salt_api_url',
-            'default': None
+            'default': ''
         },
         {
             'name': 'salt_api_eauth',
@@ -55,11 +55,11 @@ class DeepSeaOrchestrator(MgrModule, orchestrator.Orchestrator):
         },
         {
             'name': 'salt_api_username',
-            'default': None
+            'default': ''
         },
         {
             'name': 'salt_api_password',
-            'default': None
+            'default': ''
         }
     ]