deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject [1/9] git commit: Fixed instance state conversion. Tested EBS instance for start/stop/reboot. Works fine
Date Fri, 28 Jun 2013 09:06:30 GMT
Updated Branches:
  refs/heads/master 9ea3eeb06 -> fd92d39d4


Fixed instance state conversion. Tested EBS instance for start/stop/reboot. Works fine


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/9e53cb09
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/9e53cb09
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/9e53cb09

Branch: refs/heads/master
Commit: 9e53cb09f338a567d1d079c72ca3507ea8bbefb1
Parents: eb329da
Author: David Ellinger <dellinger@ltionline.com>
Authored: Fri May 24 13:59:42 2013 -0400
Committer: marios <marios@redhat.com>
Committed: Fri Jun 28 12:05:49 2013 +0300

----------------------------------------------------------------------
 server/lib/deltacloud/drivers/ec2/ec2_driver.rb | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/9e53cb09/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
index f462b37..7c41aeb 100644
--- a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
+++ b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
@@ -27,7 +27,6 @@ class Instance
   def authn_feature_failed?
     return true unless authn_error.nil?
   end
-
 end
 
 module Deltacloud
@@ -126,15 +125,21 @@ module Deltacloud
         define_instance_states do
           start.to( :pending )          .automatically
           pending.to( :running )        .automatically
-          pending.to( :stopping )       .on( :stop )
-          pending.to( :stopped )        .automatically
-          stopped.to( :running )        .on( :start )
           running.to( :running )        .on( :reboot )
           running.to( :stopping )       .on( :stop )
           stopping.to(:stopped)         .automatically
-
+          stopped.to( :running )        .on( :start )
           stopped.to(:finish)         .on( :destroy)
 
+          #pending.to( :stopping )       .on( :stop )
+          #pending.to( :stopped )        .automatically
+
+          
+         
+          
+
+          
+
         end
 
         # We do not allow users to set the endpoint through environment
@@ -1248,11 +1253,13 @@ module Deltacloud
         def convert_state(ec2_state)
           case ec2_state
             when "terminated"
-              "STOPPED"
+              "FINISH"
             when "stopped"
               "STOPPED"
             when "running"
               "RUNNING"
+            when "stopping"
+              "STOPPING"
             when "pending"
               "PENDING"
             when "shutting-down"


Mime
View raw message