UPSTREAM: 50673: Azure - Use cloud environment to instantiate storage client
@@ -106,7 +106,7 @@ func (c *BlobDiskController) CreateVolume(name, storageAccount string, storageAc
return "", "", 0, err
}
- client, err := azstorage.NewBasicClient(storageAccount, key)
+ client, err := azstorage.NewBasicClientOnSovereignCloud(storageAccount, key, c.common.cloud.Environment)
if err != nil {
return "", "", 0, err
}
@@ -223,7 +223,7 @@ func (c *BlobDiskController) createVHDBlobDisk(blobClient azstorage.BlobStorageC
// delete a vhd blob
func (c *BlobDiskController) deleteVhdBlob(accountName, accountKey, blobName string) error {
- client, err := azstorage.NewBasicClient(accountName, accountKey)
+ client, err := azstorage.NewBasicClientOnSovereignCloud(accountName, accountKey, c.common.cloud.Environment)
if err != nil {
return err
}
@@ -416,7 +416,7 @@ func (c *BlobDiskController) getBlobSvcClient(SAName string) (azstorage.BlobStor
return blobSvc, err
}
- if client, err = azstorage.NewBasicClient(SAName, key); err != nil {
+ if client, err = azstorage.NewBasicClientOnSovereignCloud(SAName, key, c.common.cloud.Environment); err != nil {
return blobSvc, err
}
