deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Koper, Dies" <di...@fast.au.fujitsu.com>
Subject RE: [PATCH] rhevm: DTACLOUD-452: expose create_image action only when stopped
Date Wed, 06 Feb 2013 10:00:46 GMT
Thanks. Pushed as 8d3868244fd0666c43a1811eb4205e4639f7f221

Regards,
Dies Koper


> -----Original Message-----
> From: Michal Fojtik [mailto:mfojtik@redhat.com]
> Sent: Wednesday, 6 February 2013 8:55 PM
> To: dev@deltacloud.apache.org
> Subject: Re: [PATCH] rhevm: DTACLOUD-452: expose create_image action
only
> when stopped
> 
> 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