Skip to content

Commit 9ecda22

Browse files
authored
Merge pull request #134 from libopenstorage/azureOldUpdate
[PWX-29160] Upgrade azure-sdk-for-go clients api to version '2021-07-01'
2 parents d6ee60e + 8b8fa30 commit 9ecda22

476 files changed

Lines changed: 82636 additions & 33332 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

azure/azure.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import (
1313
"strings"
1414
"time"
1515

16-
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute"
17-
"github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2019-02-01/containerservice"
16+
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
17+
"github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-07-01/containerservice"
1818
"github.com/Azure/go-autorest/autorest"
1919
"github.com/Azure/go-autorest/autorest/azure"
2020
"github.com/Azure/go-autorest/autorest/azure/auth"
@@ -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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"os"
66
"testing"
77

8-
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute"
8+
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
99
"github.com/Azure/go-autorest/autorest/to"
1010
"github.com/libopenstorage/cloudops"
1111
"github.com/libopenstorage/cloudops/azure"
@@ -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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"context"
55
"fmt"
66

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

@@ -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

go.mod

Lines changed: 68 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
module github.com/libopenstorage/cloudops
22

3-
go 1.13
3+
go 1.17
44

55
require (
66
cloud.google.com/go v0.65.0
7-
github.com/Azure/azure-sdk-for-go v43.0.0+incompatible
8-
github.com/Azure/go-autorest/autorest v0.11.13
7+
github.com/Azure/azure-sdk-for-go v68.0.0+incompatible
8+
github.com/Azure/go-autorest/autorest v0.11.28
99
github.com/Azure/go-autorest/autorest/azure/auth v0.5.5
1010
github.com/Azure/go-autorest/autorest/to v0.4.0
11-
github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect
1211
github.com/IBM-Cloud/bluemix-go v0.0.0-20220329045155-d2a8118ac5c7
1312
github.com/aws/aws-sdk-go v1.40.39
1413
github.com/codeskyblue/go-sh v0.0.0-20170112005953-b097669b1569
@@ -32,8 +31,72 @@ require (
3231
k8s.io/klog v1.0.0
3332
)
3433

34+
require (
35+
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
36+
github.com/Azure/go-autorest/autorest/adal v0.9.22 // indirect
37+
github.com/Azure/go-autorest/autorest/azure/cli v0.4.2 // indirect
38+
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
39+
github.com/Azure/go-autorest/autorest/validation v0.3.1 // indirect
40+
github.com/Azure/go-autorest/logger v0.2.1 // indirect
41+
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
42+
github.com/beorn7/perks v1.0.1 // indirect
43+
github.com/cespare/xxhash/v2 v2.1.1 // indirect
44+
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 // indirect
45+
github.com/coreos/go-oidc v2.2.1+incompatible // indirect
46+
github.com/davecgh/go-spew v1.1.1 // indirect
47+
github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect
48+
github.com/dimchansky/utfbom v1.1.0 // indirect
49+
github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c // indirect
50+
github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 // indirect
51+
github.com/go-logr/logr v0.3.0 // indirect
52+
github.com/gofrs/flock v0.8.1 // indirect
53+
github.com/gogo/protobuf v1.3.2 // indirect
54+
github.com/golang-jwt/jwt/v4 v4.4.3 // indirect
55+
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
56+
github.com/golang/protobuf v1.5.2 // indirect
57+
github.com/google/gofuzz v1.1.0 // indirect
58+
github.com/googleapis/gax-go/v2 v2.0.5 // indirect
59+
github.com/googleapis/gnostic v0.5.1 // indirect
60+
github.com/grpc-ecosystem/go-grpc-middleware v1.2.2 // indirect
61+
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
62+
github.com/imdario/mergo v0.3.10 // indirect
63+
github.com/jmespath/go-jmespath v0.4.0 // indirect
64+
github.com/json-iterator/go v1.1.10 // indirect
65+
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
66+
github.com/mitchellh/go-homedir v1.1.0 // indirect
67+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
68+
github.com/modern-go/reflect2 v1.0.1 // indirect
69+
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
70+
github.com/pmezard/go-difflib v1.0.0 // indirect
71+
github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 // indirect
72+
github.com/prometheus/client_model v0.2.0 // indirect
73+
github.com/prometheus/common v0.15.0 // indirect
74+
github.com/prometheus/procfs v0.2.0 // indirect
75+
github.com/sony/gobreaker v0.5.0 // indirect
76+
github.com/spf13/pflag v1.0.5 // indirect
77+
go.opencensus.io v0.22.4 // indirect
78+
golang.org/x/crypto v0.6.0 // indirect
79+
golang.org/x/net v0.6.0 // indirect
80+
golang.org/x/sys v0.5.0 // indirect
81+
golang.org/x/term v0.5.0 // indirect
82+
golang.org/x/text v0.7.0 // indirect
83+
golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 // indirect
84+
google.golang.org/appengine v1.6.7 // indirect
85+
google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e // indirect
86+
google.golang.org/grpc v1.36.0 // indirect
87+
google.golang.org/protobuf v1.26.0 // indirect
88+
gopkg.in/inf.v0 v0.9.1 // indirect
89+
gopkg.in/square/go-jose.v2 v2.5.1 // indirect
90+
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect
91+
k8s.io/api v0.20.4 // indirect
92+
k8s.io/klog/v2 v2.4.0 // indirect
93+
k8s.io/kube-openapi v0.0.0-20210216185858-15cd8face8d6 // indirect
94+
k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 // indirect
95+
sigs.k8s.io/structured-merge-diff/v4 v4.0.2 // indirect
96+
sigs.k8s.io/yaml v1.2.0 // indirect
97+
)
98+
3599
replace (
36-
github.com/Azure/azure-sdk-for-go => github.com/Azure/azure-sdk-for-go v40.2.0+incompatible
37100
github.com/Azure/go-autorest => github.com/Azure/go-autorest v14.2.0+incompatible
38101
github.com/kubernetes-incubator/external-storage => github.com/libopenstorage/external-storage v5.1.1-0.20190919185747-9394ee8dd536+incompatible
39102
github.com/prometheus/prometheus v2.9.2+incompatible => github.com/prometheus/prometheus v1.8.2-0.20190424153033-d3245f150225

0 commit comments

Comments
 (0)