11644: Use storage account and bucket name as DeviceID for Azure volumes.
[arvados.git] / services / keepstore / azure_blob_volume.go
index 16f1a0bd97c427446cd8325eec1e4ae130ef5f47..3090b95cb22909614c909d1e8b4b56cffe4e0c40 100644 (file)
@@ -174,6 +174,11 @@ func (v *AzureBlobVolume) Start() error {
        return nil
 }
 
+// DeviceID returns a globally unique ID for the storage container.
+func (v *AzureBlobVolume) DeviceID() string {
+       return "azure://" + v.StorageBaseURL + "/" + v.StorageAccountName + "/" + v.ContainerName
+}
+
 // Return true if expires_at metadata attribute is found on the block
 func (v *AzureBlobVolume) checkTrashed(loc string) (bool, map[string]string, error) {
        metadata, err := v.bsClient.GetBlobMetadata(v.ContainerName, loc)