diff options
| author | Jenkins <jenkins@review.openstack.org> | 2013-05-13 19:16:49 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2013-05-13 19:16:49 +0000 |
| commit | e31af73cd77cfc963dc003680f4b5042ee9cd6df (patch) | |
| tree | f021404a34a77b2b2623b3b9752dffc8bc9ae71b /nova/virt | |
| parent | 30d85bc9aeb3cf691b3505acd48bb953d87e6002 (diff) | |
| parent | 6be85774aec674eef7bfbf66f8885a4531c7c605 (diff) | |
Merge "Convert to using newly imported processutils."
Diffstat (limited to 'nova/virt')
| -rw-r--r-- | nova/virt/baremetal/virtual_power_driver.py | 5 | ||||
| -rw-r--r-- | nova/virt/powervm/blockdev.py | 6 | ||||
| -rw-r--r-- | nova/virt/powervm/common.py | 5 | ||||
| -rw-r--r-- | nova/virt/powervm/operator.py | 5 |
4 files changed, 9 insertions, 12 deletions
diff --git a/nova/virt/baremetal/virtual_power_driver.py b/nova/virt/baremetal/virtual_power_driver.py index 22dd815d0..e110bf436 100644 --- a/nova/virt/baremetal/virtual_power_driver.py +++ b/nova/virt/baremetal/virtual_power_driver.py @@ -24,7 +24,6 @@ from nova import exception from nova.openstack.common import importutils from nova.openstack.common import log as logging from nova.openstack.common import processutils -from nova import utils from nova.virt.baremetal import baremetal_states from nova.virt.baremetal import base from nova.virt.baremetal import db @@ -230,8 +229,8 @@ class VirtualPowerManager(base.PowerManager): cmd = '%s %s' % (self._vp_cmd.base_cmd, cmd) try: - stdout, stderr = utils.ssh_execute(self._connection, cmd, - check_exit_code=check_exit_code) + stdout, stderr = processutils.ssh_execute( + self._connection, cmd, check_exit_code=check_exit_code) result = stdout.strip().splitlines() LOG.debug('Result for run_command: %s' % result) except processutils.ProcessExecutionError: diff --git a/nova/virt/powervm/blockdev.py b/nova/virt/powervm/blockdev.py index 0c3528d5c..5b15c14bb 100644 --- a/nova/virt/powervm/blockdev.py +++ b/nova/virt/powervm/blockdev.py @@ -25,7 +25,7 @@ from nova.compute import task_states from nova.image import glance from nova.openstack.common import excutils from nova.openstack.common import log as logging -from nova import utils +from nova.openstack.common import processutils from nova.virt import images from nova.virt.powervm import command from nova.virt.powervm import common @@ -533,8 +533,8 @@ class PowerVMLocalVolumeAdapter(PowerVMDiskAdapter): :param command: String with the command to run. """ self._set_connection() - stdout, stderr = utils.ssh_execute(self._connection, cmd, - check_exit_code=check_exit_code) + stdout, stderr = processutils.ssh_execute( + self._connection, cmd, check_exit_code=check_exit_code) error_text = stderr.strip() if error_text: diff --git a/nova/virt/powervm/common.py b/nova/virt/powervm/common.py index 0b1dc6a14..0fd2f84a4 100644 --- a/nova/virt/powervm/common.py +++ b/nova/virt/powervm/common.py @@ -23,7 +23,6 @@ import paramiko from nova.openstack.common import log as logging from nova.openstack.common import processutils -from nova import utils from nova.virt.powervm import constants from nova.virt.powervm import exception @@ -113,7 +112,7 @@ def ssh_command_as_root(ssh_connection, cmd, check_exit_code=True): stdin.flush() exit_status = chan.recv_exit_status() - # Lets handle the error just like nova.utils.ssh_execute does. + # Lets handle the error just like processutils.ssh_execute does. if exit_status != -1: LOG.debug(_('Result was %s') % exit_status) if check_exit_code and exit_status != 0: @@ -218,7 +217,7 @@ def vios_to_vios_auth(source, dest, conn_info): dest_conn_obj = ssh_connect(dest_conn_info) def run_command(conn_obj, cmd): - stdout, stderr = utils.ssh_execute(conn_obj, cmd) + stdout, stderr = processutils.ssh_execute(conn_obj, cmd) return stdout.strip().splitlines() def build_keypair_on_source(): diff --git a/nova/virt/powervm/operator.py b/nova/virt/powervm/operator.py index 2539f29b1..f78aeb475 100644 --- a/nova/virt/powervm/operator.py +++ b/nova/virt/powervm/operator.py @@ -25,7 +25,6 @@ from nova.compute import power_state from nova.openstack.common import excutils from nova.openstack.common import log as logging from nova.openstack.common import processutils -from nova import utils from nova.virt.powervm import blockdev from nova.virt.powervm import command from nova.virt.powervm import common @@ -666,8 +665,8 @@ class BaseOperator(object): :param command: String with the command to run. """ self._set_connection() - stdout, stderr = utils.ssh_execute(self._connection, cmd, - check_exit_code=check_exit_code) + stdout, stderr = processutils.ssh_execute( + self._connection, cmd, check_exit_code=check_exit_code) error_text = stderr.strip() if error_text: |
