summaryrefslogtreecommitdiff
path: root/nova/virt/powervm
diff options
context:
space:
mode:
Diffstat (limited to 'nova/virt/powervm')
-rw-r--r--nova/virt/powervm/driver.py3
-rw-r--r--nova/virt/powervm/vif.py3
-rw-r--r--nova/virt/powervm/vm.py7
-rw-r--r--nova/virt/powervm/volume/fcvscsi.py3
4 files changed, 6 insertions, 10 deletions
diff --git a/nova/virt/powervm/driver.py b/nova/virt/powervm/driver.py
index 6b862ca566..2fbdd6d178 100644
--- a/nova/virt/powervm/driver.py
+++ b/nova/virt/powervm/driver.py
@@ -26,7 +26,6 @@ from pypowervm.tasks import partition as pvm_par
from pypowervm.tasks import storage as pvm_stor
from pypowervm.tasks import vterm as pvm_vterm
from pypowervm.wrappers import managed_system as pvm_ms
-import six
from taskflow.patterns import linear_flow as tf_lf
from nova.compute import task_states
@@ -400,7 +399,7 @@ class PowerVMDriver(driver.ComputeDriver):
except pvm_exc.Error as e:
LOG.exception("PowerVM error during destroy.", instance=instance)
# Convert to a Nova exception
- raise exc.InstanceTerminationFailure(reason=six.text_type(e))
+ raise exc.InstanceTerminationFailure(reason=str(e))
def snapshot(self, context, instance, image_id, update_task_state):
"""Snapshots the specified instance.
diff --git a/nova/virt/powervm/vif.py b/nova/virt/powervm/vif.py
index 6662249539..8ab591a15d 100644
--- a/nova/virt/powervm/vif.py
+++ b/nova/virt/powervm/vif.py
@@ -24,7 +24,6 @@ from pypowervm import exceptions as pvm_ex
from pypowervm.tasks import cna as pvm_cna
from pypowervm.tasks import partition as pvm_par
from pypowervm.wrappers import event as pvm_evt
-import six
from nova import exception
from nova.network import model as network_model
@@ -210,7 +209,7 @@ class PvmVifDriver(metaclass=abc.ABCMeta):
LOG.exception('Unable to unplug VIF with mac %(mac)s.',
{'mac': vif['address']}, instance=self.instance)
raise exception.VirtualInterfaceUnplugException(
- reason=six.text_type(e))
+ reason=str(e))
return cna_w
@staticmethod
diff --git a/nova/virt/powervm/vm.py b/nova/virt/powervm/vm.py
index fc4cbbffa6..2e5247551f 100644
--- a/nova/virt/powervm/vm.py
+++ b/nova/virt/powervm/vm.py
@@ -32,7 +32,6 @@ from pypowervm.wrappers import base_partition as pvm_bp
from pypowervm.wrappers import logical_partition as pvm_lpar
from pypowervm.wrappers import network as pvm_net
from pypowervm.wrappers import shared_proc_pool as pvm_spp
-import six
from nova.compute import power_state
from nova import conf
@@ -153,7 +152,7 @@ def power_on(adapter, instance):
except pvm_exc.Error as e:
LOG.exception("PowerVM error during power_on.",
instance=instance)
- raise exc.InstancePowerOnFailure(reason=six.text_type(e))
+ raise exc.InstancePowerOnFailure(reason=str(e))
def power_off(adapter, instance, force_immediate=False, timeout=None):
@@ -189,7 +188,7 @@ def power_off(adapter, instance, force_immediate=False, timeout=None):
except pvm_exc.Error as e:
LOG.exception("PowerVM error during power_off.",
instance=instance)
- raise exc.InstancePowerOffFailure(reason=six.text_type(e))
+ raise exc.InstancePowerOffFailure(reason=str(e))
else:
LOG.debug("Power off not required for instance %(inst)s.",
{'inst': instance.name})
@@ -221,7 +220,7 @@ def reboot(adapter, instance, hard):
power.power_on(entry, None)
except pvm_exc.Error as e:
LOG.exception("PowerVM error during reboot.", instance=instance)
- raise exc.InstanceRebootFailure(reason=six.text_type(e))
+ raise exc.InstanceRebootFailure(reason=str(e))
def delete_lpar(adapter, instance):
diff --git a/nova/virt/powervm/volume/fcvscsi.py b/nova/virt/powervm/volume/fcvscsi.py
index 74f7a37c74..cf2c6e4d25 100644
--- a/nova/virt/powervm/volume/fcvscsi.py
+++ b/nova/virt/powervm/volume/fcvscsi.py
@@ -23,7 +23,6 @@ from pypowervm.tasks import scsi_mapper as tsk_map
from pypowervm.utils import transaction as pvm_tx
from pypowervm.wrappers import storage as pvm_stor
from pypowervm.wrappers import virtual_io_server as pvm_vios
-import six
from taskflow import task
from nova import conf as cfg
@@ -326,7 +325,7 @@ class FCVscsiVolumeAdapter(object):
except Exception as e:
LOG.exception('PowerVM error detaching volume from virtual '
'machine.', instance=self.instance)
- ex_args = {'volume_id': self.volume_id, 'reason': six.text_type(e)}
+ ex_args = {'volume_id': self.volume_id, 'reason': str(e)}
raise exc.VolumeDetachFailed(**ex_args)
self.stg_ftsk.execute()