Simone Tiraboschi has uploaded a new change for review. Change subject: packaging: setup: fixing development environment ......................................................................
packaging: setup: fixing development environment Fixing imports and external tool usage for notroot developing environment. Change-Id: Ifa388eeec683ec2ec4f7e3b3949e296f2078180e Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1109326 Signed-off-by: Simone Tiraboschi <[email protected]> --- M packaging/setup/plugins/ovirt-engine-common/base/remote_engine/remote_engine_root_ssh.py M packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/system/nfs.py 2 files changed, 19 insertions(+), 12 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/57/34257/1 diff --git a/packaging/setup/plugins/ovirt-engine-common/base/remote_engine/remote_engine_root_ssh.py b/packaging/setup/plugins/ovirt-engine-common/base/remote_engine/remote_engine_root_ssh.py index ce3c127..ccd643a 100644 --- a/packaging/setup/plugins/ovirt-engine-common/base/remote_engine/remote_engine_root_ssh.py +++ b/packaging/setup/plugins/ovirt-engine-common/base/remote_engine/remote_engine_root_ssh.py @@ -17,7 +17,6 @@ import socket -import paramiko import time import gettext _ = lambda m: gettext.dgettext(message=m, domain='ovirt-engine-setup') @@ -66,6 +65,7 @@ return _('Access remote engine server using ssh as root') def _ssh_get_port(self): + import paramiko port_valid = False key = osetupcons.ConfigEnv.REMOTE_ENGINE_HOST_SSH_PORT port = self.environment[key] @@ -114,6 +114,7 @@ raise RuntimeError(msg) def _ssh_connect(self): + import paramiko connected = False interactive = False password = self.environment[ diff --git a/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/system/nfs.py b/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/system/nfs.py index 3803f1f..fd94a21 100644 --- a/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/system/nfs.py +++ b/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/system/nfs.py @@ -91,7 +91,10 @@ stage=plugin.Stages.STAGE_PROGRAMS, ) def _programs(self): - self.command.detect('exportfs') + if not self.environment[ + osetupcons.CoreEnv.DEVELOPER_MODE + ]: + self.command.detect('exportfs') @plugin.event( stage=plugin.Stages.STAGE_LATE_SETUP, @@ -134,16 +137,19 @@ oenginecons.SystemEnv.NFS_CONFIG_ENABLED_LEGACY_IN_POSTINSTALL ] = False - rc, stdout, stderr = self.execute( - ( - self.command.get('exportfs'), - ), - raiseOnError=False, - ) - if rc == 0: - for line in stdout: - if line[0] == '/': - self._foundpreextnfs = True + if not self.environment[ + osetupcons.CoreEnv.DEVELOPER_MODE + ]: + rc, stdout, stderr = self.execute( + ( + self.command.get('exportfs'), + ), + raiseOnError=False, + ) + if rc == 0: + for line in stdout: + if line[0] == '/': + self._foundpreextnfs = True @plugin.event( stage=plugin.Stages.STAGE_CUSTOMIZATION, -- To view, visit http://gerrit.ovirt.org/34257 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifa388eeec683ec2ec4f7e3b3949e296f2078180e Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Simone Tiraboschi <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
