diff options
| author | Ronen Kat <ronenkat@il.ibm.com> | 2012-08-06 10:11:10 +0300 |
|---|---|---|
| committer | Mark McLoughlin <markmc@redhat.com> | 2012-09-07 14:07:01 +0100 |
| commit | 3379e821f715d6c63af3f0e96d276ca3f3ff24ca (patch) | |
| tree | 8795e48c3aba4c45040a302a660f506b68b565ce /nova/exception.py | |
| parent | 37cc45b8fdaa199b248a7ef5f683d514733b8387 (diff) | |
Use volume driver specific exceptions
Change generic use of exception.NovaException in the nova/volume directory
to specific exceptions. The exceptions used in this patch are:
exception.VolumeBackendAPIException
exception.InvalidInput
exception.InvalidVolume
exception.VolumeAtatched
Patch includes updates to the appropriate tests as well.
(cherry picked from cinder commit 3905a99)
Change-Id: I10407ff3f5babe64e88f445d3529269b7665ee16
Diffstat (limited to 'nova/exception.py')
| -rw-r--r-- | nova/exception.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/nova/exception.py b/nova/exception.py index cd1eabc9d..784f90a6e 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -230,6 +230,10 @@ class VolumeUnattached(Invalid): message = _("Volume %(volume_id)s is not attached to anything") +class VolumeAttached(Invalid): + message = _("Volume %(volume_id)s is still attached, detach volume first.") + + class InvalidKeypair(Invalid): message = _("Keypair data is invalid") @@ -1018,7 +1022,7 @@ class VolumeTypeCreateFailed(NovaException): class VolumeBackendAPIException(NovaException): message = _("Bad or unexpected response from the storage volume " - "backend API: data=%(data)s") + "backend API: %(data)s") class InstanceTypeCreateFailed(NovaException): |
