Return-Path: Delivered-To: apmail-incubator-deltacloud-dev-archive@minotaur.apache.org Received: (qmail 57940 invoked from network); 4 Mar 2011 10:47:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Mar 2011 10:47:38 -0000 Received: (qmail 53675 invoked by uid 500); 4 Mar 2011 10:47:38 -0000 Delivered-To: apmail-incubator-deltacloud-dev-archive@incubator.apache.org Received: (qmail 53640 invoked by uid 500); 4 Mar 2011 10:47:38 -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 53626 invoked by uid 99); 4 Mar 2011 10:47:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Mar 2011 10:47:37 +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 mfojtik@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, 04 Mar 2011 10:47:32 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p24AlBrk015149 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 4 Mar 2011 05:47:11 -0500 Received: from redhat.com (dhcp-2-138.brq.redhat.com [10.34.2.138]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p24Al7Gv026956 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 4 Mar 2011 05:47:10 -0500 Date: Fri, 4 Mar 2011 11:47:06 +0100 From: Michal Fojtik To: deltacloud-dev@incubator.apache.org Subject: Re: Image creation from running Instance (rev 1 Message-ID: <20110304104706.GB25787@redhat.com> References: <1299063937-25175-1-git-send-email-mfojtik@redhat.com> <1299202742.13816.63.camel@avon.watzmann.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <1299202742.13816.63.camel@avon.watzmann.net> X-Operating-System: Linux patashnik 2.6.35.11-83.fc14.i686.PAE User-Agent: Mutt/1.5.20 (2009-06-14) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 On 03/03/11 17:39 -0800, David Lutterkort wrote: >On Wed, 2011-03-02 at 12:05 +0100, mfojtik@redhat.com wrote: >> Hi, >> >> I decide to send out another patch, which fixes all issues mentioned by David. >> >> Also when I tried to figure out how I'll report the link in instance actions for >> creating images, I got into a problem how I'll report params needed to complete >> this action (like instance_id). >> >> So I came up with this solution and want to know if I'm wrong or not ;-) >> >> So I wrote a simple helper for Sinatra called 'generate_action_params' which >> will generate this block for element: >> >> >> >> >> >> > >I am not convinced that that will make clients' life easier - they still >need to know what the name and description parameters mean. Of course, >we'd want the mandatory instance_id to show up in the URL. We could use >a query param: > > > >but you shouldn't really use query params on a URL you'll post to. This >might be a good use for a matrix param then: > > > >Haven't tried yet though how Rack/Sinatra handle them. Good idea! I created a simple Rack middleware to do this. What about 'optional' parameters? So we will advertise them somewhere (except docs) ? Should I keep the generate_action_params and remove 'required' param from there? -- Michal > >David > > -- -------------------------------------------------------- Michal Fojtik, mfojtik@redhat.com Deltacloud API: http://deltacloud.org --------------------------------------------------------