From 860eb7e84588c41da1f3ae570f918e90f8443037 Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Fri, 18 Aug 2017 13:53:05 -0400 Subject: [PATCH] Match Azure sdk changes Signed-off-by: Andy Goldstein --- pkg/cloudprovider/azure/block_storage_adapter.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/cloudprovider/azure/block_storage_adapter.go b/pkg/cloudprovider/azure/block_storage_adapter.go index bc87f9ffc..61886a34f 100644 --- a/pkg/cloudprovider/azure/block_storage_adapter.go +++ b/pkg/cloudprovider/azure/block_storage_adapter.go @@ -26,6 +26,7 @@ import ( "github.com/Azure/azure-sdk-for-go/arm/disk" "github.com/Azure/azure-sdk-for-go/arm/examples/helpers" "github.com/Azure/azure-sdk-for-go/arm/resources/subscriptions" + "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/satori/uuid" @@ -90,12 +91,13 @@ func NewBlockStorageAdapter(location string, apiTimeout time.Duration) (cloudpro disksClient := disk.NewDisksClient(cfg[azureSubscriptionIDKey]) snapsClient := disk.NewSnapshotsClient(cfg[azureSubscriptionIDKey]) - disksClient.Authorizer = spt - snapsClient.Authorizer = spt + authorizer := autorest.NewBearerAuthorizer(spt) + disksClient.Authorizer = authorizer + snapsClient.Authorizer = authorizer // validate the location groupClient := subscriptions.NewGroupClient() - groupClient.Authorizer = spt + groupClient.Authorizer = authorizer locs, err := groupClient.ListLocations(cfg[azureSubscriptionIDKey]) if err != nil {