Snapshots/backups can no longer happen simultaneously. Tests included.

Implemented exception.InstanceBusy when attempting to snapshot/backup an
instance which is already snapshotting or being currently backed up.

Fixes bug 727502.

(Patch Set 2) 3 new exceptions: InstanceBusy, InstanceSnapshotting, and InstanceBackingUp
(Patch Set 3) Oops. New exceptions now inherit from InstanceBusy
(Patch Set 4) Tests now tear down created instances

Change-Id: I9614740bba26c04e64b0e27c24fbace12334f4d1
This commit is contained in:
Brian Lamar
2011-09-26 23:41:28 -04:00
parent f8740cab61
commit ca5abac753
2 changed files with 43 additions and 0 deletions

View File

@@ -175,6 +175,18 @@ class AdminRequired(NotAuthorized):
message = _("User does not have admin privileges")
class InstanceBusy(NovaException):
message = _("Instance %(instance_id)s is busy. (%(task_state)s)")
class InstanceSnapshotting(InstanceBusy):
message = _("Instance %(instance_id)s is currently snapshotting.")
class InstanceBackingUp(InstanceBusy):
message = _("Instance %(instance_id)s is currently being backed up.")
class Invalid(NovaException):
message = _("Unacceptable parameters.")