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 core 11/16] Core: Check if instance used to create new image exists correctly
Date Thu, 26 Jul 2012 23:35:25 GMT
Hi Michal,

For consistency's sake, could you resolve 214 then? There is a patch
attached.
(of course other providers may need changes too).

Regards,
Dies Koper


> -----Original Message-----
> From: Michal Fojtik [mailto:mfojtik@redhat.com]
> Sent: Thursday, 26 July 2012 6:30 PM
> To: dev@deltacloud.apache.org
> Subject: Re: [PATCH core 11/16] Core: Check if instance used to create
new
> image exists correctly
> 
> Hi,
> 
> Yeah, I think David is right, I wasn't aware about 214, I'm sorry for
this.
> I added the checking just because I found with unit test that
> you can create a 'new image' form even with non-existing instance.
> 
> I i'll remove the checking then with patch I'll sent in a minute.
> 
>   -- Michal
> 
> 
> ---
> Michal Fojtik, Sr. Soft. Engineer
> Deltacloud API / CloudForms
> mfojtik@redhat.com
> 
> On Jul 20, 2012, at 1:32 AM, Koper, Dies wrote:
> 
> > Hi Michal,
> >
> > This looks like a case where you are introducing code that, at least
in
> > FGCP's case, will result in 5+ calls to retrieve instance details,
> > password, public ip addresses and running status just to check a
> > resource is there, which we discussed in the following issue:
> >
> > https://issues.apache.org/jira/browse/DTACLOUD-214
> >
> > My suggestion was to introduce a new method to retrieve only the
> > required information, while David suggested to remove the check
entirely
> > as we can determine the instance doesn't exist or is in the wrong
state
> > from the error message. What's your opinion?
> >
> > Cheers,
> > Dies Koper
> >
> >
> >> -----Original Message-----
> >> From: mfojtik@redhat.com [mailto:mfojtik@redhat.com]
> >> Sent: Thursday, 19 July 2012 11:03 PM
> >> To: dev@deltacloud.apache.org
> >> Subject: [PATCH core 11/16] Core: Check if instance used to create
new
> >> image exists correctly
> >>
> >> From: Michal Fojtik <mfojtik@redhat.com>
> >>
> >>
> >> Signed-off-by: Michal fojtik <mfojtik@redhat.com>
> >> ---
> >> server/lib/deltacloud/collections/images.rb |    4 ++--
> >> 1 file changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/server/lib/deltacloud/collections/images.rb
> >> b/server/lib/deltacloud/collections/images.rb
> >> index 2bb836e..6c4583d 100644
> >> --- a/server/lib/deltacloud/collections/images.rb
> >> +++ b/server/lib/deltacloud/collections/images.rb
> >> @@ -22,8 +22,8 @@ module Deltacloud::Collections
> >>     set :capability, lambda { |m| driver.respond_to? m }
> >>
> >>     new_route_for :images do
> >> -      @instance = Instance.new( :id => params[:instance_id] )
> >> -      status 404 unless @instance
> >> +      @instance = driver.instance(credentials, :id =>
> > params[:instance_id]) if
> >> params[:instance_id]
> >> +      halt 404 unless @instance
> >>     end
> >>
> >>     collection :images do
> >> --
> >> 1.7.10.2
> >>
> >
> >
> 



Mime
View raw message