-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 05/05/2010 07:36 PM, Chris Lalancette wrote:
> Signed-off-by: Chris Lalancette <[email protected]> > --- > server/lib/deltacloud/drivers/ec2/ec2_driver.rb | 11 ++++++++--- > 1 files changed, 8 insertions(+), 3 deletions(-) > > diff --git a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb > b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb > index 3134469..c8b26cc 100644 > --- a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb > +++ b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb > @@ -99,9 +99,14 @@ class EC2Driver < Deltacloud::BaseDriver > def images(credentials, opts={} ) > ec2 = new_client(credentials) > img_arr = [] > - config = { :owner_id => "amazon" } > - config.merge!({ :owner_id => opts[:owner_id] }) if opts and > opts[:owner_id] > - config.merge!({ :image_id => opts[:id] }) if opts and opts[:id] > + # if we know the image_id, we don't want to limit by owner_id, since this > + # will exclude public images > + if (opts and opts[:id]) > + config = { :image_id => opts[:id] } > + else > + config = { :owner_id => "amazon" } > + config.merge!({ :owner_id => opts[:owner_id] }) if opts and > opts[:owner_id] > + end > safely do > ec2.describe_images(config).imagesSet.item.each do |image| > img_arr << convert_image(image) ACK. - Michal - -- - -------------------------------------------------------- Michal Fojtik, [email protected], +420 532 294 4307 Ruby / Ruby On Rails Developer Deltacloud API: http://deltacloud.org - -------------------------------------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJL4a8xAAoJEEwRP1Pf2/iq3UcIAIwlTh/VT93K9E9hcytqtwwe ObTIQOM3x0S34fIsJe0peY8CfCtfwyD6ygrBfD6uHU5AXCYtRBS2tjw4ZheD8XbD saihw0CwH2e9YC9iLSiWfAsDSA0Uuyolsv+JMqntohukpNk3wOtsKgDeHrulFCGV 4XhY8z2ZiJuxZW6SoatxJHLS2Lw2pbWGFvvvoqWQEhDoF39BENrf3ci3iW53EoQz EY3rVvjul9HPWYwbeWFxcpbYRMMC+fe/skg4hxzjn5+Zyck+Ooq80Rq1l08UrhBH ISP41keUM9GrN7COzOfBJxeL5b0xQ/n1XY83MFXrgjPQr9yhTY75e2GESClB2aY= =YZhL -----END PGP SIGNATURE----- _______________________________________________ deltacloud-devel mailing list [email protected] https://fedorahosted.org/mailman/listinfo/deltacloud-devel
