Merge "Remove unused CannotMigrateWithTargetHost"

This commit is contained in:
Zuul 2019-11-14 00:59:25 +00:00 committed by Gerrit Code Review
commit 3d5115a761
3 changed files with 0 additions and 10 deletions

View File

@ -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:

View File

@ -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.")

View File

@ -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)