Change in vdsm[master]: utils: add ovirt-node persistence functions

smizrahi at redhat.com smizrahi at redhat.com
Sun Jun 8 14:47:18 UTC 2014


Saggi Mizrahi has posted comments on this change.

Change subject: utils: add ovirt-node persistence functions
......................................................................


Patch Set 4:

(1 comment)

http://gerrit.ovirt.org/#/c/20811/4/lib/vdsm/utils.py
File lib/vdsm/utils.py:

Line 1234:         glob.glob('/etc/ovirt-node-*-release')
Line 1235:     )
Line 1236: 
Line 1237: 
Line 1238: def ovirtNodePersist(files):
> the reason was not to check the node each time and not to import the ovirtf
I was going to suggest moving the import to the top
of the file.

ovirtfunctions = None
if isOvirtNode() then
    from ovirtnode import ovirtfunctions

or

try:
    from ovirtnode import ovirtfunctions
except ImportError:
    ovirtfunctions = None


further more isOvirtNode() is memoized so it's
not really that much of a performance hit to
merit a style break
Line 1239:     if isOvirtNode():
Line 1240:         from ovirtnode import ovirtfunctions
Line 1241:         for f in files:
Line 1242:             if not ovirtfunctions.is_persisted(f):


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib93af61a44a52c37faf92d6f6081babefa3a09aa
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <alonbl at redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alonbl at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei 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