Remove unused CannotMigrateWithTargetHost
Before [1] this could be raised from the API resize() method if getting a RequestSpec failed and a target host was specified for cold migration. Since that change the usage of the exception was removed so we can remove it altogether since only unit test code is using it. [1] I34ffaf285718059b55f90e812b57f1e11d566c6f Change-Id: I19db48bd03855d1a1edbeff5adf15a28abcb5d92
This commit is contained in:
parent
7aa88029bb
commit
fb283dab57
|
@ -77,7 +77,6 @@ class MigrateServerController(wsgi.Controller):
|
|||
except (exception.TooManyInstances, exception.QuotaError) as e:
|
||||
raise exc.HTTPForbidden(explanation=e.format_message())
|
||||
except (exception.InstanceIsLocked,
|
||||
exception.CannotMigrateWithTargetHost,
|
||||
exception.AllocationMoveFailed) as e:
|
||||
raise exc.HTTPConflict(explanation=e.format_message())
|
||||
except exception.InstanceInvalidState as state_error:
|
||||
|
|
|
@ -2312,11 +2312,6 @@ class TraitCreationFailed(NovaException):
|
|||
msg_fmt = _("Failed to create trait %(name)s: %(error)s")
|
||||
|
||||
|
||||
class CannotMigrateWithTargetHost(NovaException):
|
||||
msg_fmt = _("Cannot migrate with target host. Retry without a host "
|
||||
"specified.")
|
||||
|
||||
|
||||
class CannotMigrateToSameHost(NovaException):
|
||||
msg_fmt = _("Cannot migrate to the host where the server exists.")
|
||||
|
||||
|
|
|
@ -581,10 +581,6 @@ class MigrateServerTestsV256(MigrateServerTestsV234):
|
|||
exc_info = exception.ComputeHostNotFound(host='nonexistent_host')
|
||||
self._test_migrate_exception(exc_info, webob.exc.HTTPBadRequest)
|
||||
|
||||
def test_migrate_no_request_spec(self):
|
||||
exc_info = exception.CannotMigrateWithTargetHost()
|
||||
self._test_migrate_exception(exc_info, webob.exc.HTTPConflict)
|
||||
|
||||
def test_migrate_to_same_host(self):
|
||||
exc_info = exception.CannotMigrateToSameHost()
|
||||
self._test_migrate_exception(exc_info, webob.exc.HTTPBadRequest)
|
||||
|
|
Loading…
Reference in New Issue