Return-Path: X-Original-To: apmail-deltacloud-dev-archive@www.apache.org Delivered-To: apmail-deltacloud-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 555869A60 for ; Sat, 17 Dec 2011 00:01:35 +0000 (UTC) Received: (qmail 87393 invoked by uid 500); 17 Dec 2011 00:01:35 -0000 Delivered-To: apmail-deltacloud-dev-archive@deltacloud.apache.org Received: (qmail 87250 invoked by uid 500); 17 Dec 2011 00:01:34 -0000 Mailing-List: contact dev-help@deltacloud.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@deltacloud.apache.org Delivered-To: mailing list dev@deltacloud.apache.org Received: (qmail 87237 invoked by uid 99); 17 Dec 2011 00:01:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 Dec 2011 00:01:34 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lutter@redhat.com designates 209.132.183.28 as permitted sender) Received: from [209.132.183.28] (HELO mx1.redhat.com) (209.132.183.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 Dec 2011 00:01:28 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pBH016Gc012616 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 16 Dec 2011 19:01:06 -0500 Received: from [10.3.113.57] (ovpn-113-57.phx2.redhat.com [10.3.113.57]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pBH0168X032098 for ; Fri, 16 Dec 2011 19:01:06 -0500 Subject: Re: [PATCH 1/2] Add fetching of EC2 regions via API call (for drivers collection) From: David Lutterkort To: dev@deltacloud.apache.org Date: Fri, 16 Dec 2011 16:01:06 -0800 In-Reply-To: <1323859649-17097-1-git-send-email-marios@redhat.com> References: <1323859649-17097-1-git-send-email-marios@redhat.com> Organization: Red Hat Inc Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: 7bit Message-ID: <1324080066.19204.10.camel@avon.watzmann.net> Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Hi Marios, this is not all directly connected to your patch; but you made me look at this code ;) On Wed, 2011-12-14 at 12:47 +0200, marios@redhat.com wrote: > From: marios > > > Signed-off-by: marios > --- > server/lib/deltacloud/drivers/ec2/ec2_driver.rb | 6 ++++++ > 1 files changed, 6 insertions(+), 0 deletions(-) > > diff --git a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb > index 12f4fb3..da2cb3d 100644 > --- a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb > +++ b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb > @@ -695,6 +695,12 @@ module Deltacloud > end > end > > + def providers(credentials, opts={}) > + ec2 = new_client(credentials) > + providers = ec2.describe_regions.map{|r| Provider.new( {:id=>r, :name=>r, > + :url=>"#{ENV['API_HOST']}:#{ENV['API_PORT']}#{settings.root_url}\;provider=#{r}" }) } The url should also include the protocol. (http/https) Also, in the XML we now say localhost:3001/api;provider=eu-west-1 Maybe we should change that to Do we have any cases where provider/@id and entrypoint/@name would ever differ ? And what is the exact meaning of these attributes ? Which of them would I use as the X-Deltacloud-Provider ? David