Replace wrong Nova references to Compute ones
Octavia code base should be more generic, because containers can be used in a near future. This patch corrects naming methods and fix some docstrings. Change-Id: I5157ebaf8a044daf6b0cee5bada5591b7ef50bf1
This commit is contained in:
parent
b3776a4110
commit
dd1e3c0797
|
@ -141,19 +141,19 @@ class ImmutableObject(APIException):
|
|||
|
||||
|
||||
class ComputeBuildException(OctaviaException):
|
||||
message = _LE('Failed to build nova instance.')
|
||||
message = _LE('Failed to build compute instance.')
|
||||
|
||||
|
||||
class ComputeDeleteException(OctaviaException):
|
||||
message = _LE('Failed to delete nova instance.')
|
||||
message = _LE('Failed to delete compute instance.')
|
||||
|
||||
|
||||
class ComputeGetException(OctaviaException):
|
||||
message = _LE('Failed to retrieve nova instance.')
|
||||
message = _LE('Failed to retrieve compute instance.')
|
||||
|
||||
|
||||
class ComputeStatusException(OctaviaException):
|
||||
message = _LE('Failed to retrieve nova instance status.')
|
||||
message = _LE('Failed to retrieve compute instance status.')
|
||||
|
||||
|
||||
class IDAlreadyExists(OctaviaException):
|
||||
|
@ -171,7 +171,7 @@ class NoSuitableAmphoraException(OctaviaException):
|
|||
|
||||
# This is an internal use exception for the taskflow work flow
|
||||
# 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
|
||||
class ComputeWaitTimeoutException(OctaviaException):
|
||||
message = _LI('Waiting for compute to go active timeout.')
|
||||
|
|
|
@ -41,7 +41,7 @@ class ComputeBase(object):
|
|||
metadata server this can be a file type object as well or
|
||||
a string
|
||||
|
||||
:raises NovaBuildException: if nova failed to build virtual machine
|
||||
:raises ComputeBuildException: if compute failed to build amphora
|
||||
:returns: UUID of amphora
|
||||
"""
|
||||
pass
|
||||
|
@ -59,7 +59,7 @@ class ComputeBase(object):
|
|||
"""Check whether the specified amphora is up
|
||||
|
||||
: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
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ class VirtualMachineManager(compute_base.ComputeBase):
|
|||
metadata server this can be a file type object as well or
|
||||
a string
|
||||
|
||||
:raises NovaBuildException: if nova failed to build virtual machine
|
||||
:raises ComputeBuildException: if nova failed to build virtual machine
|
||||
:returns: UUID of amphora
|
||||
'''
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ class ComputeCreate(BaseComputeTask):
|
|||
"""
|
||||
ports = ports 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)
|
||||
|
||||
try:
|
||||
|
@ -76,7 +76,7 @@ class ComputeCreate(BaseComputeTask):
|
|||
return compute_id
|
||||
|
||||
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"),
|
||||
{'amp': amphora_id, 'exp': e})
|
||||
raise e
|
||||
|
@ -89,13 +89,13 @@ class ComputeCreate(BaseComputeTask):
|
|||
if isinstance(result, failure.Failure):
|
||||
return
|
||||
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': amphora_id, 'comp': compute_id})
|
||||
try:
|
||||
self.compute.delete(compute_id)
|
||||
except Exception as e:
|
||||
LOG.error(_LE("Reverting Nova create failed"
|
||||
LOG.error(_LE("Reverting compute create failed"
|
||||
" with exception %s"), e)
|
||||
|
||||
|
||||
|
@ -127,19 +127,19 @@ class DeleteAmphoraeOnLoadBalancer(BaseComputeTask):
|
|||
try:
|
||||
self.compute.delete(compute_id=amp.compute_id)
|
||||
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})
|
||||
raise e
|
||||
|
||||
|
||||
class ComputeDelete(BaseComputeTask):
|
||||
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:
|
||||
self.compute.delete(compute_id=amphora.compute_id)
|
||||
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})
|
||||
raise e
|
||||
|
||||
|
|
Loading…
Reference in New Issue