Pearl1594 commented on a change in pull request #4053:
URL: https://github.com/apache/cloudstack/pull/4053#discussion_r426744052



##########
File path: 
engine/storage/src/main/java/org/apache/cloudstack/storage/datastore/ObjectInDataStoreManagerImpl.java
##########
@@ -104,6 +104,14 @@ public ObjectInDataStoreManagerImpl() {
         // TODO: further investigate why an extra event is sent when it is
         // alreay Ready for DownloadListener
         stateMachines.addTransition(State.Ready, Event.OperationSuccessed, 
State.Ready);
+        // State transitions for data object migration
+        stateMachines.addTransition(State.Ready, Event.MigrationRequested, 
State.Migrating);
+        stateMachines.addTransition(State.Ready, Event.CopyRequested, 
State.Copying);
+        stateMachines.addTransition(State.Allocated, Event.MigrationRequested, 
State.Migrating);
+        stateMachines.addTransition(State.Migrating, Event.MigrationFailed, 
State.Failed);
+        stateMachines.addTransition(State.Migrating, Event.MigrationSucceeded, 
State.Destroyed);
+        stateMachines.addTransition(State.Migrating, Event.OperationSuccessed, 
State.Ready);

Review comment:
       I've reused what existed before
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to