fix: make changes due to azure sdk upgrade

feat: fix disks client failure

fix: revert api-version change

revert disks client change
This commit is contained in:
andyzhangx 2020-03-13 09:15:35 +00:00
parent da20cc202f
commit dd9474e78e
8 changed files with 11 additions and 11 deletions

View File

@ -344,7 +344,7 @@ func (c *BlobDiskController) ensureDefaultContainer(storageAccountName string) e
}
// account exists but not ready yet
if provisionState != storage.ProvisioningStateSucceeded {
if provisionState != storage.Succeeded {
// we don't want many attempts to validate the account readiness
// here hence we are locking
counter := 1
@ -375,7 +375,7 @@ func (c *BlobDiskController) ensureDefaultContainer(storageAccountName string) e
return false, nil // error performing the query - retryable
}
if provisionState == storage.ProvisioningStateSucceeded {
if provisionState == storage.Succeeded {
return true, nil
}

View File

@ -124,15 +124,15 @@ func (c *ManagedDiskController) CreateManagedDisk(options *ManagedDiskOptions) (
}
diskProperties.DiskIOPSReadWrite = to.Int64Ptr(diskIOPSReadWrite)
diskMBpsReadWrite := int32(defaultDiskMBpsReadWrite)
diskMBpsReadWrite := int64(defaultDiskMBpsReadWrite)
if options.DiskMBpsReadWrite != "" {
v, err := strconv.Atoi(options.DiskMBpsReadWrite)
if err != nil {
return "", fmt.Errorf("AzureDisk - failed to parse DiskMBpsReadWrite: %v", err)
}
diskMBpsReadWrite = int32(v)
diskMBpsReadWrite = int64(v)
}
diskProperties.DiskMBpsReadWrite = to.Int32Ptr(diskMBpsReadWrite)
diskProperties.DiskMBpsReadWrite = to.Int64Ptr(diskMBpsReadWrite)
} else {
if options.DiskIOPSReadWrite != "" {
return "", fmt.Errorf("AzureDisk - DiskIOPSReadWrite parameter is only applicable in UltraSSD_LRS disk type")

View File

@ -27,7 +27,7 @@ import (
const (
// APIVersion is the API version for compute.
APIVersion = "2019-12-01"
APIVersion = "2019-07-01"
)
// Interface is the client interface for Disks.

View File

@ -27,7 +27,7 @@ import (
const (
// APIVersion is the API version for compute.
APIVersion = "2019-12-01"
APIVersion = "2019-07-01"
)
// Interface is the client interface for Snapshots.

View File

@ -27,7 +27,7 @@ import (
const (
// APIVersion is the API version for VirtualMachine.
APIVersion = "2019-12-01"
APIVersion = "2019-07-01"
)
// Interface is the client interface for VirtualMachines.

View File

@ -27,7 +27,7 @@ import (
const (
// APIVersion is the API version for compute.
APIVersion = "2019-12-01"
APIVersion = "2019-07-01"
)
// Interface is the client interface for VirtualMachineSizes.

View File

@ -27,7 +27,7 @@ import (
const (
// APIVersion is the API version for VMSS.
APIVersion = "2019-12-01"
APIVersion = "2019-07-01"
)
// Interface is the client interface for VirtualMachineScaleSet.

View File

@ -27,7 +27,7 @@ import (
const (
// APIVersion is the API version for VMSS.
APIVersion = "2019-12-01"
APIVersion = "2019-07-01"
)
// Interface is the client interface for VirtualMachineScaleSetVM.