Project

General

Profile

Actions

Idea #8832

closed

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

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

Status:
Resolved
Priority:
Normal
Assigned To:
Radhika Chippada
Category:
Keep
Target version:
Start date:
Due date:
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 - Idea #8833: [Keep] Azure SDK update to add metadata to ListBlobs callResolvedRadhika Chippada04/28/2016Actions
Actions #1

Updated by Radhika Chippada over 8 years ago

  • Description updated (diff)
Actions #2

Updated by Radhika Chippada over 8 years ago

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

Updated by Radhika Chippada over 8 years ago

  • Status changed from New to In Progress
Actions #4

Updated by Radhika Chippada over 8 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"`
 }
Actions #5

Updated by Brett Smith over 8 years ago

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

Updated by Radhika Chippada over 8 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.

Actions

Also available in: Atom PDF