fix pep8 issue on powervc driver
Fix some pep8 issue introduced in recent code change Closes-Bug: #1393663 Change-Id: I6f18600d000725122f6c6cc4f27ca0b37c2037f4
This commit is contained in:
parent
3fbb8abd9a
commit
5a255d5d95
|
@ -10,6 +10,7 @@ class BlockMigrationException(exception.NovaException):
|
|||
message = _("PowerVC does not support block migration.")
|
||||
super(BlockMigrationException, self).__init__(message=message)
|
||||
|
||||
|
||||
class LiveMigrationException(exception.NovaException):
|
||||
"""User attempted to perform live migration with block migration."""
|
||||
def __init__(self, uuid):
|
||||
|
|
|
@ -52,6 +52,7 @@ CONF = cfg.CONF
|
|||
# store the deleted powervc instance uuids
|
||||
deleted_pvc_ids = set()
|
||||
|
||||
|
||||
class PowerVCCloudManager(manager.Manager):
|
||||
|
||||
def __init__(self, compute_driver=None, *args, **kwargs):
|
||||
|
|
|
@ -1206,12 +1206,12 @@ class PowerVCService(object):
|
|||
current_host != orig_host):
|
||||
LOG.info(_("Instance %s completed migration.") % pvc_server.id)
|
||||
raise loopingcall.LoopingCallDone(True)
|
||||
if ((pvc_server.status == pvc_vm_states.ACTIVE or
|
||||
pvc_server.status == pvc_vm_states.ERROR) and
|
||||
pvc_task_state == None and current_host == orig_host):
|
||||
if pvc_task_state is None and current_host == orig_host and\
|
||||
pvc_server.status in (pvc_vm_states.ACTIVE,
|
||||
pvc_vm_states.ERROR):
|
||||
LOG.error('Instance %s failed to migrate to another host, '
|
||||
'please check with PowerVC console error message or '
|
||||
'log file',pvc_server.id)
|
||||
'log file', pvc_server.id)
|
||||
raise LiveMigrationException(pvc_server.id)
|
||||
|
||||
timer = loopingcall.FixedIntervalLoopingCall(_wait_for_live_migration)
|
||||
|
|
Loading…
Reference in New Issue