Skip to content

Commit 53f3ebc

Browse files
committed
api fixes
1 parent 29c5a26 commit 53f3ebc

6 files changed

Lines changed: 11 additions & 11 deletions

File tree

azure/azure.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ func (a *azureOps) SetInstanceGroupSize(instanceGroupID string,
347347
instanceGroupSize := int32(count)
348348
agentPoolProperties := containerservice.ManagedClusterAgentPoolProfileProperties{
349349
Count: &instanceGroupSize,
350-
OsType: containerservice.Linux,
350+
OsType: containerservice.OSTypeLinux,
351351
}
352352

353353
agentPool := containerservice.AgentPool{
@@ -410,7 +410,7 @@ func (a *azureOps) Create(
410410
Sku: d.Sku,
411411
DiskProperties: &compute.DiskProperties{
412412
CreationData: &compute.CreationData{
413-
CreateOption: compute.Empty,
413+
CreateOption: compute.DiskCreateOptionEmpty,
414414
},
415415
DiskSizeGB: d.DiskProperties.DiskSizeGB,
416416
DiskIOPSReadWrite: d.DiskProperties.DiskIOPSReadWrite,
@@ -850,7 +850,7 @@ func (a *azureOps) Snapshot(diskName string, readonly bool, options map[string]s
850850
Location: disk.Location,
851851
SnapshotProperties: &compute.SnapshotProperties{
852852
CreationData: &compute.CreationData{
853-
CreateOption: compute.Copy,
853+
CreateOption: compute.DiskCreateOptionCopy,
854854
SourceResourceID: disk.ID,
855855
},
856856
},

azure/azure_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func initAzure(t *testing.T) (cloudops.Ops, map[string]interface{}) {
4343
DiskMBpsReadWrite: to.Int64Ptr(550),
4444
},
4545
Sku: &compute.DiskSku{
46-
Name: compute.PremiumLRS,
46+
Name: compute.DiskStorageAccountTypesPremiumLRS,
4747
},
4848
}
4949

azure/base_vmsclient.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,6 @@ func (b *baseVMsClient) describeInstance(
9090
context.Background(),
9191
b.resourceGroupName,
9292
instanceName,
93-
compute.InstanceView,
93+
compute.InstanceViewTypesInstanceView,
9494
)
9595
}

azure/scaleset_vmsclient.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package azure
33
import (
44
"context"
55

6-
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute"
6+
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
77
"github.com/Azure/go-autorest/autorest"
88
)
99

@@ -92,7 +92,7 @@ func (s *scaleSetVMsClient) describeInstance(
9292
s.resourceGroupName,
9393
s.scaleSetName,
9494
instanceID,
95-
compute.InstanceView,
95+
compute.InstanceViewTypesInstanceView,
9696
)
9797
}
9898

azure/scaleset_vmsclient_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package azure
33
import (
44
"testing"
55

6-
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute"
6+
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
77
"github.com/Azure/go-autorest/autorest/to"
88
"github.com/stretchr/testify/require"
99
)
@@ -25,8 +25,8 @@ func TestRetrieveDataDisks(t *testing.T) {
2525
expectedRes []compute.DataDisk
2626
}{
2727
{
28-
name: "nil vm properties",
29-
input: compute.VirtualMachineScaleSetVM{},
28+
name: "nil vm properties",
29+
input: compute.VirtualMachineScaleSetVM{},
3030
expectedRes: []compute.DataDisk{},
3131
},
3232
{

azure/vmsclient.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package azure
22

33
import (
4-
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute"
4+
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
55
"github.com/Azure/go-autorest/autorest"
66
)
77

0 commit comments

Comments
 (0)