Return-Path: Delivered-To: apmail-incubator-deltacloud-dev-archive@minotaur.apache.org Received: (qmail 32743 invoked from network); 27 Aug 2010 00:03:57 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 27 Aug 2010 00:03:57 -0000 Received: (qmail 26750 invoked by uid 500); 27 Aug 2010 00:03:57 -0000 Delivered-To: apmail-incubator-deltacloud-dev-archive@incubator.apache.org Received: (qmail 26731 invoked by uid 500); 27 Aug 2010 00:03:57 -0000 Mailing-List: contact deltacloud-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: deltacloud-dev@incubator.apache.org Delivered-To: mailing list deltacloud-dev@incubator.apache.org Received: (qmail 26723 invoked by uid 99); 27 Aug 2010 00:03:57 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Aug 2010 00:03:57 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=10.0 tests=RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.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; Fri, 27 Aug 2010 00:03:35 +0000 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o7R03DHn010632 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 26 Aug 2010 20:03:13 -0400 Received: from [10.3.113.22] (ovpn-113-22.phx2.redhat.com [10.3.113.22]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o7R03C8S000305 for ; Thu, 26 Aug 2010 20:03:13 -0400 Subject: Re: [PATCH] azure blob storage driver - very early prototype with basic functions From: David Lutterkort To: deltacloud-dev@incubator.apache.org In-Reply-To: <1282672321-6993-2-git-send-email-mandreou@redhat.com> References: <1282672321-6993-1-git-send-email-mandreou@redhat.com> <1282672321-6993-2-git-send-email-mandreou@redhat.com> Content-Type: text/plain; charset="ISO-8859-15" Organization: Red Hat Inc Date: Thu, 26 Aug 2010 17:03:12 -0700 Message-ID: <1282867392.21129.380.camel@avon.watzmann.net> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-Virus-Checked: Checked by ClamAV on apache.org On Tue, 2010-08-24 at 18:52 +0100, mandreou@redhat.com wrote: > diff --git a/server/lib/deltacloud/drivers/azure/azure_driver.rb b/server/lib/deltacloud/drivers/azure/azure_driver.rb > new file mode 100644 > index 0000000..780e278 > --- /dev/null > +++ b/server/lib/deltacloud/drivers/azure/azure_driver.rb > @@ -0,0 +1,105 @@ > > +#Windows Azure (WAZ) gem at http://github.com/johnnyhalife/waz-storage > +require 'waz-blobs' > +require 'deltacloud/base_driver' > +module Deltacloud > + module Drivers > + module Azure > + > +class AzureDriver < Deltacloud::BaseDriver > + > + def supported_collections > + DEFAULT_COLLECTIONS.reject! { |c| [:hardware_profiles, :images, :instances, :instance_states, > + :realms, :storage_volumes, :storage_snapshots ].include?(c) } > + DEFAULT_COLLECTIONS + [:containers] > + end Could just do 'def supported_collections; [:containers] end' here ;) > + def blobs(credentials, opts) > + blob_list = [] > + unless opts['container'] then > + raise Deltacloud::Validation::Failure.new(Deltacloud::Validation::Param.new(["container"]), "Error - need container name to retrieve the blob list. You said container->#{opts['container']}.") > + end Shouldn't this be handled by the declaration of containers in server.rb ? In particular, since :container is part of the URL, this method would never be called if it's not there. Other than that, looks great. David