[ https://issues.apache.org/jira/browse/DTACLOUD-454?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marios Andreou updated DTACLOUD-454: ------------------------------------ Attachment: 0001-Deltacloud-fix-bug-in-to_hash-json-for-storage_volum.patch attach patch should address this (minor nit/typo) - also tracked at http://tracker.deltacloud.org/set/296 > 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