Add exception SnapshotIsBusy to be handled as VolumeIsBusy.

This is helpful when driver can not delete snapshot if it has volumes
created from it.
Add tests for both VolumeIsBusy and SnapshotIsBusy cases.

Change-Id: I3fcc6b1ffdfbc7e22ed30ac832db500eb3260d04
This commit is contained in:
Yuriy Taraday
2011-11-08 18:57:11 +04:00
parent 588fa2c2a5
commit 863fb0c999
2 changed files with 47 additions and 0 deletions

View File

@@ -447,6 +447,11 @@ class VolumeIsBusy(NovaException):
message = _("deleting volume %(volume_name)s that has snapshot")
class SnapshotIsBusy(NovaException):
message = _("deleting snapshot %(snapshot_name)s that has "
"dependent volumes")
class ISCSITargetNotFoundForVolume(NotFound):
message = _("No target id found for volume %(volume_id)s.")