deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Fojtik <mfoj...@redhat.com>
Subject Re: [PATCH] rhevm: DTACLOUD-452: expose create_image action only when stopped
Date Wed, 06 Feb 2013 09:55:04 GMT
On 02/06, diesk@fast.au.fujitsu.com wrote:

ACK!

  -- Michal

> From: Dies Koper <diesk@fast.au.fujitsu.com>
> 
> ---
>  server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> 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
>  
> -- 
> 1.8.0.msysgit.0
> 
> 

-- 
Michal Fojtik <mfojtik@redhat.com>
Deltacloud API, CloudForms

Mime
View raw message