diff --git a/api/src/com/cloud/storage/Volume.java b/api/src/com/cloud/storage/Volume.java index 342dfd3ab2e..9319da9d29b 100755 --- a/api/src/com/cloud/storage/Volume.java +++ b/api/src/com/cloud/storage/Volume.java @@ -93,6 +93,9 @@ public interface Volume extends ControlledEntity, Identity, InternalIdentity, Ba s_fsm.addTransition(UploadOp, Event.OperationSucceeded, Uploaded); s_fsm.addTransition(UploadOp, Event.OperationFailed, Allocated); s_fsm.addTransition(Uploaded, Event.DestroyRequested, Destroy); + s_fsm.addTransition(Expunged, Event.ExpungingRequested, Expunged); + s_fsm.addTransition(Expunged, Event.OperationSucceeded, Expunged); + s_fsm.addTransition(Expunged, Event.OperationFailed, Expunged); } } diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ObjectInDataStoreStateMachine.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ObjectInDataStoreStateMachine.java index 04522f628d5..b21616a5094 100644 --- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ObjectInDataStoreStateMachine.java +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ObjectInDataStoreStateMachine.java @@ -22,11 +22,16 @@ import com.cloud.utils.fsm.StateObject; public interface ObjectInDataStoreStateMachine extends StateObject { enum State { - Allocated("The initial state"), Creating2("This is only used with createOnlyRequested event"), Creating( - "The object is being creating on data store"), Created("The object is created"), Ready( - "Template downloading is accomplished"), Copying("The object is being coping"), Migrating( - "The object is being migrated"), Destroying("Template is destroying"), Destroyed( - "Template is destroyed"), Failed("Failed to download template"); + Allocated("The initial state"), + Creating2("This is only used with createOnlyRequested event"), + Creating("The object is being creating on data store"), + Created("The object is created"), + Ready("Template downloading is accomplished"), + Copying("The object is being coping"), + Migrating("The object is being migrated"), + Destroying("Template is destroying"), + Destroyed("Template is destroyed"), + Failed("Failed to download template"); String _description; private State(String description) { @@ -39,7 +44,14 @@ public interface ObjectInDataStoreStateMachine extends StateObject