[node-patches] Change in ovirt-node[master]: Find installer exceptions
rbarry at redhat.com
rbarry at redhat.com
Thu May 1 14:29:35 UTC 2014
Ryan Barry has uploaded a new change for review.
Change subject: Find installer exceptions
......................................................................
Find installer exceptions
Rearrange the imports in ovirt.node.config.migrate so we only
try to clear out one augeas object when we exit.
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1085835
Change-Id: Ida10fd5ae68d2b8eececd58d154adf9d3042ff28
Signed-off-by: Ryan Barry <rbarry at redhat.com>
---
M src/ovirt/node/config/migrate.py
1 file changed, 11 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/03/27303/1
diff --git a/src/ovirt/node/config/migrate.py b/src/ovirt/node/config/migrate.py
index ac167b2..5eb991b 100644
--- a/src/ovirt/node/config/migrate.py
+++ b/src/ovirt/node/config/migrate.py
@@ -19,8 +19,6 @@
# MA 02110-1301, USA. A copy of the GNU General Public License is
# also available at http://www.gnu.org/copyleft/gpl.html.
from ovirt.node import base
-from ovirt.node.config import defaults
-from ovirt.node.utils import AugeasWrapper, network, parse_bool
from ovirt.node.utils.fs import Config
from ovirtnode import iscsi, log, ovirtfunctions
import os
@@ -40,6 +38,8 @@
def _determine_migration_func(self):
"""Determins if a migration and which migration is necessary
"""
+ from ovirt.node.config import defaults
+
migration_func = None
cfgver = defaults.ConfigVersion().retrieve()["ver"]
@@ -61,6 +61,8 @@
return migration_func
def _run(self, migration_func):
+ from ovirt.node.config import defaults
+
try:
self.logger.info("Starting config migration")
@@ -81,6 +83,8 @@
"""Import the real configs into Node's abstract config
"""
def __init__(self):
+ from ovirt.node.utils import AugeasWrapper
+
self.aug = AugeasWrapper()
super(ImportConfigs, self).__init__()
@@ -124,6 +128,8 @@
str(logrotate_size) or "")
def translate_ssh(self):
+ from ovirt.node.utils import parse_bool
+
if self.__is_persisted("/etc/ssh/sshd_config"):
pw_auth_enabled = ovirtfunctions.augtool_get(
"/files/etc/ssh/sshd_config/PasswordAuthentication")
@@ -313,6 +319,9 @@
return Config().exists(path)
def migrate_network_layout(self):
+ from ovirt.node import defaults
+ from ovirt.node.utils import network
+
bondcfg = defaults.NicBonding().retrieve()
netlayoutcfg = defaults.NetworkLayout().retrieve()
--
To view, visit http://gerrit.ovirt.org/27303
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida10fd5ae68d2b8eececd58d154adf9d3042ff28
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>
More information about the node-patches
mailing list