deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ronelle Landy (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DTACLOUD-432) Using $select=disks&$expand=disks return 500
Date Thu, 24 Jan 2013 17:51:13 GMT

    [ https://issues.apache.org/jira/browse/DTACLOUD-432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13561798#comment-13561798
] 

Ronelle Landy commented on DTACLOUD-432:
----------------------------------------

Applying patches http://tracker.deltacloud.org/set/272, I no longer get a 500 error but all
the attributes are returned - not just disks, expanded ...

 curl -X GET -H "accept:application/xml" --user "un:pw" "http://localhost:3001/cimi/machines?$select=disks&$expand=disks"

<Collection xmlns="http://schemas.dmtf.org/cimi/1" resourceURI="http://schemas.dmtf.org/cimi/1/MachineCollection">
  <id>http://localhost:3001/cimi/machines</id>
  <count>2</count>
  <Machine>
    <id>http://localhost:3001/cimi/machines/inst0</id>
    <name>Mock Instance With Profile Change</name>
    <description>No description set for Machine Mock Instance With Profile Change</description>
    <created>2013-01-24T12:48:17-05:00</created>
    <property key="machine_image">http://localhost:3001/cimi/machine_images/img1</property>
    <property key="credential">http://localhost:3001/cimi/credentials</property>
    <realm>us</realm>
    <machineImage href="http://localhost:3001/cimi/machine_images/img1" />
    <state>STARTED</state>
    <cpu>1</cpu>
    <memory>12582912</memory>
    <disks href="http://localhost:3001/cimi/machines/inst0/disks" />
    <volumes href="http://localhost:3001/cimi/machines/inst0/volumes" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/restart" href="http://localhost:3001/cimi/machines/inst0/restart"
/>
    <operation rel="http://schemas.dmtf.org/cimi/1/action/stop" href="http://localhost:3001/cimi/machines/inst0/stop"
/>
    <operation rel="http://schemas.dmtf.org/cimi/1/action/capture" href="http://localhost:3001/cimi/machine_images"
/>
  </Machine>
  <Machine>
    <id>http://localhost:3001/cimi/machines/inst1</id>
    <name>MockUserInstance</name>
    <description>No description set for Machine MockUserInstance</description>
    <created>2013-01-24T12:48:17-05:00</created>
    <property key="machine_image">http://localhost:3001/cimi/machine_images/img3</property>
    <property key="credential">http://localhost:3001/cimi/credentials</property>
    <realm>us</realm>
    <machineImage href="http://localhost:3001/cimi/machine_images/img3" />
    <state>STARTED</state>
    <cpu>1</cpu>
    <memory>1782579</memory>
    <disks href="http://localhost:3001/cimi/machines/inst1/disks" />
    <volumes href="http://localhost:3001/cimi/machines/inst1/volumes" />
    <operation rel="http://schemas.dmtf.org/cimi/1/action/restart" href="http://localhost:3001/cimi/machines/inst1/restart"
/>
    <operation rel="http://schemas.dmtf.org/cimi/1/action/stop" href="http://localhost:3001/cimi/machines/inst1/stop"
/>
    <operation rel="http://schemas.dmtf.org/cimi/1/action/capture" href="http://localhost:3001/cimi/machine_images"
/>
  </Machine>
  <operation rel="add" href="http://localhost:3001/cimi/machines" />
</Collection>

                
> Using $select=disks&$expand=disks 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=disks&$select=disks
> I expect that only expanded disks subcollection will appear. However I get this:
> error status="500" url="/cimi/machines">
> <kind>backend_error</kind>
> <message>
> <![CDATA[undefined local variable or method `entry_name' for #<Class::DiskCollection:0x7fe03934a050>
]]>
> </message>
> <backend driver="mock">
> <code>500</code>
> </backend>
> <backtrace>
> [ Abbreviated trace pass fulltrace=1 as query param to see everything $app = /home/mfojtik/code/core/server/lib
] $app/cimi/models/collection.rb:56:in `[]' $app/cimi/models/collection.rb:27:in `initialize'
$app/cimi/models/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 `initialize' ... $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/models/base.rb:288:in `new' $app/cimi/models/base.rb:288:in `filter_attributes'
$app/cimi/models/collection.rb:67:in `filter_attributes' $app/cimi/models/collection.rb:66:in
`map' $app/cimi/models/collection.rb:66:in `filter_attributes' $app/cimi/models/base.rb:252:in
`filter_by' $app/cimi/collections/machines.rb:27 ... $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_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_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_accept.rb:164:in `call' ... $app/sinatra/rack_accept.rb:164:in `call'
... $app/sinatra/rack_driver_select.rb:45:in `call' $app/sinatra/rack_matrix_params.rb:104:in
`call' $app/sinatra/rack_etag.rb:41:in `call' $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_matrix_params.rb:104:in
`call' ...
> </backtrace>
> </error>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message