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-454) JSON error - GET /api/storage_volumes, ec2 provider
Date Tue, 05 Feb 2013 19:32:11 GMT

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

Ronelle Landy commented on DTACLOUD-454:
----------------------------------------

ACK - works for me ...

>>  ruby storage_volumes_test.rb
Run options: --seed 22526

# Running tests:

..............

Finished tests in 12.009554s, 1.1657 tests/s, 3.1641 assertions/s.

14 tests, 38 assertions, 0 failures, 0 errors, 0 skips

[root@qe-blade-01 deltacloud]# curl -X GET --user "un:pw" "localhost:3001/api/storage_volumes?format=json"


{"storage_volumes":[{"id":"vol-12d27763","href":"http://localhost:3001/api/storage_volumes/vol-12d27763","name":null,"description":null,"state":"AVAILABLE","created":"2013-02-04
23:48:28 UTC","realm":{"id":"us-east-1a","href":"http://localhost:3001/api/realms/us-east-1a","rel":"realm"},"device":null,"kind":null,"capacity":100,"actions":[{"href":"http://localhost:3001/api/storage_volumes/vol-12d27763/attach","rel":"attach"},{"href":"http://localhost:3001/api/storage_volumes/vol-12d27763/detach","rel":"detach"},{"href":"http://localhost:3001/api/storage_volumes/vol-12d27763","rel":"destroy"}],"instance":{}},{"id":"vol-7ab3100b","href":"http://localhost:3001/api/storage_volumes/vol-7ab3100b","name":null,"description":null,"state":"AVAILABLE","created":"2013-02-05
12:27:15 UTC","realm":{"id":"us-east-1a","href":"http://localhost:3001/api/realms/us-east-1a","rel":"realm"},"device":null,"kind":null,"capacity":15,"actions":[{"href":"http://localhost:3001/api/storage_volumes/vol-7ab3100b/attach","rel":"attach"},{"href":"http://localhost:3001/api/storage_volumes/vol-7ab3100b/detach","rel":"detach"},{"href":"http://localhost:3001/api/storage_volumes/vol-7ab3100b","rel":"destroy"}],"instance":{}}]}[root@qe-blade-01
deltacloud]# 

                
> JSON error - GET /api/storage_volumes, ec2 provider
> ---------------------------------------------------
>
>                 Key: DTACLOUD-454
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-454
>             Project: DeltaCloud
>          Issue Type: Bug
>          Components: Native/Frontend
>         Environment: Deltacloud commit version: 152247911e61041e35202ffdd22b2c160a390008
> ec2 provider
> JSON
>            Reporter: Ronelle Landy
>            Assignee: Marios Andreou
>         Attachments: 0001-Deltacloud-fix-bug-in-to_hash-json-for-storage_volum.patch
>
>
> Executing GET /api/storage_volumes for ec2 and returning XML works fine.  Requesting
JSON for the same, errors out. Output from both formats is copied below:
> XML seems happy enough ...
> >> curl -X GET --user "un:pw" "localhost:3001/api/storage_volumes?format=xml"
> <?xml version='1.0' encoding='utf-8' ?>
> <storage_volumes>
>   <storage_volume href='http://localhost:3001/api/storage_volumes/vol-12d27763' id='vol-12d27763'>
>     <created>2013-02-04 23:48:28 UTC</created>
>     <capacity unit='GB'>100</capacity>
>     <name>vol-12d27763</name>
>     <realm href='http://localhost:3001/api/realms/us-east-1a' id='us-east-1a'></realm>
>     <realm_id>us-east-1a</realm_id>
>     <state>AVAILABLE</state>
>     <actions>
>       <link href='http://localhost:3001/api/storage_volumes/vol-12d27763/attach' method='post'
rel='attach' />
>       <link href='http://localhost:3001/api/storage_volumes/vol-12d27763/detach' method='post'
rel='detach' />
>       <link href='http://localhost:3001/api/storage_volumes/vol-12d27763' method='post'
rel='destroy' />
>     </actions>
>   </storage_volume>
> </storage_volumes>
> Now let's try that with JSON output returned:
> [root@cloud-qe-5 deltacloud]# curl -X GET --user "un:pw" "localhost:3001/api/storage_volumes?format=json"
> {"code":500,"message":"undefined method `attach_storage_volume' for #<Deltacloud::Collections::StorageVolumes:0x007fc0e00e9888>","error":"NoMethodError"}

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