deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dko...@apache.org
Subject git commit: rhevm: DTACLOUD-452: expose create_image action only when stopped
Date Wed, 06 Feb 2013 09:58:43 GMT
Updated Branches:
  refs/heads/master b2c15bc47 -> dea916da7


rhevm: DTACLOUD-452: expose create_image action only when stopped


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

Branch: refs/heads/master
Commit: dea916da7acbb07fe996bf2854e63d22ee7385e6
Parents: b2c15bc
Author: Dies Koper <diesk@fast.au.fujitsu.com>
Authored: Wed Feb 6 13:09:07 2013 +1100
Committer: Dies Koper <diesk@fast.au.fujitsu.com>
Committed: Wed Feb 6 20:58:23 2013 +1100

----------------------------------------------------------------------
 .../lib/deltacloud/drivers/rhevm/rhevm_driver.rb   |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/dea916da/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
index 69cc563..65ba26d 100644
--- a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
+++ b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
@@ -254,6 +254,7 @@ class RhevmDriver < Deltacloud::BaseDriver
       public_addresses << InstanceAddress.new(inst.vnc[:address], :port => inst.vnc[:port],
:type => :vnc)
     end
 
+    can_create_image = state == 'STOPPED'
     # Remove 'destroy' operation from list of actions when RHEV-M instance
     # is suspended or paused.
     if state == 'PAUSED'
@@ -261,7 +262,6 @@ class RhevmDriver < Deltacloud::BaseDriver
       actions.delete(:destroy)
     else
       actions = instance_actions_for(state)
-      can_create_image = true
     end
 
     Instance.new(
@@ -277,7 +277,7 @@ class RhevmDriver < Deltacloud::BaseDriver
       :hardware_profile_id => profile.id,
       :public_addresses => public_addresses,
       :private_addresses => [],
-      :create_image => can_create_image || false
+      :create_image => can_create_image
     )
   end
 


Mime
View raw message