Merge pull request #57920 from feiskyer/baseuri

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Do not set BaseURI twice

**What this PR does / why we need it**:

Do not set BaseURI again. BaseURI has been set by NewAccountsClientWithBaseURI and NewDisksClientWithBaseURI method.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #57951

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/assign @karataliu
This commit is contained in:
Kubernetes Submit Queue 2018-01-08 00:14:09 -08:00 committed by GitHub
commit df080693ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -328,14 +328,12 @@ func NewCloud(configReader io.Reader) (cloudprovider.Interface, error) {
az.VirtualMachineScaleSetsClient = virtualMachineScaleSetsClient
storageAccountClient := storage.NewAccountsClientWithBaseURI(az.Environment.ResourceManagerEndpoint, az.SubscriptionID)
storageAccountClient.BaseURI = az.Environment.ResourceManagerEndpoint
storageAccountClient.Authorizer = autorest.NewBearerAuthorizer(servicePrincipalToken)
storageAccountClient.PollingDelay = 5 * time.Second
configureUserAgent(&storageAccountClient.Client)
az.StorageAccountClient = storageAccountClient
disksClient := disk.NewDisksClientWithBaseURI(az.Environment.ResourceManagerEndpoint, az.SubscriptionID)
disksClient.BaseURI = az.Environment.ResourceManagerEndpoint
disksClient.Authorizer = autorest.NewBearerAuthorizer(servicePrincipalToken)
disksClient.PollingDelay = 5 * time.Second
configureUserAgent(&disksClient.Client)