Merge "Replace wrong Nova references to Compute ones"

This commit is contained in:
Jenkins 2015-10-02 18:09:17 +00:00 committed by Gerrit Code Review
commit cc67be5e5f
4 changed files with 15 additions and 15 deletions

View File

@ -141,19 +141,19 @@ class ImmutableObject(APIException):
class ComputeBuildException(OctaviaException): class ComputeBuildException(OctaviaException):
message = _LE('Failed to build nova instance.') message = _LE('Failed to build compute instance.')
class ComputeDeleteException(OctaviaException): class ComputeDeleteException(OctaviaException):
message = _LE('Failed to delete nova instance.') message = _LE('Failed to delete compute instance.')
class ComputeGetException(OctaviaException): class ComputeGetException(OctaviaException):
message = _LE('Failed to retrieve nova instance.') message = _LE('Failed to retrieve compute instance.')
class ComputeStatusException(OctaviaException): class ComputeStatusException(OctaviaException):
message = _LE('Failed to retrieve nova instance status.') message = _LE('Failed to retrieve compute instance status.')
class IDAlreadyExists(OctaviaException): class IDAlreadyExists(OctaviaException):
@ -171,7 +171,7 @@ class NoSuitableAmphoraException(OctaviaException):
# This is an internal use exception for the taskflow work flow # This is an internal use exception for the taskflow work flow
# and will not be exposed to the customer. This means it is a # and will not be exposed to the customer. This means it is a
# normal part of operation while waiting for nova to go active # normal part of operation while waiting for compute to go active
# on the instance # on the instance
class ComputeWaitTimeoutException(OctaviaException): class ComputeWaitTimeoutException(OctaviaException):
message = _LI('Waiting for compute to go active timeout.') message = _LI('Waiting for compute to go active timeout.')

View File

@ -41,7 +41,7 @@ class ComputeBase(object):
metadata server this can be a file type object as well or metadata server this can be a file type object as well or
a string a string
:raises NovaBuildException: if nova failed to build virtual machine :raises ComputeBuildException: if compute failed to build amphora
:returns: UUID of amphora :returns: UUID of amphora
""" """
pass pass
@ -59,7 +59,7 @@ class ComputeBase(object):
"""Check whether the specified amphora is up """Check whether the specified amphora is up
:param amphora_id: the ID of the desired amphora :param amphora_id: the ID of the desired amphora
:returns: The nova "status" response ("ONLINE" or "OFFLINE") :returns: The compute "status" response ("ONLINE" or "OFFLINE")
""" """
pass pass

View File

@ -59,7 +59,7 @@ class VirtualMachineManager(compute_base.ComputeBase):
metadata server this can be a file type object as well or metadata server this can be a file type object as well or
a string a string
:raises NovaBuildException: if nova failed to build virtual machine :raises ComputeBuildException: if nova failed to build virtual machine
:returns: UUID of amphora :returns: UUID of amphora
''' '''

View File

@ -54,7 +54,7 @@ class ComputeCreate(BaseComputeTask):
""" """
ports = ports or [] ports = ports or []
config_drive_files = config_drive_files or {} config_drive_files = config_drive_files or {}
LOG.debug("Nova Create execute for amphora with id %s" LOG.debug("Compute create execute for amphora with id %s"
% amphora_id) % amphora_id)
try: try:
@ -76,7 +76,7 @@ class ComputeCreate(BaseComputeTask):
return compute_id return compute_id
except Exception as e: except Exception as e:
LOG.error(_LE("Nova create for amphora id: %(amp)s " LOG.error(_LE("Compute create for amphora id: %(amp)s "
"failed: %(exp)s"), "failed: %(exp)s"),
{'amp': amphora_id, 'exp': e}) {'amp': amphora_id, 'exp': e})
raise e raise e
@ -89,13 +89,13 @@ class ComputeCreate(BaseComputeTask):
if isinstance(result, failure.Failure): if isinstance(result, failure.Failure):
return return
compute_id = result compute_id = result
LOG.warn(_LW("Reverting Nova create for amphora with id" LOG.warn(_LW("Reverting compute create for amphora with id"
"%(amp)s and compute id: %(comp)s"), "%(amp)s and compute id: %(comp)s"),
{'amp': amphora_id, 'comp': compute_id}) {'amp': amphora_id, 'comp': compute_id})
try: try:
self.compute.delete(compute_id) self.compute.delete(compute_id)
except Exception as e: except Exception as e:
LOG.error(_LE("Reverting Nova create failed" LOG.error(_LE("Reverting compute create failed"
" with exception %s"), e) " with exception %s"), e)
@ -127,19 +127,19 @@ class DeleteAmphoraeOnLoadBalancer(BaseComputeTask):
try: try:
self.compute.delete(amp.compute_id) self.compute.delete(amp.compute_id)
except Exception as e: except Exception as e:
LOG.error(_LE("Nova delete for amphora id: %(amp)s failed:" LOG.error(_LE("Compute delete for amphora id: %(amp)s failed:"
"%(exp)s"), {'amp': amp.id, 'exp': e}) "%(exp)s"), {'amp': amp.id, 'exp': e})
raise e raise e
class ComputeDelete(BaseComputeTask): class ComputeDelete(BaseComputeTask):
def execute(self, amphora): def execute(self, amphora):
LOG.debug("Nova Delete execute for amphora with id %s" % amphora.id) LOG.debug("Compute delete execute for amphora with id %s" % amphora.id)
try: try:
self.compute.delete(compute_id=amphora.compute_id) self.compute.delete(compute_id=amphora.compute_id)
except Exception as e: except Exception as e:
LOG.error(_LE("Nova delete for amphora id: %(amp)s failed:" LOG.error(_LE("Compute delete for amphora id: %(amp)s failed:"
"%(exp)s"), {'amp': amphora.id, 'exp': e}) "%(exp)s"), {'amp': amphora.id, 'exp': e})
raise e raise e