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 307B3E5C1 for ; Sat, 26 Jan 2013 00:57:13 +0000 (UTC) Received: (qmail 33800 invoked by uid 500); 26 Jan 2013 00:57:13 -0000 Delivered-To: apmail-deltacloud-dev-archive@deltacloud.apache.org Received: (qmail 33770 invoked by uid 500); 26 Jan 2013 00:57:13 -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 33761 invoked by uid 99); 26 Jan 2013 00:57:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 26 Jan 2013 00:57:13 +0000 Date: Sat, 26 Jan 2013 00:57:13 +0000 (UTC) From: "David Lutterkort (JIRA)" To: dev@deltacloud.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (DTACLOUD-432) Using $select=disks&$expand=disks return 500 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DTACLOUD-432?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D13= 563226#comment-13563226 ]=20 David Lutterkort edited comment on DTACLOUD-432 at 1/26/13 12:56 AM: --------------------------------------------------------------------- It took me a while to figure this out: your shell is taking you to the clea= ners, as $select and $expand get replaced with nothing by your shell. Enclo= se the URL in single quotes and you get: curl -H 'Accept: application/xml' -i --user "mockuser:mockpassword" 'http:/= /localhost:3001/cimi/machines?$select=3Ddisks&$expand=3Ddisks' http://localhost:3001/cimi/machines 2 http://localhost:3001/cimi/machines/inst0/disks 1 891289600 http://localhost:3001/cimi/machines/inst1/disks 1 167772160 That's close, but not correct, since we should be seeing all the attributes= of each Disk, not just capacity =20 was (Author: lutter): It took me a while to figure this out: your shell is taking you to the = cleaners, as $select and $expand get replaced with nothing by your shell. E= nclose the URL in single quotes and you get: curl -H 'Accept: application/xml' -i --user "mockuser:mockpassword" 'http:/= /localhost:3001/cimi/machines?$select=3Ddisks&$expand=3Ddisks' http://localhost:3001/cimi/machines 2 http://localhost:3001/cimi/machines/inst0/disks 1 891289600 http://localhost:3001/cimi/machines/inst1/disks 1 167772160 =20 > Using $select=3Ddisks&$expand=3Ddisks return 500 > -------------------------------------------- > > Key: DTACLOUD-432 > URL: https://issues.apache.org/jira/browse/DTACLOUD-432 > Project: DeltaCloud > Issue Type: Bug > Reporter: Michal Fojtik > Assignee: Michal Fojtik > > When using this URL: > http://localhost:3001/cimi/machines?$expand=3Ddisks&$select=3Ddisks > I expect that only expanded disks subcollection will appear. However I ge= t this: > error status=3D"500" url=3D"/cimi/machines"> > backend_error > > ]]> > > > 500 > > > [ Abbreviated trace pass fulltrace=3D1 as query param to see everything $= app =3D /home/mfojtik/code/core/server/lib ] $app/cimi/models/collection.rb= :56:in `[]' $app/cimi/models/collection.rb:27:in `initialize' $app/cimi/mod= els/schema.rb:266:in `new' $app/cimi/models/schema.rb:266:in `convert' $app= /cimi/models/schema.rb:288:in `convert' $app/cimi/models/base.rb:184:in `in= itialize' ... $app/cimi/models/base.rb:183:in `each' $app/cimi/models/base.= rb:183:in `inject' $app/cimi/models/base.rb:183:in `initialize' $app/cimi/m= odels/base.rb:288:in `new' $app/cimi/models/base.rb:288:in `filter_attribut= es' $app/cimi/models/collection.rb:67:in `filter_attributes' $app/cimi/mode= ls/collection.rb:66:in `map' $app/cimi/models/collection.rb:66:in `filter_a= ttributes' $app/cimi/models/base.rb:252:in `filter_by' $app/cimi/collection= s/machines.rb:27 ... $app/sinatra/rack_accept.rb:164:in `call' ... $app/sin= atra/rack_accept.rb:164:in `call' ... $app/sinatra/rack_accept.rb:164:in `c= all' ... $app/sinatra/rack_accept.rb:164:in `call' ... $app/sinatra/rack_ac= cept.rb:164:in `call' ... $app/sinatra/rack_accept.rb:164:in `call' ... $ap= p/sinatra/rack_accept.rb:164:in `call' ... $app/sinatra/rack_accept.rb:164:= in `call' ... $app/sinatra/rack_accept.rb:164:in `call' ... $app/sinatra/ra= ck_accept.rb:164:in `call' ... $app/sinatra/rack_accept.rb:164:in `call' ..= . $app/sinatra/rack_accept.rb:164:in `call' ... $app/sinatra/rack_accept.rb= :164:in `call' ... $app/sinatra/rack_driver_select.rb:45:in `call' $app/sin= atra/rack_matrix_params.rb:104:in `call' $app/sinatra/rack_etag.rb:41:in `c= all' $app/sinatra/rack_date.rb:31:in `call' $app/sinatra/rack_logger.rb:76:= in `call' $app/sinatra/rack_accept.rb:164:in `call' ... $app/sinatra/rack_m= atrix_params.rb:104:in `call' ... > > -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira