Antoni Segura Puimedon has posted comments on this change.
Change subject: Unified network persistence [3/3] - Restore network
configuration
......................................................................
Patch Set 2:
(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():
I'm afraid I don't understand the comment. Could you please clarify?
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))
plain text readability is one of the requirements of the persistence system.
Thus, it should be json, yaml, xml or something of the sort. I chose json due
to personal preference for visual editing and inspection.
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