You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by "Ronelle Landy (Commented) (JIRA)" <ji...@apache.org> on 2012/03/27 23:40:24 UTC

[jira] [Commented] (DTACLOUD-171) GET api/buckets/:bucket_id/blob_id - format=json returns user meta_data, format=xml does not

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

Ronelle Landy commented on DTACLOUD-171:
----------------------------------------

Tested with git commit version: 59659586a6783bd4c851056813ed8369d08d4589 + attached patch:

GET api/buckets/:bucket_id/:blob_id does return user meta-data with json and xml output:

 curl -X GET --user "username:password" "http://qe-blade-02.idm.lab.bos.redhat.com:3009/api/buckets/bucket_rlandy/blob03272012_1?format=json"                                                                                                                                            

{"blob":{"content_length":"262","href":"http://qe-blade-02.idm.lab.bos.redhat.com:3009/api/buckets/bucket_rlandy/blob03272012_1","last_modified":"Tue Mar 27 21:28:41 UTC 2012","bucket":"bucket_rlandy","content_type":"application/xml","user_metadata":{"version":"2.3","author":"rlandy"},"id":"blob03272012_1"}}[rlandy@localhost /]$ 

[rlandy@localhost /]$ curl -X GET --user "username:password" "http://qe-blade-02.idm.lab.bos.redhat.com:3009/api/buckets/bucket_rlandy/blob03272012_1?format=xml"
<?xml version='1.0' encoding='utf-8' ?>
<blob href='http://qe-blade-02.idm.lab.bos.redhat.com:3009/api/buckets/bucket_rlandy/blob03272012_1' id='blob03272012_1'>
  <bucket>bucket_rlandy</bucket>
  <content_length>262</content_length>
  <content_type>application/xml</content_type>
  <last_modified>Tue Mar 27 21:28:41 UTC 2012</last_modified>
  <user_metadata>
    <entry key='version'>
      <![CDATA[2.3]]>
    </entry>
    <entry key='author'>
      <![CDATA[rlandy]]>
    </entry>
  </user_metadata>
  <content href='http://qe-blade-02.idm.lab.bos.redhat.com:3009/api/buckets/bucket_rlandy/blob03272012_1/content'></content>
</blob>

Is the CDATA format expected?

                
> GET api/buckets/:bucket_id/blob_id -  format=json returns user meta_data, format=xml does not
> ---------------------------------------------------------------------------------------------
>
>                 Key: DTACLOUD-171
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-171
>             Project: DeltaCloud
>          Issue Type: Bug
>          Components: Server
>         Environment: Deltacloud git commit: 7e372dfca79c02a799046287e5936129216b781b	n - branch 'master' of https://git-wip-us.apache.org/repos/asf/deltacloud
> ec2 driver
> Fedora 16, RHEL 6.2
>            Reporter: Ronelle Landy
>            Assignee: Ronelle Landy
>         Attachments: 0001-Fix-for-DTACLOUD-171-display-blob-metadata-for-xml-f.patch
>
>
>  - Create a bucket using the Deltacloud API, ec2 provider
>  - Add a blob to that bucket  - with user meta_data
>  - Execute >>  GET api/buckets/:bucket_id/blob_id 
>  - Note that; using GET with format=json returns user meta_data. Using GET with format=xml does not:
> curl -X GET --user "username:password" "http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob3?format=json"
> \{"blob":{"href":"http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob3","last_modified":"Thu  Mar 22 20:02:17 UTC  2012","bucket":"bucket-rlandy2","content_type":"application/octet-stream","user_metadata":{"author":"rlandy","version":"2.2"},"id":"03222012blob3","content_length":"15637"}}
> [rlandy@localhost server]$ curl -X GET --user "username:password" "http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob3?format=xml"
> <?xml version='1.0' encoding='utf-8' ?>
> <blob href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob3' id='03222012blob3'>
>   <bucket>bucket-rlandy2</bucket>
>   <content_length>15637</content_length>
>   <content_type>application/octet-stream</content_type>
>   <last_modified>Thu Mar 22 20:02:17 UTC 2012</last_modified>
>   <user_metadata>
>   </user_metadata>
>   <content href='http://localhost:3009/api/buckets/bucket-rlandy2/03222012blob3/content'></content>
> </blob>
> Note from marios: introduced by a recent commit of mfojtik's. He came across some issue with client spec tests but I cannot reproduce it.
> (/server/views/blobs/show.xml.haml)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira