From 13f4127c9dc0bd4c955a38081af9a9bfd99e1031 Mon Sep 17 00:00:00 2001 From: jichenjc Date: Fri, 9 Feb 2018 04:48:18 +0800 Subject: [PATCH] Remove MigrationPreCheckClientException Commit c2f57a126f135879b96947a6734db9b0e01c2ad3 removes last raise place of this exception Change-Id: I9ab1b2a064e09f8af69d1783675070e24ede5cf8 --- nova/conductor/manager.py | 2 -- nova/exception.py | 4 ---- .../tests/unit/api/openstack/compute/test_migrate_server.py | 6 ------ nova/tests/unit/conductor/test_conductor.py | 1 - 4 files changed, 13 deletions(-) diff --git a/nova/conductor/manager.py b/nova/conductor/manager.py index 98efa2336b8e..04232456cc0e 100644 --- a/nova/conductor/manager.py +++ b/nova/conductor/manager.py @@ -252,7 +252,6 @@ class ComputeTaskManager(base.Base): exception.HypervisorUnavailable, exception.InstanceInvalidState, exception.MigrationPreCheckError, - exception.MigrationPreCheckClientException, exception.LiveMigrationWithOldNovaNotSupported, exception.UnsupportedPolicyException) @targets_cell @@ -430,7 +429,6 @@ class ComputeTaskManager(base.Base): exception.HypervisorUnavailable, exception.InstanceInvalidState, exception.MigrationPreCheckError, - exception.MigrationPreCheckClientException, exception.LiveMigrationWithOldNovaNotSupported, exception.MigrationSchedulerRPCError) as ex: with excutils.save_and_reraise_exception(): diff --git a/nova/exception.py b/nova/exception.py index daeaf6824bdd..b86a8d0dcfa5 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -1329,10 +1329,6 @@ class MigrationPreCheckError(MigrationError): msg_fmt = _("Migration pre-check error: %(reason)s") -class MigrationPreCheckClientException(MigrationError): - msg_fmt = _("Client exception during Migration Pre check: %(reason)s") - - class MigrationSchedulerRPCError(MigrationError): msg_fmt = _("Migration select destinations error: %(reason)s") diff --git a/nova/tests/unit/api/openstack/compute/test_migrate_server.py b/nova/tests/unit/api/openstack/compute/test_migrate_server.py index e09492187bc1..05b36415283c 100644 --- a/nova/tests/unit/api/openstack/compute/test_migrate_server.py +++ b/nova/tests/unit/api/openstack/compute/test_migrate_server.py @@ -279,12 +279,6 @@ class MigrateServerTestsV21(admin_only_action_common.CommonTests): self._test_migrate_live_failed_with_exception( exception.MigrationPreCheckError(reason='')) - def test_migrate_live_migration_precheck_client_exception(self): - self._test_migrate_live_failed_with_exception( - exception.MigrationPreCheckClientException(reason=''), - expected_exc=webob.exc.HTTPInternalServerError, - check_response=False) - def test_migrate_live_migration_with_unexpected_error(self): self._test_migrate_live_failed_with_exception( exception.MigrationError(reason=''), diff --git a/nova/tests/unit/conductor/test_conductor.py b/nova/tests/unit/conductor/test_conductor.py index cf0c36a37f46..34887b5df815 100644 --- a/nova/tests/unit/conductor/test_conductor.py +++ b/nova/tests/unit/conductor/test_conductor.py @@ -2109,7 +2109,6 @@ class ConductorTaskTestCase(_BaseTaskTestCase, test_compute.BaseTestCase): exc.HypervisorUnavailable(host='dummy'), exc.LiveMigrationWithOldNovaNotSupported(), exc.MigrationPreCheckError(reason='dummy'), - exc.MigrationPreCheckClientException(reason='dummy'), exc.InvalidSharedStorage(path='dummy', reason='dummy'), exc.NoValidHost(reason='dummy'), exc.ComputeServiceUnavailable(host='dummy'),