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-511) Filtering images by owner (using Mock driver) errors out
Date Thu, 04 Apr 2013 04:01:15 GMT

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

Ronelle Landy commented on DTACLOUD-511:
----------------------------------------

Fixed in: http://tracker.deltacloud.org/set/407


 curl -X GET -H "accept:application/xml" --user 'un:pw' "localhost:3001/api/images?owner_id=mockuserother"
<?xml version='1.0' encoding='utf-8' ?>
<images>
</images>

[root@cloud-qe-14 tests]# curl -X GET -H "accept:application/xml" --user 'un:pw' "localhost:3001/api/images?owner_id=mockuser"
<?xml version='1.0' encoding='utf-8' ?>
<images>
  <image href='http://localhost:3001/api/images/img3' id='img3'>
    <name>img3</name>
    <description>JBoss</description>
    <owner_id>mockuser</owner_id>
    <architecture>i386</architecture>
    <state>AVAILABLE</state>
    <creation_time>Thu Oct 25 14:27:53 CEST 2012</creation_time>
    <hardware_profiles>
      <hardware_profile href='http://localhost:3001/api/hardware_profiles/m1-small' id='m1-small'
rel='hardware_profile'></hardware_profile>
      <hardware_profile href='http://localhost:3001/api/hardware_profiles/m1-large' id='m1-large'
rel='hardware_profile'></hardware_profile>
      <hardware_profile href='http://localhost:3001/api/hardware_profiles/m1-xlarge' id='m1-xlarge'
rel='hardware_profile'></hardware_profile>
      <hardware_profile href='http://localhost:3001/api/hardware_profiles/opaque' id='opaque'
rel='hardware_profile'></hardware_profile>
    </hardware_profiles>
    <root_type>transient</root_type>
    <actions>
      <link href='http://localhost:3001/api/instances;image_id=img3' method='post' rel='create_instance'
/>
      <link href='http://localhost:3001/api/images/img3' method='delete' rel='destroy_image'
/>
    </actions>
  </image>
</images>
[root@cloud-qe-14 tests]# 

Please push to master

                
> Filtering images by owner (using Mock driver) errors out
> --------------------------------------------------------
>
>                 Key: DTACLOUD-511
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-511
>             Project: DeltaCloud
>          Issue Type: Bug
>          Components: Native/Frontend
>         Environment: deltacloud gem under test (post 1.1.1)
> mock driver
>            Reporter: Ronelle Landy
>            Assignee: Michal Fojtik
>
> This error was found by running the tests in deltacloud/client/tests against the mock
driver.
> The test wants to return only the images owned by user:
> images = client.images( :owner_id=>:self )
>  ERROR -- 500: [NameError] undefined local variable or method `credentials' for #<Deltacloud::Drivers::Mock::MockDriver:0x007fe5d802c248>
> /usr/local/share/gems/gems/deltacloud-core-1.1.2/lib/deltacloud/drivers/mock/mock_driver.rb:120:in
`block in filter_by_owner'
> /usr/local/share/gems/gems/deltacloud-core-1.1.2/lib/deltacloud/drivers/mock/mock_driver.rb:120:in
`select'
> /usr/local/share/gems/gems/deltacloud-core-1.1.2/lib/deltacloud/drivers/mock/mock_driver.rb:120:in
`filter_by_owner'
> /usr/local/share/gems/gems/deltacloud-core-1.1.2/lib/deltacloud/drivers/mock/mock_driver.rb:134:in
`images'
> /usr/local/share/gems/gems/deltacloud-core-1.1.2/lib/deltacloud/helpers/deltacloud_helper.rb:70:in
`block in filter_all'
> /usr/share/ruby/benchmark.rb:280:in `measure'
> /usr/local/share/gems/gems/deltacloud-core-1.1.2/lib/deltacloud/helpers/deltacloud_helper.rb:70:in
`filter_all'
> /usr/local/share/gems/gems/deltacloud-core-1.1.2/lib/deltacloud/collections/images.rb:34:in
`block (3 levels) in <class:Images>'
> /usr/local/share/gems/gems/sinatra-rabbit-1.1.6/lib/sinatra/rabbit/base.rb:400:in `instance_eval'
> /usr/local/share/gems/gems/sinatra-rabbit-1.1.6/lib/sinatra/rabbit/base.rb:400:in `block
in control'
> /usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:1293:in `call'
> /usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:1293:in `block in compile!'
> /usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:860:in `[]'
> /usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:860:in `block (3 levels)
in route!'
> /usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:876:in `route_eval'
> /usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:860:in `block (2 levels)
in route!'
> /usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:897:in `block in process_route'
> /usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:895:in `catch'
> /usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:895:in `process_route'
> /usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:859:in `block in route!'
> /usr/local/share/gems/gems/sinatra-1.3.5/lib/sinatra/base.rb:858:in `each'
> 10.16.120.64 - - [12/Mar/2013 17:04:22] "GET /api/images?owner_id=self HTTP/1.1" 500
37884 0.0349

--
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