Change in vdsm[master]: network: move NET_LOGICALNET_CONF_BACK_DIR to ifcfg
ibarkan at redhat.com
ibarkan at redhat.com
Tue May 5 11:13:56 UTC 2015
Ido Barkan has uploaded a new change for review.
Change subject: network: move NET_LOGICALNET_CONF_BACK_DIR to ifcfg
......................................................................
network: move NET_LOGICALNET_CONF_BACK_DIR to ifcfg
It is not used elsewhere.
Change-Id: Ic9da7203d319879ab754822bd5cb9f922d6080f6
Signed-off-by: Ido Barkan <ibarkan at redhat.com>
---
M lib/vdsm/netinfo.py
M vdsm/network/configurators/ifcfg.py
2 files changed, 3 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/38/40538/1
diff --git a/lib/vdsm/netinfo.py b/lib/vdsm/netinfo.py
index d9bdc42..e7563d6 100644
--- a/lib/vdsm/netinfo.py
+++ b/lib/vdsm/netinfo.py
@@ -51,7 +51,6 @@
NET_CONF_DIR = '/etc/sysconfig/network-scripts/'
# ifcfg persistence directories
NET_CONF_BACK_DIR = constants.P_VDSM_LIB + 'netconfback/'
-NET_LOGICALNET_CONF_BACK_DIR = NET_CONF_BACK_DIR + 'logicalnetworks/'
# possible names of dhclient's lease files (e.g. as NetworkManager's slave)
_DHCLIENT_LEASES_GLOBS = [
diff --git a/vdsm/network/configurators/ifcfg.py b/vdsm/network/configurators/ifcfg.py
index 6d35c0a..42a78ca 100644
--- a/vdsm/network/configurators/ifcfg.py
+++ b/vdsm/network/configurators/ifcfg.py
@@ -47,6 +47,7 @@
from ..sourceroute import StaticSourceRoute, DynamicSourceRoute
import dsaversion # TODO: Make parent package import when vdsm is a package
+NET_LOGICALNET_CONF_BACK_DIR = netinfo.NET_CONF_BACK_DIR + 'logicalnetworks/'
def is_available():
return True
@@ -339,8 +340,7 @@
content = cls.DELETED_HEADER + '\n'
logging.debug("backing up network %s: %s", network, content)
- cls.writeBackupFile(netinfo.NET_LOGICALNET_CONF_BACK_DIR, network,
- content)
+ cls.writeBackupFile(NET_LOGICALNET_CONF_BACK_DIR, network, content)
def restoreAtomicNetworkBackup(self):
logging.info("Rolling back logical networks configuration "
@@ -511,7 +511,7 @@
def loadBackups(self):
""" Load persistent backups into memory """
# Load logical networks
- self._loadBackupFiles(netinfo.NET_LOGICALNET_CONF_BACK_DIR)
+ self._loadBackupFiles(NET_LOGICALNET_CONF_BACK_DIR)
# Load config files
self._loadBackupFiles(netinfo.NET_CONF_BACK_DIR, netinfo.NET_CONF_DIR)
--
To view, visit https://gerrit.ovirt.org/40538
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic9da7203d319879ab754822bd5cb9f922d6080f6
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan <ibarkan at redhat.com>
More information about the vdsm-patches
mailing list