Yaniv Bronhaim has uploaded a new change for review.

Change subject: Changing isconfigured parameter semantics
......................................................................

Changing isconfigured parameter semantics

Currently isconfigured holds boolean and that way the name is misleading as
True doesn't mean the module is actually configured. This patch changes
that and put in isconfigured just the ret value of isconfigured() on the
specific module instead of calling it twice, and later on we use this
parameter to decide when to reconfigure the module or not.

Change-Id: Ifb7f6c234993701d912ecf731b4927c380fd7d13
Signed-off-by: Yaniv Bronhaim <[email protected]>
---
M lib/vdsm/tool/configurator.py
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/71/30571/1

diff --git a/lib/vdsm/tool/configurator.py b/lib/vdsm/tool/configurator.py
index 12666e3..8136613 100644
--- a/lib/vdsm/tool/configurator.py
+++ b/lib/vdsm/tool/configurator.py
@@ -691,13 +691,13 @@
     sys.stdout.write("\nChecking configuration status...\n\n")
     for c in __configurers:
         if c.getName() in args.modules:
-            isconfigured = c.isconfigured() != CONFIGURED
-            override = args.force and isconfigured
+            isconfigured = c.isconfigured()
+            override = args.force and isconfigured != CONFIGURED
             if not override and not c.validate():
                 raise InvalidConfig(
                     "Configuration of %s is invalid" % c.getName()
                 )
-            if override or isconfigured:
+            if override or isconfigured == NOT_CONFIGURED:
                 configurer_to_trigger.append(c)
 
     services = []


-- 
To view, visit http://gerrit.ovirt.org/30571
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifb7f6c234993701d912ecf731b4927c380fd7d13
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to