Yaniv Bronhaim has posted comments on this change.

Change subject: tool: autoload modules.
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.ovirt.org/#/c/34049/3/lib/vdsm/tool/configurator.py
File lib/vdsm/tool/configurator.py:

Line 100:         for module in glob("%s*.py" % path)
Line 101:         if filter_(getmname(module))
Line 102:     ]
Line 103: 
Line 104: _CONFIGURATORS = {}
> I'd prefer if this was lazy loaded since it's a lot of work to do during im
I don't agree with that. "vdsm-tool" dynamically loads all py modules under 
vdsm/tool directory and if one module throws exception during the import 
vdsm-tool will ignore its verbs. 

when loading configurator.py I'd except that all configurators were loaded as 
well and not finding that out only when calling "vdsm-tool configure --modules 
***".

I want it to be done in module level, the work should be done while calling 
vdsm-tool, and if something fails to load properly all configure verb should be 
disabled.
Line 105: for module in _listmodules(configurators):
Line 106:     _CONFIGURATORS[module] = _import_module(configurators, module)
Line 107: 
Line 108: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I6cc14a1c409ee607e18d42adcd8a54759d8dbf6d
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: mooli tayer <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Dima Kuznetsov <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: Yeela Kaplan <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: mooli tayer <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to