Change in vdsm[master]: tool: autoload modules.
mtayer at redhat.com
mtayer at redhat.com
Thu Dec 18 14:10:23 UTC 2014
mooli tayer has posted comments on this change.
Change subject: tool: autoload modules.
......................................................................
Patch Set 4:
(3 comments)
http://gerrit.ovirt.org/#/c/34049/4/lib/vdsm/tool/configurator.py
File lib/vdsm/tool/configurator.py:
Line 81: requiresRoot
Line 82: from . import configurators
Line 83:
Line 84:
Line 85: _CONFIGURATORS = None
> set to {}
I need to distinguish between empty dict of configurators and non initialized dict - the dict can be empty after load configurators was called.
Line 86:
Line 87:
Line 88: @expose("configure")
Line 89: @requiresRoot
Line 270: return sortedModules
Line 271:
Line 272:
Line 273: def _parse_args(action, *args):
Line 274: _load_configurators()
> call it globally . why here?
Saggi's comment from previews change:
"I'd prefer if this was lazy loaded since it's a lot of work to do during import."
Line 275: parser = argparse.ArgumentParser('vdsm-tool %s' % (action))
Line 276: parser.add_argument(
Line 277: '--module',
Line 278: dest='modules',
http://gerrit.ovirt.org/#/c/34049/4/lib/vdsm/tool/configurators/libvirt.py
File lib/vdsm/tool/configurators/libvirt.py:
Line 39: ConfigFile,
Line 40: ParserWrapper,
Line 41: )
Line 42: from .. import service
Line 43: from .. validate_ovirt_certs import validate_ovirt_certs
> is it related to the dynamic load?
doesn't work without it.
no idea why...
Line 44: from ... import utils
Line 45: from ... import constants
Line 46:
Line 47: if utils.isOvirtNode():
--
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: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: mooli tayer <mtayer at redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alonbl at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Dima Kuznetsov <dkuznets at redhat.com>
Gerrit-Reviewer: Ohad Basan <obasan at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: mooli tayer <mtayer at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list