Edward Haas has uploaded a new change for review. Change subject: net: Fix reference to CONFFILE_HEADER_BASE which was moved ......................................................................
net: Fix reference to CONFFILE_HEADER_BASE which was moved CONFFILE_HEADER_BASE has been renamed and moved to module scope in commit 8e72106a39f435471e591c465b5f49bd934868e7 Change-Id: I0e1bd308edbe334e62606572e3edf734cd73fd51 Signed-off-by: Edward Haas <edwa...@redhat.com> --- M init/wait_for_ipv4s M lib/vdsm/network/configurators/ifcfg.py 2 files changed, 2 insertions(+), 9 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/42/64442/1 diff --git a/init/wait_for_ipv4s b/init/wait_for_ipv4s index e2ddf5b..c1e7f32 100755 --- a/init/wait_for_ipv4s +++ b/init/wait_for_ipv4s @@ -11,7 +11,7 @@ import sys from vdsm.network.configurators.ifcfg import NET_CONF_DIR -from vdsm.network.configurators.ifcfg import ConfigWriter +from vdsm.network.configurators.ifcfg import CONFFILE_HEADER_SIGNATURE from vdsm.network.netinfo.addresses import getIpInfo from vdsm.network.netlink import monitor @@ -24,7 +24,7 @@ for ifcfg in ifcfgs: with open(join(NET_CONF_DIR, ifcfg)) as f: config = f.read() - if (config.startswith(ConfigWriter.CONFFILE_HEADER_BASE) and + if (config.startswith(CONFFILE_HEADER_SIGNATURE) and '\nONBOOT=yes\n' in config and '\nIPADDR=' in config): vdsm_ip_onboot_devs.add(ifcfg[6:]) return vdsm_ip_onboot_devs diff --git a/lib/vdsm/network/configurators/ifcfg.py b/lib/vdsm/network/configurators/ifcfg.py index e67a3cf..aac39d1 100644 --- a/lib/vdsm/network/configurators/ifcfg.py +++ b/lib/vdsm/network/configurators/ifcfg.py @@ -522,13 +522,6 @@ logging.info('Loaded %s', fpath) - def _ownedIfcfg(self, fpath): - if not os.path.isfile(fpath): - return False - with open(fpath) as confFile: - content = confFile.readline() - return content.startswith(self.CONFFILE_HEADER_BASE) - def loadBackups(self): """ Load persistent backups into memory """ # Load logical networks -- To view, visit https://gerrit.ovirt.org/64442 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0e1bd308edbe334e62606572e3edf734cd73fd51 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Edward Haas <edwa...@redhat.com> _______________________________________________ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org