Giuseppe Vallarelli has posted comments on this change.

Change subject: Unified network persistence [3/3] - Restore network 
configuration
......................................................................


Patch Set 2: Code-Review-1

(2 comments)

....................................................
File vdsm/vdsm-restore-net-config
Line 27: from vdsm import netinfo
Line 28: from configNetwork import setupNetworks
Line 29: 
Line 30: 
Line 31: def ifcfg_restoration():
Of course I don't agree on having this behaviour in a different script.
We got now if config.get('vars', 'persistence') == 'unified' 6..
Including the ones in the first patch of the series.
Line 32:     configWriter = ifcfg.ConfigWriter()
Line 33:     configWriter.restorePersistentBackup()
Line 34: 
Line 35: 


Line 40:     """
Line 41:     nets = {}
Line 42:     bonds = {}
Line 43:     for netFile in os.listdir(netinfo.NET_CONF_PERS_DIR):
Line 44:         nets[os.path.basename(netFile)] = json.load(open(netFile))
By looking at the usage of the json module we only use json for convenience 
there are no real requirements for the json format, so at this point why don't 
we use the pickle module which serve for this exact purpose.
Line 45: 
Line 46:     for bondFile in os.listdir(netinfo.BOND_CONF_PERS_DIR):
Line 47:         bonds[os.path.basename(bondFile)] = json.load(open(bondFile))
Line 48:     setupNetworks(nets, bonds)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I73462b160ecfbaa7efe71eed905a3bbd69ee6c23
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Assaf Muller <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Assaf Muller <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Giuseppe Vallarelli <[email protected]>
Gerrit-Reviewer: Livnat Peer <[email protected]>
Gerrit-Reviewer: Mark Wu <[email protected]>
Gerrit-Reviewer: Petr Ĺ ebek <[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