Nir Soffer has posted comments on this change.
Change subject: utils: Use ovirt node for persist and unpersist files ......................................................................
Patch Set 1:
(1 comment)
http://gerrit.ovirt.org/#/c/31584/1/lib/vdsm/utils.py File lib/vdsm/utils.py:
Line 143: raise Line 144: Line 145: Line 146: def persistFile(name): Line 147: if isOvirtNode(): Can this change during runtime?
It seem that this check should be done on import, and the required functions can be set like this:
if isOvirtNode(): from ovirt.node.utils.fs import Config cfg = Config() persistFile = cfg.persist unpersistFile = cfg.unpersist del cfg else: persistFile = lambda s: None unpersistFile = lambda s: None
Antoni: is this possible or node requires creation of a new instance for each call? Line 148: from ovirt.node.utils.fs import Config as NodeCfg Line 149: NodeCfg().persist(name) Line 150: Line 151: