Story #8832
closed
[Keep] Azure SDK requirements analysis - update Azure SDK to include metadata in ListBlobs api call
Added by Radhika Chippada almost 9 years ago.
Updated over 8 years ago.
Assigned To:
Radhika Chippada
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)
- Description updated (diff)
- Category set to Keep
- Assigned To set to Radhika Chippada
- Target version changed from Arvados Future Sprints to 2016-04-27 sprint
- Status changed from New to In Progress
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"`
}
- Target version changed from 2016-04-27 sprint to Arvados Future Sprints
- 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