Merge "Remove unused exceptions"

This commit is contained in:
Jenkins 2014-01-26 11:36:38 +00:00 committed by Gerrit Code Review
commit cbc6e8ef5d
2 changed files with 0 additions and 32 deletions

View File

@ -352,10 +352,6 @@ class OverQuota(CinderException):
message = _("Quota exceeded for resources: %(overs)s")
class MigrationNotFound(NotFound):
message = _("Migration %(migration_id)s could not be found.")
class FileNotFound(NotFound):
message = _("File %(file_path)s could not be found.")
@ -440,18 +436,10 @@ class MalformedResponse(VolumeDriverException):
message = _("Malformed response to command %(cmd)s: %(reason)s")
class BadDriverResponseStatus(VolumeDriverException):
message = _("Bad driver response status: %(status)s")
class FailedCmdWithDump(VolumeDriverException):
message = _("Operation failed with status=%(status)s. Full dump: %(data)s")
class InstanceNotFound(NotFound):
message = _("Instance %(instance_id)s could not be found.")
class GlanceMetadataExists(Invalid):
message = _("Glance metadata cannot be updated, key %(key)s"
" exists for volume id %(volume_id)s")
@ -566,10 +554,6 @@ class KeyManagerError(CinderException):
msg_fmt = _("key manager error: %(reason)s")
class VolumeRetypeFailed(CinderException):
message = _("Volume retype failed: %(reason)s")
# Driver specific exceptions
# Coraid
class CoraidException(VolumeDriverException):
@ -647,10 +631,6 @@ class SolidFireAccountNotFound(SolidFireDriverException):
"Solidfire device")
class DuplicateSolidFireVolumeNames(SolidFireDriverException):
message = _("Detected more than one volume with name %(vol_name)s")
# HP 3Par
class Invalid3PARDomain(VolumeDriverException):
message = _("Invalid 3PAR Domain: %(err)s")

View File

@ -18,7 +18,6 @@ from lxml import etree
import webob
from cinder.api.contrib import extended_snapshot_attributes
from cinder import exception
from cinder.openstack.common import jsonutils
from cinder import test
from cinder.tests.api import fakes
@ -97,17 +96,6 @@ class ExtendedSnapshotAttributesTest(test.TestCase):
project_id='fake',
progress='0%')
def test_no_instance_passthrough_404(self):
def fake_snapshot_get(*args, **kwargs):
raise exception.InstanceNotFound(instance_id='fake')
self.stubs.Set(volume.api.API, 'get_snapshot', fake_snapshot_get)
url = '/v2/fake/snapshots/70f6db34-de8d-4fbd-aafb-4065bdfa6115'
res = self._make_request(url)
self.assertEqual(res.status_int, 404)
class ExtendedSnapshotAttributesXmlTest(ExtendedSnapshotAttributesTest):
content_type = 'application/xml'