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.")
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")
msg_fmt = _("key manager error: %(reason)s")
-class VolumeRetypeFailed(CinderException):
- message = _("Volume retype failed: %(reason)s")
-
-
# Driver specific exceptions
# Coraid
class CoraidException(VolumeDriverException):
"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")
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
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'