Story #8832

[Keep] Azure SDK requirements analysis - update Azure SDK to include metadata in ListBlobs api call

Added by Radhika Chippada over 5 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Radhika Chippada
Category:
Keep
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Story points:
-

Description

  • Create a ticket (if one does not already exist)
  • Determine the acceptable metadata xml encoding
    • Test locally (with valid account name and key) to see if ' Include: "metadata" ' works or not with the SDK and how the XML is encoded
    • Discuss with the Azure team to agree on the acceptable xml encoding (if the above test does not give conclusive results)

Related issues

Blocks Arvados - Story #8833: [Keep] Azure SDK update to add metadata to ListBlobs callResolved04/28/2016

History

#1 Updated by Radhika Chippada over 5 years ago

  • Description updated (diff)

#2 Updated by Radhika Chippada over 5 years ago

  • Category set to Keep
  • Assigned To set to Radhika Chippada
  • Target version changed from Arvados Future Sprints to 2016-04-27 sprint

#3 Updated by Radhika Chippada over 5 years ago

  • Status changed from New to In Progress

#4 Updated by Radhika Chippada over 5 years ago

Adding "include:metadata" to ListBlobs request is resulting in the inclusion of Metadata in the ListBlobs response.

With that, using the following code, we are now able to include the Metadata in Blob in the ListBlobs response.

--- a/storage/blob.go
+++ b/storage/blob.go
@@ -53,9 +53,21 @@ type ContainerListResponse struct {

 // A Blob is an entry in BlobListResponse.
 type Blob struct {
-       Name       string         `xml:"Name"`
-       Properties BlobProperties `xml:"Properties"`
-       // TODO (ahmetalpbalkan) Metadata
+       Name       string               `xml:"Name"`
+       Properties BlobProperties       `xml:"Properties"`
+       Metadata   MetadataPropertyList `xml:"Metadata"`
+}
+
+// MetadataPropertyList belonging to a Blob
+type MetadataPropertyList struct {
+       List []MetadataProperty `xml:",any"`
+}
+
+// A MetadataProperty is a name and value pair, comprising
+// an XMLName of type xml.Name and Value of type string.
+type MetadataProperty struct {
+       XMLName xml.Name `xml:""`
+       Value   string   `xml:",chardata"`
 }

#5 Updated by Brett Smith over 5 years ago

  • Target version changed from 2016-04-27 sprint to Arvados Future Sprints

#6 Updated by Radhika Chippada over 5 years ago

  • Status changed from In Progress to Resolved
  • Target version changed from Arvados Future Sprints to 2016-05-11 sprint

PR was made with work from #8833 and was accepted.

Also available in: Atom PDF