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: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifaf19e5f8f5beca38d34a606c3eb370385dc206d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Fabian Deutsch <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: [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