diff --git a/cluster-autoscaler/cloudprovider/azure/azure_agent_pool.go b/cluster-autoscaler/cloudprovider/azure/azure_agent_pool.go
index 48e2c770bffd..dbc697016e29 100644
--- a/cluster-autoscaler/cloudprovider/azure/azure_agent_pool.go
+++ b/cluster-autoscaler/cloudprovider/azure/azure_agent_pool.go
@@ -24,7 +24,7 @@ import (
"sync"
"time"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
"github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources"
azStorage "github.com/Azure/azure-sdk-for-go/storage"
"github.com/Azure/go-autorest/autorest/to"
diff --git a/cluster-autoscaler/cloudprovider/azure/azure_agent_pool_test.go b/cluster-autoscaler/cloudprovider/azure/azure_agent_pool_test.go
index 605f514a97a4..cf410db02f7c 100644
--- a/cluster-autoscaler/cloudprovider/azure/azure_agent_pool_test.go
+++ b/cluster-autoscaler/cloudprovider/azure/azure_agent_pool_test.go
@@ -30,7 +30,7 @@ import (
"sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmclient/mockvmclient"
"sigs.k8s.io/cloud-provider-azure/pkg/retry"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
"github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources"
"github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-02-01/storage"
"github.com/Azure/go-autorest/autorest/date"
@@ -69,7 +69,7 @@ func getExpectedVMs() []compute.VirtualMachine {
VirtualMachineProperties: &compute.VirtualMachineProperties{
StorageProfile: &compute.StorageProfile{
OsDisk: &compute.OSDisk{
- OsType: compute.Linux,
+ OsType: compute.OperatingSystemTypesLinux,
Vhd: &compute.VirtualHardDisk{URI: to.StringPtr("https://foo.blob/vhds/bar.vhd")},
},
},
@@ -86,7 +86,7 @@ func getExpectedVMs() []compute.VirtualMachine {
Tags: map[string]*string{"poolName": to.StringPtr("as")},
VirtualMachineProperties: &compute.VirtualMachineProperties{
StorageProfile: &compute.StorageProfile{
- OsDisk: &compute.OSDisk{OsType: compute.Windows},
+ OsDisk: &compute.OSDisk{OsType: compute.OperatingSystemTypesWindows},
},
},
},
diff --git a/cluster-autoscaler/cloudprovider/azure/azure_cache.go b/cluster-autoscaler/cloudprovider/azure/azure_cache.go
index ddb2227cc4cc..d29da1491901 100644
--- a/cluster-autoscaler/cloudprovider/azure/azure_cache.go
+++ b/cluster-autoscaler/cloudprovider/azure/azure_cache.go
@@ -23,7 +23,7 @@ import (
"sync"
"time"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
"github.com/Azure/go-autorest/autorest/to"
"k8s.io/autoscaler/cluster-autoscaler/cloudprovider"
diff --git a/cluster-autoscaler/cloudprovider/azure/azure_fakes.go b/cluster-autoscaler/cloudprovider/azure/azure_fakes.go
index 25d19c5a5cf2..d3e71378a026 100644
--- a/cluster-autoscaler/cloudprovider/azure/azure_fakes.go
+++ b/cluster-autoscaler/cloudprovider/azure/azure_fakes.go
@@ -22,7 +22,7 @@ import (
"net/http"
"sync"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
"github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources"
"github.com/stretchr/testify/mock"
)
diff --git a/cluster-autoscaler/cloudprovider/azure/azure_kubernetes_service_pool.go b/cluster-autoscaler/cloudprovider/azure/azure_kubernetes_service_pool.go
index ea65f8f23a7e..145745046b10 100644
--- a/cluster-autoscaler/cloudprovider/azure/azure_kubernetes_service_pool.go
+++ b/cluster-autoscaler/cloudprovider/azure/azure_kubernetes_service_pool.go
@@ -22,7 +22,7 @@ import (
"sync"
"time"
- "github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice"
+ "github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice"
klog "k8s.io/klog/v2"
apiv1 "k8s.io/api/core/v1"
diff --git a/cluster-autoscaler/cloudprovider/azure/azure_kubernetes_service_pool_test.go b/cluster-autoscaler/cloudprovider/azure/azure_kubernetes_service_pool_test.go
index 85487b07cf4f..6b1841c99033 100644
--- a/cluster-autoscaler/cloudprovider/azure/azure_kubernetes_service_pool_test.go
+++ b/cluster-autoscaler/cloudprovider/azure/azure_kubernetes_service_pool_test.go
@@ -22,8 +22,8 @@ import (
"testing"
"time"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
- "github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice"
"github.com/Azure/go-autorest/autorest/to"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
diff --git a/cluster-autoscaler/cloudprovider/azure/azure_manager_test.go b/cluster-autoscaler/cloudprovider/azure/azure_manager_test.go
index 76940e1143c5..75d4078a383a 100644
--- a/cluster-autoscaler/cloudprovider/azure/azure_manager_test.go
+++ b/cluster-autoscaler/cloudprovider/azure/azure_manager_test.go
@@ -25,7 +25,7 @@ import (
"testing"
"time"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
"github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
diff --git a/cluster-autoscaler/cloudprovider/azure/azure_scale_set.go b/cluster-autoscaler/cloudprovider/azure/azure_scale_set.go
index 103d0b36237b..05767df3758f 100644
--- a/cluster-autoscaler/cloudprovider/azure/azure_scale_set.go
+++ b/cluster-autoscaler/cloudprovider/azure/azure_scale_set.go
@@ -31,7 +31,7 @@ import (
schedulerframework "k8s.io/kubernetes/pkg/scheduler/framework"
"sigs.k8s.io/cloud-provider-azure/pkg/retry"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
"github.com/Azure/go-autorest/autorest/azure"
)
diff --git a/cluster-autoscaler/cloudprovider/azure/azure_scale_set_test.go b/cluster-autoscaler/cloudprovider/azure/azure_scale_set_test.go
index ac8f9fc75975..69c80eb3153b 100644
--- a/cluster-autoscaler/cloudprovider/azure/azure_scale_set_test.go
+++ b/cluster-autoscaler/cloudprovider/azure/azure_scale_set_test.go
@@ -26,7 +26,7 @@ import (
"sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssvmclient/mockvmssvmclient"
"testing"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
"github.com/Azure/go-autorest/autorest/to"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
diff --git a/cluster-autoscaler/cloudprovider/azure/azure_template.go b/cluster-autoscaler/cloudprovider/azure/azure_template.go
index 77e542d9f264..0541617e9053 100644
--- a/cluster-autoscaler/cloudprovider/azure/azure_template.go
+++ b/cluster-autoscaler/cloudprovider/azure/azure_template.go
@@ -18,7 +18,7 @@ package azure
import (
"fmt"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
apiv1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
diff --git a/cluster-autoscaler/cloudprovider/azure/azure_util.go b/cluster-autoscaler/cloudprovider/azure/azure_util.go
index 4db18bcabc38..9ddd33e768d9 100644
--- a/cluster-autoscaler/cloudprovider/azure/azure_util.go
+++ b/cluster-autoscaler/cloudprovider/azure/azure_util.go
@@ -31,7 +31,7 @@ import (
"strings"
"time"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
azStorage "github.com/Azure/azure-sdk-for-go/storage"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/to"
@@ -482,12 +482,12 @@ func windowsVMNameParts(vmName string) (poolPrefix string, orch string, poolInde
func GetVMNameIndex(osType compute.OperatingSystemTypes, vmName string) (int, error) {
var agentIndex int
var err error
- if osType == compute.Linux {
+ if osType == compute.OperatingSystemTypesLinux {
_, _, agentIndex, err = k8sLinuxVMNameParts(vmName)
if err != nil {
return 0, err
}
- } else if osType == compute.Windows {
+ } else if osType == compute.OperatingSystemTypesWindows {
_, _, _, agentIndex, err = windowsVMNameParts(vmName)
if err != nil {
return 0, err
diff --git a/cluster-autoscaler/cloudprovider/azure/azure_util_test.go b/cluster-autoscaler/cloudprovider/azure/azure_util_test.go
index 5371cc96ef14..af332eaef462 100644
--- a/cluster-autoscaler/cloudprovider/azure/azure_util_test.go
+++ b/cluster-autoscaler/cloudprovider/azure/azure_util_test.go
@@ -23,7 +23,7 @@ import (
"testing"
"time"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
"github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-02-01/storage"
"github.com/Azure/go-autorest/autorest/to"
"github.com/golang/mock/gomock"
@@ -121,7 +121,7 @@ func TestWindowsVMNameParts(t *testing.T) {
func TestGetVMNameIndexLinux(t *testing.T) {
expectedAgentIndex := 65
- agentIndex, err := GetVMNameIndex(compute.Linux, "k8s-agentpool1-38988164-65")
+ agentIndex, err := GetVMNameIndex(compute.OperatingSystemTypesLinux, "k8s-agentpool1-38988164-65")
if agentIndex != expectedAgentIndex {
t.Fatalf("incorrect agentIndex. expected=%d actual=%d", expectedAgentIndex, agentIndex)
}
@@ -133,7 +133,7 @@ func TestGetVMNameIndexLinux(t *testing.T) {
func TestGetVMNameIndexWindows(t *testing.T) {
expectedAgentIndex := 20
- agentIndex, err := GetVMNameIndex(compute.Windows, "38988k8s90320")
+ agentIndex, err := GetVMNameIndex(compute.OperatingSystemTypesWindows, "38988k8s90320")
if agentIndex != expectedAgentIndex {
t.Fatalf("incorrect agentIndex. expected=%d actual=%d", expectedAgentIndex, agentIndex)
}
diff --git a/cluster-autoscaler/go.mod b/cluster-autoscaler/go.mod
index 31cb1fe6cbfa..bc2f647113d5 100644
--- a/cluster-autoscaler/go.mod
+++ b/cluster-autoscaler/go.mod
@@ -4,9 +4,9 @@ go 1.16
require (
cloud.google.com/go v0.81.0
- github.com/Azure/azure-sdk-for-go v55.8.0+incompatible
- github.com/Azure/go-autorest/autorest v0.11.22
- github.com/Azure/go-autorest/autorest/adal v0.9.17
+ github.com/Azure/azure-sdk-for-go v63.4.0+incompatible
+ github.com/Azure/go-autorest/autorest v0.11.27
+ github.com/Azure/go-autorest/autorest/adal v0.9.18
github.com/Azure/go-autorest/autorest/azure/auth v0.5.8
github.com/Azure/go-autorest/autorest/date v0.3.0
github.com/Azure/go-autorest/autorest/to v0.4.0
@@ -21,25 +21,25 @@ require (
github.com/prometheus/client_golang v1.11.0
github.com/satori/go.uuid v1.2.0
github.com/spf13/pflag v1.0.5
- github.com/stretchr/testify v1.7.0
- golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
- golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f
+ github.com/stretchr/testify v1.7.1
+ golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce
+ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8
google.golang.org/api v0.46.0
gopkg.in/gcfg.v1 v1.2.0
gopkg.in/yaml.v2 v2.4.0
- k8s.io/api v0.23.0
- k8s.io/apimachinery v0.23.0
- k8s.io/apiserver v0.23.0
- k8s.io/client-go v0.23.0
- k8s.io/cloud-provider v0.23.0
- k8s.io/component-base v0.23.0
- k8s.io/component-helpers v0.23.0
+ k8s.io/api v0.23.5
+ k8s.io/apimachinery v0.23.5
+ k8s.io/apiserver v0.23.5
+ k8s.io/client-go v0.23.5
+ k8s.io/cloud-provider v0.23.5
+ k8s.io/component-base v0.23.5
+ k8s.io/component-helpers v0.23.5
k8s.io/klog/v2 v2.30.0
- k8s.io/kubelet v0.23.0
+ k8s.io/kubelet v0.23.5
k8s.io/kubernetes v1.23.0
k8s.io/legacy-cloud-providers v0.0.0
- k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b
- sigs.k8s.io/cloud-provider-azure v1.23.2
+ k8s.io/utils v0.0.0-20211116205334-6203023598ed
+ sigs.k8s.io/cloud-provider-azure v1.23.11
)
replace github.com/aws/aws-sdk-go/service/eks => github.com/aws/aws-sdk-go/service/eks v1.38.49
diff --git a/cluster-autoscaler/go.sum b/cluster-autoscaler/go.sum
index 71132ee5ae8e..206b479c4988 100644
--- a/cluster-autoscaler/go.sum
+++ b/cluster-autoscaler/go.sum
@@ -42,8 +42,8 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20201218220906-28db891af037/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/Azure/azure-sdk-for-go v55.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
-github.com/Azure/azure-sdk-for-go v55.8.0+incompatible h1:EuccMPzxu67cIE95/mrtwQivLv7ETmURi5IUgLNVug8=
-github.com/Azure/azure-sdk-for-go v55.8.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
+github.com/Azure/azure-sdk-for-go v63.4.0+incompatible h1:fle3M5Q7vr8auaiPffKyUQmLbvYeqpw30bKU6PrWJFo=
+github.com/Azure/azure-sdk-for-go v63.4.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8=
github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8=
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8=
@@ -52,22 +52,22 @@ github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK
github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
github.com/Azure/go-autorest/autorest v0.11.17/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw=
github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA=
-github.com/Azure/go-autorest/autorest v0.11.22 h1:bXiQwDjrRmBQOE67bwlvUKAC1EU1yZTPQ38c+bstZws=
-github.com/Azure/go-autorest/autorest v0.11.22/go.mod h1:BAWYUWGPEtKPzjVkp0Q6an0MJcJDsoh5Z1BFAEFs4Xs=
+github.com/Azure/go-autorest/autorest v0.11.27 h1:F3R3q42aWytozkV8ihzcgMO4OA4cuqr3bNlsEuF6//A=
+github.com/Azure/go-autorest/autorest v0.11.27/go.mod h1:7l8ybrIdUmGqZMTD0sRtAr8NvbHjfofbf8RSP2q7w7U=
github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A=
github.com/Azure/go-autorest/autorest/adal v0.9.11/go.mod h1:nBKAnTomx8gDtl+3ZCJv2v0KACFHWTB2drffI1B68Pk=
github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M=
-github.com/Azure/go-autorest/autorest/adal v0.9.14/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M=
-github.com/Azure/go-autorest/autorest/adal v0.9.17 h1:esOPl2dhcz9P3jqBSJ8tPGEj2EqzPPT6zfyuloiogKY=
-github.com/Azure/go-autorest/autorest/adal v0.9.17/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ=
+github.com/Azure/go-autorest/autorest/adal v0.9.18 h1:kLnPsRjzZZUF3K5REu/Kc+qMQrvuza2bwSnNdhmzLfQ=
+github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ=
github.com/Azure/go-autorest/autorest/azure/auth v0.5.8 h1:TzPg6B6fTZ0G1zBf3T54aI7p3cAT6u//TOXGPmFMOXg=
github.com/Azure/go-autorest/autorest/azure/auth v0.5.8/go.mod h1:kxyKZTSfKh8OVFWPAgOgQ/frrJgeYQJPyR5fLFmXko4=
github.com/Azure/go-autorest/autorest/azure/cli v0.4.2 h1:dMOmEJfkLKW/7JsokJqkyoYSgmR08hi9KrhjZb+JALY=
github.com/Azure/go-autorest/autorest/azure/cli v0.4.2/go.mod h1:7qkJkT+j6b+hIpzMOwPChJhTqS8VbsqqgULzMNRugoM=
github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw=
github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74=
-github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk=
github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=
+github.com/Azure/go-autorest/autorest/mocks v0.4.2 h1:PGN4EDXnuQbojHbU0UWoNvmu9AGVwYHG9/fkDYhtAfw=
+github.com/Azure/go-autorest/autorest/mocks v0.4.2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU=
github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk=
github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE=
github.com/Azure/go-autorest/autorest/validation v0.1.0/go.mod h1:Ha3z/SqBeaalWQvokg3NZAlQTalVMtOIAs1aGK7G6u8=
@@ -141,8 +141,9 @@ github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6
github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA=
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
-github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
+github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
+github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw=
github.com/checkpoint-restore/go-criu/v5 v5.0.0 h1:TW8f/UvntYoVDMN1K2HlT82qH1rb0sOjpGw3m6Ym+i4=
github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M=
@@ -158,7 +159,11 @@ github.com/clusterhq/flocker-go v0.0.0-20160920122132-2b8b7259d313/go.mod h1:P1w
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
+github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
+github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
+github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
+github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo=
github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA=
github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI=
@@ -198,6 +203,7 @@ github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
+github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw=
github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
@@ -239,12 +245,14 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ=
+github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/euank/go-kmsg-parser v2.0.0+incompatible h1:cHD53+PLQuuQyLZeriD1V/esuG4MuU0Pjs5y6iknohY=
github.com/euank/go-kmsg-parser v2.0.0+incompatible/go.mod h1:MhmAMZ8V4CYH4ybgdRwPr2TU5ThnS43puaKEMpja1uw=
github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
-github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84=
github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
+github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U=
+github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4=
github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
@@ -259,8 +267,8 @@ github.com/frankban/quicktest v1.11.3 h1:8sXhOn0uLys67V8EsXLc6eszDs8VXWxL3iRvebP
github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
-github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI=
-github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU=
+github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
+github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0=
github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg=
github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ=
@@ -304,8 +312,9 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV
github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
-github.com/golang-jwt/jwt/v4 v4.0.0 h1:RAqyYixv1p7uEnocuy8P1nru5wprCh/MH2BIlW5z5/o=
github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
+github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU=
+github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4=
@@ -362,8 +371,9 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
+github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk=
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
@@ -383,6 +393,7 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe
github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
@@ -568,11 +579,13 @@ github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9k
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
+github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
-github.com/onsi/gomega v1.16.0 h1:6gjqkI8iiRHMvdccRJM8rVKjCWk6ZIm6FTm3ddIe4/c=
-github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
+github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
+github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw=
+github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI=
@@ -636,6 +649,7 @@ github.com/rubiojr/go-vhd v0.0.0-20200706105327-02e210299021 h1:if3/24+h9Sq6eDx8
github.com/rubiojr/go-vhd v0.0.0-20200706105327-02e210299021/go.mod h1:DM5xW0nvfNNm2uytzsvhI3OnX8uzaRAg8UX/CnDqbto=
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
+github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww=
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
@@ -666,8 +680,9 @@ github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkU
github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE=
github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo=
-github.com/spf13/cobra v1.2.1 h1:+KmjbUw1hriSNMF55oPrkZcb27aECyrj8V2ytv7kWDw=
github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk=
+github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q=
+github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g=
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
@@ -689,8 +704,9 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
+github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtseVEc4yCz2qF8ZrQvIDBJLl4S1c3GCXmoI=
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
@@ -722,10 +738,12 @@ github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU=
go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4=
-go.etcd.io/etcd/api/v3 v3.5.0 h1:GsV3S+OfZEOCNXdtNkBSR7kgLobAa/SO6tCxRa0GAYw=
go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs=
-go.etcd.io/etcd/client/pkg/v3 v3.5.0 h1:2aQv6F436YnN7I4VbI8PPYrBhu+SmrTaADcf8Mi/6PU=
+go.etcd.io/etcd/api/v3 v3.5.1 h1:v28cktvBq+7vGyJXF8G+rWJmj+1XUmMtqcLnH8hDocM=
+go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs=
go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
+go.etcd.io/etcd/client/pkg/v3 v3.5.1 h1:XIQcHCFSG53bJETYeRJtIxdLv2EWRGxcfzR8lSnTH4E=
+go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
go.etcd.io/etcd/client/v2 v2.305.0 h1:ftQ0nOOHMcbMS3KIaDQ0g5Qcd6bhaBrQT6b89DfwLTs=
go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ=
go.etcd.io/etcd/client/v3 v3.5.0 h1:62Eh0XOro+rDwkrypAGDfgmNh5Joq+z+W9HZdlXMzek=
@@ -793,8 +811,10 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh
golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8=
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
-golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
+golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
+golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce h1:Roh6XWxHFKrPgC/EQhVubSAGQ6Ozk6IdxHSzt1mR0EI=
+golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
@@ -890,8 +910,10 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT
golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.0.0-20210825183410-e898025ed96a h1:bRuuGXV8wwSdGTB+CtJf+FjgO1APK1CoO39T4BN/XBw=
golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
+golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
+golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc=
+golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -907,8 +929,9 @@ golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ
golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210427180440-81ed05c6b58c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f h1:Qmd2pbz05z7z6lm0DrgQVVPuBm92jqujBKMHMOlOQEw=
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg=
+golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -995,13 +1018,15 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e h1:XMgFehsDnnLGtjvjOfqWSUzt0alpTR1RSEuznObga2c=
golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0=
+golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE=
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
+golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
+golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -1171,8 +1196,9 @@ google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6D
google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A=
google.golang.org/genproto v0.0.0-20210429181445-86c259c2b4ab/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A=
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
-google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2 h1:NHN4wOCScVzKhPenJ2dt+BTs3X/XkBVI/Rh4iDt55T8=
google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
+google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa h1:I0YcKz0I7OAhddo7ya8kMnvprhcWM045PmkBdMO9zN0=
+google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
@@ -1195,8 +1221,9 @@ google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG
google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
-google.golang.org/grpc v1.40.0 h1:AGJ0Ih4mHjSeibYkFGh1dD9KJ/eOtZ93I6hoHhukQ5Q=
google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
+google.golang.org/grpc v1.42.0 h1:XT2/MFpuPFsEX2fWh3YQtHkZ+WYZFQRfaUgLZYj/p6A=
+google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
@@ -1313,8 +1340,9 @@ k8s.io/sample-apiserver v0.23.0/go.mod h1:o0U/1hkfndbnLg1OfVHQiG08lmDkYJq7qljCuw
k8s.io/system-validators v1.6.0/go.mod h1:bPldcLgkIUK22ALflnsXk8pvkTEndYdNuaHH6gRrl0Q=
k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
-k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b h1:wxEMGetGMur3J1xuGLQY7GEQYg9bZxKn3tKo5k/eYcs=
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
+k8s.io/utils v0.0.0-20211116205334-6203023598ed h1:ck1fRPWPJWsMd8ZRFsWc6mh/zHp5fZ/shhbrgPUxDAE=
+k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw=
modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk=
modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k=
@@ -1324,10 +1352,11 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
-sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.25 h1:DEQ12ZRxJjsglk5JIi5bLgpKaHihGervKmg5uryaEHw=
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.25/go.mod h1:Mlj9PNLmG9bZ6BHFwFKDo5afkpWyUISkb9Me0GnK66I=
-sigs.k8s.io/cloud-provider-azure v1.23.2 h1:DQuKWZ168Ei8iterMX5Ri02DtcoKWbU1S2Jkqwk6aDw=
-sigs.k8s.io/cloud-provider-azure v1.23.2/go.mod h1:yQ1Tjce4uX29FGI0pvAEH0CVt+a7RGfOwVdkAon8ygw=
+sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.30 h1:dUk62HQ3ZFhD48Qr8MIXCiKA8wInBQCtuE4QGfFW7yA=
+sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.30/go.mod h1:fEO7lRTdivWO2qYVCVG7dEADOMo/MLDCVr8So2g88Uw=
+sigs.k8s.io/cloud-provider-azure v1.23.11 h1:qyK1Sc765r6SDnSHjYxYf+iSP/XKIpus4pW7Z36g2Wk=
+sigs.k8s.io/cloud-provider-azure v1.23.11/go.mod h1:erGu3WmmGrDhGeW2NZw7H0zBaFKqgK70FwMzruxLN64=
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 h1:fD1pz4yfdADVNfFmcP2aBEtudwUQ1AlLnRBALr33v3s=
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs=
sigs.k8s.io/kustomize/api v0.10.1/go.mod h1:2FigT1QN6xKdcnGS2Ppp1uIWrtWN28Ms8A3OZUZhwr8=
@@ -1335,8 +1364,9 @@ sigs.k8s.io/kustomize/cmd/config v0.10.2/go.mod h1:K2aW7nXJ0AaT+VA/eO0/dzFLxmpFc
sigs.k8s.io/kustomize/kustomize/v4 v4.4.1/go.mod h1:qOKJMMz2mBP+vcS7vK+mNz4HBLjaQSWRY22EF6Tb7Io=
sigs.k8s.io/kustomize/kyaml v0.13.0/go.mod h1:FTJxEZ86ScK184NpGSAQcfEqee0nul8oLCK30D47m4E=
sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=
-sigs.k8s.io/structured-merge-diff/v4 v4.1.2 h1:Hr/htKFmJEbtMgS/UD0N+gtgctAqz81t3nu+sPzynno=
sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4=
+sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y=
+sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/LICENSE.txt b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/LICENSE.txt
index ccb63b166732..05b0ebf5bc76 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/LICENSE.txt
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/LICENSE.txt
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2021 Microsoft
+Copyright (c) Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
\ No newline at end of file
+SOFTWARE.
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/CHANGELOG.md b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/CHANGELOG.md
index 36998b6d59fb..52911e4cc5e4 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/CHANGELOG.md
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/CHANGELOG.md
@@ -1,43 +1,2 @@
# Change History
-## Additive Changes
-
-### New Funcs
-
-1. AccessURI.MarshalJSON() ([]byte, error)
-1. BootDiagnosticsInstanceView.MarshalJSON() ([]byte, error)
-1. DataDiskImage.MarshalJSON() ([]byte, error)
-1. GalleryIdentifier.MarshalJSON() ([]byte, error)
-1. LogAnalyticsOperationResult.MarshalJSON() ([]byte, error)
-1. LogAnalyticsOutput.MarshalJSON() ([]byte, error)
-1. OperationListResult.MarshalJSON() ([]byte, error)
-1. OperationValueDisplay.MarshalJSON() ([]byte, error)
-1. OrchestrationServiceSummary.MarshalJSON() ([]byte, error)
-1. RecoveryWalkResponse.MarshalJSON() ([]byte, error)
-1. RegionalReplicationStatus.MarshalJSON() ([]byte, error)
-1. ReplicationStatus.MarshalJSON() ([]byte, error)
-1. ResourceSku.MarshalJSON() ([]byte, error)
-1. ResourceSkuCapabilities.MarshalJSON() ([]byte, error)
-1. ResourceSkuCapacity.MarshalJSON() ([]byte, error)
-1. ResourceSkuCosts.MarshalJSON() ([]byte, error)
-1. ResourceSkuLocationInfo.MarshalJSON() ([]byte, error)
-1. ResourceSkuRestrictionInfo.MarshalJSON() ([]byte, error)
-1. ResourceSkuRestrictions.MarshalJSON() ([]byte, error)
-1. ResourceSkuZoneDetails.MarshalJSON() ([]byte, error)
-1. RollbackStatusInfo.MarshalJSON() ([]byte, error)
-1. RollingUpgradeProgressInfo.MarshalJSON() ([]byte, error)
-1. RollingUpgradeRunningStatus.MarshalJSON() ([]byte, error)
-1. RollingUpgradeStatusInfoProperties.MarshalJSON() ([]byte, error)
-1. ShareInfoElement.MarshalJSON() ([]byte, error)
-1. SubResourceReadOnly.MarshalJSON() ([]byte, error)
-1. UpgradeOperationHistoricalStatusInfo.MarshalJSON() ([]byte, error)
-1. UpgradeOperationHistoricalStatusInfoProperties.MarshalJSON() ([]byte, error)
-1. UpgradeOperationHistoryStatus.MarshalJSON() ([]byte, error)
-1. VirtualMachineHealthStatus.MarshalJSON() ([]byte, error)
-1. VirtualMachineIdentityUserAssignedIdentitiesValue.MarshalJSON() ([]byte, error)
-1. VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue.MarshalJSON() ([]byte, error)
-1. VirtualMachineScaleSetInstanceViewStatusesSummary.MarshalJSON() ([]byte, error)
-1. VirtualMachineScaleSetSku.MarshalJSON() ([]byte, error)
-1. VirtualMachineScaleSetSkuCapacity.MarshalJSON() ([]byte, error)
-1. VirtualMachineScaleSetVMExtensionsSummary.MarshalJSON() ([]byte, error)
-1. VirtualMachineStatusCodeCount.MarshalJSON() ([]byte, error)
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/_meta.json b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/_meta.json
index 19bf9006ede8..ad0ecd947317 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/_meta.json
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/_meta.json
@@ -2,10 +2,10 @@
"commit": "3c764635e7d442b3e74caf593029fcd440b3ef82",
"readme": "/_/azure-rest-api-specs/specification/compute/resource-manager/readme.md",
"tag": "package-2019-12-01",
- "use": "@microsoft.azure/autorest.go@2.1.183",
+ "use": "@microsoft.azure/autorest.go@2.1.187",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
- "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2019-12-01 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/compute/resource-manager/readme.md",
+ "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2019-12-01 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/compute/resource-manager/readme.md",
"additional_properties": {
- "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION"
+ "additional_options": "--go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION"
}
}
\ No newline at end of file
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/containerservices.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/containerservices.go
index d27f363dab63..b1c854615c25 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/containerservices.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/containerservices.go
@@ -88,7 +88,7 @@ func (client ContainerServicesClient) CreateOrUpdate(ctx context.Context, resour
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -122,6 +122,7 @@ func (client ContainerServicesClient) CreateOrUpdatePreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client ContainerServicesClient) CreateOrUpdateSender(req *http.Request) (future ContainerServicesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -171,7 +172,7 @@ func (client ContainerServicesClient) Delete(ctx context.Context, resourceGroupN
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -203,6 +204,7 @@ func (client ContainerServicesClient) DeletePreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client ContainerServicesClient) DeleteSender(req *http.Request) (future ContainerServicesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhosts.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhosts.go
index 934ac008b8ae..eebe2534f7b3 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhosts.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/dedicatedhosts.go
@@ -68,7 +68,7 @@ func (client DedicatedHostsClient) CreateOrUpdate(ctx context.Context, resourceG
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -103,6 +103,7 @@ func (client DedicatedHostsClient) CreateOrUpdatePreparer(ctx context.Context, r
// http.Response Body if it receives an error.
func (client DedicatedHostsClient) CreateOrUpdateSender(req *http.Request) (future DedicatedHostsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -150,7 +151,7 @@ func (client DedicatedHostsClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -183,6 +184,7 @@ func (client DedicatedHostsClient) DeletePreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client DedicatedHostsClient) DeleteSender(req *http.Request) (future DedicatedHostsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -431,7 +433,7 @@ func (client DedicatedHostsClient) Update(ctx context.Context, resourceGroupName
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -466,6 +468,7 @@ func (client DedicatedHostsClient) UpdatePreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client DedicatedHostsClient) UpdateSender(req *http.Request) (future DedicatedHostsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/diskencryptionsets.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/diskencryptionsets.go
index da0a8164cd24..7b232cdfb8bc 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/diskencryptionsets.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/diskencryptionsets.go
@@ -70,7 +70,7 @@ func (client DiskEncryptionSetsClient) CreateOrUpdate(ctx context.Context, resou
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -104,6 +104,7 @@ func (client DiskEncryptionSetsClient) CreateOrUpdatePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client DiskEncryptionSetsClient) CreateOrUpdateSender(req *http.Request) (future DiskEncryptionSetsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -152,7 +153,7 @@ func (client DiskEncryptionSetsClient) Delete(ctx context.Context, resourceGroup
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -184,6 +185,7 @@ func (client DiskEncryptionSetsClient) DeletePreparer(ctx context.Context, resou
// http.Response Body if it receives an error.
func (client DiskEncryptionSetsClient) DeleteSender(req *http.Request) (future DiskEncryptionSetsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -540,7 +542,7 @@ func (client DiskEncryptionSetsClient) Update(ctx context.Context, resourceGroup
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -574,6 +576,7 @@ func (client DiskEncryptionSetsClient) UpdatePreparer(ctx context.Context, resou
// http.Response Body if it receives an error.
func (client DiskEncryptionSetsClient) UpdateSender(req *http.Request) (future DiskEncryptionSetsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/disks.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/disks.go
index 915d456cda4f..d3c7af7f3832 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/disks.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/disks.go
@@ -72,7 +72,7 @@ func (client DisksClient) CreateOrUpdate(ctx context.Context, resourceGroupName
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -108,6 +108,7 @@ func (client DisksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGr
// http.Response Body if it receives an error.
func (client DisksClient) CreateOrUpdateSender(req *http.Request) (future DisksCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -156,7 +157,7 @@ func (client DisksClient) Delete(ctx context.Context, resourceGroupName string,
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -188,6 +189,7 @@ func (client DisksClient) DeletePreparer(ctx context.Context, resourceGroupName
// http.Response Body if it receives an error.
func (client DisksClient) DeleteSender(req *http.Request) (future DisksDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -320,7 +322,7 @@ func (client DisksClient) GrantAccess(ctx context.Context, resourceGroupName str
result, err = client.GrantAccessSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksClient", "GrantAccess", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "GrantAccess", result.Response(), "Failure sending request")
return
}
@@ -354,6 +356,7 @@ func (client DisksClient) GrantAccessPreparer(ctx context.Context, resourceGroup
// http.Response Body if it receives an error.
func (client DisksClient) GrantAccessSender(req *http.Request) (future DisksGrantAccessFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -631,7 +634,7 @@ func (client DisksClient) RevokeAccess(ctx context.Context, resourceGroupName st
result, err = client.RevokeAccessSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksClient", "RevokeAccess", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "RevokeAccess", result.Response(), "Failure sending request")
return
}
@@ -663,6 +666,7 @@ func (client DisksClient) RevokeAccessPreparer(ctx context.Context, resourceGrou
// http.Response Body if it receives an error.
func (client DisksClient) RevokeAccessSender(req *http.Request) (future DisksRevokeAccessFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -711,7 +715,7 @@ func (client DisksClient) Update(ctx context.Context, resourceGroupName string,
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -745,6 +749,7 @@ func (client DisksClient) UpdatePreparer(ctx context.Context, resourceGroupName
// http.Response Body if it receives an error.
func (client DisksClient) UpdateSender(req *http.Request) (future DisksUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleries.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleries.go
index 75873554375b..0d32432e367a 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleries.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleries.go
@@ -55,7 +55,7 @@ func (client GalleriesClient) CreateOrUpdate(ctx context.Context, resourceGroupN
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -89,6 +89,7 @@ func (client GalleriesClient) CreateOrUpdatePreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client GalleriesClient) CreateOrUpdateSender(req *http.Request) (future GalleriesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -135,7 +136,7 @@ func (client GalleriesClient) Delete(ctx context.Context, resourceGroupName stri
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -167,6 +168,7 @@ func (client GalleriesClient) DeletePreparer(ctx context.Context, resourceGroupN
// http.Response Body if it receives an error.
func (client GalleriesClient) DeleteSender(req *http.Request) (future GalleriesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -519,7 +521,7 @@ func (client GalleriesClient) Update(ctx context.Context, resourceGroupName stri
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -553,6 +555,7 @@ func (client GalleriesClient) UpdatePreparer(ctx context.Context, resourceGroupN
// http.Response Body if it receives an error.
func (client GalleriesClient) UpdateSender(req *http.Request) (future GalleriesUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplications.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplications.go
index 9f50ac068e76..7886b4fec37c 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplications.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplications.go
@@ -59,7 +59,7 @@ func (client GalleryApplicationsClient) CreateOrUpdate(ctx context.Context, reso
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -94,6 +94,7 @@ func (client GalleryApplicationsClient) CreateOrUpdatePreparer(ctx context.Conte
// http.Response Body if it receives an error.
func (client GalleryApplicationsClient) CreateOrUpdateSender(req *http.Request) (future GalleryApplicationsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -142,7 +143,7 @@ func (client GalleryApplicationsClient) Delete(ctx context.Context, resourceGrou
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -175,6 +176,7 @@ func (client GalleryApplicationsClient) DeletePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client GalleryApplicationsClient) DeleteSender(req *http.Request) (future GalleryApplicationsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -423,7 +425,7 @@ func (client GalleryApplicationsClient) Update(ctx context.Context, resourceGrou
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -458,6 +460,7 @@ func (client GalleryApplicationsClient) UpdatePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client GalleryApplicationsClient) UpdateSender(req *http.Request) (future GalleryApplicationsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplicationversions.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplicationversions.go
index 122818fed019..3958d3bbe33c 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplicationversions.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryapplicationversions.go
@@ -75,7 +75,7 @@ func (client GalleryApplicationVersionsClient) CreateOrUpdate(ctx context.Contex
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -111,6 +111,7 @@ func (client GalleryApplicationVersionsClient) CreateOrUpdatePreparer(ctx contex
// http.Response Body if it receives an error.
func (client GalleryApplicationVersionsClient) CreateOrUpdateSender(req *http.Request) (future GalleryApplicationVersionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -160,7 +161,7 @@ func (client GalleryApplicationVersionsClient) Delete(ctx context.Context, resou
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -194,6 +195,7 @@ func (client GalleryApplicationVersionsClient) DeletePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client GalleryApplicationVersionsClient) DeleteSender(req *http.Request) (future GalleryApplicationVersionsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -451,7 +453,7 @@ func (client GalleryApplicationVersionsClient) Update(ctx context.Context, resou
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -487,6 +489,7 @@ func (client GalleryApplicationVersionsClient) UpdatePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client GalleryApplicationVersionsClient) UpdateSender(req *http.Request) (future GalleryApplicationVersionsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimages.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimages.go
index 98858ff6c7e3..a57095ccf216 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimages.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimages.go
@@ -70,7 +70,7 @@ func (client GalleryImagesClient) CreateOrUpdate(ctx context.Context, resourceGr
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -105,6 +105,7 @@ func (client GalleryImagesClient) CreateOrUpdatePreparer(ctx context.Context, re
// http.Response Body if it receives an error.
func (client GalleryImagesClient) CreateOrUpdateSender(req *http.Request) (future GalleryImagesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -152,7 +153,7 @@ func (client GalleryImagesClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -185,6 +186,7 @@ func (client GalleryImagesClient) DeletePreparer(ctx context.Context, resourceGr
// http.Response Body if it receives an error.
func (client GalleryImagesClient) DeleteSender(req *http.Request) (future GalleryImagesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -430,7 +432,7 @@ func (client GalleryImagesClient) Update(ctx context.Context, resourceGroupName
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -465,6 +467,7 @@ func (client GalleryImagesClient) UpdatePreparer(ctx context.Context, resourceGr
// http.Response Body if it receives an error.
func (client GalleryImagesClient) UpdateSender(req *http.Request) (future GalleryImagesUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimageversions.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimageversions.go
index 64ab355fd855..5db43f681fcf 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimageversions.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/galleryimageversions.go
@@ -67,7 +67,7 @@ func (client GalleryImageVersionsClient) CreateOrUpdate(ctx context.Context, res
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -103,6 +103,7 @@ func (client GalleryImageVersionsClient) CreateOrUpdatePreparer(ctx context.Cont
// http.Response Body if it receives an error.
func (client GalleryImageVersionsClient) CreateOrUpdateSender(req *http.Request) (future GalleryImageVersionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -151,7 +152,7 @@ func (client GalleryImageVersionsClient) Delete(ctx context.Context, resourceGro
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -185,6 +186,7 @@ func (client GalleryImageVersionsClient) DeletePreparer(ctx context.Context, res
// http.Response Body if it receives an error.
func (client GalleryImageVersionsClient) DeleteSender(req *http.Request) (future GalleryImageVersionsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -440,7 +442,7 @@ func (client GalleryImageVersionsClient) Update(ctx context.Context, resourceGro
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -476,6 +478,7 @@ func (client GalleryImageVersionsClient) UpdatePreparer(ctx context.Context, res
// http.Response Body if it receives an error.
func (client GalleryImageVersionsClient) UpdateSender(req *http.Request) (future GalleryImageVersionsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/images.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/images.go
index a4dca093545a..d0b4009a4afe 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/images.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/images.go
@@ -54,7 +54,7 @@ func (client ImagesClient) CreateOrUpdate(ctx context.Context, resourceGroupName
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -88,6 +88,7 @@ func (client ImagesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client ImagesClient) CreateOrUpdateSender(req *http.Request) (future ImagesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -134,7 +135,7 @@ func (client ImagesClient) Delete(ctx context.Context, resourceGroupName string,
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -166,6 +167,7 @@ func (client ImagesClient) DeletePreparer(ctx context.Context, resourceGroupName
// http.Response Body if it receives an error.
func (client ImagesClient) DeleteSender(req *http.Request) (future ImagesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -522,7 +524,7 @@ func (client ImagesClient) Update(ctx context.Context, resourceGroupName string,
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -556,6 +558,7 @@ func (client ImagesClient) UpdatePreparer(ctx context.Context, resourceGroupName
// http.Response Body if it receives an error.
func (client ImagesClient) UpdateSender(req *http.Request) (future ImagesUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/loganalytics.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/loganalytics.go
index 0220277e0498..e388b68ee2e6 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/loganalytics.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/loganalytics.go
@@ -61,7 +61,7 @@ func (client LogAnalyticsClient) ExportRequestRateByInterval(ctx context.Context
result, err = client.ExportRequestRateByIntervalSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportRequestRateByInterval", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportRequestRateByInterval", result.Response(), "Failure sending request")
return
}
@@ -94,6 +94,7 @@ func (client LogAnalyticsClient) ExportRequestRateByIntervalPreparer(ctx context
// http.Response Body if it receives an error.
func (client LogAnalyticsClient) ExportRequestRateByIntervalSender(req *http.Request) (future LogAnalyticsExportRequestRateByIntervalFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -147,7 +148,7 @@ func (client LogAnalyticsClient) ExportThrottledRequests(ctx context.Context, pa
result, err = client.ExportThrottledRequestsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportThrottledRequests", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportThrottledRequests", result.Response(), "Failure sending request")
return
}
@@ -180,6 +181,7 @@ func (client LogAnalyticsClient) ExportThrottledRequestsPreparer(ctx context.Con
// http.Response Body if it receives an error.
func (client LogAnalyticsClient) ExportThrottledRequestsSender(req *http.Request) (future LogAnalyticsExportThrottledRequestsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/snapshots.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/snapshots.go
index 3e802546cc83..986664e4603d 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/snapshots.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/snapshots.go
@@ -71,7 +71,7 @@ func (client SnapshotsClient) CreateOrUpdate(ctx context.Context, resourceGroupN
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -106,6 +106,7 @@ func (client SnapshotsClient) CreateOrUpdatePreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client SnapshotsClient) CreateOrUpdateSender(req *http.Request) (future SnapshotsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -153,7 +154,7 @@ func (client SnapshotsClient) Delete(ctx context.Context, resourceGroupName stri
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -185,6 +186,7 @@ func (client SnapshotsClient) DeletePreparer(ctx context.Context, resourceGroupN
// http.Response Body if it receives an error.
func (client SnapshotsClient) DeleteSender(req *http.Request) (future SnapshotsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -315,7 +317,7 @@ func (client SnapshotsClient) GrantAccess(ctx context.Context, resourceGroupName
result, err = client.GrantAccessSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "GrantAccess", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "GrantAccess", result.Response(), "Failure sending request")
return
}
@@ -349,6 +351,7 @@ func (client SnapshotsClient) GrantAccessPreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client SnapshotsClient) GrantAccessSender(req *http.Request) (future SnapshotsGrantAccessFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -625,7 +628,7 @@ func (client SnapshotsClient) RevokeAccess(ctx context.Context, resourceGroupNam
result, err = client.RevokeAccessSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "RevokeAccess", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "RevokeAccess", result.Response(), "Failure sending request")
return
}
@@ -657,6 +660,7 @@ func (client SnapshotsClient) RevokeAccessPreparer(ctx context.Context, resource
// http.Response Body if it receives an error.
func (client SnapshotsClient) RevokeAccessSender(req *http.Request) (future SnapshotsRevokeAccessFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -704,7 +708,7 @@ func (client SnapshotsClient) Update(ctx context.Context, resourceGroupName stri
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -738,6 +742,7 @@ func (client SnapshotsClient) UpdatePreparer(ctx context.Context, resourceGroupN
// http.Response Body if it receives an error.
func (client SnapshotsClient) UpdateSender(req *http.Request) (future SnapshotsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensions.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensions.go
index 52c8c43792a3..e31db946f2f1 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensions.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachineextensions.go
@@ -56,7 +56,7 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdate(ctx context.Context,
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -91,6 +91,7 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdatePreparer(ctx context.
// http.Response Body if it receives an error.
func (client VirtualMachineExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineExtensionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -138,7 +139,7 @@ func (client VirtualMachineExtensionsClient) Delete(ctx context.Context, resourc
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -171,6 +172,7 @@ func (client VirtualMachineExtensionsClient) DeletePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VirtualMachineExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineExtensionsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -380,7 +382,7 @@ func (client VirtualMachineExtensionsClient) Update(ctx context.Context, resourc
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -415,6 +417,7 @@ func (client VirtualMachineExtensionsClient) UpdatePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VirtualMachineExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineExtensionsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachines.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachines.go
index fd89096a5aa4..c872f43df71f 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachines.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachines.go
@@ -64,7 +64,7 @@ func (client VirtualMachinesClient) Capture(ctx context.Context, resourceGroupNa
result, err = client.CaptureSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Capture", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Capture", result.Response(), "Failure sending request")
return
}
@@ -98,6 +98,7 @@ func (client VirtualMachinesClient) CapturePreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) CaptureSender(req *http.Request) (future VirtualMachinesCaptureFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -149,7 +150,7 @@ func (client VirtualMachinesClient) ConvertToManagedDisks(ctx context.Context, r
result, err = client.ConvertToManagedDisksSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ConvertToManagedDisks", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ConvertToManagedDisks", result.Response(), "Failure sending request")
return
}
@@ -181,6 +182,7 @@ func (client VirtualMachinesClient) ConvertToManagedDisksPreparer(ctx context.Co
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) ConvertToManagedDisksSender(req *http.Request) (future VirtualMachinesConvertToManagedDisksFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -249,7 +251,7 @@ func (client VirtualMachinesClient) CreateOrUpdate(ctx context.Context, resource
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -284,6 +286,7 @@ func (client VirtualMachinesClient) CreateOrUpdatePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachinesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -331,7 +334,7 @@ func (client VirtualMachinesClient) Deallocate(ctx context.Context, resourceGrou
result, err = client.DeallocateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Deallocate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Deallocate", result.Response(), "Failure sending request")
return
}
@@ -363,6 +366,7 @@ func (client VirtualMachinesClient) DeallocatePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) DeallocateSender(req *http.Request) (future VirtualMachinesDeallocateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -408,7 +412,7 @@ func (client VirtualMachinesClient) Delete(ctx context.Context, resourceGroupNam
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -440,6 +444,7 @@ func (client VirtualMachinesClient) DeletePreparer(ctx context.Context, resource
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) DeleteSender(req *http.Request) (future VirtualMachinesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1155,7 +1160,7 @@ func (client VirtualMachinesClient) PerformMaintenance(ctx context.Context, reso
result, err = client.PerformMaintenanceSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PerformMaintenance", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PerformMaintenance", result.Response(), "Failure sending request")
return
}
@@ -1187,6 +1192,7 @@ func (client VirtualMachinesClient) PerformMaintenancePreparer(ctx context.Conte
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) PerformMaintenanceSender(req *http.Request) (future VirtualMachinesPerformMaintenanceFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1236,7 +1242,7 @@ func (client VirtualMachinesClient) PowerOff(ctx context.Context, resourceGroupN
result, err = client.PowerOffSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PowerOff", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PowerOff", result.Response(), "Failure sending request")
return
}
@@ -1273,6 +1279,7 @@ func (client VirtualMachinesClient) PowerOffPreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) PowerOffSender(req *http.Request) (future VirtualMachinesPowerOffFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1318,7 +1325,7 @@ func (client VirtualMachinesClient) Reapply(ctx context.Context, resourceGroupNa
result, err = client.ReapplySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reapply", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reapply", result.Response(), "Failure sending request")
return
}
@@ -1350,6 +1357,7 @@ func (client VirtualMachinesClient) ReapplyPreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) ReapplySender(req *http.Request) (future VirtualMachinesReapplyFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1395,7 +1403,7 @@ func (client VirtualMachinesClient) Redeploy(ctx context.Context, resourceGroupN
result, err = client.RedeploySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Redeploy", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Redeploy", result.Response(), "Failure sending request")
return
}
@@ -1427,6 +1435,7 @@ func (client VirtualMachinesClient) RedeployPreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) RedeploySender(req *http.Request) (future VirtualMachinesRedeployFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1473,7 +1482,7 @@ func (client VirtualMachinesClient) Reimage(ctx context.Context, resourceGroupNa
result, err = client.ReimageSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reimage", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reimage", result.Response(), "Failure sending request")
return
}
@@ -1510,6 +1519,7 @@ func (client VirtualMachinesClient) ReimagePreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) ReimageSender(req *http.Request) (future VirtualMachinesReimageFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1555,7 +1565,7 @@ func (client VirtualMachinesClient) Restart(ctx context.Context, resourceGroupNa
result, err = client.RestartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Restart", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Restart", result.Response(), "Failure sending request")
return
}
@@ -1587,6 +1597,7 @@ func (client VirtualMachinesClient) RestartPreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) RestartSender(req *http.Request) (future VirtualMachinesRestartFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1639,7 +1650,7 @@ func (client VirtualMachinesClient) RunCommand(ctx context.Context, resourceGrou
result, err = client.RunCommandSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "RunCommand", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "RunCommand", result.Response(), "Failure sending request")
return
}
@@ -1673,6 +1684,7 @@ func (client VirtualMachinesClient) RunCommandPreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) RunCommandSender(req *http.Request) (future VirtualMachinesRunCommandFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1795,7 +1807,7 @@ func (client VirtualMachinesClient) Start(ctx context.Context, resourceGroupName
result, err = client.StartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Start", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Start", result.Response(), "Failure sending request")
return
}
@@ -1827,6 +1839,7 @@ func (client VirtualMachinesClient) StartPreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) StartSender(req *http.Request) (future VirtualMachinesStartFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1873,7 +1886,7 @@ func (client VirtualMachinesClient) Update(ctx context.Context, resourceGroupNam
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -1907,6 +1920,7 @@ func (client VirtualMachinesClient) UpdatePreparer(ctx context.Context, resource
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) UpdateSender(req *http.Request) (future VirtualMachinesUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetextensions.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetextensions.go
index 59f4fee45c92..c5835208907e 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetextensions.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetextensions.go
@@ -56,7 +56,7 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdate(ctx context.
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -92,6 +92,7 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdatePreparer(ctx
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetExtensionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -139,7 +140,7 @@ func (client VirtualMachineScaleSetExtensionsClient) Delete(ctx context.Context,
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -172,6 +173,7 @@ func (client VirtualMachineScaleSetExtensionsClient) DeletePreparer(ctx context.
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetExtensionsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -419,7 +421,7 @@ func (client VirtualMachineScaleSetExtensionsClient) Update(ctx context.Context,
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -456,6 +458,7 @@ func (client VirtualMachineScaleSetExtensionsClient) UpdatePreparer(ctx context.
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetExtensionsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetrollingupgrades.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetrollingupgrades.go
index 117a4155d388..b0d5b63e0df7 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetrollingupgrades.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetrollingupgrades.go
@@ -55,7 +55,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) Cancel(ctx context.Con
result, err = client.CancelSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "Cancel", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "Cancel", result.Response(), "Failure sending request")
return
}
@@ -87,6 +87,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) CancelPreparer(ctx con
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetRollingUpgradesClient) CancelSender(req *http.Request) (future VirtualMachineScaleSetRollingUpgradesCancelFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -210,7 +211,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgrade(
result, err = client.StartExtensionUpgradeSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartExtensionUpgrade", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartExtensionUpgrade", result.Response(), "Failure sending request")
return
}
@@ -242,6 +243,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeP
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeSender(req *http.Request) (future VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -288,7 +290,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgrade(ctx con
result, err = client.StartOSUpgradeSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartOSUpgrade", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartOSUpgrade", result.Response(), "Failure sending request")
return
}
@@ -320,6 +322,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradePreparer
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradeSender(req *http.Request) (future VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesets.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesets.go
index ef561dedb432..a14352bdc23c 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesets.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesets.go
@@ -158,7 +158,7 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdate(ctx context.Context,
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -192,6 +192,7 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdatePreparer(ctx context.C
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -240,7 +241,7 @@ func (client VirtualMachineScaleSetsClient) Deallocate(ctx context.Context, reso
result, err = client.DeallocateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Deallocate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Deallocate", result.Response(), "Failure sending request")
return
}
@@ -277,6 +278,7 @@ func (client VirtualMachineScaleSetsClient) DeallocatePreparer(ctx context.Conte
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) DeallocateSender(req *http.Request) (future VirtualMachineScaleSetsDeallocateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -322,7 +324,7 @@ func (client VirtualMachineScaleSetsClient) Delete(ctx context.Context, resource
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -354,6 +356,7 @@ func (client VirtualMachineScaleSetsClient) DeletePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -406,7 +409,7 @@ func (client VirtualMachineScaleSetsClient) DeleteInstances(ctx context.Context,
result, err = client.DeleteInstancesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "DeleteInstances", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "DeleteInstances", result.Response(), "Failure sending request")
return
}
@@ -440,6 +443,7 @@ func (client VirtualMachineScaleSetsClient) DeleteInstancesPreparer(ctx context.
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) DeleteInstancesSender(req *http.Request) (future VirtualMachineScaleSetsDeleteInstancesFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1187,7 +1191,7 @@ func (client VirtualMachineScaleSetsClient) PerformMaintenance(ctx context.Conte
result, err = client.PerformMaintenanceSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PerformMaintenance", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PerformMaintenance", result.Response(), "Failure sending request")
return
}
@@ -1224,6 +1228,7 @@ func (client VirtualMachineScaleSetsClient) PerformMaintenancePreparer(ctx conte
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) PerformMaintenanceSender(req *http.Request) (future VirtualMachineScaleSetsPerformMaintenanceFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1274,7 +1279,7 @@ func (client VirtualMachineScaleSetsClient) PowerOff(ctx context.Context, resour
result, err = client.PowerOffSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PowerOff", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PowerOff", result.Response(), "Failure sending request")
return
}
@@ -1316,6 +1321,7 @@ func (client VirtualMachineScaleSetsClient) PowerOffPreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) PowerOffSender(req *http.Request) (future VirtualMachineScaleSetsPowerOffFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1363,7 +1369,7 @@ func (client VirtualMachineScaleSetsClient) Redeploy(ctx context.Context, resour
result, err = client.RedeploySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Redeploy", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Redeploy", result.Response(), "Failure sending request")
return
}
@@ -1400,6 +1406,7 @@ func (client VirtualMachineScaleSetsClient) RedeployPreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) RedeploySender(req *http.Request) (future VirtualMachineScaleSetsRedeployFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1447,7 +1454,7 @@ func (client VirtualMachineScaleSetsClient) Reimage(ctx context.Context, resourc
result, err = client.ReimageSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Reimage", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Reimage", result.Response(), "Failure sending request")
return
}
@@ -1484,6 +1491,7 @@ func (client VirtualMachineScaleSetsClient) ReimagePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) ReimageSender(req *http.Request) (future VirtualMachineScaleSetsReimageFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1531,7 +1539,7 @@ func (client VirtualMachineScaleSetsClient) ReimageAll(ctx context.Context, reso
result, err = client.ReimageAllSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ReimageAll", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ReimageAll", result.Response(), "Failure sending request")
return
}
@@ -1568,6 +1576,7 @@ func (client VirtualMachineScaleSetsClient) ReimageAllPreparer(ctx context.Conte
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) ReimageAllSender(req *http.Request) (future VirtualMachineScaleSetsReimageAllFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1614,7 +1623,7 @@ func (client VirtualMachineScaleSetsClient) Restart(ctx context.Context, resourc
result, err = client.RestartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Restart", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Restart", result.Response(), "Failure sending request")
return
}
@@ -1651,6 +1660,7 @@ func (client VirtualMachineScaleSetsClient) RestartPreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) RestartSender(req *http.Request) (future VirtualMachineScaleSetsRestartFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1697,7 +1707,7 @@ func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceState(ctx con
result, err = client.SetOrchestrationServiceStateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "SetOrchestrationServiceState", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "SetOrchestrationServiceState", result.Response(), "Failure sending request")
return
}
@@ -1731,6 +1741,7 @@ func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceStatePreparer
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceStateSender(req *http.Request) (future VirtualMachineScaleSetsSetOrchestrationServiceStateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1777,7 +1788,7 @@ func (client VirtualMachineScaleSetsClient) Start(ctx context.Context, resourceG
result, err = client.StartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Start", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Start", result.Response(), "Failure sending request")
return
}
@@ -1814,6 +1825,7 @@ func (client VirtualMachineScaleSetsClient) StartPreparer(ctx context.Context, r
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) StartSender(req *http.Request) (future VirtualMachineScaleSetsStartFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1860,7 +1872,7 @@ func (client VirtualMachineScaleSetsClient) Update(ctx context.Context, resource
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -1894,6 +1906,7 @@ func (client VirtualMachineScaleSetsClient) UpdatePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1947,7 +1960,7 @@ func (client VirtualMachineScaleSetsClient) UpdateInstances(ctx context.Context,
result, err = client.UpdateInstancesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "UpdateInstances", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "UpdateInstances", result.Response(), "Failure sending request")
return
}
@@ -1981,6 +1994,7 @@ func (client VirtualMachineScaleSetsClient) UpdateInstancesPreparer(ctx context.
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) UpdateInstancesSender(req *http.Request) (future VirtualMachineScaleSetsUpdateInstancesFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvmextensions.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvmextensions.go
index e2a2e0fef6a4..d028fd0f510c 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvmextensions.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvmextensions.go
@@ -58,7 +58,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdate(ctx contex
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -94,6 +94,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdatePreparer(ct
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -142,7 +143,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) Delete(ctx context.Contex
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -176,6 +177,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) DeletePreparer(ctx contex
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetVMExtensionsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -390,7 +392,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) Update(ctx context.Contex
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -426,6 +428,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) UpdatePreparer(ctx contex
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetVMExtensionsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvms.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvms.go
index a80529f51b32..3f5dcbfaa930 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvms.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute/virtualmachinescalesetvms.go
@@ -58,7 +58,7 @@ func (client VirtualMachineScaleSetVMsClient) Deallocate(ctx context.Context, re
result, err = client.DeallocateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Deallocate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Deallocate", result.Response(), "Failure sending request")
return
}
@@ -91,6 +91,7 @@ func (client VirtualMachineScaleSetVMsClient) DeallocatePreparer(ctx context.Con
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) DeallocateSender(req *http.Request) (future VirtualMachineScaleSetVMsDeallocateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -137,7 +138,7 @@ func (client VirtualMachineScaleSetVMsClient) Delete(ctx context.Context, resour
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -170,6 +171,7 @@ func (client VirtualMachineScaleSetVMsClient) DeletePreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetVMsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -508,7 +510,7 @@ func (client VirtualMachineScaleSetVMsClient) PerformMaintenance(ctx context.Con
result, err = client.PerformMaintenanceSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PerformMaintenance", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PerformMaintenance", result.Response(), "Failure sending request")
return
}
@@ -541,6 +543,7 @@ func (client VirtualMachineScaleSetVMsClient) PerformMaintenancePreparer(ctx con
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) PerformMaintenanceSender(req *http.Request) (future VirtualMachineScaleSetVMsPerformMaintenanceFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -591,7 +594,7 @@ func (client VirtualMachineScaleSetVMsClient) PowerOff(ctx context.Context, reso
result, err = client.PowerOffSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PowerOff", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PowerOff", result.Response(), "Failure sending request")
return
}
@@ -629,6 +632,7 @@ func (client VirtualMachineScaleSetVMsClient) PowerOffPreparer(ctx context.Conte
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) PowerOffSender(req *http.Request) (future VirtualMachineScaleSetVMsPowerOffFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -676,7 +680,7 @@ func (client VirtualMachineScaleSetVMsClient) Redeploy(ctx context.Context, reso
result, err = client.RedeploySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Redeploy", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Redeploy", result.Response(), "Failure sending request")
return
}
@@ -709,6 +713,7 @@ func (client VirtualMachineScaleSetVMsClient) RedeployPreparer(ctx context.Conte
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) RedeploySender(req *http.Request) (future VirtualMachineScaleSetVMsRedeployFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -756,7 +761,7 @@ func (client VirtualMachineScaleSetVMsClient) Reimage(ctx context.Context, resou
result, err = client.ReimageSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Reimage", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Reimage", result.Response(), "Failure sending request")
return
}
@@ -794,6 +799,7 @@ func (client VirtualMachineScaleSetVMsClient) ReimagePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) ReimageSender(req *http.Request) (future VirtualMachineScaleSetVMsReimageFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -841,7 +847,7 @@ func (client VirtualMachineScaleSetVMsClient) ReimageAll(ctx context.Context, re
result, err = client.ReimageAllSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "ReimageAll", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "ReimageAll", result.Response(), "Failure sending request")
return
}
@@ -874,6 +880,7 @@ func (client VirtualMachineScaleSetVMsClient) ReimageAllPreparer(ctx context.Con
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) ReimageAllSender(req *http.Request) (future VirtualMachineScaleSetVMsReimageAllFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -920,7 +927,7 @@ func (client VirtualMachineScaleSetVMsClient) Restart(ctx context.Context, resou
result, err = client.RestartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Restart", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Restart", result.Response(), "Failure sending request")
return
}
@@ -953,6 +960,7 @@ func (client VirtualMachineScaleSetVMsClient) RestartPreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) RestartSender(req *http.Request) (future VirtualMachineScaleSetVMsRestartFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1006,7 +1014,7 @@ func (client VirtualMachineScaleSetVMsClient) RunCommand(ctx context.Context, re
result, err = client.RunCommandSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "RunCommand", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "RunCommand", result.Response(), "Failure sending request")
return
}
@@ -1041,6 +1049,7 @@ func (client VirtualMachineScaleSetVMsClient) RunCommandPreparer(ctx context.Con
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) RunCommandSender(req *http.Request) (future VirtualMachineScaleSetVMsRunCommandFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1166,7 +1175,7 @@ func (client VirtualMachineScaleSetVMsClient) Start(ctx context.Context, resourc
result, err = client.StartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Start", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Start", result.Response(), "Failure sending request")
return
}
@@ -1199,6 +1208,7 @@ func (client VirtualMachineScaleSetVMsClient) StartPreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) StartSender(req *http.Request) (future VirtualMachineScaleSetVMsStartFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1267,7 +1277,7 @@ func (client VirtualMachineScaleSetVMsClient) Update(ctx context.Context, resour
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -1306,6 +1316,7 @@ func (client VirtualMachineScaleSetVMsClient) UpdatePreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetVMsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/CHANGELOG.md b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/CHANGELOG.md
index b9055bec3169..e66613099e84 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/CHANGELOG.md
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/CHANGELOG.md
@@ -1,53 +1,561 @@
# Change History
+## Breaking Changes
+
+### Removed Constants
+
+1. AccessLevel.None
+1. AccessLevel.Read
+1. AccessLevel.Write
+1. AggregatedReplicationState.Completed
+1. AggregatedReplicationState.Failed
+1. AggregatedReplicationState.InProgress
+1. AggregatedReplicationState.Unknown
+1. AvailabilitySetSkuTypes.Aligned
+1. AvailabilitySetSkuTypes.Classic
+1. ComponentNames.MicrosoftWindowsShellSetup
+1. DiffDiskOptions.Local
+1. DiffDiskPlacement.CacheDisk
+1. DiffDiskPlacement.ResourceDisk
+1. DiskCreateOption.Attach
+1. DiskCreateOption.Copy
+1. DiskCreateOption.Empty
+1. DiskCreateOption.FromImage
+1. DiskCreateOption.Import
+1. DiskCreateOption.Restore
+1. DiskCreateOption.Upload
+1. DiskDetachOptionTypes.ForceDetach
+1. DiskEncryptionSetType.EncryptionAtRestWithCustomerKey
+1. DiskEncryptionSetType.EncryptionAtRestWithPlatformAndCustomerKeys
+1. DiskSecurityTypes.TrustedLaunch
+1. DiskState.ActiveSAS
+1. DiskState.ActiveUpload
+1. DiskState.Attached
+1. DiskState.ReadyToUpload
+1. DiskState.Reserved
+1. DiskState.Unattached
+1. DiskStorageAccountTypes.PremiumLRS
+1. DiskStorageAccountTypes.PremiumZRS
+1. DiskStorageAccountTypes.StandardLRS
+1. DiskStorageAccountTypes.StandardSSDLRS
+1. DiskStorageAccountTypes.StandardSSDZRS
+1. DiskStorageAccountTypes.UltraSSDLRS
+1. ExtendedLocationTypes.EdgeZone
+1. HyperVGeneration.V1
+1. HyperVGeneration.V2
+1. IPVersion.IPv4
+1. IPVersion.IPv6
+1. InstanceViewTypes.InstanceView
+1. IntervalInMins.FiveMins
+1. IntervalInMins.SixtyMins
+1. IntervalInMins.ThirtyMins
+1. IntervalInMins.ThreeMins
+1. LinuxVMGuestPatchMode.AutomaticByPlatform
+1. LinuxVMGuestPatchMode.ImageDefault
+1. NetworkAccessPolicy.AllowAll
+1. NetworkAccessPolicy.AllowPrivate
+1. NetworkAccessPolicy.DenyAll
+1. OperatingSystemStateTypes.Generalized
+1. OperatingSystemStateTypes.Specialized
+1. OperatingSystemTypes.Linux
+1. OperatingSystemTypes.Windows
+1. OrchestrationMode.Flexible
+1. OrchestrationMode.Uniform
+1. OrchestrationServiceNames.AutomaticRepairs
+1. OrchestrationServiceState.NotRunning
+1. OrchestrationServiceState.Running
+1. OrchestrationServiceState.Suspended
+1. OrchestrationServiceStateAction.Resume
+1. OrchestrationServiceStateAction.Suspend
+1. PassNames.OobeSystem
+1. PrivateEndpointServiceConnectionStatus.Approved
+1. PrivateEndpointServiceConnectionStatus.Pending
+1. PrivateEndpointServiceConnectionStatus.Rejected
+1. ProtocolTypes.HTTP
+1. ProtocolTypes.HTTPS
+1. ProximityPlacementGroupType.Standard
+1. ProximityPlacementGroupType.Ultra
+1. ResourceSkuRestrictionsReasonCode.NotAvailableForSubscription
+1. ResourceSkuRestrictionsReasonCode.QuotaID
+1. ResourceSkuRestrictionsType.Location
+1. ResourceSkuRestrictionsType.Zone
+1. RollingUpgradeActionType.Cancel
+1. RollingUpgradeActionType.Start
+1. SettingNames.AutoLogon
+1. SettingNames.FirstLogonCommands
+1. StatusLevelTypes.Error
+1. StatusLevelTypes.Info
+1. StatusLevelTypes.Warning
+1. UpgradeMode.Automatic
+1. UpgradeMode.Manual
+1. UpgradeMode.Rolling
+1. VMGuestPatchClassificationLinux.Critical
+1. VMGuestPatchClassificationLinux.Other
+1. VMGuestPatchClassificationLinux.Security
+1. VMGuestPatchRebootSetting.Always
+1. VMGuestPatchRebootSetting.IfRequired
+1. VMGuestPatchRebootSetting.Never
+1. VirtualMachineEvictionPolicyTypes.Deallocate
+1. VirtualMachineEvictionPolicyTypes.Delete
+1. VirtualMachinePriorityTypes.Low
+1. VirtualMachinePriorityTypes.Regular
+1. VirtualMachinePriorityTypes.Spot
+1. VirtualMachineScaleSetScaleInRules.Default
+1. VirtualMachineScaleSetScaleInRules.NewestVM
+1. VirtualMachineScaleSetScaleInRules.OldestVM
+1. VirtualMachineSizeTypes.BasicA0
+1. VirtualMachineSizeTypes.BasicA1
+1. VirtualMachineSizeTypes.BasicA2
+1. VirtualMachineSizeTypes.BasicA3
+1. VirtualMachineSizeTypes.BasicA4
+1. VirtualMachineSizeTypes.StandardA0
+1. VirtualMachineSizeTypes.StandardA1
+1. VirtualMachineSizeTypes.StandardA10
+1. VirtualMachineSizeTypes.StandardA11
+1. VirtualMachineSizeTypes.StandardA1V2
+1. VirtualMachineSizeTypes.StandardA2
+1. VirtualMachineSizeTypes.StandardA2V2
+1. VirtualMachineSizeTypes.StandardA2mV2
+1. VirtualMachineSizeTypes.StandardA3
+1. VirtualMachineSizeTypes.StandardA4
+1. VirtualMachineSizeTypes.StandardA4V2
+1. VirtualMachineSizeTypes.StandardA4mV2
+1. VirtualMachineSizeTypes.StandardA5
+1. VirtualMachineSizeTypes.StandardA6
+1. VirtualMachineSizeTypes.StandardA7
+1. VirtualMachineSizeTypes.StandardA8
+1. VirtualMachineSizeTypes.StandardA8V2
+1. VirtualMachineSizeTypes.StandardA8mV2
+1. VirtualMachineSizeTypes.StandardA9
+1. VirtualMachineSizeTypes.StandardB1ms
+1. VirtualMachineSizeTypes.StandardB1s
+1. VirtualMachineSizeTypes.StandardB2ms
+1. VirtualMachineSizeTypes.StandardB2s
+1. VirtualMachineSizeTypes.StandardB4ms
+1. VirtualMachineSizeTypes.StandardB8ms
+1. VirtualMachineSizeTypes.StandardD1
+1. VirtualMachineSizeTypes.StandardD11
+1. VirtualMachineSizeTypes.StandardD11V2
+1. VirtualMachineSizeTypes.StandardD12
+1. VirtualMachineSizeTypes.StandardD12V2
+1. VirtualMachineSizeTypes.StandardD13
+1. VirtualMachineSizeTypes.StandardD13V2
+1. VirtualMachineSizeTypes.StandardD14
+1. VirtualMachineSizeTypes.StandardD14V2
+1. VirtualMachineSizeTypes.StandardD15V2
+1. VirtualMachineSizeTypes.StandardD16V3
+1. VirtualMachineSizeTypes.StandardD16sV3
+1. VirtualMachineSizeTypes.StandardD1V2
+1. VirtualMachineSizeTypes.StandardD2
+1. VirtualMachineSizeTypes.StandardD2V2
+1. VirtualMachineSizeTypes.StandardD2V3
+1. VirtualMachineSizeTypes.StandardD2sV3
+1. VirtualMachineSizeTypes.StandardD3
+1. VirtualMachineSizeTypes.StandardD32V3
+1. VirtualMachineSizeTypes.StandardD32sV3
+1. VirtualMachineSizeTypes.StandardD3V2
+1. VirtualMachineSizeTypes.StandardD4
+1. VirtualMachineSizeTypes.StandardD4V2
+1. VirtualMachineSizeTypes.StandardD4V3
+1. VirtualMachineSizeTypes.StandardD4sV3
+1. VirtualMachineSizeTypes.StandardD5V2
+1. VirtualMachineSizeTypes.StandardD64V3
+1. VirtualMachineSizeTypes.StandardD64sV3
+1. VirtualMachineSizeTypes.StandardD8V3
+1. VirtualMachineSizeTypes.StandardD8sV3
+1. VirtualMachineSizeTypes.StandardDS1
+1. VirtualMachineSizeTypes.StandardDS11
+1. VirtualMachineSizeTypes.StandardDS11V2
+1. VirtualMachineSizeTypes.StandardDS12
+1. VirtualMachineSizeTypes.StandardDS12V2
+1. VirtualMachineSizeTypes.StandardDS13
+1. VirtualMachineSizeTypes.StandardDS132V2
+1. VirtualMachineSizeTypes.StandardDS134V2
+1. VirtualMachineSizeTypes.StandardDS13V2
+1. VirtualMachineSizeTypes.StandardDS14
+1. VirtualMachineSizeTypes.StandardDS144V2
+1. VirtualMachineSizeTypes.StandardDS148V2
+1. VirtualMachineSizeTypes.StandardDS14V2
+1. VirtualMachineSizeTypes.StandardDS15V2
+1. VirtualMachineSizeTypes.StandardDS1V2
+1. VirtualMachineSizeTypes.StandardDS2
+1. VirtualMachineSizeTypes.StandardDS2V2
+1. VirtualMachineSizeTypes.StandardDS3
+1. VirtualMachineSizeTypes.StandardDS3V2
+1. VirtualMachineSizeTypes.StandardDS4
+1. VirtualMachineSizeTypes.StandardDS4V2
+1. VirtualMachineSizeTypes.StandardDS5V2
+1. VirtualMachineSizeTypes.StandardE16V3
+1. VirtualMachineSizeTypes.StandardE16sV3
+1. VirtualMachineSizeTypes.StandardE2V3
+1. VirtualMachineSizeTypes.StandardE2sV3
+1. VirtualMachineSizeTypes.StandardE3216V3
+1. VirtualMachineSizeTypes.StandardE328sV3
+1. VirtualMachineSizeTypes.StandardE32V3
+1. VirtualMachineSizeTypes.StandardE32sV3
+1. VirtualMachineSizeTypes.StandardE4V3
+1. VirtualMachineSizeTypes.StandardE4sV3
+1. VirtualMachineSizeTypes.StandardE6416sV3
+1. VirtualMachineSizeTypes.StandardE6432sV3
+1. VirtualMachineSizeTypes.StandardE64V3
+1. VirtualMachineSizeTypes.StandardE64sV3
+1. VirtualMachineSizeTypes.StandardE8V3
+1. VirtualMachineSizeTypes.StandardE8sV3
+1. VirtualMachineSizeTypes.StandardF1
+1. VirtualMachineSizeTypes.StandardF16
+1. VirtualMachineSizeTypes.StandardF16s
+1. VirtualMachineSizeTypes.StandardF16sV2
+1. VirtualMachineSizeTypes.StandardF1s
+1. VirtualMachineSizeTypes.StandardF2
+1. VirtualMachineSizeTypes.StandardF2s
+1. VirtualMachineSizeTypes.StandardF2sV2
+1. VirtualMachineSizeTypes.StandardF32sV2
+1. VirtualMachineSizeTypes.StandardF4
+1. VirtualMachineSizeTypes.StandardF4s
+1. VirtualMachineSizeTypes.StandardF4sV2
+1. VirtualMachineSizeTypes.StandardF64sV2
+1. VirtualMachineSizeTypes.StandardF72sV2
+1. VirtualMachineSizeTypes.StandardF8
+1. VirtualMachineSizeTypes.StandardF8s
+1. VirtualMachineSizeTypes.StandardF8sV2
+1. VirtualMachineSizeTypes.StandardG1
+1. VirtualMachineSizeTypes.StandardG2
+1. VirtualMachineSizeTypes.StandardG3
+1. VirtualMachineSizeTypes.StandardG4
+1. VirtualMachineSizeTypes.StandardG5
+1. VirtualMachineSizeTypes.StandardGS1
+1. VirtualMachineSizeTypes.StandardGS2
+1. VirtualMachineSizeTypes.StandardGS3
+1. VirtualMachineSizeTypes.StandardGS4
+1. VirtualMachineSizeTypes.StandardGS44
+1. VirtualMachineSizeTypes.StandardGS48
+1. VirtualMachineSizeTypes.StandardGS5
+1. VirtualMachineSizeTypes.StandardGS516
+1. VirtualMachineSizeTypes.StandardGS58
+1. VirtualMachineSizeTypes.StandardH16
+1. VirtualMachineSizeTypes.StandardH16m
+1. VirtualMachineSizeTypes.StandardH16mr
+1. VirtualMachineSizeTypes.StandardH16r
+1. VirtualMachineSizeTypes.StandardH8
+1. VirtualMachineSizeTypes.StandardH8m
+1. VirtualMachineSizeTypes.StandardL16s
+1. VirtualMachineSizeTypes.StandardL32s
+1. VirtualMachineSizeTypes.StandardL4s
+1. VirtualMachineSizeTypes.StandardL8s
+1. VirtualMachineSizeTypes.StandardM12832ms
+1. VirtualMachineSizeTypes.StandardM12864ms
+1. VirtualMachineSizeTypes.StandardM128ms
+1. VirtualMachineSizeTypes.StandardM128s
+1. VirtualMachineSizeTypes.StandardM6416ms
+1. VirtualMachineSizeTypes.StandardM6432ms
+1. VirtualMachineSizeTypes.StandardM64ms
+1. VirtualMachineSizeTypes.StandardM64s
+1. VirtualMachineSizeTypes.StandardNC12
+1. VirtualMachineSizeTypes.StandardNC12sV2
+1. VirtualMachineSizeTypes.StandardNC12sV3
+1. VirtualMachineSizeTypes.StandardNC24
+1. VirtualMachineSizeTypes.StandardNC24r
+1. VirtualMachineSizeTypes.StandardNC24rsV2
+1. VirtualMachineSizeTypes.StandardNC24rsV3
+1. VirtualMachineSizeTypes.StandardNC24sV2
+1. VirtualMachineSizeTypes.StandardNC24sV3
+1. VirtualMachineSizeTypes.StandardNC6
+1. VirtualMachineSizeTypes.StandardNC6sV2
+1. VirtualMachineSizeTypes.StandardNC6sV3
+1. VirtualMachineSizeTypes.StandardND12s
+1. VirtualMachineSizeTypes.StandardND24rs
+1. VirtualMachineSizeTypes.StandardND24s
+1. VirtualMachineSizeTypes.StandardND6s
+1. VirtualMachineSizeTypes.StandardNV12
+1. VirtualMachineSizeTypes.StandardNV24
+1. VirtualMachineSizeTypes.StandardNV6
+
## Additive Changes
+### New Constants
+
+1. AccessLevel.AccessLevelNone
+1. AccessLevel.AccessLevelRead
+1. AccessLevel.AccessLevelWrite
+1. AggregatedReplicationState.AggregatedReplicationStateCompleted
+1. AggregatedReplicationState.AggregatedReplicationStateFailed
+1. AggregatedReplicationState.AggregatedReplicationStateInProgress
+1. AggregatedReplicationState.AggregatedReplicationStateUnknown
+1. AvailabilitySetSkuTypes.AvailabilitySetSkuTypesAligned
+1. AvailabilitySetSkuTypes.AvailabilitySetSkuTypesClassic
+1. ComponentNames.ComponentNamesMicrosoftWindowsShellSetup
+1. DiffDiskOptions.DiffDiskOptionsLocal
+1. DiffDiskPlacement.DiffDiskPlacementCacheDisk
+1. DiffDiskPlacement.DiffDiskPlacementResourceDisk
+1. DiskCreateOption.DiskCreateOptionAttach
+1. DiskCreateOption.DiskCreateOptionCopy
+1. DiskCreateOption.DiskCreateOptionEmpty
+1. DiskCreateOption.DiskCreateOptionFromImage
+1. DiskCreateOption.DiskCreateOptionImport
+1. DiskCreateOption.DiskCreateOptionRestore
+1. DiskCreateOption.DiskCreateOptionUpload
+1. DiskDetachOptionTypes.DiskDetachOptionTypesForceDetach
+1. DiskEncryptionSetType.DiskEncryptionSetTypeEncryptionAtRestWithCustomerKey
+1. DiskEncryptionSetType.DiskEncryptionSetTypeEncryptionAtRestWithPlatformAndCustomerKeys
+1. DiskSecurityTypes.DiskSecurityTypesTrustedLaunch
+1. DiskState.DiskStateActiveSAS
+1. DiskState.DiskStateActiveUpload
+1. DiskState.DiskStateAttached
+1. DiskState.DiskStateReadyToUpload
+1. DiskState.DiskStateReserved
+1. DiskState.DiskStateUnattached
+1. DiskStorageAccountTypes.DiskStorageAccountTypesPremiumLRS
+1. DiskStorageAccountTypes.DiskStorageAccountTypesPremiumZRS
+1. DiskStorageAccountTypes.DiskStorageAccountTypesStandardLRS
+1. DiskStorageAccountTypes.DiskStorageAccountTypesStandardSSDLRS
+1. DiskStorageAccountTypes.DiskStorageAccountTypesStandardSSDZRS
+1. DiskStorageAccountTypes.DiskStorageAccountTypesUltraSSDLRS
+1. ExtendedLocationTypes.ExtendedLocationTypesEdgeZone
+1. HyperVGeneration.HyperVGenerationV1
+1. HyperVGeneration.HyperVGenerationV2
+1. IPVersion.IPVersionIPv4
+1. IPVersion.IPVersionIPv6
+1. InstanceViewTypes.InstanceViewTypesInstanceView
+1. IntervalInMins.IntervalInMinsFiveMins
+1. IntervalInMins.IntervalInMinsSixtyMins
+1. IntervalInMins.IntervalInMinsThirtyMins
+1. IntervalInMins.IntervalInMinsThreeMins
+1. LinuxVMGuestPatchMode.LinuxVMGuestPatchModeAutomaticByPlatform
+1. LinuxVMGuestPatchMode.LinuxVMGuestPatchModeImageDefault
+1. NetworkAccessPolicy.NetworkAccessPolicyAllowAll
+1. NetworkAccessPolicy.NetworkAccessPolicyAllowPrivate
+1. NetworkAccessPolicy.NetworkAccessPolicyDenyAll
+1. OperatingSystemStateTypes.OperatingSystemStateTypesGeneralized
+1. OperatingSystemStateTypes.OperatingSystemStateTypesSpecialized
+1. OperatingSystemTypes.OperatingSystemTypesLinux
+1. OperatingSystemTypes.OperatingSystemTypesWindows
+1. OrchestrationMode.OrchestrationModeFlexible
+1. OrchestrationMode.OrchestrationModeUniform
+1. OrchestrationServiceNames.OrchestrationServiceNamesAutomaticRepairs
+1. OrchestrationServiceState.OrchestrationServiceStateNotRunning
+1. OrchestrationServiceState.OrchestrationServiceStateRunning
+1. OrchestrationServiceState.OrchestrationServiceStateSuspended
+1. OrchestrationServiceStateAction.OrchestrationServiceStateActionResume
+1. OrchestrationServiceStateAction.OrchestrationServiceStateActionSuspend
+1. PassNames.PassNamesOobeSystem
+1. PrivateEndpointServiceConnectionStatus.PrivateEndpointServiceConnectionStatusApproved
+1. PrivateEndpointServiceConnectionStatus.PrivateEndpointServiceConnectionStatusPending
+1. PrivateEndpointServiceConnectionStatus.PrivateEndpointServiceConnectionStatusRejected
+1. ProtocolTypes.ProtocolTypesHTTP
+1. ProtocolTypes.ProtocolTypesHTTPS
+1. ProximityPlacementGroupType.ProximityPlacementGroupTypeStandard
+1. ProximityPlacementGroupType.ProximityPlacementGroupTypeUltra
+1. ResourceSkuRestrictionsReasonCode.ResourceSkuRestrictionsReasonCodeNotAvailableForSubscription
+1. ResourceSkuRestrictionsReasonCode.ResourceSkuRestrictionsReasonCodeQuotaID
+1. ResourceSkuRestrictionsType.ResourceSkuRestrictionsTypeLocation
+1. ResourceSkuRestrictionsType.ResourceSkuRestrictionsTypeZone
+1. RollingUpgradeActionType.RollingUpgradeActionTypeCancel
+1. RollingUpgradeActionType.RollingUpgradeActionTypeStart
+1. SettingNames.SettingNamesAutoLogon
+1. SettingNames.SettingNamesFirstLogonCommands
+1. StatusLevelTypes.StatusLevelTypesError
+1. StatusLevelTypes.StatusLevelTypesInfo
+1. StatusLevelTypes.StatusLevelTypesWarning
+1. UpgradeMode.UpgradeModeAutomatic
+1. UpgradeMode.UpgradeModeManual
+1. UpgradeMode.UpgradeModeRolling
+1. VMGuestPatchClassificationLinux.VMGuestPatchClassificationLinuxCritical
+1. VMGuestPatchClassificationLinux.VMGuestPatchClassificationLinuxOther
+1. VMGuestPatchClassificationLinux.VMGuestPatchClassificationLinuxSecurity
+1. VMGuestPatchRebootSetting.VMGuestPatchRebootSettingAlways
+1. VMGuestPatchRebootSetting.VMGuestPatchRebootSettingIfRequired
+1. VMGuestPatchRebootSetting.VMGuestPatchRebootSettingNever
+1. VirtualMachineEvictionPolicyTypes.VirtualMachineEvictionPolicyTypesDeallocate
+1. VirtualMachineEvictionPolicyTypes.VirtualMachineEvictionPolicyTypesDelete
+1. VirtualMachinePriorityTypes.VirtualMachinePriorityTypesLow
+1. VirtualMachinePriorityTypes.VirtualMachinePriorityTypesRegular
+1. VirtualMachinePriorityTypes.VirtualMachinePriorityTypesSpot
+1. VirtualMachineScaleSetScaleInRules.VirtualMachineScaleSetScaleInRulesDefault
+1. VirtualMachineScaleSetScaleInRules.VirtualMachineScaleSetScaleInRulesNewestVM
+1. VirtualMachineScaleSetScaleInRules.VirtualMachineScaleSetScaleInRulesOldestVM
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesBasicA0
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesBasicA1
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesBasicA2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesBasicA3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesBasicA4
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardA0
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardA1
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardA10
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardA11
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardA1V2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardA2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardA2V2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardA2mV2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardA3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardA4
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardA4V2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardA4mV2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardA5
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardA6
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardA7
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardA8
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardA8V2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardA8mV2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardA9
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardB1ms
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardB1s
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardB2ms
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardB2s
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardB4ms
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardB8ms
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardD1
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardD11
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardD11V2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardD12
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardD12V2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardD13
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardD13V2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardD14
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardD14V2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardD15V2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardD16V3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardD16sV3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardD1V2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardD2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardD2V2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardD2V3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardD2sV3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardD3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardD32V3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardD32sV3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardD3V2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardD4
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardD4V2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardD4V3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardD4sV3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardD5V2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardD64V3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardD64sV3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardD8V3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardD8sV3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardDS1
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardDS11
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardDS11V2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardDS12
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardDS12V2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardDS13
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardDS132V2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardDS134V2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardDS13V2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardDS14
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardDS144V2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardDS148V2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardDS14V2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardDS15V2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardDS1V2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardDS2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardDS2V2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardDS3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardDS3V2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardDS4
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardDS4V2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardDS5V2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardE16V3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardE16sV3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardE2V3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardE2sV3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardE3216V3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardE328sV3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardE32V3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardE32sV3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardE4V3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardE4sV3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardE6416sV3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardE6432sV3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardE64V3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardE64sV3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardE8V3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardE8sV3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardF1
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardF16
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardF16s
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardF16sV2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardF1s
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardF2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardF2s
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardF2sV2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardF32sV2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardF4
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardF4s
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardF4sV2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardF64sV2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardF72sV2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardF8
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardF8s
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardF8sV2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardG1
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardG2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardG3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardG4
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardG5
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardGS1
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardGS2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardGS3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardGS4
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardGS44
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardGS48
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardGS5
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardGS516
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardGS58
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardH16
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardH16m
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardH16mr
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardH16r
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardH8
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardH8m
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardL16s
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardL32s
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardL4s
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardL8s
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardM12832ms
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardM12864ms
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardM128ms
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardM128s
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardM6416ms
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardM6432ms
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardM64ms
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardM64s
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardNC12
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardNC12sV2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardNC12sV3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardNC24
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardNC24r
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardNC24rsV2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardNC24rsV3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardNC24sV2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardNC24sV3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardNC6
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardNC6sV2
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardNC6sV3
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardND12s
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardND24rs
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardND24s
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardND6s
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardNV12
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardNV24
+1. VirtualMachineSizeTypes.VirtualMachineSizeTypesStandardNV6
+
### New Funcs
-1. AccessURI.MarshalJSON() ([]byte, error)
-1. AvailablePatchSummary.MarshalJSON() ([]byte, error)
-1. BootDiagnosticsInstanceView.MarshalJSON() ([]byte, error)
-1. DataDiskImage.MarshalJSON() ([]byte, error)
-1. DiskAccessProperties.MarshalJSON() ([]byte, error)
-1. GalleryIdentifier.MarshalJSON() ([]byte, error)
-1. LastPatchInstallationSummary.MarshalJSON() ([]byte, error)
-1. LogAnalyticsOperationResult.MarshalJSON() ([]byte, error)
-1. LogAnalyticsOutput.MarshalJSON() ([]byte, error)
-1. OperationListResult.MarshalJSON() ([]byte, error)
-1. OperationValueDisplay.MarshalJSON() ([]byte, error)
-1. OrchestrationServiceSummary.MarshalJSON() ([]byte, error)
-1. PatchInstallationDetail.MarshalJSON() ([]byte, error)
-1. PrivateEndpoint.MarshalJSON() ([]byte, error)
-1. ProxyOnlyResource.MarshalJSON() ([]byte, error)
-1. RecoveryWalkResponse.MarshalJSON() ([]byte, error)
-1. RegionalReplicationStatus.MarshalJSON() ([]byte, error)
-1. ReplicationStatus.MarshalJSON() ([]byte, error)
-1. ResourceSku.MarshalJSON() ([]byte, error)
-1. ResourceSkuCapabilities.MarshalJSON() ([]byte, error)
-1. ResourceSkuCapacity.MarshalJSON() ([]byte, error)
-1. ResourceSkuCosts.MarshalJSON() ([]byte, error)
-1. ResourceSkuLocationInfo.MarshalJSON() ([]byte, error)
-1. ResourceSkuRestrictionInfo.MarshalJSON() ([]byte, error)
-1. ResourceSkuRestrictions.MarshalJSON() ([]byte, error)
-1. ResourceSkuZoneDetails.MarshalJSON() ([]byte, error)
-1. RetrieveBootDiagnosticsDataResult.MarshalJSON() ([]byte, error)
-1. RollbackStatusInfo.MarshalJSON() ([]byte, error)
-1. RollingUpgradeProgressInfo.MarshalJSON() ([]byte, error)
-1. RollingUpgradeRunningStatus.MarshalJSON() ([]byte, error)
-1. RollingUpgradeStatusInfoProperties.MarshalJSON() ([]byte, error)
-1. ShareInfoElement.MarshalJSON() ([]byte, error)
-1. SubResourceReadOnly.MarshalJSON() ([]byte, error)
-1. UpgradeOperationHistoricalStatusInfo.MarshalJSON() ([]byte, error)
-1. UpgradeOperationHistoricalStatusInfoProperties.MarshalJSON() ([]byte, error)
-1. UpgradeOperationHistoryStatus.MarshalJSON() ([]byte, error)
-1. VirtualMachineAssessPatchesResult.MarshalJSON() ([]byte, error)
-1. VirtualMachineHealthStatus.MarshalJSON() ([]byte, error)
-1. VirtualMachineIdentityUserAssignedIdentitiesValue.MarshalJSON() ([]byte, error)
-1. VirtualMachineInstallPatchesResult.MarshalJSON() ([]byte, error)
-1. VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue.MarshalJSON() ([]byte, error)
-1. VirtualMachineScaleSetInstanceViewStatusesSummary.MarshalJSON() ([]byte, error)
-1. VirtualMachineScaleSetSku.MarshalJSON() ([]byte, error)
-1. VirtualMachineScaleSetSkuCapacity.MarshalJSON() ([]byte, error)
-1. VirtualMachineScaleSetVMExtensionsSummary.MarshalJSON() ([]byte, error)
-1. VirtualMachineSoftwarePatchProperties.MarshalJSON() ([]byte, error)
-1. VirtualMachineStatusCodeCount.MarshalJSON() ([]byte, error)
+1. *DiskRestorePointGrantAccessFuture.UnmarshalJSON([]byte) error
+1. *DiskRestorePointRevokeAccessFuture.UnmarshalJSON([]byte) error
+1. DiskRestorePointClient.GrantAccess(context.Context, string, string, string, string, GrantAccessData) (DiskRestorePointGrantAccessFuture, error)
+1. DiskRestorePointClient.GrantAccessPreparer(context.Context, string, string, string, string, GrantAccessData) (*http.Request, error)
+1. DiskRestorePointClient.GrantAccessResponder(*http.Response) (AccessURI, error)
+1. DiskRestorePointClient.GrantAccessSender(*http.Request) (DiskRestorePointGrantAccessFuture, error)
+1. DiskRestorePointClient.RevokeAccess(context.Context, string, string, string, string) (DiskRestorePointRevokeAccessFuture, error)
+1. DiskRestorePointClient.RevokeAccessPreparer(context.Context, string, string, string, string) (*http.Request, error)
+1. DiskRestorePointClient.RevokeAccessResponder(*http.Response) (autorest.Response, error)
+1. DiskRestorePointClient.RevokeAccessSender(*http.Request) (DiskRestorePointRevokeAccessFuture, error)
+
+### Struct Changes
+
+#### New Structs
+
+1. DiskRestorePointGrantAccessFuture
+1. DiskRestorePointRevokeAccessFuture
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/_meta.json b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/_meta.json
index 24ac069d726e..74d93d45ca57 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/_meta.json
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/_meta.json
@@ -1,11 +1,11 @@
{
- "commit": "e0f8b9ab0f5fe5e71b7429ebfea8a33c19ec9d8d",
+ "commit": "af463c3f9502d353b8a009685177f13335adb8cd",
"readme": "/_/azure-rest-api-specs/specification/compute/resource-manager/readme.md",
"tag": "package-2020-12-01",
- "use": "@microsoft.azure/autorest.go@2.1.183",
+ "use": "@microsoft.azure/autorest.go@2.1.187",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
- "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2020-12-01 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/compute/resource-manager/readme.md",
+ "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2020-12-01 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix /_/azure-rest-api-specs/specification/compute/resource-manager/readme.md",
"additional_properties": {
- "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION"
+ "additional_options": "--go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix"
}
}
\ No newline at end of file
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/dedicatedhosts.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/dedicatedhosts.go
index f8e12fe08136..9cfc587ffb2d 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/dedicatedhosts.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/dedicatedhosts.go
@@ -66,7 +66,7 @@ func (client DedicatedHostsClient) CreateOrUpdate(ctx context.Context, resourceG
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -101,6 +101,7 @@ func (client DedicatedHostsClient) CreateOrUpdatePreparer(ctx context.Context, r
// http.Response Body if it receives an error.
func (client DedicatedHostsClient) CreateOrUpdateSender(req *http.Request) (future DedicatedHostsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -148,7 +149,7 @@ func (client DedicatedHostsClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -181,6 +182,7 @@ func (client DedicatedHostsClient) DeletePreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client DedicatedHostsClient) DeleteSender(req *http.Request) (future DedicatedHostsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -429,7 +431,7 @@ func (client DedicatedHostsClient) Update(ctx context.Context, resourceGroupName
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -464,6 +466,7 @@ func (client DedicatedHostsClient) UpdatePreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client DedicatedHostsClient) UpdateSender(req *http.Request) (future DedicatedHostsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/diskaccesses.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/diskaccesses.go
index 44a4985630d6..45105cae000e 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/diskaccesses.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/diskaccesses.go
@@ -57,7 +57,7 @@ func (client DiskAccessesClient) CreateOrUpdate(ctx context.Context, resourceGro
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -91,6 +91,7 @@ func (client DiskAccessesClient) CreateOrUpdatePreparer(ctx context.Context, res
// http.Response Body if it receives an error.
func (client DiskAccessesClient) CreateOrUpdateSender(req *http.Request) (future DiskAccessesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -139,7 +140,7 @@ func (client DiskAccessesClient) Delete(ctx context.Context, resourceGroupName s
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -171,6 +172,7 @@ func (client DiskAccessesClient) DeletePreparer(ctx context.Context, resourceGro
// http.Response Body if it receives an error.
func (client DiskAccessesClient) DeleteSender(req *http.Request) (future DiskAccessesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -219,7 +221,7 @@ func (client DiskAccessesClient) DeleteAPrivateEndpointConnection(ctx context.Co
result, err = client.DeleteAPrivateEndpointConnectionSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "DeleteAPrivateEndpointConnection", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "DeleteAPrivateEndpointConnection", result.Response(), "Failure sending request")
return
}
@@ -252,6 +254,7 @@ func (client DiskAccessesClient) DeleteAPrivateEndpointConnectionPreparer(ctx co
// http.Response Body if it receives an error.
func (client DiskAccessesClient) DeleteAPrivateEndpointConnectionSender(req *http.Request) (future DiskAccessesDeleteAPrivateEndpointConnectionFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -885,7 +888,7 @@ func (client DiskAccessesClient) Update(ctx context.Context, resourceGroupName s
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -919,6 +922,7 @@ func (client DiskAccessesClient) UpdatePreparer(ctx context.Context, resourceGro
// http.Response Body if it receives an error.
func (client DiskAccessesClient) UpdateSender(req *http.Request) (future DiskAccessesUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -978,7 +982,7 @@ func (client DiskAccessesClient) UpdateAPrivateEndpointConnection(ctx context.Co
result, err = client.UpdateAPrivateEndpointConnectionSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "UpdateAPrivateEndpointConnection", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "UpdateAPrivateEndpointConnection", result.Response(), "Failure sending request")
return
}
@@ -1016,6 +1020,7 @@ func (client DiskAccessesClient) UpdateAPrivateEndpointConnectionPreparer(ctx co
// http.Response Body if it receives an error.
func (client DiskAccessesClient) UpdateAPrivateEndpointConnectionSender(req *http.Request) (future DiskAccessesUpdateAPrivateEndpointConnectionFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/diskencryptionsets.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/diskencryptionsets.go
index 2a5ea1fb4786..37f51fe19198 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/diskencryptionsets.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/diskencryptionsets.go
@@ -68,7 +68,7 @@ func (client DiskEncryptionSetsClient) CreateOrUpdate(ctx context.Context, resou
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -102,6 +102,7 @@ func (client DiskEncryptionSetsClient) CreateOrUpdatePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client DiskEncryptionSetsClient) CreateOrUpdateSender(req *http.Request) (future DiskEncryptionSetsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -150,7 +151,7 @@ func (client DiskEncryptionSetsClient) Delete(ctx context.Context, resourceGroup
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -182,6 +183,7 @@ func (client DiskEncryptionSetsClient) DeletePreparer(ctx context.Context, resou
// http.Response Body if it receives an error.
func (client DiskEncryptionSetsClient) DeleteSender(req *http.Request) (future DiskEncryptionSetsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -658,7 +660,7 @@ func (client DiskEncryptionSetsClient) Update(ctx context.Context, resourceGroup
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -692,6 +694,7 @@ func (client DiskEncryptionSetsClient) UpdatePreparer(ctx context.Context, resou
// http.Response Body if it receives an error.
func (client DiskEncryptionSetsClient) UpdateSender(req *http.Request) (future DiskEncryptionSetsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/diskrestorepoint.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/diskrestorepoint.go
index 79620d98ae91..20b31a6d4748 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/diskrestorepoint.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/diskrestorepoint.go
@@ -10,6 +10,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
"github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -114,6 +115,101 @@ func (client DiskRestorePointClient) GetResponder(resp *http.Response) (result D
return
}
+// GrantAccess grants access to a diskRestorePoint.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// restorePointCollectionName - the name of the restore point collection that the disk restore point belongs.
+// Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
+// VMRestorePointName - the name of the vm restore point that the disk disk restore point belongs. Supported
+// characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
+// diskRestorePointName - the name of the disk restore point created. Supported characters for the name are
+// a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
+// grantAccessData - access data object supplied in the body of the get disk access operation.
+func (client DiskRestorePointClient) GrantAccess(ctx context.Context, resourceGroupName string, restorePointCollectionName string, VMRestorePointName string, diskRestorePointName string, grantAccessData GrantAccessData) (result DiskRestorePointGrantAccessFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskRestorePointClient.GrantAccess")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: grantAccessData,
+ Constraints: []validation.Constraint{{Target: "grantAccessData.DurationInSeconds", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("compute.DiskRestorePointClient", "GrantAccess", err.Error())
+ }
+
+ req, err := client.GrantAccessPreparer(ctx, resourceGroupName, restorePointCollectionName, VMRestorePointName, diskRestorePointName, grantAccessData)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "GrantAccess", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.GrantAccessSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "GrantAccess", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// GrantAccessPreparer prepares the GrantAccess request.
+func (client DiskRestorePointClient) GrantAccessPreparer(ctx context.Context, resourceGroupName string, restorePointCollectionName string, VMRestorePointName string, diskRestorePointName string, grantAccessData GrantAccessData) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskRestorePointName": autorest.Encode("path", diskRestorePointName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "restorePointCollectionName": autorest.Encode("path", restorePointCollectionName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmRestorePointName": autorest.Encode("path", VMRestorePointName),
+ }
+
+ const APIVersion = "2020-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/beginGetAccess", pathParameters),
+ autorest.WithJSON(grantAccessData),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GrantAccessSender sends the GrantAccess request. The method will close the
+// http.Response Body if it receives an error.
+func (client DiskRestorePointClient) GrantAccessSender(req *http.Request) (future DiskRestorePointGrantAccessFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// GrantAccessResponder handles the response to the GrantAccess request. The method always
+// closes the http.Response Body.
+func (client DiskRestorePointClient) GrantAccessResponder(resp *http.Response) (result AccessURI, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
// ListByRestorePoint lists diskRestorePoints under a vmRestorePoint.
// Parameters:
// resourceGroupName - the name of the resource group.
@@ -235,3 +331,88 @@ func (client DiskRestorePointClient) ListByRestorePointComplete(ctx context.Cont
result.page, err = client.ListByRestorePoint(ctx, resourceGroupName, restorePointCollectionName, VMRestorePointName)
return
}
+
+// RevokeAccess revokes access to a diskRestorePoint.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// restorePointCollectionName - the name of the restore point collection that the disk restore point belongs.
+// Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
+// VMRestorePointName - the name of the vm restore point that the disk disk restore point belongs. Supported
+// characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
+// diskRestorePointName - the name of the disk restore point created. Supported characters for the name are
+// a-z, A-Z, 0-9 and _. The maximum name length is 80 characters.
+func (client DiskRestorePointClient) RevokeAccess(ctx context.Context, resourceGroupName string, restorePointCollectionName string, VMRestorePointName string, diskRestorePointName string) (result DiskRestorePointRevokeAccessFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskRestorePointClient.RevokeAccess")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.RevokeAccessPreparer(ctx, resourceGroupName, restorePointCollectionName, VMRestorePointName, diskRestorePointName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "RevokeAccess", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.RevokeAccessSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "RevokeAccess", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// RevokeAccessPreparer prepares the RevokeAccess request.
+func (client DiskRestorePointClient) RevokeAccessPreparer(ctx context.Context, resourceGroupName string, restorePointCollectionName string, VMRestorePointName string, diskRestorePointName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskRestorePointName": autorest.Encode("path", diskRestorePointName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "restorePointCollectionName": autorest.Encode("path", restorePointCollectionName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmRestorePointName": autorest.Encode("path", VMRestorePointName),
+ }
+
+ const APIVersion = "2020-12-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/endGetAccess", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RevokeAccessSender sends the RevokeAccess request. The method will close the
+// http.Response Body if it receives an error.
+func (client DiskRestorePointClient) RevokeAccessSender(req *http.Request) (future DiskRestorePointRevokeAccessFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// RevokeAccessResponder handles the response to the RevokeAccess request. The method always
+// closes the http.Response Body.
+func (client DiskRestorePointClient) RevokeAccessResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/disks.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/disks.go
index 438b3cc62735..1080f7b8558e 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/disks.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/disks.go
@@ -77,7 +77,7 @@ func (client DisksClient) CreateOrUpdate(ctx context.Context, resourceGroupName
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -113,6 +113,7 @@ func (client DisksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGr
// http.Response Body if it receives an error.
func (client DisksClient) CreateOrUpdateSender(req *http.Request) (future DisksCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -161,7 +162,7 @@ func (client DisksClient) Delete(ctx context.Context, resourceGroupName string,
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -193,6 +194,7 @@ func (client DisksClient) DeletePreparer(ctx context.Context, resourceGroupName
// http.Response Body if it receives an error.
func (client DisksClient) DeleteSender(req *http.Request) (future DisksDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -325,7 +327,7 @@ func (client DisksClient) GrantAccess(ctx context.Context, resourceGroupName str
result, err = client.GrantAccessSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksClient", "GrantAccess", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "GrantAccess", result.Response(), "Failure sending request")
return
}
@@ -359,6 +361,7 @@ func (client DisksClient) GrantAccessPreparer(ctx context.Context, resourceGroup
// http.Response Body if it receives an error.
func (client DisksClient) GrantAccessSender(req *http.Request) (future DisksGrantAccessFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -636,7 +639,7 @@ func (client DisksClient) RevokeAccess(ctx context.Context, resourceGroupName st
result, err = client.RevokeAccessSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksClient", "RevokeAccess", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "RevokeAccess", result.Response(), "Failure sending request")
return
}
@@ -668,6 +671,7 @@ func (client DisksClient) RevokeAccessPreparer(ctx context.Context, resourceGrou
// http.Response Body if it receives an error.
func (client DisksClient) RevokeAccessSender(req *http.Request) (future DisksRevokeAccessFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -716,7 +720,7 @@ func (client DisksClient) Update(ctx context.Context, resourceGroupName string,
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.DisksClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -750,6 +754,7 @@ func (client DisksClient) UpdatePreparer(ctx context.Context, resourceGroupName
// http.Response Body if it receives an error.
func (client DisksClient) UpdateSender(req *http.Request) (future DisksUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/enums.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/enums.go
index d5ff913519ed..2962ffcdabd8 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/enums.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/enums.go
@@ -10,51 +10,51 @@ package compute
type AccessLevel string
const (
- // None ...
- None AccessLevel = "None"
- // Read ...
- Read AccessLevel = "Read"
- // Write ...
- Write AccessLevel = "Write"
+ // AccessLevelNone ...
+ AccessLevelNone AccessLevel = "None"
+ // AccessLevelRead ...
+ AccessLevelRead AccessLevel = "Read"
+ // AccessLevelWrite ...
+ AccessLevelWrite AccessLevel = "Write"
)
// PossibleAccessLevelValues returns an array of possible values for the AccessLevel const type.
func PossibleAccessLevelValues() []AccessLevel {
- return []AccessLevel{None, Read, Write}
+ return []AccessLevel{AccessLevelNone, AccessLevelRead, AccessLevelWrite}
}
// AggregatedReplicationState enumerates the values for aggregated replication state.
type AggregatedReplicationState string
const (
- // Completed ...
- Completed AggregatedReplicationState = "Completed"
- // Failed ...
- Failed AggregatedReplicationState = "Failed"
- // InProgress ...
- InProgress AggregatedReplicationState = "InProgress"
- // Unknown ...
- Unknown AggregatedReplicationState = "Unknown"
+ // AggregatedReplicationStateCompleted ...
+ AggregatedReplicationStateCompleted AggregatedReplicationState = "Completed"
+ // AggregatedReplicationStateFailed ...
+ AggregatedReplicationStateFailed AggregatedReplicationState = "Failed"
+ // AggregatedReplicationStateInProgress ...
+ AggregatedReplicationStateInProgress AggregatedReplicationState = "InProgress"
+ // AggregatedReplicationStateUnknown ...
+ AggregatedReplicationStateUnknown AggregatedReplicationState = "Unknown"
)
// PossibleAggregatedReplicationStateValues returns an array of possible values for the AggregatedReplicationState const type.
func PossibleAggregatedReplicationStateValues() []AggregatedReplicationState {
- return []AggregatedReplicationState{Completed, Failed, InProgress, Unknown}
+ return []AggregatedReplicationState{AggregatedReplicationStateCompleted, AggregatedReplicationStateFailed, AggregatedReplicationStateInProgress, AggregatedReplicationStateUnknown}
}
// AvailabilitySetSkuTypes enumerates the values for availability set sku types.
type AvailabilitySetSkuTypes string
const (
- // Aligned ...
- Aligned AvailabilitySetSkuTypes = "Aligned"
- // Classic ...
- Classic AvailabilitySetSkuTypes = "Classic"
+ // AvailabilitySetSkuTypesAligned ...
+ AvailabilitySetSkuTypesAligned AvailabilitySetSkuTypes = "Aligned"
+ // AvailabilitySetSkuTypesClassic ...
+ AvailabilitySetSkuTypesClassic AvailabilitySetSkuTypes = "Classic"
)
// PossibleAvailabilitySetSkuTypesValues returns an array of possible values for the AvailabilitySetSkuTypes const type.
func PossibleAvailabilitySetSkuTypesValues() []AvailabilitySetSkuTypes {
- return []AvailabilitySetSkuTypes{Aligned, Classic}
+ return []AvailabilitySetSkuTypes{AvailabilitySetSkuTypesAligned, AvailabilitySetSkuTypesClassic}
}
// CachingTypes enumerates the values for caching types.
@@ -78,13 +78,13 @@ func PossibleCachingTypesValues() []CachingTypes {
type ComponentNames string
const (
- // MicrosoftWindowsShellSetup ...
- MicrosoftWindowsShellSetup ComponentNames = "Microsoft-Windows-Shell-Setup"
+ // ComponentNamesMicrosoftWindowsShellSetup ...
+ ComponentNamesMicrosoftWindowsShellSetup ComponentNames = "Microsoft-Windows-Shell-Setup"
)
// PossibleComponentNamesValues returns an array of possible values for the ComponentNames const type.
func PossibleComponentNamesValues() []ComponentNames {
- return []ComponentNames{MicrosoftWindowsShellSetup}
+ return []ComponentNames{ComponentNamesMicrosoftWindowsShellSetup}
}
// DedicatedHostLicenseTypes enumerates the values for dedicated host license types.
@@ -108,57 +108,57 @@ func PossibleDedicatedHostLicenseTypesValues() []DedicatedHostLicenseTypes {
type DiffDiskOptions string
const (
- // Local ...
- Local DiffDiskOptions = "Local"
+ // DiffDiskOptionsLocal ...
+ DiffDiskOptionsLocal DiffDiskOptions = "Local"
)
// PossibleDiffDiskOptionsValues returns an array of possible values for the DiffDiskOptions const type.
func PossibleDiffDiskOptionsValues() []DiffDiskOptions {
- return []DiffDiskOptions{Local}
+ return []DiffDiskOptions{DiffDiskOptionsLocal}
}
// DiffDiskPlacement enumerates the values for diff disk placement.
type DiffDiskPlacement string
const (
- // CacheDisk ...
- CacheDisk DiffDiskPlacement = "CacheDisk"
- // ResourceDisk ...
- ResourceDisk DiffDiskPlacement = "ResourceDisk"
+ // DiffDiskPlacementCacheDisk ...
+ DiffDiskPlacementCacheDisk DiffDiskPlacement = "CacheDisk"
+ // DiffDiskPlacementResourceDisk ...
+ DiffDiskPlacementResourceDisk DiffDiskPlacement = "ResourceDisk"
)
// PossibleDiffDiskPlacementValues returns an array of possible values for the DiffDiskPlacement const type.
func PossibleDiffDiskPlacementValues() []DiffDiskPlacement {
- return []DiffDiskPlacement{CacheDisk, ResourceDisk}
+ return []DiffDiskPlacement{DiffDiskPlacementCacheDisk, DiffDiskPlacementResourceDisk}
}
// DiskCreateOption enumerates the values for disk create option.
type DiskCreateOption string
const (
- // Attach Disk will be attached to a VM.
- Attach DiskCreateOption = "Attach"
- // Copy Create a new disk or snapshot by copying from a disk or snapshot specified by the given
- // sourceResourceId.
- Copy DiskCreateOption = "Copy"
- // Empty Create an empty data disk of a size given by diskSizeGB.
- Empty DiskCreateOption = "Empty"
- // FromImage Create a new disk from a platform image specified by the given imageReference or
- // galleryImageReference.
- FromImage DiskCreateOption = "FromImage"
- // Import Create a disk by importing from a blob specified by a sourceUri in a storage account specified by
- // storageAccountId.
- Import DiskCreateOption = "Import"
- // Restore Create a new disk by copying from a backup recovery point.
- Restore DiskCreateOption = "Restore"
- // Upload Create a new disk by obtaining a write token and using it to directly upload the contents of the
- // disk.
- Upload DiskCreateOption = "Upload"
+ // DiskCreateOptionAttach Disk will be attached to a VM.
+ DiskCreateOptionAttach DiskCreateOption = "Attach"
+ // DiskCreateOptionCopy Create a new disk or snapshot by copying from a disk or snapshot specified by the
+ // given sourceResourceId.
+ DiskCreateOptionCopy DiskCreateOption = "Copy"
+ // DiskCreateOptionEmpty Create an empty data disk of a size given by diskSizeGB.
+ DiskCreateOptionEmpty DiskCreateOption = "Empty"
+ // DiskCreateOptionFromImage Create a new disk from a platform image specified by the given imageReference
+ // or galleryImageReference.
+ DiskCreateOptionFromImage DiskCreateOption = "FromImage"
+ // DiskCreateOptionImport Create a disk by importing from a blob specified by a sourceUri in a storage
+ // account specified by storageAccountId.
+ DiskCreateOptionImport DiskCreateOption = "Import"
+ // DiskCreateOptionRestore Create a new disk by copying from a backup recovery point.
+ DiskCreateOptionRestore DiskCreateOption = "Restore"
+ // DiskCreateOptionUpload Create a new disk by obtaining a write token and using it to directly upload the
+ // contents of the disk.
+ DiskCreateOptionUpload DiskCreateOption = "Upload"
)
// PossibleDiskCreateOptionValues returns an array of possible values for the DiskCreateOption const type.
func PossibleDiskCreateOptionValues() []DiskCreateOption {
- return []DiskCreateOption{Attach, Copy, Empty, FromImage, Import, Restore, Upload}
+ return []DiskCreateOption{DiskCreateOptionAttach, DiskCreateOptionCopy, DiskCreateOptionEmpty, DiskCreateOptionFromImage, DiskCreateOptionImport, DiskCreateOptionRestore, DiskCreateOptionUpload}
}
// DiskCreateOptionTypes enumerates the values for disk create option types.
@@ -182,13 +182,13 @@ func PossibleDiskCreateOptionTypesValues() []DiskCreateOptionTypes {
type DiskDetachOptionTypes string
const (
- // ForceDetach ...
- ForceDetach DiskDetachOptionTypes = "ForceDetach"
+ // DiskDetachOptionTypesForceDetach ...
+ DiskDetachOptionTypesForceDetach DiskDetachOptionTypes = "ForceDetach"
)
// PossibleDiskDetachOptionTypesValues returns an array of possible values for the DiskDetachOptionTypes const type.
func PossibleDiskDetachOptionTypesValues() []DiskDetachOptionTypes {
- return []DiskDetachOptionTypes{ForceDetach}
+ return []DiskDetachOptionTypes{DiskDetachOptionTypesForceDetach}
}
// DiskEncryptionSetIdentityType enumerates the values for disk encryption set identity type.
@@ -210,84 +210,85 @@ func PossibleDiskEncryptionSetIdentityTypeValues() []DiskEncryptionSetIdentityTy
type DiskEncryptionSetType string
const (
- // EncryptionAtRestWithCustomerKey Resource using diskEncryptionSet would be encrypted at rest with
- // Customer managed key that can be changed and revoked by a customer.
- EncryptionAtRestWithCustomerKey DiskEncryptionSetType = "EncryptionAtRestWithCustomerKey"
- // EncryptionAtRestWithPlatformAndCustomerKeys Resource using diskEncryptionSet would be encrypted at rest
- // with two layers of encryption. One of the keys is Customer managed and the other key is Platform
- // managed.
- EncryptionAtRestWithPlatformAndCustomerKeys DiskEncryptionSetType = "EncryptionAtRestWithPlatformAndCustomerKeys"
+ // DiskEncryptionSetTypeEncryptionAtRestWithCustomerKey Resource using diskEncryptionSet would be encrypted
+ // at rest with Customer managed key that can be changed and revoked by a customer.
+ DiskEncryptionSetTypeEncryptionAtRestWithCustomerKey DiskEncryptionSetType = "EncryptionAtRestWithCustomerKey"
+ // DiskEncryptionSetTypeEncryptionAtRestWithPlatformAndCustomerKeys Resource using diskEncryptionSet would
+ // be encrypted at rest with two layers of encryption. One of the keys is Customer managed and the other
+ // key is Platform managed.
+ DiskEncryptionSetTypeEncryptionAtRestWithPlatformAndCustomerKeys DiskEncryptionSetType = "EncryptionAtRestWithPlatformAndCustomerKeys"
)
// PossibleDiskEncryptionSetTypeValues returns an array of possible values for the DiskEncryptionSetType const type.
func PossibleDiskEncryptionSetTypeValues() []DiskEncryptionSetType {
- return []DiskEncryptionSetType{EncryptionAtRestWithCustomerKey, EncryptionAtRestWithPlatformAndCustomerKeys}
+ return []DiskEncryptionSetType{DiskEncryptionSetTypeEncryptionAtRestWithCustomerKey, DiskEncryptionSetTypeEncryptionAtRestWithPlatformAndCustomerKeys}
}
// DiskSecurityTypes enumerates the values for disk security types.
type DiskSecurityTypes string
const (
- // TrustedLaunch Trusted Launch provides security features such as secure boot and virtual Trusted Platform
- // Module (vTPM)
- TrustedLaunch DiskSecurityTypes = "TrustedLaunch"
+ // DiskSecurityTypesTrustedLaunch Trusted Launch provides security features such as secure boot and virtual
+ // Trusted Platform Module (vTPM)
+ DiskSecurityTypesTrustedLaunch DiskSecurityTypes = "TrustedLaunch"
)
// PossibleDiskSecurityTypesValues returns an array of possible values for the DiskSecurityTypes const type.
func PossibleDiskSecurityTypesValues() []DiskSecurityTypes {
- return []DiskSecurityTypes{TrustedLaunch}
+ return []DiskSecurityTypes{DiskSecurityTypesTrustedLaunch}
}
// DiskState enumerates the values for disk state.
type DiskState string
const (
- // ActiveSAS The disk currently has an Active SAS Uri associated with it.
- ActiveSAS DiskState = "ActiveSAS"
- // ActiveUpload A disk is created for upload and a write token has been issued for uploading to it.
- ActiveUpload DiskState = "ActiveUpload"
- // Attached The disk is currently mounted to a running VM.
- Attached DiskState = "Attached"
- // ReadyToUpload A disk is ready to be created by upload by requesting a write token.
- ReadyToUpload DiskState = "ReadyToUpload"
- // Reserved The disk is mounted to a stopped-deallocated VM
- Reserved DiskState = "Reserved"
- // Unattached The disk is not being used and can be attached to a VM.
- Unattached DiskState = "Unattached"
+ // DiskStateActiveSAS The disk currently has an Active SAS Uri associated with it.
+ DiskStateActiveSAS DiskState = "ActiveSAS"
+ // DiskStateActiveUpload A disk is created for upload and a write token has been issued for uploading to
+ // it.
+ DiskStateActiveUpload DiskState = "ActiveUpload"
+ // DiskStateAttached The disk is currently mounted to a running VM.
+ DiskStateAttached DiskState = "Attached"
+ // DiskStateReadyToUpload A disk is ready to be created by upload by requesting a write token.
+ DiskStateReadyToUpload DiskState = "ReadyToUpload"
+ // DiskStateReserved The disk is mounted to a stopped-deallocated VM
+ DiskStateReserved DiskState = "Reserved"
+ // DiskStateUnattached The disk is not being used and can be attached to a VM.
+ DiskStateUnattached DiskState = "Unattached"
)
// PossibleDiskStateValues returns an array of possible values for the DiskState const type.
func PossibleDiskStateValues() []DiskState {
- return []DiskState{ActiveSAS, ActiveUpload, Attached, ReadyToUpload, Reserved, Unattached}
+ return []DiskState{DiskStateActiveSAS, DiskStateActiveUpload, DiskStateAttached, DiskStateReadyToUpload, DiskStateReserved, DiskStateUnattached}
}
// DiskStorageAccountTypes enumerates the values for disk storage account types.
type DiskStorageAccountTypes string
const (
- // PremiumLRS Premium SSD locally redundant storage. Best for production and performance sensitive
- // workloads.
- PremiumLRS DiskStorageAccountTypes = "Premium_LRS"
- // PremiumZRS Premium SSD zone redundant storage. Best for the production workloads that need storage
- // resiliency against zone failures.
- PremiumZRS DiskStorageAccountTypes = "Premium_ZRS"
- // StandardLRS Standard HDD locally redundant storage. Best for backup, non-critical, and infrequent
- // access.
- StandardLRS DiskStorageAccountTypes = "Standard_LRS"
- // StandardSSDLRS Standard SSD locally redundant storage. Best for web servers, lightly used enterprise
- // applications and dev/test.
- StandardSSDLRS DiskStorageAccountTypes = "StandardSSD_LRS"
- // StandardSSDZRS Standard SSD zone redundant storage. Best for web servers, lightly used enterprise
- // applications and dev/test that need storage resiliency against zone failures.
- StandardSSDZRS DiskStorageAccountTypes = "StandardSSD_ZRS"
- // UltraSSDLRS Ultra SSD locally redundant storage. Best for IO-intensive workloads such as SAP HANA, top
- // tier databases (for example, SQL, Oracle), and other transaction-heavy workloads.
- UltraSSDLRS DiskStorageAccountTypes = "UltraSSD_LRS"
+ // DiskStorageAccountTypesPremiumLRS Premium SSD locally redundant storage. Best for production and
+ // performance sensitive workloads.
+ DiskStorageAccountTypesPremiumLRS DiskStorageAccountTypes = "Premium_LRS"
+ // DiskStorageAccountTypesPremiumZRS Premium SSD zone redundant storage. Best for the production workloads
+ // that need storage resiliency against zone failures.
+ DiskStorageAccountTypesPremiumZRS DiskStorageAccountTypes = "Premium_ZRS"
+ // DiskStorageAccountTypesStandardLRS Standard HDD locally redundant storage. Best for backup,
+ // non-critical, and infrequent access.
+ DiskStorageAccountTypesStandardLRS DiskStorageAccountTypes = "Standard_LRS"
+ // DiskStorageAccountTypesStandardSSDLRS Standard SSD locally redundant storage. Best for web servers,
+ // lightly used enterprise applications and dev/test.
+ DiskStorageAccountTypesStandardSSDLRS DiskStorageAccountTypes = "StandardSSD_LRS"
+ // DiskStorageAccountTypesStandardSSDZRS Standard SSD zone redundant storage. Best for web servers, lightly
+ // used enterprise applications and dev/test that need storage resiliency against zone failures.
+ DiskStorageAccountTypesStandardSSDZRS DiskStorageAccountTypes = "StandardSSD_ZRS"
+ // DiskStorageAccountTypesUltraSSDLRS Ultra SSD locally redundant storage. Best for IO-intensive workloads
+ // such as SAP HANA, top tier databases (for example, SQL, Oracle), and other transaction-heavy workloads.
+ DiskStorageAccountTypesUltraSSDLRS DiskStorageAccountTypes = "UltraSSD_LRS"
)
// PossibleDiskStorageAccountTypesValues returns an array of possible values for the DiskStorageAccountTypes const type.
func PossibleDiskStorageAccountTypesValues() []DiskStorageAccountTypes {
- return []DiskStorageAccountTypes{PremiumLRS, PremiumZRS, StandardLRS, StandardSSDLRS, StandardSSDZRS, UltraSSDLRS}
+ return []DiskStorageAccountTypes{DiskStorageAccountTypesPremiumLRS, DiskStorageAccountTypesPremiumZRS, DiskStorageAccountTypesStandardLRS, DiskStorageAccountTypesStandardSSDLRS, DiskStorageAccountTypesStandardSSDZRS, DiskStorageAccountTypesUltraSSDLRS}
}
// EncryptionType enumerates the values for encryption type.
@@ -339,13 +340,13 @@ func PossibleExecutionStateValues() []ExecutionState {
type ExtendedLocationTypes string
const (
- // EdgeZone ...
- EdgeZone ExtendedLocationTypes = "EdgeZone"
+ // ExtendedLocationTypesEdgeZone ...
+ ExtendedLocationTypesEdgeZone ExtendedLocationTypes = "EdgeZone"
)
// PossibleExtendedLocationTypesValues returns an array of possible values for the ExtendedLocationTypes const type.
func PossibleExtendedLocationTypesValues() []ExtendedLocationTypes {
- return []ExtendedLocationTypes{EdgeZone}
+ return []ExtendedLocationTypes{ExtendedLocationTypesEdgeZone}
}
// HostCaching enumerates the values for host caching.
@@ -369,15 +370,15 @@ func PossibleHostCachingValues() []HostCaching {
type HyperVGeneration string
const (
- // V1 ...
- V1 HyperVGeneration = "V1"
- // V2 ...
- V2 HyperVGeneration = "V2"
+ // HyperVGenerationV1 ...
+ HyperVGenerationV1 HyperVGeneration = "V1"
+ // HyperVGenerationV2 ...
+ HyperVGenerationV2 HyperVGeneration = "V2"
)
// PossibleHyperVGenerationValues returns an array of possible values for the HyperVGeneration const type.
func PossibleHyperVGenerationValues() []HyperVGeneration {
- return []HyperVGeneration{V1, V2}
+ return []HyperVGeneration{HyperVGenerationV1, HyperVGenerationV2}
}
// HyperVGenerationType enumerates the values for hyper v generation type.
@@ -414,62 +415,62 @@ func PossibleHyperVGenerationTypesValues() []HyperVGenerationTypes {
type InstanceViewTypes string
const (
- // InstanceView ...
- InstanceView InstanceViewTypes = "instanceView"
+ // InstanceViewTypesInstanceView ...
+ InstanceViewTypesInstanceView InstanceViewTypes = "instanceView"
)
// PossibleInstanceViewTypesValues returns an array of possible values for the InstanceViewTypes const type.
func PossibleInstanceViewTypesValues() []InstanceViewTypes {
- return []InstanceViewTypes{InstanceView}
+ return []InstanceViewTypes{InstanceViewTypesInstanceView}
}
// IntervalInMins enumerates the values for interval in mins.
type IntervalInMins string
const (
- // FiveMins ...
- FiveMins IntervalInMins = "FiveMins"
- // SixtyMins ...
- SixtyMins IntervalInMins = "SixtyMins"
- // ThirtyMins ...
- ThirtyMins IntervalInMins = "ThirtyMins"
- // ThreeMins ...
- ThreeMins IntervalInMins = "ThreeMins"
+ // IntervalInMinsFiveMins ...
+ IntervalInMinsFiveMins IntervalInMins = "FiveMins"
+ // IntervalInMinsSixtyMins ...
+ IntervalInMinsSixtyMins IntervalInMins = "SixtyMins"
+ // IntervalInMinsThirtyMins ...
+ IntervalInMinsThirtyMins IntervalInMins = "ThirtyMins"
+ // IntervalInMinsThreeMins ...
+ IntervalInMinsThreeMins IntervalInMins = "ThreeMins"
)
// PossibleIntervalInMinsValues returns an array of possible values for the IntervalInMins const type.
func PossibleIntervalInMinsValues() []IntervalInMins {
- return []IntervalInMins{FiveMins, SixtyMins, ThirtyMins, ThreeMins}
+ return []IntervalInMins{IntervalInMinsFiveMins, IntervalInMinsSixtyMins, IntervalInMinsThirtyMins, IntervalInMinsThreeMins}
}
// IPVersion enumerates the values for ip version.
type IPVersion string
const (
- // IPv4 ...
- IPv4 IPVersion = "IPv4"
- // IPv6 ...
- IPv6 IPVersion = "IPv6"
+ // IPVersionIPv4 ...
+ IPVersionIPv4 IPVersion = "IPv4"
+ // IPVersionIPv6 ...
+ IPVersionIPv6 IPVersion = "IPv6"
)
// PossibleIPVersionValues returns an array of possible values for the IPVersion const type.
func PossibleIPVersionValues() []IPVersion {
- return []IPVersion{IPv4, IPv6}
+ return []IPVersion{IPVersionIPv4, IPVersionIPv6}
}
// LinuxVMGuestPatchMode enumerates the values for linux vm guest patch mode.
type LinuxVMGuestPatchMode string
const (
- // AutomaticByPlatform ...
- AutomaticByPlatform LinuxVMGuestPatchMode = "AutomaticByPlatform"
- // ImageDefault ...
- ImageDefault LinuxVMGuestPatchMode = "ImageDefault"
+ // LinuxVMGuestPatchModeAutomaticByPlatform ...
+ LinuxVMGuestPatchModeAutomaticByPlatform LinuxVMGuestPatchMode = "AutomaticByPlatform"
+ // LinuxVMGuestPatchModeImageDefault ...
+ LinuxVMGuestPatchModeImageDefault LinuxVMGuestPatchMode = "ImageDefault"
)
// PossibleLinuxVMGuestPatchModeValues returns an array of possible values for the LinuxVMGuestPatchMode const type.
func PossibleLinuxVMGuestPatchModeValues() []LinuxVMGuestPatchMode {
- return []LinuxVMGuestPatchMode{AutomaticByPlatform, ImageDefault}
+ return []LinuxVMGuestPatchMode{LinuxVMGuestPatchModeAutomaticByPlatform, LinuxVMGuestPatchModeImageDefault}
}
// MaintenanceOperationResultCodeTypes enumerates the values for maintenance operation result code types.
@@ -495,120 +496,121 @@ func PossibleMaintenanceOperationResultCodeTypesValues() []MaintenanceOperationR
type NetworkAccessPolicy string
const (
- // AllowAll The disk can be exported or uploaded to from any network.
- AllowAll NetworkAccessPolicy = "AllowAll"
- // AllowPrivate The disk can be exported or uploaded to using a DiskAccess resource's private endpoints.
- AllowPrivate NetworkAccessPolicy = "AllowPrivate"
- // DenyAll The disk cannot be exported.
- DenyAll NetworkAccessPolicy = "DenyAll"
+ // NetworkAccessPolicyAllowAll The disk can be exported or uploaded to from any network.
+ NetworkAccessPolicyAllowAll NetworkAccessPolicy = "AllowAll"
+ // NetworkAccessPolicyAllowPrivate The disk can be exported or uploaded to using a DiskAccess resource's
+ // private endpoints.
+ NetworkAccessPolicyAllowPrivate NetworkAccessPolicy = "AllowPrivate"
+ // NetworkAccessPolicyDenyAll The disk cannot be exported.
+ NetworkAccessPolicyDenyAll NetworkAccessPolicy = "DenyAll"
)
// PossibleNetworkAccessPolicyValues returns an array of possible values for the NetworkAccessPolicy const type.
func PossibleNetworkAccessPolicyValues() []NetworkAccessPolicy {
- return []NetworkAccessPolicy{AllowAll, AllowPrivate, DenyAll}
+ return []NetworkAccessPolicy{NetworkAccessPolicyAllowAll, NetworkAccessPolicyAllowPrivate, NetworkAccessPolicyDenyAll}
}
// OperatingSystemStateTypes enumerates the values for operating system state types.
type OperatingSystemStateTypes string
const (
- // Generalized Generalized image. Needs to be provisioned during deployment time.
- Generalized OperatingSystemStateTypes = "Generalized"
- // Specialized Specialized image. Contains already provisioned OS Disk.
- Specialized OperatingSystemStateTypes = "Specialized"
+ // OperatingSystemStateTypesGeneralized Generalized image. Needs to be provisioned during deployment time.
+ OperatingSystemStateTypesGeneralized OperatingSystemStateTypes = "Generalized"
+ // OperatingSystemStateTypesSpecialized Specialized image. Contains already provisioned OS Disk.
+ OperatingSystemStateTypesSpecialized OperatingSystemStateTypes = "Specialized"
)
// PossibleOperatingSystemStateTypesValues returns an array of possible values for the OperatingSystemStateTypes const type.
func PossibleOperatingSystemStateTypesValues() []OperatingSystemStateTypes {
- return []OperatingSystemStateTypes{Generalized, Specialized}
+ return []OperatingSystemStateTypes{OperatingSystemStateTypesGeneralized, OperatingSystemStateTypesSpecialized}
}
// OperatingSystemTypes enumerates the values for operating system types.
type OperatingSystemTypes string
const (
- // Linux ...
- Linux OperatingSystemTypes = "Linux"
- // Windows ...
- Windows OperatingSystemTypes = "Windows"
+ // OperatingSystemTypesLinux ...
+ OperatingSystemTypesLinux OperatingSystemTypes = "Linux"
+ // OperatingSystemTypesWindows ...
+ OperatingSystemTypesWindows OperatingSystemTypes = "Windows"
)
// PossibleOperatingSystemTypesValues returns an array of possible values for the OperatingSystemTypes const type.
func PossibleOperatingSystemTypesValues() []OperatingSystemTypes {
- return []OperatingSystemTypes{Linux, Windows}
+ return []OperatingSystemTypes{OperatingSystemTypesLinux, OperatingSystemTypesWindows}
}
// OrchestrationMode enumerates the values for orchestration mode.
type OrchestrationMode string
const (
- // Flexible ...
- Flexible OrchestrationMode = "Flexible"
- // Uniform ...
- Uniform OrchestrationMode = "Uniform"
+ // OrchestrationModeFlexible ...
+ OrchestrationModeFlexible OrchestrationMode = "Flexible"
+ // OrchestrationModeUniform ...
+ OrchestrationModeUniform OrchestrationMode = "Uniform"
)
// PossibleOrchestrationModeValues returns an array of possible values for the OrchestrationMode const type.
func PossibleOrchestrationModeValues() []OrchestrationMode {
- return []OrchestrationMode{Flexible, Uniform}
+ return []OrchestrationMode{OrchestrationModeFlexible, OrchestrationModeUniform}
}
// OrchestrationServiceNames enumerates the values for orchestration service names.
type OrchestrationServiceNames string
const (
- // AutomaticRepairs ...
- AutomaticRepairs OrchestrationServiceNames = "AutomaticRepairs"
+ // OrchestrationServiceNamesAutomaticRepairs ...
+ OrchestrationServiceNamesAutomaticRepairs OrchestrationServiceNames = "AutomaticRepairs"
)
// PossibleOrchestrationServiceNamesValues returns an array of possible values for the OrchestrationServiceNames const type.
func PossibleOrchestrationServiceNamesValues() []OrchestrationServiceNames {
- return []OrchestrationServiceNames{AutomaticRepairs}
+ return []OrchestrationServiceNames{OrchestrationServiceNamesAutomaticRepairs}
}
// OrchestrationServiceState enumerates the values for orchestration service state.
type OrchestrationServiceState string
const (
- // NotRunning ...
- NotRunning OrchestrationServiceState = "NotRunning"
- // Running ...
- Running OrchestrationServiceState = "Running"
- // Suspended ...
- Suspended OrchestrationServiceState = "Suspended"
+ // OrchestrationServiceStateNotRunning ...
+ OrchestrationServiceStateNotRunning OrchestrationServiceState = "NotRunning"
+ // OrchestrationServiceStateRunning ...
+ OrchestrationServiceStateRunning OrchestrationServiceState = "Running"
+ // OrchestrationServiceStateSuspended ...
+ OrchestrationServiceStateSuspended OrchestrationServiceState = "Suspended"
)
// PossibleOrchestrationServiceStateValues returns an array of possible values for the OrchestrationServiceState const type.
func PossibleOrchestrationServiceStateValues() []OrchestrationServiceState {
- return []OrchestrationServiceState{NotRunning, Running, Suspended}
+ return []OrchestrationServiceState{OrchestrationServiceStateNotRunning, OrchestrationServiceStateRunning, OrchestrationServiceStateSuspended}
}
// OrchestrationServiceStateAction enumerates the values for orchestration service state action.
type OrchestrationServiceStateAction string
const (
- // Resume ...
- Resume OrchestrationServiceStateAction = "Resume"
- // Suspend ...
- Suspend OrchestrationServiceStateAction = "Suspend"
+ // OrchestrationServiceStateActionResume ...
+ OrchestrationServiceStateActionResume OrchestrationServiceStateAction = "Resume"
+ // OrchestrationServiceStateActionSuspend ...
+ OrchestrationServiceStateActionSuspend OrchestrationServiceStateAction = "Suspend"
)
// PossibleOrchestrationServiceStateActionValues returns an array of possible values for the OrchestrationServiceStateAction const type.
func PossibleOrchestrationServiceStateActionValues() []OrchestrationServiceStateAction {
- return []OrchestrationServiceStateAction{Resume, Suspend}
+ return []OrchestrationServiceStateAction{OrchestrationServiceStateActionResume, OrchestrationServiceStateActionSuspend}
}
// PassNames enumerates the values for pass names.
type PassNames string
const (
- // OobeSystem ...
- OobeSystem PassNames = "OobeSystem"
+ // PassNamesOobeSystem ...
+ PassNamesOobeSystem PassNames = "OobeSystem"
)
// PossiblePassNamesValues returns an array of possible values for the PassNames const type.
func PossiblePassNamesValues() []PassNames {
- return []PassNames{OobeSystem}
+ return []PassNames{PassNamesOobeSystem}
}
// PatchAssessmentState enumerates the values for patch assessment state.
@@ -694,32 +696,32 @@ func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpoin
type PrivateEndpointServiceConnectionStatus string
const (
- // Approved ...
- Approved PrivateEndpointServiceConnectionStatus = "Approved"
- // Pending ...
- Pending PrivateEndpointServiceConnectionStatus = "Pending"
- // Rejected ...
- Rejected PrivateEndpointServiceConnectionStatus = "Rejected"
+ // PrivateEndpointServiceConnectionStatusApproved ...
+ PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved"
+ // PrivateEndpointServiceConnectionStatusPending ...
+ PrivateEndpointServiceConnectionStatusPending PrivateEndpointServiceConnectionStatus = "Pending"
+ // PrivateEndpointServiceConnectionStatusRejected ...
+ PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected"
)
// PossiblePrivateEndpointServiceConnectionStatusValues returns an array of possible values for the PrivateEndpointServiceConnectionStatus const type.
func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus {
- return []PrivateEndpointServiceConnectionStatus{Approved, Pending, Rejected}
+ return []PrivateEndpointServiceConnectionStatus{PrivateEndpointServiceConnectionStatusApproved, PrivateEndpointServiceConnectionStatusPending, PrivateEndpointServiceConnectionStatusRejected}
}
// ProtocolTypes enumerates the values for protocol types.
type ProtocolTypes string
const (
- // HTTP ...
- HTTP ProtocolTypes = "Http"
- // HTTPS ...
- HTTPS ProtocolTypes = "Https"
+ // ProtocolTypesHTTP ...
+ ProtocolTypesHTTP ProtocolTypes = "Http"
+ // ProtocolTypesHTTPS ...
+ ProtocolTypesHTTPS ProtocolTypes = "Https"
)
// PossibleProtocolTypesValues returns an array of possible values for the ProtocolTypes const type.
func PossibleProtocolTypesValues() []ProtocolTypes {
- return []ProtocolTypes{HTTP, HTTPS}
+ return []ProtocolTypes{ProtocolTypesHTTP, ProtocolTypesHTTPS}
}
// ProvisioningState enumerates the values for provisioning state.
@@ -818,15 +820,15 @@ func PossibleProvisioningState3Values() []ProvisioningState3 {
type ProximityPlacementGroupType string
const (
- // Standard ...
- Standard ProximityPlacementGroupType = "Standard"
- // Ultra ...
- Ultra ProximityPlacementGroupType = "Ultra"
+ // ProximityPlacementGroupTypeStandard ...
+ ProximityPlacementGroupTypeStandard ProximityPlacementGroupType = "Standard"
+ // ProximityPlacementGroupTypeUltra ...
+ ProximityPlacementGroupTypeUltra ProximityPlacementGroupType = "Ultra"
)
// PossibleProximityPlacementGroupTypeValues returns an array of possible values for the ProximityPlacementGroupType const type.
func PossibleProximityPlacementGroupTypeValues() []ProximityPlacementGroupType {
- return []ProximityPlacementGroupType{Standard, Ultra}
+ return []ProximityPlacementGroupType{ProximityPlacementGroupTypeStandard, ProximityPlacementGroupTypeUltra}
}
// ReplicationState enumerates the values for replication state.
@@ -901,45 +903,45 @@ func PossibleResourceSkuCapacityScaleTypeValues() []ResourceSkuCapacityScaleType
type ResourceSkuRestrictionsReasonCode string
const (
- // NotAvailableForSubscription ...
- NotAvailableForSubscription ResourceSkuRestrictionsReasonCode = "NotAvailableForSubscription"
- // QuotaID ...
- QuotaID ResourceSkuRestrictionsReasonCode = "QuotaId"
+ // ResourceSkuRestrictionsReasonCodeNotAvailableForSubscription ...
+ ResourceSkuRestrictionsReasonCodeNotAvailableForSubscription ResourceSkuRestrictionsReasonCode = "NotAvailableForSubscription"
+ // ResourceSkuRestrictionsReasonCodeQuotaID ...
+ ResourceSkuRestrictionsReasonCodeQuotaID ResourceSkuRestrictionsReasonCode = "QuotaId"
)
// PossibleResourceSkuRestrictionsReasonCodeValues returns an array of possible values for the ResourceSkuRestrictionsReasonCode const type.
func PossibleResourceSkuRestrictionsReasonCodeValues() []ResourceSkuRestrictionsReasonCode {
- return []ResourceSkuRestrictionsReasonCode{NotAvailableForSubscription, QuotaID}
+ return []ResourceSkuRestrictionsReasonCode{ResourceSkuRestrictionsReasonCodeNotAvailableForSubscription, ResourceSkuRestrictionsReasonCodeQuotaID}
}
// ResourceSkuRestrictionsType enumerates the values for resource sku restrictions type.
type ResourceSkuRestrictionsType string
const (
- // Location ...
- Location ResourceSkuRestrictionsType = "Location"
- // Zone ...
- Zone ResourceSkuRestrictionsType = "Zone"
+ // ResourceSkuRestrictionsTypeLocation ...
+ ResourceSkuRestrictionsTypeLocation ResourceSkuRestrictionsType = "Location"
+ // ResourceSkuRestrictionsTypeZone ...
+ ResourceSkuRestrictionsTypeZone ResourceSkuRestrictionsType = "Zone"
)
// PossibleResourceSkuRestrictionsTypeValues returns an array of possible values for the ResourceSkuRestrictionsType const type.
func PossibleResourceSkuRestrictionsTypeValues() []ResourceSkuRestrictionsType {
- return []ResourceSkuRestrictionsType{Location, Zone}
+ return []ResourceSkuRestrictionsType{ResourceSkuRestrictionsTypeLocation, ResourceSkuRestrictionsTypeZone}
}
// RollingUpgradeActionType enumerates the values for rolling upgrade action type.
type RollingUpgradeActionType string
const (
- // Cancel ...
- Cancel RollingUpgradeActionType = "Cancel"
- // Start ...
- Start RollingUpgradeActionType = "Start"
+ // RollingUpgradeActionTypeCancel ...
+ RollingUpgradeActionTypeCancel RollingUpgradeActionType = "Cancel"
+ // RollingUpgradeActionTypeStart ...
+ RollingUpgradeActionTypeStart RollingUpgradeActionType = "Start"
)
// PossibleRollingUpgradeActionTypeValues returns an array of possible values for the RollingUpgradeActionType const type.
func PossibleRollingUpgradeActionTypeValues() []RollingUpgradeActionType {
- return []RollingUpgradeActionType{Cancel, Start}
+ return []RollingUpgradeActionType{RollingUpgradeActionTypeCancel, RollingUpgradeActionTypeStart}
}
// RollingUpgradeStatusCode enumerates the values for rolling upgrade status code.
@@ -978,15 +980,15 @@ func PossibleSecurityTypesValues() []SecurityTypes {
type SettingNames string
const (
- // AutoLogon ...
- AutoLogon SettingNames = "AutoLogon"
- // FirstLogonCommands ...
- FirstLogonCommands SettingNames = "FirstLogonCommands"
+ // SettingNamesAutoLogon ...
+ SettingNamesAutoLogon SettingNames = "AutoLogon"
+ // SettingNamesFirstLogonCommands ...
+ SettingNamesFirstLogonCommands SettingNames = "FirstLogonCommands"
)
// PossibleSettingNamesValues returns an array of possible values for the SettingNames const type.
func PossibleSettingNamesValues() []SettingNames {
- return []SettingNames{AutoLogon, FirstLogonCommands}
+ return []SettingNames{SettingNamesAutoLogon, SettingNamesFirstLogonCommands}
}
// SnapshotStorageAccountTypes enumerates the values for snapshot storage account types.
@@ -1010,17 +1012,17 @@ func PossibleSnapshotStorageAccountTypesValues() []SnapshotStorageAccountTypes {
type StatusLevelTypes string
const (
- // Error ...
- Error StatusLevelTypes = "Error"
- // Info ...
- Info StatusLevelTypes = "Info"
- // Warning ...
- Warning StatusLevelTypes = "Warning"
+ // StatusLevelTypesError ...
+ StatusLevelTypesError StatusLevelTypes = "Error"
+ // StatusLevelTypesInfo ...
+ StatusLevelTypesInfo StatusLevelTypes = "Info"
+ // StatusLevelTypesWarning ...
+ StatusLevelTypesWarning StatusLevelTypes = "Warning"
)
// PossibleStatusLevelTypesValues returns an array of possible values for the StatusLevelTypes const type.
func PossibleStatusLevelTypesValues() []StatusLevelTypes {
- return []StatusLevelTypes{Error, Info, Warning}
+ return []StatusLevelTypes{StatusLevelTypesError, StatusLevelTypesInfo, StatusLevelTypesWarning}
}
// StorageAccountType enumerates the values for storage account type.
@@ -1067,17 +1069,17 @@ func PossibleStorageAccountTypesValues() []StorageAccountTypes {
type UpgradeMode string
const (
- // Automatic ...
- Automatic UpgradeMode = "Automatic"
- // Manual ...
- Manual UpgradeMode = "Manual"
- // Rolling ...
- Rolling UpgradeMode = "Rolling"
+ // UpgradeModeAutomatic ...
+ UpgradeModeAutomatic UpgradeMode = "Automatic"
+ // UpgradeModeManual ...
+ UpgradeModeManual UpgradeMode = "Manual"
+ // UpgradeModeRolling ...
+ UpgradeModeRolling UpgradeMode = "Rolling"
)
// PossibleUpgradeModeValues returns an array of possible values for the UpgradeMode const type.
func PossibleUpgradeModeValues() []UpgradeMode {
- return []UpgradeMode{Automatic, Manual, Rolling}
+ return []UpgradeMode{UpgradeModeAutomatic, UpgradeModeManual, UpgradeModeRolling}
}
// UpgradeOperationInvoker enumerates the values for upgrade operation invoker.
@@ -1120,49 +1122,49 @@ func PossibleUpgradeStateValues() []UpgradeState {
type VirtualMachineEvictionPolicyTypes string
const (
- // Deallocate ...
- Deallocate VirtualMachineEvictionPolicyTypes = "Deallocate"
- // Delete ...
- Delete VirtualMachineEvictionPolicyTypes = "Delete"
+ // VirtualMachineEvictionPolicyTypesDeallocate ...
+ VirtualMachineEvictionPolicyTypesDeallocate VirtualMachineEvictionPolicyTypes = "Deallocate"
+ // VirtualMachineEvictionPolicyTypesDelete ...
+ VirtualMachineEvictionPolicyTypesDelete VirtualMachineEvictionPolicyTypes = "Delete"
)
// PossibleVirtualMachineEvictionPolicyTypesValues returns an array of possible values for the VirtualMachineEvictionPolicyTypes const type.
func PossibleVirtualMachineEvictionPolicyTypesValues() []VirtualMachineEvictionPolicyTypes {
- return []VirtualMachineEvictionPolicyTypes{Deallocate, Delete}
+ return []VirtualMachineEvictionPolicyTypes{VirtualMachineEvictionPolicyTypesDeallocate, VirtualMachineEvictionPolicyTypesDelete}
}
// VirtualMachinePriorityTypes enumerates the values for virtual machine priority types.
type VirtualMachinePriorityTypes string
const (
- // Low ...
- Low VirtualMachinePriorityTypes = "Low"
- // Regular ...
- Regular VirtualMachinePriorityTypes = "Regular"
- // Spot ...
- Spot VirtualMachinePriorityTypes = "Spot"
+ // VirtualMachinePriorityTypesLow ...
+ VirtualMachinePriorityTypesLow VirtualMachinePriorityTypes = "Low"
+ // VirtualMachinePriorityTypesRegular ...
+ VirtualMachinePriorityTypesRegular VirtualMachinePriorityTypes = "Regular"
+ // VirtualMachinePriorityTypesSpot ...
+ VirtualMachinePriorityTypesSpot VirtualMachinePriorityTypes = "Spot"
)
// PossibleVirtualMachinePriorityTypesValues returns an array of possible values for the VirtualMachinePriorityTypes const type.
func PossibleVirtualMachinePriorityTypesValues() []VirtualMachinePriorityTypes {
- return []VirtualMachinePriorityTypes{Low, Regular, Spot}
+ return []VirtualMachinePriorityTypes{VirtualMachinePriorityTypesLow, VirtualMachinePriorityTypesRegular, VirtualMachinePriorityTypesSpot}
}
// VirtualMachineScaleSetScaleInRules enumerates the values for virtual machine scale set scale in rules.
type VirtualMachineScaleSetScaleInRules string
const (
- // Default ...
- Default VirtualMachineScaleSetScaleInRules = "Default"
- // NewestVM ...
- NewestVM VirtualMachineScaleSetScaleInRules = "NewestVM"
- // OldestVM ...
- OldestVM VirtualMachineScaleSetScaleInRules = "OldestVM"
+ // VirtualMachineScaleSetScaleInRulesDefault ...
+ VirtualMachineScaleSetScaleInRulesDefault VirtualMachineScaleSetScaleInRules = "Default"
+ // VirtualMachineScaleSetScaleInRulesNewestVM ...
+ VirtualMachineScaleSetScaleInRulesNewestVM VirtualMachineScaleSetScaleInRules = "NewestVM"
+ // VirtualMachineScaleSetScaleInRulesOldestVM ...
+ VirtualMachineScaleSetScaleInRulesOldestVM VirtualMachineScaleSetScaleInRules = "OldestVM"
)
// PossibleVirtualMachineScaleSetScaleInRulesValues returns an array of possible values for the VirtualMachineScaleSetScaleInRules const type.
func PossibleVirtualMachineScaleSetScaleInRulesValues() []VirtualMachineScaleSetScaleInRules {
- return []VirtualMachineScaleSetScaleInRules{Default, NewestVM, OldestVM}
+ return []VirtualMachineScaleSetScaleInRules{VirtualMachineScaleSetScaleInRulesDefault, VirtualMachineScaleSetScaleInRulesNewestVM, VirtualMachineScaleSetScaleInRulesOldestVM}
}
// VirtualMachineScaleSetSkuScaleType enumerates the values for virtual machine scale set sku scale type.
@@ -1184,343 +1186,343 @@ func PossibleVirtualMachineScaleSetSkuScaleTypeValues() []VirtualMachineScaleSet
type VirtualMachineSizeTypes string
const (
- // BasicA0 ...
- BasicA0 VirtualMachineSizeTypes = "Basic_A0"
- // BasicA1 ...
- BasicA1 VirtualMachineSizeTypes = "Basic_A1"
- // BasicA2 ...
- BasicA2 VirtualMachineSizeTypes = "Basic_A2"
- // BasicA3 ...
- BasicA3 VirtualMachineSizeTypes = "Basic_A3"
- // BasicA4 ...
- BasicA4 VirtualMachineSizeTypes = "Basic_A4"
- // StandardA0 ...
- StandardA0 VirtualMachineSizeTypes = "Standard_A0"
- // StandardA1 ...
- StandardA1 VirtualMachineSizeTypes = "Standard_A1"
- // StandardA10 ...
- StandardA10 VirtualMachineSizeTypes = "Standard_A10"
- // StandardA11 ...
- StandardA11 VirtualMachineSizeTypes = "Standard_A11"
- // StandardA1V2 ...
- StandardA1V2 VirtualMachineSizeTypes = "Standard_A1_v2"
- // StandardA2 ...
- StandardA2 VirtualMachineSizeTypes = "Standard_A2"
- // StandardA2mV2 ...
- StandardA2mV2 VirtualMachineSizeTypes = "Standard_A2m_v2"
- // StandardA2V2 ...
- StandardA2V2 VirtualMachineSizeTypes = "Standard_A2_v2"
- // StandardA3 ...
- StandardA3 VirtualMachineSizeTypes = "Standard_A3"
- // StandardA4 ...
- StandardA4 VirtualMachineSizeTypes = "Standard_A4"
- // StandardA4mV2 ...
- StandardA4mV2 VirtualMachineSizeTypes = "Standard_A4m_v2"
- // StandardA4V2 ...
- StandardA4V2 VirtualMachineSizeTypes = "Standard_A4_v2"
- // StandardA5 ...
- StandardA5 VirtualMachineSizeTypes = "Standard_A5"
- // StandardA6 ...
- StandardA6 VirtualMachineSizeTypes = "Standard_A6"
- // StandardA7 ...
- StandardA7 VirtualMachineSizeTypes = "Standard_A7"
- // StandardA8 ...
- StandardA8 VirtualMachineSizeTypes = "Standard_A8"
- // StandardA8mV2 ...
- StandardA8mV2 VirtualMachineSizeTypes = "Standard_A8m_v2"
- // StandardA8V2 ...
- StandardA8V2 VirtualMachineSizeTypes = "Standard_A8_v2"
- // StandardA9 ...
- StandardA9 VirtualMachineSizeTypes = "Standard_A9"
- // StandardB1ms ...
- StandardB1ms VirtualMachineSizeTypes = "Standard_B1ms"
- // StandardB1s ...
- StandardB1s VirtualMachineSizeTypes = "Standard_B1s"
- // StandardB2ms ...
- StandardB2ms VirtualMachineSizeTypes = "Standard_B2ms"
- // StandardB2s ...
- StandardB2s VirtualMachineSizeTypes = "Standard_B2s"
- // StandardB4ms ...
- StandardB4ms VirtualMachineSizeTypes = "Standard_B4ms"
- // StandardB8ms ...
- StandardB8ms VirtualMachineSizeTypes = "Standard_B8ms"
- // StandardD1 ...
- StandardD1 VirtualMachineSizeTypes = "Standard_D1"
- // StandardD11 ...
- StandardD11 VirtualMachineSizeTypes = "Standard_D11"
- // StandardD11V2 ...
- StandardD11V2 VirtualMachineSizeTypes = "Standard_D11_v2"
- // StandardD12 ...
- StandardD12 VirtualMachineSizeTypes = "Standard_D12"
- // StandardD12V2 ...
- StandardD12V2 VirtualMachineSizeTypes = "Standard_D12_v2"
- // StandardD13 ...
- StandardD13 VirtualMachineSizeTypes = "Standard_D13"
- // StandardD13V2 ...
- StandardD13V2 VirtualMachineSizeTypes = "Standard_D13_v2"
- // StandardD14 ...
- StandardD14 VirtualMachineSizeTypes = "Standard_D14"
- // StandardD14V2 ...
- StandardD14V2 VirtualMachineSizeTypes = "Standard_D14_v2"
- // StandardD15V2 ...
- StandardD15V2 VirtualMachineSizeTypes = "Standard_D15_v2"
- // StandardD16sV3 ...
- StandardD16sV3 VirtualMachineSizeTypes = "Standard_D16s_v3"
- // StandardD16V3 ...
- StandardD16V3 VirtualMachineSizeTypes = "Standard_D16_v3"
- // StandardD1V2 ...
- StandardD1V2 VirtualMachineSizeTypes = "Standard_D1_v2"
- // StandardD2 ...
- StandardD2 VirtualMachineSizeTypes = "Standard_D2"
- // StandardD2sV3 ...
- StandardD2sV3 VirtualMachineSizeTypes = "Standard_D2s_v3"
- // StandardD2V2 ...
- StandardD2V2 VirtualMachineSizeTypes = "Standard_D2_v2"
- // StandardD2V3 ...
- StandardD2V3 VirtualMachineSizeTypes = "Standard_D2_v3"
- // StandardD3 ...
- StandardD3 VirtualMachineSizeTypes = "Standard_D3"
- // StandardD32sV3 ...
- StandardD32sV3 VirtualMachineSizeTypes = "Standard_D32s_v3"
- // StandardD32V3 ...
- StandardD32V3 VirtualMachineSizeTypes = "Standard_D32_v3"
- // StandardD3V2 ...
- StandardD3V2 VirtualMachineSizeTypes = "Standard_D3_v2"
- // StandardD4 ...
- StandardD4 VirtualMachineSizeTypes = "Standard_D4"
- // StandardD4sV3 ...
- StandardD4sV3 VirtualMachineSizeTypes = "Standard_D4s_v3"
- // StandardD4V2 ...
- StandardD4V2 VirtualMachineSizeTypes = "Standard_D4_v2"
- // StandardD4V3 ...
- StandardD4V3 VirtualMachineSizeTypes = "Standard_D4_v3"
- // StandardD5V2 ...
- StandardD5V2 VirtualMachineSizeTypes = "Standard_D5_v2"
- // StandardD64sV3 ...
- StandardD64sV3 VirtualMachineSizeTypes = "Standard_D64s_v3"
- // StandardD64V3 ...
- StandardD64V3 VirtualMachineSizeTypes = "Standard_D64_v3"
- // StandardD8sV3 ...
- StandardD8sV3 VirtualMachineSizeTypes = "Standard_D8s_v3"
- // StandardD8V3 ...
- StandardD8V3 VirtualMachineSizeTypes = "Standard_D8_v3"
- // StandardDS1 ...
- StandardDS1 VirtualMachineSizeTypes = "Standard_DS1"
- // StandardDS11 ...
- StandardDS11 VirtualMachineSizeTypes = "Standard_DS11"
- // StandardDS11V2 ...
- StandardDS11V2 VirtualMachineSizeTypes = "Standard_DS11_v2"
- // StandardDS12 ...
- StandardDS12 VirtualMachineSizeTypes = "Standard_DS12"
- // StandardDS12V2 ...
- StandardDS12V2 VirtualMachineSizeTypes = "Standard_DS12_v2"
- // StandardDS13 ...
- StandardDS13 VirtualMachineSizeTypes = "Standard_DS13"
- // StandardDS132V2 ...
- StandardDS132V2 VirtualMachineSizeTypes = "Standard_DS13-2_v2"
- // StandardDS134V2 ...
- StandardDS134V2 VirtualMachineSizeTypes = "Standard_DS13-4_v2"
- // StandardDS13V2 ...
- StandardDS13V2 VirtualMachineSizeTypes = "Standard_DS13_v2"
- // StandardDS14 ...
- StandardDS14 VirtualMachineSizeTypes = "Standard_DS14"
- // StandardDS144V2 ...
- StandardDS144V2 VirtualMachineSizeTypes = "Standard_DS14-4_v2"
- // StandardDS148V2 ...
- StandardDS148V2 VirtualMachineSizeTypes = "Standard_DS14-8_v2"
- // StandardDS14V2 ...
- StandardDS14V2 VirtualMachineSizeTypes = "Standard_DS14_v2"
- // StandardDS15V2 ...
- StandardDS15V2 VirtualMachineSizeTypes = "Standard_DS15_v2"
- // StandardDS1V2 ...
- StandardDS1V2 VirtualMachineSizeTypes = "Standard_DS1_v2"
- // StandardDS2 ...
- StandardDS2 VirtualMachineSizeTypes = "Standard_DS2"
- // StandardDS2V2 ...
- StandardDS2V2 VirtualMachineSizeTypes = "Standard_DS2_v2"
- // StandardDS3 ...
- StandardDS3 VirtualMachineSizeTypes = "Standard_DS3"
- // StandardDS3V2 ...
- StandardDS3V2 VirtualMachineSizeTypes = "Standard_DS3_v2"
- // StandardDS4 ...
- StandardDS4 VirtualMachineSizeTypes = "Standard_DS4"
- // StandardDS4V2 ...
- StandardDS4V2 VirtualMachineSizeTypes = "Standard_DS4_v2"
- // StandardDS5V2 ...
- StandardDS5V2 VirtualMachineSizeTypes = "Standard_DS5_v2"
- // StandardE16sV3 ...
- StandardE16sV3 VirtualMachineSizeTypes = "Standard_E16s_v3"
- // StandardE16V3 ...
- StandardE16V3 VirtualMachineSizeTypes = "Standard_E16_v3"
- // StandardE2sV3 ...
- StandardE2sV3 VirtualMachineSizeTypes = "Standard_E2s_v3"
- // StandardE2V3 ...
- StandardE2V3 VirtualMachineSizeTypes = "Standard_E2_v3"
- // StandardE3216V3 ...
- StandardE3216V3 VirtualMachineSizeTypes = "Standard_E32-16_v3"
- // StandardE328sV3 ...
- StandardE328sV3 VirtualMachineSizeTypes = "Standard_E32-8s_v3"
- // StandardE32sV3 ...
- StandardE32sV3 VirtualMachineSizeTypes = "Standard_E32s_v3"
- // StandardE32V3 ...
- StandardE32V3 VirtualMachineSizeTypes = "Standard_E32_v3"
- // StandardE4sV3 ...
- StandardE4sV3 VirtualMachineSizeTypes = "Standard_E4s_v3"
- // StandardE4V3 ...
- StandardE4V3 VirtualMachineSizeTypes = "Standard_E4_v3"
- // StandardE6416sV3 ...
- StandardE6416sV3 VirtualMachineSizeTypes = "Standard_E64-16s_v3"
- // StandardE6432sV3 ...
- StandardE6432sV3 VirtualMachineSizeTypes = "Standard_E64-32s_v3"
- // StandardE64sV3 ...
- StandardE64sV3 VirtualMachineSizeTypes = "Standard_E64s_v3"
- // StandardE64V3 ...
- StandardE64V3 VirtualMachineSizeTypes = "Standard_E64_v3"
- // StandardE8sV3 ...
- StandardE8sV3 VirtualMachineSizeTypes = "Standard_E8s_v3"
- // StandardE8V3 ...
- StandardE8V3 VirtualMachineSizeTypes = "Standard_E8_v3"
- // StandardF1 ...
- StandardF1 VirtualMachineSizeTypes = "Standard_F1"
- // StandardF16 ...
- StandardF16 VirtualMachineSizeTypes = "Standard_F16"
- // StandardF16s ...
- StandardF16s VirtualMachineSizeTypes = "Standard_F16s"
- // StandardF16sV2 ...
- StandardF16sV2 VirtualMachineSizeTypes = "Standard_F16s_v2"
- // StandardF1s ...
- StandardF1s VirtualMachineSizeTypes = "Standard_F1s"
- // StandardF2 ...
- StandardF2 VirtualMachineSizeTypes = "Standard_F2"
- // StandardF2s ...
- StandardF2s VirtualMachineSizeTypes = "Standard_F2s"
- // StandardF2sV2 ...
- StandardF2sV2 VirtualMachineSizeTypes = "Standard_F2s_v2"
- // StandardF32sV2 ...
- StandardF32sV2 VirtualMachineSizeTypes = "Standard_F32s_v2"
- // StandardF4 ...
- StandardF4 VirtualMachineSizeTypes = "Standard_F4"
- // StandardF4s ...
- StandardF4s VirtualMachineSizeTypes = "Standard_F4s"
- // StandardF4sV2 ...
- StandardF4sV2 VirtualMachineSizeTypes = "Standard_F4s_v2"
- // StandardF64sV2 ...
- StandardF64sV2 VirtualMachineSizeTypes = "Standard_F64s_v2"
- // StandardF72sV2 ...
- StandardF72sV2 VirtualMachineSizeTypes = "Standard_F72s_v2"
- // StandardF8 ...
- StandardF8 VirtualMachineSizeTypes = "Standard_F8"
- // StandardF8s ...
- StandardF8s VirtualMachineSizeTypes = "Standard_F8s"
- // StandardF8sV2 ...
- StandardF8sV2 VirtualMachineSizeTypes = "Standard_F8s_v2"
- // StandardG1 ...
- StandardG1 VirtualMachineSizeTypes = "Standard_G1"
- // StandardG2 ...
- StandardG2 VirtualMachineSizeTypes = "Standard_G2"
- // StandardG3 ...
- StandardG3 VirtualMachineSizeTypes = "Standard_G3"
- // StandardG4 ...
- StandardG4 VirtualMachineSizeTypes = "Standard_G4"
- // StandardG5 ...
- StandardG5 VirtualMachineSizeTypes = "Standard_G5"
- // StandardGS1 ...
- StandardGS1 VirtualMachineSizeTypes = "Standard_GS1"
- // StandardGS2 ...
- StandardGS2 VirtualMachineSizeTypes = "Standard_GS2"
- // StandardGS3 ...
- StandardGS3 VirtualMachineSizeTypes = "Standard_GS3"
- // StandardGS4 ...
- StandardGS4 VirtualMachineSizeTypes = "Standard_GS4"
- // StandardGS44 ...
- StandardGS44 VirtualMachineSizeTypes = "Standard_GS4-4"
- // StandardGS48 ...
- StandardGS48 VirtualMachineSizeTypes = "Standard_GS4-8"
- // StandardGS5 ...
- StandardGS5 VirtualMachineSizeTypes = "Standard_GS5"
- // StandardGS516 ...
- StandardGS516 VirtualMachineSizeTypes = "Standard_GS5-16"
- // StandardGS58 ...
- StandardGS58 VirtualMachineSizeTypes = "Standard_GS5-8"
- // StandardH16 ...
- StandardH16 VirtualMachineSizeTypes = "Standard_H16"
- // StandardH16m ...
- StandardH16m VirtualMachineSizeTypes = "Standard_H16m"
- // StandardH16mr ...
- StandardH16mr VirtualMachineSizeTypes = "Standard_H16mr"
- // StandardH16r ...
- StandardH16r VirtualMachineSizeTypes = "Standard_H16r"
- // StandardH8 ...
- StandardH8 VirtualMachineSizeTypes = "Standard_H8"
- // StandardH8m ...
- StandardH8m VirtualMachineSizeTypes = "Standard_H8m"
- // StandardL16s ...
- StandardL16s VirtualMachineSizeTypes = "Standard_L16s"
- // StandardL32s ...
- StandardL32s VirtualMachineSizeTypes = "Standard_L32s"
- // StandardL4s ...
- StandardL4s VirtualMachineSizeTypes = "Standard_L4s"
- // StandardL8s ...
- StandardL8s VirtualMachineSizeTypes = "Standard_L8s"
- // StandardM12832ms ...
- StandardM12832ms VirtualMachineSizeTypes = "Standard_M128-32ms"
- // StandardM12864ms ...
- StandardM12864ms VirtualMachineSizeTypes = "Standard_M128-64ms"
- // StandardM128ms ...
- StandardM128ms VirtualMachineSizeTypes = "Standard_M128ms"
- // StandardM128s ...
- StandardM128s VirtualMachineSizeTypes = "Standard_M128s"
- // StandardM6416ms ...
- StandardM6416ms VirtualMachineSizeTypes = "Standard_M64-16ms"
- // StandardM6432ms ...
- StandardM6432ms VirtualMachineSizeTypes = "Standard_M64-32ms"
- // StandardM64ms ...
- StandardM64ms VirtualMachineSizeTypes = "Standard_M64ms"
- // StandardM64s ...
- StandardM64s VirtualMachineSizeTypes = "Standard_M64s"
- // StandardNC12 ...
- StandardNC12 VirtualMachineSizeTypes = "Standard_NC12"
- // StandardNC12sV2 ...
- StandardNC12sV2 VirtualMachineSizeTypes = "Standard_NC12s_v2"
- // StandardNC12sV3 ...
- StandardNC12sV3 VirtualMachineSizeTypes = "Standard_NC12s_v3"
- // StandardNC24 ...
- StandardNC24 VirtualMachineSizeTypes = "Standard_NC24"
- // StandardNC24r ...
- StandardNC24r VirtualMachineSizeTypes = "Standard_NC24r"
- // StandardNC24rsV2 ...
- StandardNC24rsV2 VirtualMachineSizeTypes = "Standard_NC24rs_v2"
- // StandardNC24rsV3 ...
- StandardNC24rsV3 VirtualMachineSizeTypes = "Standard_NC24rs_v3"
- // StandardNC24sV2 ...
- StandardNC24sV2 VirtualMachineSizeTypes = "Standard_NC24s_v2"
- // StandardNC24sV3 ...
- StandardNC24sV3 VirtualMachineSizeTypes = "Standard_NC24s_v3"
- // StandardNC6 ...
- StandardNC6 VirtualMachineSizeTypes = "Standard_NC6"
- // StandardNC6sV2 ...
- StandardNC6sV2 VirtualMachineSizeTypes = "Standard_NC6s_v2"
- // StandardNC6sV3 ...
- StandardNC6sV3 VirtualMachineSizeTypes = "Standard_NC6s_v3"
- // StandardND12s ...
- StandardND12s VirtualMachineSizeTypes = "Standard_ND12s"
- // StandardND24rs ...
- StandardND24rs VirtualMachineSizeTypes = "Standard_ND24rs"
- // StandardND24s ...
- StandardND24s VirtualMachineSizeTypes = "Standard_ND24s"
- // StandardND6s ...
- StandardND6s VirtualMachineSizeTypes = "Standard_ND6s"
- // StandardNV12 ...
- StandardNV12 VirtualMachineSizeTypes = "Standard_NV12"
- // StandardNV24 ...
- StandardNV24 VirtualMachineSizeTypes = "Standard_NV24"
- // StandardNV6 ...
- StandardNV6 VirtualMachineSizeTypes = "Standard_NV6"
+ // VirtualMachineSizeTypesBasicA0 ...
+ VirtualMachineSizeTypesBasicA0 VirtualMachineSizeTypes = "Basic_A0"
+ // VirtualMachineSizeTypesBasicA1 ...
+ VirtualMachineSizeTypesBasicA1 VirtualMachineSizeTypes = "Basic_A1"
+ // VirtualMachineSizeTypesBasicA2 ...
+ VirtualMachineSizeTypesBasicA2 VirtualMachineSizeTypes = "Basic_A2"
+ // VirtualMachineSizeTypesBasicA3 ...
+ VirtualMachineSizeTypesBasicA3 VirtualMachineSizeTypes = "Basic_A3"
+ // VirtualMachineSizeTypesBasicA4 ...
+ VirtualMachineSizeTypesBasicA4 VirtualMachineSizeTypes = "Basic_A4"
+ // VirtualMachineSizeTypesStandardA0 ...
+ VirtualMachineSizeTypesStandardA0 VirtualMachineSizeTypes = "Standard_A0"
+ // VirtualMachineSizeTypesStandardA1 ...
+ VirtualMachineSizeTypesStandardA1 VirtualMachineSizeTypes = "Standard_A1"
+ // VirtualMachineSizeTypesStandardA10 ...
+ VirtualMachineSizeTypesStandardA10 VirtualMachineSizeTypes = "Standard_A10"
+ // VirtualMachineSizeTypesStandardA11 ...
+ VirtualMachineSizeTypesStandardA11 VirtualMachineSizeTypes = "Standard_A11"
+ // VirtualMachineSizeTypesStandardA1V2 ...
+ VirtualMachineSizeTypesStandardA1V2 VirtualMachineSizeTypes = "Standard_A1_v2"
+ // VirtualMachineSizeTypesStandardA2 ...
+ VirtualMachineSizeTypesStandardA2 VirtualMachineSizeTypes = "Standard_A2"
+ // VirtualMachineSizeTypesStandardA2mV2 ...
+ VirtualMachineSizeTypesStandardA2mV2 VirtualMachineSizeTypes = "Standard_A2m_v2"
+ // VirtualMachineSizeTypesStandardA2V2 ...
+ VirtualMachineSizeTypesStandardA2V2 VirtualMachineSizeTypes = "Standard_A2_v2"
+ // VirtualMachineSizeTypesStandardA3 ...
+ VirtualMachineSizeTypesStandardA3 VirtualMachineSizeTypes = "Standard_A3"
+ // VirtualMachineSizeTypesStandardA4 ...
+ VirtualMachineSizeTypesStandardA4 VirtualMachineSizeTypes = "Standard_A4"
+ // VirtualMachineSizeTypesStandardA4mV2 ...
+ VirtualMachineSizeTypesStandardA4mV2 VirtualMachineSizeTypes = "Standard_A4m_v2"
+ // VirtualMachineSizeTypesStandardA4V2 ...
+ VirtualMachineSizeTypesStandardA4V2 VirtualMachineSizeTypes = "Standard_A4_v2"
+ // VirtualMachineSizeTypesStandardA5 ...
+ VirtualMachineSizeTypesStandardA5 VirtualMachineSizeTypes = "Standard_A5"
+ // VirtualMachineSizeTypesStandardA6 ...
+ VirtualMachineSizeTypesStandardA6 VirtualMachineSizeTypes = "Standard_A6"
+ // VirtualMachineSizeTypesStandardA7 ...
+ VirtualMachineSizeTypesStandardA7 VirtualMachineSizeTypes = "Standard_A7"
+ // VirtualMachineSizeTypesStandardA8 ...
+ VirtualMachineSizeTypesStandardA8 VirtualMachineSizeTypes = "Standard_A8"
+ // VirtualMachineSizeTypesStandardA8mV2 ...
+ VirtualMachineSizeTypesStandardA8mV2 VirtualMachineSizeTypes = "Standard_A8m_v2"
+ // VirtualMachineSizeTypesStandardA8V2 ...
+ VirtualMachineSizeTypesStandardA8V2 VirtualMachineSizeTypes = "Standard_A8_v2"
+ // VirtualMachineSizeTypesStandardA9 ...
+ VirtualMachineSizeTypesStandardA9 VirtualMachineSizeTypes = "Standard_A9"
+ // VirtualMachineSizeTypesStandardB1ms ...
+ VirtualMachineSizeTypesStandardB1ms VirtualMachineSizeTypes = "Standard_B1ms"
+ // VirtualMachineSizeTypesStandardB1s ...
+ VirtualMachineSizeTypesStandardB1s VirtualMachineSizeTypes = "Standard_B1s"
+ // VirtualMachineSizeTypesStandardB2ms ...
+ VirtualMachineSizeTypesStandardB2ms VirtualMachineSizeTypes = "Standard_B2ms"
+ // VirtualMachineSizeTypesStandardB2s ...
+ VirtualMachineSizeTypesStandardB2s VirtualMachineSizeTypes = "Standard_B2s"
+ // VirtualMachineSizeTypesStandardB4ms ...
+ VirtualMachineSizeTypesStandardB4ms VirtualMachineSizeTypes = "Standard_B4ms"
+ // VirtualMachineSizeTypesStandardB8ms ...
+ VirtualMachineSizeTypesStandardB8ms VirtualMachineSizeTypes = "Standard_B8ms"
+ // VirtualMachineSizeTypesStandardD1 ...
+ VirtualMachineSizeTypesStandardD1 VirtualMachineSizeTypes = "Standard_D1"
+ // VirtualMachineSizeTypesStandardD11 ...
+ VirtualMachineSizeTypesStandardD11 VirtualMachineSizeTypes = "Standard_D11"
+ // VirtualMachineSizeTypesStandardD11V2 ...
+ VirtualMachineSizeTypesStandardD11V2 VirtualMachineSizeTypes = "Standard_D11_v2"
+ // VirtualMachineSizeTypesStandardD12 ...
+ VirtualMachineSizeTypesStandardD12 VirtualMachineSizeTypes = "Standard_D12"
+ // VirtualMachineSizeTypesStandardD12V2 ...
+ VirtualMachineSizeTypesStandardD12V2 VirtualMachineSizeTypes = "Standard_D12_v2"
+ // VirtualMachineSizeTypesStandardD13 ...
+ VirtualMachineSizeTypesStandardD13 VirtualMachineSizeTypes = "Standard_D13"
+ // VirtualMachineSizeTypesStandardD13V2 ...
+ VirtualMachineSizeTypesStandardD13V2 VirtualMachineSizeTypes = "Standard_D13_v2"
+ // VirtualMachineSizeTypesStandardD14 ...
+ VirtualMachineSizeTypesStandardD14 VirtualMachineSizeTypes = "Standard_D14"
+ // VirtualMachineSizeTypesStandardD14V2 ...
+ VirtualMachineSizeTypesStandardD14V2 VirtualMachineSizeTypes = "Standard_D14_v2"
+ // VirtualMachineSizeTypesStandardD15V2 ...
+ VirtualMachineSizeTypesStandardD15V2 VirtualMachineSizeTypes = "Standard_D15_v2"
+ // VirtualMachineSizeTypesStandardD16sV3 ...
+ VirtualMachineSizeTypesStandardD16sV3 VirtualMachineSizeTypes = "Standard_D16s_v3"
+ // VirtualMachineSizeTypesStandardD16V3 ...
+ VirtualMachineSizeTypesStandardD16V3 VirtualMachineSizeTypes = "Standard_D16_v3"
+ // VirtualMachineSizeTypesStandardD1V2 ...
+ VirtualMachineSizeTypesStandardD1V2 VirtualMachineSizeTypes = "Standard_D1_v2"
+ // VirtualMachineSizeTypesStandardD2 ...
+ VirtualMachineSizeTypesStandardD2 VirtualMachineSizeTypes = "Standard_D2"
+ // VirtualMachineSizeTypesStandardD2sV3 ...
+ VirtualMachineSizeTypesStandardD2sV3 VirtualMachineSizeTypes = "Standard_D2s_v3"
+ // VirtualMachineSizeTypesStandardD2V2 ...
+ VirtualMachineSizeTypesStandardD2V2 VirtualMachineSizeTypes = "Standard_D2_v2"
+ // VirtualMachineSizeTypesStandardD2V3 ...
+ VirtualMachineSizeTypesStandardD2V3 VirtualMachineSizeTypes = "Standard_D2_v3"
+ // VirtualMachineSizeTypesStandardD3 ...
+ VirtualMachineSizeTypesStandardD3 VirtualMachineSizeTypes = "Standard_D3"
+ // VirtualMachineSizeTypesStandardD32sV3 ...
+ VirtualMachineSizeTypesStandardD32sV3 VirtualMachineSizeTypes = "Standard_D32s_v3"
+ // VirtualMachineSizeTypesStandardD32V3 ...
+ VirtualMachineSizeTypesStandardD32V3 VirtualMachineSizeTypes = "Standard_D32_v3"
+ // VirtualMachineSizeTypesStandardD3V2 ...
+ VirtualMachineSizeTypesStandardD3V2 VirtualMachineSizeTypes = "Standard_D3_v2"
+ // VirtualMachineSizeTypesStandardD4 ...
+ VirtualMachineSizeTypesStandardD4 VirtualMachineSizeTypes = "Standard_D4"
+ // VirtualMachineSizeTypesStandardD4sV3 ...
+ VirtualMachineSizeTypesStandardD4sV3 VirtualMachineSizeTypes = "Standard_D4s_v3"
+ // VirtualMachineSizeTypesStandardD4V2 ...
+ VirtualMachineSizeTypesStandardD4V2 VirtualMachineSizeTypes = "Standard_D4_v2"
+ // VirtualMachineSizeTypesStandardD4V3 ...
+ VirtualMachineSizeTypesStandardD4V3 VirtualMachineSizeTypes = "Standard_D4_v3"
+ // VirtualMachineSizeTypesStandardD5V2 ...
+ VirtualMachineSizeTypesStandardD5V2 VirtualMachineSizeTypes = "Standard_D5_v2"
+ // VirtualMachineSizeTypesStandardD64sV3 ...
+ VirtualMachineSizeTypesStandardD64sV3 VirtualMachineSizeTypes = "Standard_D64s_v3"
+ // VirtualMachineSizeTypesStandardD64V3 ...
+ VirtualMachineSizeTypesStandardD64V3 VirtualMachineSizeTypes = "Standard_D64_v3"
+ // VirtualMachineSizeTypesStandardD8sV3 ...
+ VirtualMachineSizeTypesStandardD8sV3 VirtualMachineSizeTypes = "Standard_D8s_v3"
+ // VirtualMachineSizeTypesStandardD8V3 ...
+ VirtualMachineSizeTypesStandardD8V3 VirtualMachineSizeTypes = "Standard_D8_v3"
+ // VirtualMachineSizeTypesStandardDS1 ...
+ VirtualMachineSizeTypesStandardDS1 VirtualMachineSizeTypes = "Standard_DS1"
+ // VirtualMachineSizeTypesStandardDS11 ...
+ VirtualMachineSizeTypesStandardDS11 VirtualMachineSizeTypes = "Standard_DS11"
+ // VirtualMachineSizeTypesStandardDS11V2 ...
+ VirtualMachineSizeTypesStandardDS11V2 VirtualMachineSizeTypes = "Standard_DS11_v2"
+ // VirtualMachineSizeTypesStandardDS12 ...
+ VirtualMachineSizeTypesStandardDS12 VirtualMachineSizeTypes = "Standard_DS12"
+ // VirtualMachineSizeTypesStandardDS12V2 ...
+ VirtualMachineSizeTypesStandardDS12V2 VirtualMachineSizeTypes = "Standard_DS12_v2"
+ // VirtualMachineSizeTypesStandardDS13 ...
+ VirtualMachineSizeTypesStandardDS13 VirtualMachineSizeTypes = "Standard_DS13"
+ // VirtualMachineSizeTypesStandardDS132V2 ...
+ VirtualMachineSizeTypesStandardDS132V2 VirtualMachineSizeTypes = "Standard_DS13-2_v2"
+ // VirtualMachineSizeTypesStandardDS134V2 ...
+ VirtualMachineSizeTypesStandardDS134V2 VirtualMachineSizeTypes = "Standard_DS13-4_v2"
+ // VirtualMachineSizeTypesStandardDS13V2 ...
+ VirtualMachineSizeTypesStandardDS13V2 VirtualMachineSizeTypes = "Standard_DS13_v2"
+ // VirtualMachineSizeTypesStandardDS14 ...
+ VirtualMachineSizeTypesStandardDS14 VirtualMachineSizeTypes = "Standard_DS14"
+ // VirtualMachineSizeTypesStandardDS144V2 ...
+ VirtualMachineSizeTypesStandardDS144V2 VirtualMachineSizeTypes = "Standard_DS14-4_v2"
+ // VirtualMachineSizeTypesStandardDS148V2 ...
+ VirtualMachineSizeTypesStandardDS148V2 VirtualMachineSizeTypes = "Standard_DS14-8_v2"
+ // VirtualMachineSizeTypesStandardDS14V2 ...
+ VirtualMachineSizeTypesStandardDS14V2 VirtualMachineSizeTypes = "Standard_DS14_v2"
+ // VirtualMachineSizeTypesStandardDS15V2 ...
+ VirtualMachineSizeTypesStandardDS15V2 VirtualMachineSizeTypes = "Standard_DS15_v2"
+ // VirtualMachineSizeTypesStandardDS1V2 ...
+ VirtualMachineSizeTypesStandardDS1V2 VirtualMachineSizeTypes = "Standard_DS1_v2"
+ // VirtualMachineSizeTypesStandardDS2 ...
+ VirtualMachineSizeTypesStandardDS2 VirtualMachineSizeTypes = "Standard_DS2"
+ // VirtualMachineSizeTypesStandardDS2V2 ...
+ VirtualMachineSizeTypesStandardDS2V2 VirtualMachineSizeTypes = "Standard_DS2_v2"
+ // VirtualMachineSizeTypesStandardDS3 ...
+ VirtualMachineSizeTypesStandardDS3 VirtualMachineSizeTypes = "Standard_DS3"
+ // VirtualMachineSizeTypesStandardDS3V2 ...
+ VirtualMachineSizeTypesStandardDS3V2 VirtualMachineSizeTypes = "Standard_DS3_v2"
+ // VirtualMachineSizeTypesStandardDS4 ...
+ VirtualMachineSizeTypesStandardDS4 VirtualMachineSizeTypes = "Standard_DS4"
+ // VirtualMachineSizeTypesStandardDS4V2 ...
+ VirtualMachineSizeTypesStandardDS4V2 VirtualMachineSizeTypes = "Standard_DS4_v2"
+ // VirtualMachineSizeTypesStandardDS5V2 ...
+ VirtualMachineSizeTypesStandardDS5V2 VirtualMachineSizeTypes = "Standard_DS5_v2"
+ // VirtualMachineSizeTypesStandardE16sV3 ...
+ VirtualMachineSizeTypesStandardE16sV3 VirtualMachineSizeTypes = "Standard_E16s_v3"
+ // VirtualMachineSizeTypesStandardE16V3 ...
+ VirtualMachineSizeTypesStandardE16V3 VirtualMachineSizeTypes = "Standard_E16_v3"
+ // VirtualMachineSizeTypesStandardE2sV3 ...
+ VirtualMachineSizeTypesStandardE2sV3 VirtualMachineSizeTypes = "Standard_E2s_v3"
+ // VirtualMachineSizeTypesStandardE2V3 ...
+ VirtualMachineSizeTypesStandardE2V3 VirtualMachineSizeTypes = "Standard_E2_v3"
+ // VirtualMachineSizeTypesStandardE3216V3 ...
+ VirtualMachineSizeTypesStandardE3216V3 VirtualMachineSizeTypes = "Standard_E32-16_v3"
+ // VirtualMachineSizeTypesStandardE328sV3 ...
+ VirtualMachineSizeTypesStandardE328sV3 VirtualMachineSizeTypes = "Standard_E32-8s_v3"
+ // VirtualMachineSizeTypesStandardE32sV3 ...
+ VirtualMachineSizeTypesStandardE32sV3 VirtualMachineSizeTypes = "Standard_E32s_v3"
+ // VirtualMachineSizeTypesStandardE32V3 ...
+ VirtualMachineSizeTypesStandardE32V3 VirtualMachineSizeTypes = "Standard_E32_v3"
+ // VirtualMachineSizeTypesStandardE4sV3 ...
+ VirtualMachineSizeTypesStandardE4sV3 VirtualMachineSizeTypes = "Standard_E4s_v3"
+ // VirtualMachineSizeTypesStandardE4V3 ...
+ VirtualMachineSizeTypesStandardE4V3 VirtualMachineSizeTypes = "Standard_E4_v3"
+ // VirtualMachineSizeTypesStandardE6416sV3 ...
+ VirtualMachineSizeTypesStandardE6416sV3 VirtualMachineSizeTypes = "Standard_E64-16s_v3"
+ // VirtualMachineSizeTypesStandardE6432sV3 ...
+ VirtualMachineSizeTypesStandardE6432sV3 VirtualMachineSizeTypes = "Standard_E64-32s_v3"
+ // VirtualMachineSizeTypesStandardE64sV3 ...
+ VirtualMachineSizeTypesStandardE64sV3 VirtualMachineSizeTypes = "Standard_E64s_v3"
+ // VirtualMachineSizeTypesStandardE64V3 ...
+ VirtualMachineSizeTypesStandardE64V3 VirtualMachineSizeTypes = "Standard_E64_v3"
+ // VirtualMachineSizeTypesStandardE8sV3 ...
+ VirtualMachineSizeTypesStandardE8sV3 VirtualMachineSizeTypes = "Standard_E8s_v3"
+ // VirtualMachineSizeTypesStandardE8V3 ...
+ VirtualMachineSizeTypesStandardE8V3 VirtualMachineSizeTypes = "Standard_E8_v3"
+ // VirtualMachineSizeTypesStandardF1 ...
+ VirtualMachineSizeTypesStandardF1 VirtualMachineSizeTypes = "Standard_F1"
+ // VirtualMachineSizeTypesStandardF16 ...
+ VirtualMachineSizeTypesStandardF16 VirtualMachineSizeTypes = "Standard_F16"
+ // VirtualMachineSizeTypesStandardF16s ...
+ VirtualMachineSizeTypesStandardF16s VirtualMachineSizeTypes = "Standard_F16s"
+ // VirtualMachineSizeTypesStandardF16sV2 ...
+ VirtualMachineSizeTypesStandardF16sV2 VirtualMachineSizeTypes = "Standard_F16s_v2"
+ // VirtualMachineSizeTypesStandardF1s ...
+ VirtualMachineSizeTypesStandardF1s VirtualMachineSizeTypes = "Standard_F1s"
+ // VirtualMachineSizeTypesStandardF2 ...
+ VirtualMachineSizeTypesStandardF2 VirtualMachineSizeTypes = "Standard_F2"
+ // VirtualMachineSizeTypesStandardF2s ...
+ VirtualMachineSizeTypesStandardF2s VirtualMachineSizeTypes = "Standard_F2s"
+ // VirtualMachineSizeTypesStandardF2sV2 ...
+ VirtualMachineSizeTypesStandardF2sV2 VirtualMachineSizeTypes = "Standard_F2s_v2"
+ // VirtualMachineSizeTypesStandardF32sV2 ...
+ VirtualMachineSizeTypesStandardF32sV2 VirtualMachineSizeTypes = "Standard_F32s_v2"
+ // VirtualMachineSizeTypesStandardF4 ...
+ VirtualMachineSizeTypesStandardF4 VirtualMachineSizeTypes = "Standard_F4"
+ // VirtualMachineSizeTypesStandardF4s ...
+ VirtualMachineSizeTypesStandardF4s VirtualMachineSizeTypes = "Standard_F4s"
+ // VirtualMachineSizeTypesStandardF4sV2 ...
+ VirtualMachineSizeTypesStandardF4sV2 VirtualMachineSizeTypes = "Standard_F4s_v2"
+ // VirtualMachineSizeTypesStandardF64sV2 ...
+ VirtualMachineSizeTypesStandardF64sV2 VirtualMachineSizeTypes = "Standard_F64s_v2"
+ // VirtualMachineSizeTypesStandardF72sV2 ...
+ VirtualMachineSizeTypesStandardF72sV2 VirtualMachineSizeTypes = "Standard_F72s_v2"
+ // VirtualMachineSizeTypesStandardF8 ...
+ VirtualMachineSizeTypesStandardF8 VirtualMachineSizeTypes = "Standard_F8"
+ // VirtualMachineSizeTypesStandardF8s ...
+ VirtualMachineSizeTypesStandardF8s VirtualMachineSizeTypes = "Standard_F8s"
+ // VirtualMachineSizeTypesStandardF8sV2 ...
+ VirtualMachineSizeTypesStandardF8sV2 VirtualMachineSizeTypes = "Standard_F8s_v2"
+ // VirtualMachineSizeTypesStandardG1 ...
+ VirtualMachineSizeTypesStandardG1 VirtualMachineSizeTypes = "Standard_G1"
+ // VirtualMachineSizeTypesStandardG2 ...
+ VirtualMachineSizeTypesStandardG2 VirtualMachineSizeTypes = "Standard_G2"
+ // VirtualMachineSizeTypesStandardG3 ...
+ VirtualMachineSizeTypesStandardG3 VirtualMachineSizeTypes = "Standard_G3"
+ // VirtualMachineSizeTypesStandardG4 ...
+ VirtualMachineSizeTypesStandardG4 VirtualMachineSizeTypes = "Standard_G4"
+ // VirtualMachineSizeTypesStandardG5 ...
+ VirtualMachineSizeTypesStandardG5 VirtualMachineSizeTypes = "Standard_G5"
+ // VirtualMachineSizeTypesStandardGS1 ...
+ VirtualMachineSizeTypesStandardGS1 VirtualMachineSizeTypes = "Standard_GS1"
+ // VirtualMachineSizeTypesStandardGS2 ...
+ VirtualMachineSizeTypesStandardGS2 VirtualMachineSizeTypes = "Standard_GS2"
+ // VirtualMachineSizeTypesStandardGS3 ...
+ VirtualMachineSizeTypesStandardGS3 VirtualMachineSizeTypes = "Standard_GS3"
+ // VirtualMachineSizeTypesStandardGS4 ...
+ VirtualMachineSizeTypesStandardGS4 VirtualMachineSizeTypes = "Standard_GS4"
+ // VirtualMachineSizeTypesStandardGS44 ...
+ VirtualMachineSizeTypesStandardGS44 VirtualMachineSizeTypes = "Standard_GS4-4"
+ // VirtualMachineSizeTypesStandardGS48 ...
+ VirtualMachineSizeTypesStandardGS48 VirtualMachineSizeTypes = "Standard_GS4-8"
+ // VirtualMachineSizeTypesStandardGS5 ...
+ VirtualMachineSizeTypesStandardGS5 VirtualMachineSizeTypes = "Standard_GS5"
+ // VirtualMachineSizeTypesStandardGS516 ...
+ VirtualMachineSizeTypesStandardGS516 VirtualMachineSizeTypes = "Standard_GS5-16"
+ // VirtualMachineSizeTypesStandardGS58 ...
+ VirtualMachineSizeTypesStandardGS58 VirtualMachineSizeTypes = "Standard_GS5-8"
+ // VirtualMachineSizeTypesStandardH16 ...
+ VirtualMachineSizeTypesStandardH16 VirtualMachineSizeTypes = "Standard_H16"
+ // VirtualMachineSizeTypesStandardH16m ...
+ VirtualMachineSizeTypesStandardH16m VirtualMachineSizeTypes = "Standard_H16m"
+ // VirtualMachineSizeTypesStandardH16mr ...
+ VirtualMachineSizeTypesStandardH16mr VirtualMachineSizeTypes = "Standard_H16mr"
+ // VirtualMachineSizeTypesStandardH16r ...
+ VirtualMachineSizeTypesStandardH16r VirtualMachineSizeTypes = "Standard_H16r"
+ // VirtualMachineSizeTypesStandardH8 ...
+ VirtualMachineSizeTypesStandardH8 VirtualMachineSizeTypes = "Standard_H8"
+ // VirtualMachineSizeTypesStandardH8m ...
+ VirtualMachineSizeTypesStandardH8m VirtualMachineSizeTypes = "Standard_H8m"
+ // VirtualMachineSizeTypesStandardL16s ...
+ VirtualMachineSizeTypesStandardL16s VirtualMachineSizeTypes = "Standard_L16s"
+ // VirtualMachineSizeTypesStandardL32s ...
+ VirtualMachineSizeTypesStandardL32s VirtualMachineSizeTypes = "Standard_L32s"
+ // VirtualMachineSizeTypesStandardL4s ...
+ VirtualMachineSizeTypesStandardL4s VirtualMachineSizeTypes = "Standard_L4s"
+ // VirtualMachineSizeTypesStandardL8s ...
+ VirtualMachineSizeTypesStandardL8s VirtualMachineSizeTypes = "Standard_L8s"
+ // VirtualMachineSizeTypesStandardM12832ms ...
+ VirtualMachineSizeTypesStandardM12832ms VirtualMachineSizeTypes = "Standard_M128-32ms"
+ // VirtualMachineSizeTypesStandardM12864ms ...
+ VirtualMachineSizeTypesStandardM12864ms VirtualMachineSizeTypes = "Standard_M128-64ms"
+ // VirtualMachineSizeTypesStandardM128ms ...
+ VirtualMachineSizeTypesStandardM128ms VirtualMachineSizeTypes = "Standard_M128ms"
+ // VirtualMachineSizeTypesStandardM128s ...
+ VirtualMachineSizeTypesStandardM128s VirtualMachineSizeTypes = "Standard_M128s"
+ // VirtualMachineSizeTypesStandardM6416ms ...
+ VirtualMachineSizeTypesStandardM6416ms VirtualMachineSizeTypes = "Standard_M64-16ms"
+ // VirtualMachineSizeTypesStandardM6432ms ...
+ VirtualMachineSizeTypesStandardM6432ms VirtualMachineSizeTypes = "Standard_M64-32ms"
+ // VirtualMachineSizeTypesStandardM64ms ...
+ VirtualMachineSizeTypesStandardM64ms VirtualMachineSizeTypes = "Standard_M64ms"
+ // VirtualMachineSizeTypesStandardM64s ...
+ VirtualMachineSizeTypesStandardM64s VirtualMachineSizeTypes = "Standard_M64s"
+ // VirtualMachineSizeTypesStandardNC12 ...
+ VirtualMachineSizeTypesStandardNC12 VirtualMachineSizeTypes = "Standard_NC12"
+ // VirtualMachineSizeTypesStandardNC12sV2 ...
+ VirtualMachineSizeTypesStandardNC12sV2 VirtualMachineSizeTypes = "Standard_NC12s_v2"
+ // VirtualMachineSizeTypesStandardNC12sV3 ...
+ VirtualMachineSizeTypesStandardNC12sV3 VirtualMachineSizeTypes = "Standard_NC12s_v3"
+ // VirtualMachineSizeTypesStandardNC24 ...
+ VirtualMachineSizeTypesStandardNC24 VirtualMachineSizeTypes = "Standard_NC24"
+ // VirtualMachineSizeTypesStandardNC24r ...
+ VirtualMachineSizeTypesStandardNC24r VirtualMachineSizeTypes = "Standard_NC24r"
+ // VirtualMachineSizeTypesStandardNC24rsV2 ...
+ VirtualMachineSizeTypesStandardNC24rsV2 VirtualMachineSizeTypes = "Standard_NC24rs_v2"
+ // VirtualMachineSizeTypesStandardNC24rsV3 ...
+ VirtualMachineSizeTypesStandardNC24rsV3 VirtualMachineSizeTypes = "Standard_NC24rs_v3"
+ // VirtualMachineSizeTypesStandardNC24sV2 ...
+ VirtualMachineSizeTypesStandardNC24sV2 VirtualMachineSizeTypes = "Standard_NC24s_v2"
+ // VirtualMachineSizeTypesStandardNC24sV3 ...
+ VirtualMachineSizeTypesStandardNC24sV3 VirtualMachineSizeTypes = "Standard_NC24s_v3"
+ // VirtualMachineSizeTypesStandardNC6 ...
+ VirtualMachineSizeTypesStandardNC6 VirtualMachineSizeTypes = "Standard_NC6"
+ // VirtualMachineSizeTypesStandardNC6sV2 ...
+ VirtualMachineSizeTypesStandardNC6sV2 VirtualMachineSizeTypes = "Standard_NC6s_v2"
+ // VirtualMachineSizeTypesStandardNC6sV3 ...
+ VirtualMachineSizeTypesStandardNC6sV3 VirtualMachineSizeTypes = "Standard_NC6s_v3"
+ // VirtualMachineSizeTypesStandardND12s ...
+ VirtualMachineSizeTypesStandardND12s VirtualMachineSizeTypes = "Standard_ND12s"
+ // VirtualMachineSizeTypesStandardND24rs ...
+ VirtualMachineSizeTypesStandardND24rs VirtualMachineSizeTypes = "Standard_ND24rs"
+ // VirtualMachineSizeTypesStandardND24s ...
+ VirtualMachineSizeTypesStandardND24s VirtualMachineSizeTypes = "Standard_ND24s"
+ // VirtualMachineSizeTypesStandardND6s ...
+ VirtualMachineSizeTypesStandardND6s VirtualMachineSizeTypes = "Standard_ND6s"
+ // VirtualMachineSizeTypesStandardNV12 ...
+ VirtualMachineSizeTypesStandardNV12 VirtualMachineSizeTypes = "Standard_NV12"
+ // VirtualMachineSizeTypesStandardNV24 ...
+ VirtualMachineSizeTypesStandardNV24 VirtualMachineSizeTypes = "Standard_NV24"
+ // VirtualMachineSizeTypesStandardNV6 ...
+ VirtualMachineSizeTypesStandardNV6 VirtualMachineSizeTypes = "Standard_NV6"
)
// PossibleVirtualMachineSizeTypesValues returns an array of possible values for the VirtualMachineSizeTypes const type.
func PossibleVirtualMachineSizeTypesValues() []VirtualMachineSizeTypes {
- return []VirtualMachineSizeTypes{BasicA0, BasicA1, BasicA2, BasicA3, BasicA4, StandardA0, StandardA1, StandardA10, StandardA11, StandardA1V2, StandardA2, StandardA2mV2, StandardA2V2, StandardA3, StandardA4, StandardA4mV2, StandardA4V2, StandardA5, StandardA6, StandardA7, StandardA8, StandardA8mV2, StandardA8V2, StandardA9, StandardB1ms, StandardB1s, StandardB2ms, StandardB2s, StandardB4ms, StandardB8ms, StandardD1, StandardD11, StandardD11V2, StandardD12, StandardD12V2, StandardD13, StandardD13V2, StandardD14, StandardD14V2, StandardD15V2, StandardD16sV3, StandardD16V3, StandardD1V2, StandardD2, StandardD2sV3, StandardD2V2, StandardD2V3, StandardD3, StandardD32sV3, StandardD32V3, StandardD3V2, StandardD4, StandardD4sV3, StandardD4V2, StandardD4V3, StandardD5V2, StandardD64sV3, StandardD64V3, StandardD8sV3, StandardD8V3, StandardDS1, StandardDS11, StandardDS11V2, StandardDS12, StandardDS12V2, StandardDS13, StandardDS132V2, StandardDS134V2, StandardDS13V2, StandardDS14, StandardDS144V2, StandardDS148V2, StandardDS14V2, StandardDS15V2, StandardDS1V2, StandardDS2, StandardDS2V2, StandardDS3, StandardDS3V2, StandardDS4, StandardDS4V2, StandardDS5V2, StandardE16sV3, StandardE16V3, StandardE2sV3, StandardE2V3, StandardE3216V3, StandardE328sV3, StandardE32sV3, StandardE32V3, StandardE4sV3, StandardE4V3, StandardE6416sV3, StandardE6432sV3, StandardE64sV3, StandardE64V3, StandardE8sV3, StandardE8V3, StandardF1, StandardF16, StandardF16s, StandardF16sV2, StandardF1s, StandardF2, StandardF2s, StandardF2sV2, StandardF32sV2, StandardF4, StandardF4s, StandardF4sV2, StandardF64sV2, StandardF72sV2, StandardF8, StandardF8s, StandardF8sV2, StandardG1, StandardG2, StandardG3, StandardG4, StandardG5, StandardGS1, StandardGS2, StandardGS3, StandardGS4, StandardGS44, StandardGS48, StandardGS5, StandardGS516, StandardGS58, StandardH16, StandardH16m, StandardH16mr, StandardH16r, StandardH8, StandardH8m, StandardL16s, StandardL32s, StandardL4s, StandardL8s, StandardM12832ms, StandardM12864ms, StandardM128ms, StandardM128s, StandardM6416ms, StandardM6432ms, StandardM64ms, StandardM64s, StandardNC12, StandardNC12sV2, StandardNC12sV3, StandardNC24, StandardNC24r, StandardNC24rsV2, StandardNC24rsV3, StandardNC24sV2, StandardNC24sV3, StandardNC6, StandardNC6sV2, StandardNC6sV3, StandardND12s, StandardND24rs, StandardND24s, StandardND6s, StandardNV12, StandardNV24, StandardNV6}
+ return []VirtualMachineSizeTypes{VirtualMachineSizeTypesBasicA0, VirtualMachineSizeTypesBasicA1, VirtualMachineSizeTypesBasicA2, VirtualMachineSizeTypesBasicA3, VirtualMachineSizeTypesBasicA4, VirtualMachineSizeTypesStandardA0, VirtualMachineSizeTypesStandardA1, VirtualMachineSizeTypesStandardA10, VirtualMachineSizeTypesStandardA11, VirtualMachineSizeTypesStandardA1V2, VirtualMachineSizeTypesStandardA2, VirtualMachineSizeTypesStandardA2mV2, VirtualMachineSizeTypesStandardA2V2, VirtualMachineSizeTypesStandardA3, VirtualMachineSizeTypesStandardA4, VirtualMachineSizeTypesStandardA4mV2, VirtualMachineSizeTypesStandardA4V2, VirtualMachineSizeTypesStandardA5, VirtualMachineSizeTypesStandardA6, VirtualMachineSizeTypesStandardA7, VirtualMachineSizeTypesStandardA8, VirtualMachineSizeTypesStandardA8mV2, VirtualMachineSizeTypesStandardA8V2, VirtualMachineSizeTypesStandardA9, VirtualMachineSizeTypesStandardB1ms, VirtualMachineSizeTypesStandardB1s, VirtualMachineSizeTypesStandardB2ms, VirtualMachineSizeTypesStandardB2s, VirtualMachineSizeTypesStandardB4ms, VirtualMachineSizeTypesStandardB8ms, VirtualMachineSizeTypesStandardD1, VirtualMachineSizeTypesStandardD11, VirtualMachineSizeTypesStandardD11V2, VirtualMachineSizeTypesStandardD12, VirtualMachineSizeTypesStandardD12V2, VirtualMachineSizeTypesStandardD13, VirtualMachineSizeTypesStandardD13V2, VirtualMachineSizeTypesStandardD14, VirtualMachineSizeTypesStandardD14V2, VirtualMachineSizeTypesStandardD15V2, VirtualMachineSizeTypesStandardD16sV3, VirtualMachineSizeTypesStandardD16V3, VirtualMachineSizeTypesStandardD1V2, VirtualMachineSizeTypesStandardD2, VirtualMachineSizeTypesStandardD2sV3, VirtualMachineSizeTypesStandardD2V2, VirtualMachineSizeTypesStandardD2V3, VirtualMachineSizeTypesStandardD3, VirtualMachineSizeTypesStandardD32sV3, VirtualMachineSizeTypesStandardD32V3, VirtualMachineSizeTypesStandardD3V2, VirtualMachineSizeTypesStandardD4, VirtualMachineSizeTypesStandardD4sV3, VirtualMachineSizeTypesStandardD4V2, VirtualMachineSizeTypesStandardD4V3, VirtualMachineSizeTypesStandardD5V2, VirtualMachineSizeTypesStandardD64sV3, VirtualMachineSizeTypesStandardD64V3, VirtualMachineSizeTypesStandardD8sV3, VirtualMachineSizeTypesStandardD8V3, VirtualMachineSizeTypesStandardDS1, VirtualMachineSizeTypesStandardDS11, VirtualMachineSizeTypesStandardDS11V2, VirtualMachineSizeTypesStandardDS12, VirtualMachineSizeTypesStandardDS12V2, VirtualMachineSizeTypesStandardDS13, VirtualMachineSizeTypesStandardDS132V2, VirtualMachineSizeTypesStandardDS134V2, VirtualMachineSizeTypesStandardDS13V2, VirtualMachineSizeTypesStandardDS14, VirtualMachineSizeTypesStandardDS144V2, VirtualMachineSizeTypesStandardDS148V2, VirtualMachineSizeTypesStandardDS14V2, VirtualMachineSizeTypesStandardDS15V2, VirtualMachineSizeTypesStandardDS1V2, VirtualMachineSizeTypesStandardDS2, VirtualMachineSizeTypesStandardDS2V2, VirtualMachineSizeTypesStandardDS3, VirtualMachineSizeTypesStandardDS3V2, VirtualMachineSizeTypesStandardDS4, VirtualMachineSizeTypesStandardDS4V2, VirtualMachineSizeTypesStandardDS5V2, VirtualMachineSizeTypesStandardE16sV3, VirtualMachineSizeTypesStandardE16V3, VirtualMachineSizeTypesStandardE2sV3, VirtualMachineSizeTypesStandardE2V3, VirtualMachineSizeTypesStandardE3216V3, VirtualMachineSizeTypesStandardE328sV3, VirtualMachineSizeTypesStandardE32sV3, VirtualMachineSizeTypesStandardE32V3, VirtualMachineSizeTypesStandardE4sV3, VirtualMachineSizeTypesStandardE4V3, VirtualMachineSizeTypesStandardE6416sV3, VirtualMachineSizeTypesStandardE6432sV3, VirtualMachineSizeTypesStandardE64sV3, VirtualMachineSizeTypesStandardE64V3, VirtualMachineSizeTypesStandardE8sV3, VirtualMachineSizeTypesStandardE8V3, VirtualMachineSizeTypesStandardF1, VirtualMachineSizeTypesStandardF16, VirtualMachineSizeTypesStandardF16s, VirtualMachineSizeTypesStandardF16sV2, VirtualMachineSizeTypesStandardF1s, VirtualMachineSizeTypesStandardF2, VirtualMachineSizeTypesStandardF2s, VirtualMachineSizeTypesStandardF2sV2, VirtualMachineSizeTypesStandardF32sV2, VirtualMachineSizeTypesStandardF4, VirtualMachineSizeTypesStandardF4s, VirtualMachineSizeTypesStandardF4sV2, VirtualMachineSizeTypesStandardF64sV2, VirtualMachineSizeTypesStandardF72sV2, VirtualMachineSizeTypesStandardF8, VirtualMachineSizeTypesStandardF8s, VirtualMachineSizeTypesStandardF8sV2, VirtualMachineSizeTypesStandardG1, VirtualMachineSizeTypesStandardG2, VirtualMachineSizeTypesStandardG3, VirtualMachineSizeTypesStandardG4, VirtualMachineSizeTypesStandardG5, VirtualMachineSizeTypesStandardGS1, VirtualMachineSizeTypesStandardGS2, VirtualMachineSizeTypesStandardGS3, VirtualMachineSizeTypesStandardGS4, VirtualMachineSizeTypesStandardGS44, VirtualMachineSizeTypesStandardGS48, VirtualMachineSizeTypesStandardGS5, VirtualMachineSizeTypesStandardGS516, VirtualMachineSizeTypesStandardGS58, VirtualMachineSizeTypesStandardH16, VirtualMachineSizeTypesStandardH16m, VirtualMachineSizeTypesStandardH16mr, VirtualMachineSizeTypesStandardH16r, VirtualMachineSizeTypesStandardH8, VirtualMachineSizeTypesStandardH8m, VirtualMachineSizeTypesStandardL16s, VirtualMachineSizeTypesStandardL32s, VirtualMachineSizeTypesStandardL4s, VirtualMachineSizeTypesStandardL8s, VirtualMachineSizeTypesStandardM12832ms, VirtualMachineSizeTypesStandardM12864ms, VirtualMachineSizeTypesStandardM128ms, VirtualMachineSizeTypesStandardM128s, VirtualMachineSizeTypesStandardM6416ms, VirtualMachineSizeTypesStandardM6432ms, VirtualMachineSizeTypesStandardM64ms, VirtualMachineSizeTypesStandardM64s, VirtualMachineSizeTypesStandardNC12, VirtualMachineSizeTypesStandardNC12sV2, VirtualMachineSizeTypesStandardNC12sV3, VirtualMachineSizeTypesStandardNC24, VirtualMachineSizeTypesStandardNC24r, VirtualMachineSizeTypesStandardNC24rsV2, VirtualMachineSizeTypesStandardNC24rsV3, VirtualMachineSizeTypesStandardNC24sV2, VirtualMachineSizeTypesStandardNC24sV3, VirtualMachineSizeTypesStandardNC6, VirtualMachineSizeTypesStandardNC6sV2, VirtualMachineSizeTypesStandardNC6sV3, VirtualMachineSizeTypesStandardND12s, VirtualMachineSizeTypesStandardND24rs, VirtualMachineSizeTypesStandardND24s, VirtualMachineSizeTypesStandardND6s, VirtualMachineSizeTypesStandardNV12, VirtualMachineSizeTypesStandardNV24, VirtualMachineSizeTypesStandardNV6}
}
// VMDiskTypes enumerates the values for vm disk types.
@@ -1542,17 +1544,17 @@ func PossibleVMDiskTypesValues() []VMDiskTypes {
type VMGuestPatchClassificationLinux string
const (
- // Critical ...
- Critical VMGuestPatchClassificationLinux = "Critical"
- // Other ...
- Other VMGuestPatchClassificationLinux = "Other"
- // Security ...
- Security VMGuestPatchClassificationLinux = "Security"
+ // VMGuestPatchClassificationLinuxCritical ...
+ VMGuestPatchClassificationLinuxCritical VMGuestPatchClassificationLinux = "Critical"
+ // VMGuestPatchClassificationLinuxOther ...
+ VMGuestPatchClassificationLinuxOther VMGuestPatchClassificationLinux = "Other"
+ // VMGuestPatchClassificationLinuxSecurity ...
+ VMGuestPatchClassificationLinuxSecurity VMGuestPatchClassificationLinux = "Security"
)
// PossibleVMGuestPatchClassificationLinuxValues returns an array of possible values for the VMGuestPatchClassificationLinux const type.
func PossibleVMGuestPatchClassificationLinuxValues() []VMGuestPatchClassificationLinux {
- return []VMGuestPatchClassificationLinux{Critical, Other, Security}
+ return []VMGuestPatchClassificationLinux{VMGuestPatchClassificationLinuxCritical, VMGuestPatchClassificationLinuxOther, VMGuestPatchClassificationLinuxSecurity}
}
// VMGuestPatchClassificationWindows enumerates the values for vm guest patch classification windows.
@@ -1605,17 +1607,17 @@ func PossibleVMGuestPatchRebootBehaviorValues() []VMGuestPatchRebootBehavior {
type VMGuestPatchRebootSetting string
const (
- // Always ...
- Always VMGuestPatchRebootSetting = "Always"
- // IfRequired ...
- IfRequired VMGuestPatchRebootSetting = "IfRequired"
- // Never ...
- Never VMGuestPatchRebootSetting = "Never"
+ // VMGuestPatchRebootSettingAlways ...
+ VMGuestPatchRebootSettingAlways VMGuestPatchRebootSetting = "Always"
+ // VMGuestPatchRebootSettingIfRequired ...
+ VMGuestPatchRebootSettingIfRequired VMGuestPatchRebootSetting = "IfRequired"
+ // VMGuestPatchRebootSettingNever ...
+ VMGuestPatchRebootSettingNever VMGuestPatchRebootSetting = "Never"
)
// PossibleVMGuestPatchRebootSettingValues returns an array of possible values for the VMGuestPatchRebootSetting const type.
func PossibleVMGuestPatchRebootSettingValues() []VMGuestPatchRebootSetting {
- return []VMGuestPatchRebootSetting{Always, IfRequired, Never}
+ return []VMGuestPatchRebootSetting{VMGuestPatchRebootSettingAlways, VMGuestPatchRebootSettingIfRequired, VMGuestPatchRebootSettingNever}
}
// VMGuestPatchRebootStatus enumerates the values for vm guest patch reboot status.
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/galleries.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/galleries.go
index 75873554375b..0d32432e367a 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/galleries.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/galleries.go
@@ -55,7 +55,7 @@ func (client GalleriesClient) CreateOrUpdate(ctx context.Context, resourceGroupN
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -89,6 +89,7 @@ func (client GalleriesClient) CreateOrUpdatePreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client GalleriesClient) CreateOrUpdateSender(req *http.Request) (future GalleriesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -135,7 +136,7 @@ func (client GalleriesClient) Delete(ctx context.Context, resourceGroupName stri
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -167,6 +168,7 @@ func (client GalleriesClient) DeletePreparer(ctx context.Context, resourceGroupN
// http.Response Body if it receives an error.
func (client GalleriesClient) DeleteSender(req *http.Request) (future GalleriesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -519,7 +521,7 @@ func (client GalleriesClient) Update(ctx context.Context, resourceGroupName stri
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -553,6 +555,7 @@ func (client GalleriesClient) UpdatePreparer(ctx context.Context, resourceGroupN
// http.Response Body if it receives an error.
func (client GalleriesClient) UpdateSender(req *http.Request) (future GalleriesUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/galleryapplications.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/galleryapplications.go
index 9f50ac068e76..7886b4fec37c 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/galleryapplications.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/galleryapplications.go
@@ -59,7 +59,7 @@ func (client GalleryApplicationsClient) CreateOrUpdate(ctx context.Context, reso
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -94,6 +94,7 @@ func (client GalleryApplicationsClient) CreateOrUpdatePreparer(ctx context.Conte
// http.Response Body if it receives an error.
func (client GalleryApplicationsClient) CreateOrUpdateSender(req *http.Request) (future GalleryApplicationsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -142,7 +143,7 @@ func (client GalleryApplicationsClient) Delete(ctx context.Context, resourceGrou
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -175,6 +176,7 @@ func (client GalleryApplicationsClient) DeletePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client GalleryApplicationsClient) DeleteSender(req *http.Request) (future GalleryApplicationsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -423,7 +425,7 @@ func (client GalleryApplicationsClient) Update(ctx context.Context, resourceGrou
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -458,6 +460,7 @@ func (client GalleryApplicationsClient) UpdatePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client GalleryApplicationsClient) UpdateSender(req *http.Request) (future GalleryApplicationsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/galleryapplicationversions.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/galleryapplicationversions.go
index a5b0fdf91e75..1390517d554d 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/galleryapplicationversions.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/galleryapplicationversions.go
@@ -77,7 +77,7 @@ func (client GalleryApplicationVersionsClient) CreateOrUpdate(ctx context.Contex
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -113,6 +113,7 @@ func (client GalleryApplicationVersionsClient) CreateOrUpdatePreparer(ctx contex
// http.Response Body if it receives an error.
func (client GalleryApplicationVersionsClient) CreateOrUpdateSender(req *http.Request) (future GalleryApplicationVersionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -162,7 +163,7 @@ func (client GalleryApplicationVersionsClient) Delete(ctx context.Context, resou
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -196,6 +197,7 @@ func (client GalleryApplicationVersionsClient) DeletePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client GalleryApplicationVersionsClient) DeleteSender(req *http.Request) (future GalleryApplicationVersionsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -453,7 +455,7 @@ func (client GalleryApplicationVersionsClient) Update(ctx context.Context, resou
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -489,6 +491,7 @@ func (client GalleryApplicationVersionsClient) UpdatePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client GalleryApplicationVersionsClient) UpdateSender(req *http.Request) (future GalleryApplicationVersionsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/galleryimages.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/galleryimages.go
index 98858ff6c7e3..a57095ccf216 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/galleryimages.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/galleryimages.go
@@ -70,7 +70,7 @@ func (client GalleryImagesClient) CreateOrUpdate(ctx context.Context, resourceGr
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -105,6 +105,7 @@ func (client GalleryImagesClient) CreateOrUpdatePreparer(ctx context.Context, re
// http.Response Body if it receives an error.
func (client GalleryImagesClient) CreateOrUpdateSender(req *http.Request) (future GalleryImagesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -152,7 +153,7 @@ func (client GalleryImagesClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -185,6 +186,7 @@ func (client GalleryImagesClient) DeletePreparer(ctx context.Context, resourceGr
// http.Response Body if it receives an error.
func (client GalleryImagesClient) DeleteSender(req *http.Request) (future GalleryImagesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -430,7 +432,7 @@ func (client GalleryImagesClient) Update(ctx context.Context, resourceGroupName
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -465,6 +467,7 @@ func (client GalleryImagesClient) UpdatePreparer(ctx context.Context, resourceGr
// http.Response Body if it receives an error.
func (client GalleryImagesClient) UpdateSender(req *http.Request) (future GalleryImagesUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/galleryimageversions.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/galleryimageversions.go
index 64ab355fd855..5db43f681fcf 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/galleryimageversions.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/galleryimageversions.go
@@ -67,7 +67,7 @@ func (client GalleryImageVersionsClient) CreateOrUpdate(ctx context.Context, res
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -103,6 +103,7 @@ func (client GalleryImageVersionsClient) CreateOrUpdatePreparer(ctx context.Cont
// http.Response Body if it receives an error.
func (client GalleryImageVersionsClient) CreateOrUpdateSender(req *http.Request) (future GalleryImageVersionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -151,7 +152,7 @@ func (client GalleryImageVersionsClient) Delete(ctx context.Context, resourceGro
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -185,6 +186,7 @@ func (client GalleryImageVersionsClient) DeletePreparer(ctx context.Context, res
// http.Response Body if it receives an error.
func (client GalleryImageVersionsClient) DeleteSender(req *http.Request) (future GalleryImageVersionsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -440,7 +442,7 @@ func (client GalleryImageVersionsClient) Update(ctx context.Context, resourceGro
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -476,6 +478,7 @@ func (client GalleryImageVersionsClient) UpdatePreparer(ctx context.Context, res
// http.Response Body if it receives an error.
func (client GalleryImageVersionsClient) UpdateSender(req *http.Request) (future GalleryImageVersionsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/images.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/images.go
index 67ce0b343c7f..097a8f5dc61b 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/images.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/images.go
@@ -54,7 +54,7 @@ func (client ImagesClient) CreateOrUpdate(ctx context.Context, resourceGroupName
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -88,6 +88,7 @@ func (client ImagesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client ImagesClient) CreateOrUpdateSender(req *http.Request) (future ImagesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -134,7 +135,7 @@ func (client ImagesClient) Delete(ctx context.Context, resourceGroupName string,
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -166,6 +167,7 @@ func (client ImagesClient) DeletePreparer(ctx context.Context, resourceGroupName
// http.Response Body if it receives an error.
func (client ImagesClient) DeleteSender(req *http.Request) (future ImagesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -522,7 +524,7 @@ func (client ImagesClient) Update(ctx context.Context, resourceGroupName string,
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -556,6 +558,7 @@ func (client ImagesClient) UpdatePreparer(ctx context.Context, resourceGroupName
// http.Response Body if it receives an error.
func (client ImagesClient) UpdateSender(req *http.Request) (future ImagesUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/loganalytics.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/loganalytics.go
index e6b75efaf96f..38908fd0de79 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/loganalytics.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/loganalytics.go
@@ -61,7 +61,7 @@ func (client LogAnalyticsClient) ExportRequestRateByInterval(ctx context.Context
result, err = client.ExportRequestRateByIntervalSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportRequestRateByInterval", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportRequestRateByInterval", result.Response(), "Failure sending request")
return
}
@@ -94,6 +94,7 @@ func (client LogAnalyticsClient) ExportRequestRateByIntervalPreparer(ctx context
// http.Response Body if it receives an error.
func (client LogAnalyticsClient) ExportRequestRateByIntervalSender(req *http.Request) (future LogAnalyticsExportRequestRateByIntervalFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -147,7 +148,7 @@ func (client LogAnalyticsClient) ExportThrottledRequests(ctx context.Context, pa
result, err = client.ExportThrottledRequestsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportThrottledRequests", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportThrottledRequests", result.Response(), "Failure sending request")
return
}
@@ -180,6 +181,7 @@ func (client LogAnalyticsClient) ExportThrottledRequestsPreparer(ctx context.Con
// http.Response Body if it receives an error.
func (client LogAnalyticsClient) ExportThrottledRequestsSender(req *http.Request) (future LogAnalyticsExportThrottledRequestsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/models.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/models.go
index 9e9c951884a3..14a353540e8a 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/models.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/models.go
@@ -44,11 +44,11 @@ type AdditionalCapabilities struct {
// Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name,
// and the pass in which the content is applied.
type AdditionalUnattendContent struct {
- // PassName - The pass name. Currently, the only allowable value is OobeSystem. Possible values include: 'OobeSystem'
+ // PassName - The pass name. Currently, the only allowable value is OobeSystem. Possible values include: 'PassNamesOobeSystem'
PassName PassNames `json:"passName,omitempty"`
- // ComponentName - The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup. Possible values include: 'MicrosoftWindowsShellSetup'
+ // ComponentName - The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup. Possible values include: 'ComponentNamesMicrosoftWindowsShellSetup'
ComponentName ComponentNames `json:"componentName,omitempty"`
- // SettingName - Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: 'AutoLogon', 'FirstLogonCommands'
+ // SettingName - Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: 'SettingNamesAutoLogon', 'SettingNamesFirstLogonCommands'
SettingName SettingNames `json:"settingName,omitempty"`
// Content - Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted.
Content *string `json:"content,omitempty"`
@@ -555,7 +555,7 @@ type CloudError struct {
// CreationData data used when creating a disk.
type CreationData struct {
- // CreateOption - This enumerates the possible sources of a disk's creation. Possible values include: 'Empty', 'Attach', 'FromImage', 'Import', 'Copy', 'Restore', 'Upload'
+ // CreateOption - This enumerates the possible sources of a disk's creation. Possible values include: 'DiskCreateOptionEmpty', 'DiskCreateOptionAttach', 'DiskCreateOptionFromImage', 'DiskCreateOptionImport', 'DiskCreateOptionCopy', 'DiskCreateOptionRestore', 'DiskCreateOptionUpload'
CreateOption DiskCreateOption `json:"createOption,omitempty"`
// StorageAccountID - Required if createOption is Import. The Azure Resource Manager identifier of the storage account containing the blob to import as a disk.
StorageAccountID *string `json:"storageAccountId,omitempty"`
@@ -631,7 +631,7 @@ type DataDisk struct {
DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"`
// DiskMBpsReadWrite - READ-ONLY; Specifies the bandwidth in MB per second for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set.
DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"`
- // DetachOption - Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: **ForceDetach**.
detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior.
This feature is still in preview mode and is not supported for VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. Possible values include: 'ForceDetach'
+ // DetachOption - Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: **ForceDetach**.
detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior.
This feature is still in preview mode and is not supported for VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. Possible values include: 'DiskDetachOptionTypesForceDetach'
DetachOption DiskDetachOptionTypes `json:"detachOption,omitempty"`
}
@@ -1622,9 +1622,9 @@ type DiagnosticsProfile struct {
// DiffDiskSettings describes the parameters of ephemeral disk settings that can be specified for operating
// system disk.
NOTE: The ephemeral disk settings can only be specified for managed disk.
type DiffDiskSettings struct {
- // Option - Specifies the ephemeral disk settings for operating system disk. Possible values include: 'Local'
+ // Option - Specifies the ephemeral disk settings for operating system disk. Possible values include: 'DiffDiskOptionsLocal'
Option DiffDiskOptions `json:"option,omitempty"`
- // Placement - Specifies the ephemeral disk placement for operating system disk.
Possible values are:
**CacheDisk**
**ResourceDisk**
Default: **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk** is used.
Refer to VM size documentation for Windows VM at https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/en-us/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Possible values include: 'CacheDisk', 'ResourceDisk'
+ // Placement - Specifies the ephemeral disk placement for operating system disk.
Possible values are:
**CacheDisk**
**ResourceDisk**
Default: **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk** is used.
Refer to VM size documentation for Windows VM at https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/en-us/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Possible values include: 'DiffDiskPlacementCacheDisk', 'DiffDiskPlacementResourceDisk'
Placement DiffDiskPlacement `json:"placement,omitempty"`
}
@@ -2776,7 +2776,7 @@ func (desu *DiskEncryptionSetUpdate) UnmarshalJSON(body []byte) error {
// DiskEncryptionSetUpdateProperties disk encryption set resource update properties.
type DiskEncryptionSetUpdateProperties struct {
- // EncryptionType - Possible values include: 'EncryptionAtRestWithCustomerKey', 'EncryptionAtRestWithPlatformAndCustomerKeys'
+ // EncryptionType - Possible values include: 'DiskEncryptionSetTypeEncryptionAtRestWithCustomerKey', 'DiskEncryptionSetTypeEncryptionAtRestWithPlatformAndCustomerKeys'
EncryptionType DiskEncryptionSetType `json:"encryptionType,omitempty"`
ActiveKey *KeyForDiskEncryptionSet `json:"activeKey,omitempty"`
// RotationToLatestKeyVersionEnabled - Set this flag to true to enable auto-updating of this disk encryption set to the latest key version.
@@ -2962,9 +2962,9 @@ func NewDiskListPage(cur DiskList, getNextPage func(context.Context, DiskList) (
type DiskProperties struct {
// TimeCreated - READ-ONLY; The time when the disk was created.
TimeCreated *date.Time `json:"timeCreated,omitempty"`
- // OsType - The Operating System type. Possible values include: 'Windows', 'Linux'
+ // OsType - The Operating System type. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux'
OsType OperatingSystemTypes `json:"osType,omitempty"`
- // HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2'
+ // HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'HyperVGenerationV1', 'HyperVGenerationV2'
HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"`
// PurchasePlan - Purchase plan information for the the image from which the OS disk was created. E.g. - {name: 2019-Datacenter, publisher: MicrosoftWindowsServer, product: WindowsServer}
PurchasePlan *PurchasePlan `json:"purchasePlan,omitempty"`
@@ -2988,7 +2988,7 @@ type DiskProperties struct {
DiskIOPSReadOnly *int64 `json:"diskIOPSReadOnly,omitempty"`
// DiskMBpsReadOnly - The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.
DiskMBpsReadOnly *int64 `json:"diskMBpsReadOnly,omitempty"`
- // DiskState - The state of the disk. Possible values include: 'Unattached', 'Attached', 'Reserved', 'ActiveSAS', 'ReadyToUpload', 'ActiveUpload'
+ // DiskState - The state of the disk. Possible values include: 'DiskStateUnattached', 'DiskStateAttached', 'DiskStateReserved', 'DiskStateActiveSAS', 'DiskStateReadyToUpload', 'DiskStateActiveUpload'
DiskState DiskState `json:"diskState,omitempty"`
// Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
Encryption *Encryption `json:"encryption,omitempty"`
@@ -2996,7 +2996,7 @@ type DiskProperties struct {
MaxShares *int32 `json:"maxShares,omitempty"`
// ShareInfo - READ-ONLY; Details of the list of all VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs.
ShareInfo *[]ShareInfoElement `json:"shareInfo,omitempty"`
- // NetworkAccessPolicy - Possible values include: 'AllowAll', 'AllowPrivate', 'DenyAll'
+ // NetworkAccessPolicy - Possible values include: 'NetworkAccessPolicyAllowAll', 'NetworkAccessPolicyAllowPrivate', 'NetworkAccessPolicyDenyAll'
NetworkAccessPolicy NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"`
// DiskAccessID - ARM id of the DiskAccess resource for using private endpoints on disks.
DiskAccessID *string `json:"diskAccessId,omitempty"`
@@ -3147,6 +3147,49 @@ func (drp *DiskRestorePoint) UnmarshalJSON(body []byte) error {
return nil
}
+// DiskRestorePointGrantAccessFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type DiskRestorePointGrantAccessFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(DiskRestorePointClient) (AccessURI, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DiskRestorePointGrantAccessFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DiskRestorePointGrantAccessFuture.Result.
+func (future *DiskRestorePointGrantAccessFuture) result(client DiskRestorePointClient) (au AccessURI, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskRestorePointGrantAccessFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ au.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.DiskRestorePointGrantAccessFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if au.Response.Response, err = future.GetResult(sender); err == nil && au.Response.Response.StatusCode != http.StatusNoContent {
+ au, err = client.GrantAccessResponder(au.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskRestorePointGrantAccessFuture", "Result", au.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
// DiskRestorePointList the List Disk Restore Points operation response.
type DiskRestorePointList struct {
autorest.Response `json:"-"`
@@ -3312,9 +3355,9 @@ type DiskRestorePointProperties struct {
TimeCreated *date.Time `json:"timeCreated,omitempty"`
// SourceResourceID - READ-ONLY; arm id of source disk
SourceResourceID *string `json:"sourceResourceId,omitempty"`
- // OsType - READ-ONLY; The Operating System type. Possible values include: 'Windows', 'Linux'
+ // OsType - READ-ONLY; The Operating System type. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux'
OsType OperatingSystemTypes `json:"osType,omitempty"`
- // HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2'
+ // HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'HyperVGenerationV1', 'HyperVGenerationV2'
HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"`
// PurchasePlan - Purchase plan information for the the image from which the OS disk was created.
PurchasePlan *PurchasePlan `json:"purchasePlan,omitempty"`
@@ -3343,6 +3386,43 @@ func (drpp DiskRestorePointProperties) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
+// DiskRestorePointRevokeAccessFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type DiskRestorePointRevokeAccessFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(DiskRestorePointClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DiskRestorePointRevokeAccessFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DiskRestorePointRevokeAccessFuture.Result.
+func (future *DiskRestorePointRevokeAccessFuture) result(client DiskRestorePointClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskRestorePointRevokeAccessFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.DiskRestorePointRevokeAccessFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// DisksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type DisksCreateOrUpdateFuture struct {
@@ -3424,7 +3504,7 @@ func (future *DisksDeleteFuture) result(client DisksClient) (ar autorest.Respons
// DiskSecurityProfile contains the security related information for the resource.
type DiskSecurityProfile struct {
- // SecurityType - Possible values include: 'TrustedLaunch'
+ // SecurityType - Possible values include: 'DiskSecurityTypesTrustedLaunch'
SecurityType DiskSecurityTypes `json:"securityType,omitempty"`
}
@@ -3474,7 +3554,7 @@ func (future *DisksGrantAccessFuture) result(client DisksClient) (au AccessURI,
// DiskSku the disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS,
// Premium_ZRS, or StandardSSD_ZRS.
type DiskSku struct {
- // Name - The sku name. Possible values include: 'StandardLRS', 'PremiumLRS', 'StandardSSDLRS', 'UltraSSDLRS', 'PremiumZRS', 'StandardSSDZRS'
+ // Name - The sku name. Possible values include: 'DiskStorageAccountTypesStandardLRS', 'DiskStorageAccountTypesPremiumLRS', 'DiskStorageAccountTypesStandardSSDLRS', 'DiskStorageAccountTypesUltraSSDLRS', 'DiskStorageAccountTypesPremiumZRS', 'DiskStorageAccountTypesStandardSSDZRS'
Name DiskStorageAccountTypes `json:"name,omitempty"`
// Tier - READ-ONLY; The sku tier.
Tier *string `json:"tier,omitempty"`
@@ -3635,7 +3715,7 @@ func (du *DiskUpdate) UnmarshalJSON(body []byte) error {
// DiskUpdateProperties disk resource update properties.
type DiskUpdateProperties struct {
- // OsType - the Operating System type. Possible values include: 'Windows', 'Linux'
+ // OsType - the Operating System type. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux'
OsType OperatingSystemTypes `json:"osType,omitempty"`
// DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
@@ -3653,7 +3733,7 @@ type DiskUpdateProperties struct {
MaxShares *int32 `json:"maxShares,omitempty"`
// Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
Encryption *Encryption `json:"encryption,omitempty"`
- // NetworkAccessPolicy - Possible values include: 'AllowAll', 'AllowPrivate', 'DenyAll'
+ // NetworkAccessPolicy - Possible values include: 'NetworkAccessPolicyAllowAll', 'NetworkAccessPolicyAllowPrivate', 'NetworkAccessPolicyDenyAll'
NetworkAccessPolicy NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"`
// DiskAccessID - ARM id of the DiskAccess resource for using private endpoints on disks.
DiskAccessID *string `json:"diskAccessId,omitempty"`
@@ -3758,7 +3838,7 @@ func (esi EncryptionSetIdentity) MarshalJSON() ([]byte, error) {
// EncryptionSetProperties ...
type EncryptionSetProperties struct {
- // EncryptionType - Possible values include: 'EncryptionAtRestWithCustomerKey', 'EncryptionAtRestWithPlatformAndCustomerKeys'
+ // EncryptionType - Possible values include: 'DiskEncryptionSetTypeEncryptionAtRestWithCustomerKey', 'DiskEncryptionSetTypeEncryptionAtRestWithPlatformAndCustomerKeys'
EncryptionType DiskEncryptionSetType `json:"encryptionType,omitempty"`
// ActiveKey - The key vault key which is currently used by this disk encryption set.
ActiveKey *KeyForDiskEncryptionSet `json:"activeKey,omitempty"`
@@ -3809,7 +3889,7 @@ type EncryptionSettingsElement struct {
type ExtendedLocation struct {
// Name - The name of the extended location.
Name *string `json:"name,omitempty"`
- // Type - The type of the extended location. Possible values include: 'EdgeZone'
+ // Type - The type of the extended location. Possible values include: 'ExtendedLocationTypesEdgeZone'
Type ExtendedLocationTypes `json:"type,omitempty"`
}
@@ -4308,7 +4388,7 @@ type GalleryApplicationProperties struct {
ReleaseNoteURI *string `json:"releaseNoteUri,omitempty"`
// EndOfLifeDate - The end of life date of the gallery Application Definition. This property can be used for decommissioning purposes. This property is updatable.
EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
- // SupportedOSType - This property allows you to specify the supported type of the OS that application is built for.
Possible values are:
**Windows**
**Linux**. Possible values include: 'Windows', 'Linux'
+ // SupportedOSType - This property allows you to specify the supported type of the OS that application is built for.
Possible values are:
**Windows**
**Linux**. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux'
SupportedOSType OperatingSystemTypes `json:"supportedOSType,omitempty"`
}
@@ -5445,11 +5525,11 @@ type GalleryImageProperties struct {
PrivacyStatementURI *string `json:"privacyStatementUri,omitempty"`
// ReleaseNoteURI - The release note uri.
ReleaseNoteURI *string `json:"releaseNoteUri,omitempty"`
- // OsType - This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image.
Possible values are:
**Windows**
**Linux**. Possible values include: 'Windows', 'Linux'
+ // OsType - This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image.
Possible values are:
**Windows**
**Linux**. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux'
OsType OperatingSystemTypes `json:"osType,omitempty"`
- // OsState - This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. Possible values include: 'Generalized', 'Specialized'
+ // OsState - This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. Possible values include: 'OperatingSystemStateTypesGeneralized', 'OperatingSystemStateTypesSpecialized'
OsState OperatingSystemStateTypes `json:"osState,omitempty"`
- // HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2'
+ // HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'HyperVGenerationV1', 'HyperVGenerationV2'
HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"`
// EndOfLifeDate - The end of life date of the gallery Image Definition. This property can be used for decommissioning purposes. This property is updatable.
EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
@@ -6534,7 +6614,7 @@ func (gu *GalleryUpdate) UnmarshalJSON(body []byte) error {
// GrantAccessData data used for requesting a SAS.
type GrantAccessData struct {
- // Access - Possible values include: 'None', 'Read', 'Write'
+ // Access - Possible values include: 'AccessLevelNone', 'AccessLevelRead', 'AccessLevelWrite'
Access AccessLevel `json:"access,omitempty"`
// DurationInSeconds - Time duration in seconds until the SAS access expires.
DurationInSeconds *int32 `json:"durationInSeconds,omitempty"`
@@ -6542,7 +6622,7 @@ type GrantAccessData struct {
// HardwareProfile specifies the hardware settings for the virtual machine.
type HardwareProfile struct {
- // VMSize - Specifies the size of the virtual machine.
The enum data type is currently deprecated and will be removed by December 23rd 2023.
Recommended way to get the list of available sizes is using these APIs:
[List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes)
[List all available virtual machine sizes in a region]( https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list)
[List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/en-us/azure/virtual-machines/sizes).
The available VM sizes depend on region and availability set. Possible values include: 'BasicA0', 'BasicA1', 'BasicA2', 'BasicA3', 'BasicA4', 'StandardA0', 'StandardA1', 'StandardA2', 'StandardA3', 'StandardA4', 'StandardA5', 'StandardA6', 'StandardA7', 'StandardA8', 'StandardA9', 'StandardA10', 'StandardA11', 'StandardA1V2', 'StandardA2V2', 'StandardA4V2', 'StandardA8V2', 'StandardA2mV2', 'StandardA4mV2', 'StandardA8mV2', 'StandardB1s', 'StandardB1ms', 'StandardB2s', 'StandardB2ms', 'StandardB4ms', 'StandardB8ms', 'StandardD1', 'StandardD2', 'StandardD3', 'StandardD4', 'StandardD11', 'StandardD12', 'StandardD13', 'StandardD14', 'StandardD1V2', 'StandardD2V2', 'StandardD3V2', 'StandardD4V2', 'StandardD5V2', 'StandardD2V3', 'StandardD4V3', 'StandardD8V3', 'StandardD16V3', 'StandardD32V3', 'StandardD64V3', 'StandardD2sV3', 'StandardD4sV3', 'StandardD8sV3', 'StandardD16sV3', 'StandardD32sV3', 'StandardD64sV3', 'StandardD11V2', 'StandardD12V2', 'StandardD13V2', 'StandardD14V2', 'StandardD15V2', 'StandardDS1', 'StandardDS2', 'StandardDS3', 'StandardDS4', 'StandardDS11', 'StandardDS12', 'StandardDS13', 'StandardDS14', 'StandardDS1V2', 'StandardDS2V2', 'StandardDS3V2', 'StandardDS4V2', 'StandardDS5V2', 'StandardDS11V2', 'StandardDS12V2', 'StandardDS13V2', 'StandardDS14V2', 'StandardDS15V2', 'StandardDS134V2', 'StandardDS132V2', 'StandardDS148V2', 'StandardDS144V2', 'StandardE2V3', 'StandardE4V3', 'StandardE8V3', 'StandardE16V3', 'StandardE32V3', 'StandardE64V3', 'StandardE2sV3', 'StandardE4sV3', 'StandardE8sV3', 'StandardE16sV3', 'StandardE32sV3', 'StandardE64sV3', 'StandardE3216V3', 'StandardE328sV3', 'StandardE6432sV3', 'StandardE6416sV3', 'StandardF1', 'StandardF2', 'StandardF4', 'StandardF8', 'StandardF16', 'StandardF1s', 'StandardF2s', 'StandardF4s', 'StandardF8s', 'StandardF16s', 'StandardF2sV2', 'StandardF4sV2', 'StandardF8sV2', 'StandardF16sV2', 'StandardF32sV2', 'StandardF64sV2', 'StandardF72sV2', 'StandardG1', 'StandardG2', 'StandardG3', 'StandardG4', 'StandardG5', 'StandardGS1', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS5', 'StandardGS48', 'StandardGS44', 'StandardGS516', 'StandardGS58', 'StandardH8', 'StandardH16', 'StandardH8m', 'StandardH16m', 'StandardH16r', 'StandardH16mr', 'StandardL4s', 'StandardL8s', 'StandardL16s', 'StandardL32s', 'StandardM64s', 'StandardM64ms', 'StandardM128s', 'StandardM128ms', 'StandardM6432ms', 'StandardM6416ms', 'StandardM12864ms', 'StandardM12832ms', 'StandardNC6', 'StandardNC12', 'StandardNC24', 'StandardNC24r', 'StandardNC6sV2', 'StandardNC12sV2', 'StandardNC24sV2', 'StandardNC24rsV2', 'StandardNC6sV3', 'StandardNC12sV3', 'StandardNC24sV3', 'StandardNC24rsV3', 'StandardND6s', 'StandardND12s', 'StandardND24s', 'StandardND24rs', 'StandardNV6', 'StandardNV12', 'StandardNV24'
+ // VMSize - Specifies the size of the virtual machine.
The enum data type is currently deprecated and will be removed by December 23rd 2023.
Recommended way to get the list of available sizes is using these APIs:
[List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes)
[List all available virtual machine sizes in a region]( https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list)
[List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/en-us/azure/virtual-machines/sizes).
The available VM sizes depend on region and availability set. Possible values include: 'VirtualMachineSizeTypesBasicA0', 'VirtualMachineSizeTypesBasicA1', 'VirtualMachineSizeTypesBasicA2', 'VirtualMachineSizeTypesBasicA3', 'VirtualMachineSizeTypesBasicA4', 'VirtualMachineSizeTypesStandardA0', 'VirtualMachineSizeTypesStandardA1', 'VirtualMachineSizeTypesStandardA2', 'VirtualMachineSizeTypesStandardA3', 'VirtualMachineSizeTypesStandardA4', 'VirtualMachineSizeTypesStandardA5', 'VirtualMachineSizeTypesStandardA6', 'VirtualMachineSizeTypesStandardA7', 'VirtualMachineSizeTypesStandardA8', 'VirtualMachineSizeTypesStandardA9', 'VirtualMachineSizeTypesStandardA10', 'VirtualMachineSizeTypesStandardA11', 'VirtualMachineSizeTypesStandardA1V2', 'VirtualMachineSizeTypesStandardA2V2', 'VirtualMachineSizeTypesStandardA4V2', 'VirtualMachineSizeTypesStandardA8V2', 'VirtualMachineSizeTypesStandardA2mV2', 'VirtualMachineSizeTypesStandardA4mV2', 'VirtualMachineSizeTypesStandardA8mV2', 'VirtualMachineSizeTypesStandardB1s', 'VirtualMachineSizeTypesStandardB1ms', 'VirtualMachineSizeTypesStandardB2s', 'VirtualMachineSizeTypesStandardB2ms', 'VirtualMachineSizeTypesStandardB4ms', 'VirtualMachineSizeTypesStandardB8ms', 'VirtualMachineSizeTypesStandardD1', 'VirtualMachineSizeTypesStandardD2', 'VirtualMachineSizeTypesStandardD3', 'VirtualMachineSizeTypesStandardD4', 'VirtualMachineSizeTypesStandardD11', 'VirtualMachineSizeTypesStandardD12', 'VirtualMachineSizeTypesStandardD13', 'VirtualMachineSizeTypesStandardD14', 'VirtualMachineSizeTypesStandardD1V2', 'VirtualMachineSizeTypesStandardD2V2', 'VirtualMachineSizeTypesStandardD3V2', 'VirtualMachineSizeTypesStandardD4V2', 'VirtualMachineSizeTypesStandardD5V2', 'VirtualMachineSizeTypesStandardD2V3', 'VirtualMachineSizeTypesStandardD4V3', 'VirtualMachineSizeTypesStandardD8V3', 'VirtualMachineSizeTypesStandardD16V3', 'VirtualMachineSizeTypesStandardD32V3', 'VirtualMachineSizeTypesStandardD64V3', 'VirtualMachineSizeTypesStandardD2sV3', 'VirtualMachineSizeTypesStandardD4sV3', 'VirtualMachineSizeTypesStandardD8sV3', 'VirtualMachineSizeTypesStandardD16sV3', 'VirtualMachineSizeTypesStandardD32sV3', 'VirtualMachineSizeTypesStandardD64sV3', 'VirtualMachineSizeTypesStandardD11V2', 'VirtualMachineSizeTypesStandardD12V2', 'VirtualMachineSizeTypesStandardD13V2', 'VirtualMachineSizeTypesStandardD14V2', 'VirtualMachineSizeTypesStandardD15V2', 'VirtualMachineSizeTypesStandardDS1', 'VirtualMachineSizeTypesStandardDS2', 'VirtualMachineSizeTypesStandardDS3', 'VirtualMachineSizeTypesStandardDS4', 'VirtualMachineSizeTypesStandardDS11', 'VirtualMachineSizeTypesStandardDS12', 'VirtualMachineSizeTypesStandardDS13', 'VirtualMachineSizeTypesStandardDS14', 'VirtualMachineSizeTypesStandardDS1V2', 'VirtualMachineSizeTypesStandardDS2V2', 'VirtualMachineSizeTypesStandardDS3V2', 'VirtualMachineSizeTypesStandardDS4V2', 'VirtualMachineSizeTypesStandardDS5V2', 'VirtualMachineSizeTypesStandardDS11V2', 'VirtualMachineSizeTypesStandardDS12V2', 'VirtualMachineSizeTypesStandardDS13V2', 'VirtualMachineSizeTypesStandardDS14V2', 'VirtualMachineSizeTypesStandardDS15V2', 'VirtualMachineSizeTypesStandardDS134V2', 'VirtualMachineSizeTypesStandardDS132V2', 'VirtualMachineSizeTypesStandardDS148V2', 'VirtualMachineSizeTypesStandardDS144V2', 'VirtualMachineSizeTypesStandardE2V3', 'VirtualMachineSizeTypesStandardE4V3', 'VirtualMachineSizeTypesStandardE8V3', 'VirtualMachineSizeTypesStandardE16V3', 'VirtualMachineSizeTypesStandardE32V3', 'VirtualMachineSizeTypesStandardE64V3', 'VirtualMachineSizeTypesStandardE2sV3', 'VirtualMachineSizeTypesStandardE4sV3', 'VirtualMachineSizeTypesStandardE8sV3', 'VirtualMachineSizeTypesStandardE16sV3', 'VirtualMachineSizeTypesStandardE32sV3', 'VirtualMachineSizeTypesStandardE64sV3', 'VirtualMachineSizeTypesStandardE3216V3', 'VirtualMachineSizeTypesStandardE328sV3', 'VirtualMachineSizeTypesStandardE6432sV3', 'VirtualMachineSizeTypesStandardE6416sV3', 'VirtualMachineSizeTypesStandardF1', 'VirtualMachineSizeTypesStandardF2', 'VirtualMachineSizeTypesStandardF4', 'VirtualMachineSizeTypesStandardF8', 'VirtualMachineSizeTypesStandardF16', 'VirtualMachineSizeTypesStandardF1s', 'VirtualMachineSizeTypesStandardF2s', 'VirtualMachineSizeTypesStandardF4s', 'VirtualMachineSizeTypesStandardF8s', 'VirtualMachineSizeTypesStandardF16s', 'VirtualMachineSizeTypesStandardF2sV2', 'VirtualMachineSizeTypesStandardF4sV2', 'VirtualMachineSizeTypesStandardF8sV2', 'VirtualMachineSizeTypesStandardF16sV2', 'VirtualMachineSizeTypesStandardF32sV2', 'VirtualMachineSizeTypesStandardF64sV2', 'VirtualMachineSizeTypesStandardF72sV2', 'VirtualMachineSizeTypesStandardG1', 'VirtualMachineSizeTypesStandardG2', 'VirtualMachineSizeTypesStandardG3', 'VirtualMachineSizeTypesStandardG4', 'VirtualMachineSizeTypesStandardG5', 'VirtualMachineSizeTypesStandardGS1', 'VirtualMachineSizeTypesStandardGS2', 'VirtualMachineSizeTypesStandardGS3', 'VirtualMachineSizeTypesStandardGS4', 'VirtualMachineSizeTypesStandardGS5', 'VirtualMachineSizeTypesStandardGS48', 'VirtualMachineSizeTypesStandardGS44', 'VirtualMachineSizeTypesStandardGS516', 'VirtualMachineSizeTypesStandardGS58', 'VirtualMachineSizeTypesStandardH8', 'VirtualMachineSizeTypesStandardH16', 'VirtualMachineSizeTypesStandardH8m', 'VirtualMachineSizeTypesStandardH16m', 'VirtualMachineSizeTypesStandardH16r', 'VirtualMachineSizeTypesStandardH16mr', 'VirtualMachineSizeTypesStandardL4s', 'VirtualMachineSizeTypesStandardL8s', 'VirtualMachineSizeTypesStandardL16s', 'VirtualMachineSizeTypesStandardL32s', 'VirtualMachineSizeTypesStandardM64s', 'VirtualMachineSizeTypesStandardM64ms', 'VirtualMachineSizeTypesStandardM128s', 'VirtualMachineSizeTypesStandardM128ms', 'VirtualMachineSizeTypesStandardM6432ms', 'VirtualMachineSizeTypesStandardM6416ms', 'VirtualMachineSizeTypesStandardM12864ms', 'VirtualMachineSizeTypesStandardM12832ms', 'VirtualMachineSizeTypesStandardNC6', 'VirtualMachineSizeTypesStandardNC12', 'VirtualMachineSizeTypesStandardNC24', 'VirtualMachineSizeTypesStandardNC24r', 'VirtualMachineSizeTypesStandardNC6sV2', 'VirtualMachineSizeTypesStandardNC12sV2', 'VirtualMachineSizeTypesStandardNC24sV2', 'VirtualMachineSizeTypesStandardNC24rsV2', 'VirtualMachineSizeTypesStandardNC6sV3', 'VirtualMachineSizeTypesStandardNC12sV3', 'VirtualMachineSizeTypesStandardNC24sV3', 'VirtualMachineSizeTypesStandardNC24rsV3', 'VirtualMachineSizeTypesStandardND6s', 'VirtualMachineSizeTypesStandardND12s', 'VirtualMachineSizeTypesStandardND24s', 'VirtualMachineSizeTypesStandardND24rs', 'VirtualMachineSizeTypesStandardNV6', 'VirtualMachineSizeTypesStandardNV12', 'VirtualMachineSizeTypesStandardNV24'
VMSize VirtualMachineSizeTypes `json:"vmSize,omitempty"`
}
@@ -6869,9 +6949,9 @@ func NewImageListResultPage(cur ImageListResult, getNextPage func(context.Contex
// ImageOSDisk describes an Operating System disk.
type ImageOSDisk struct {
- // OsType - This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image.
Possible values are:
**Windows**
**Linux**. Possible values include: 'Windows', 'Linux'
+ // OsType - This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image.
Possible values are:
**Windows**
**Linux**. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux'
OsType OperatingSystemTypes `json:"osType,omitempty"`
- // OsState - The OS State. Possible values include: 'Generalized', 'Specialized'
+ // OsState - The OS State. Possible values include: 'OperatingSystemStateTypesGeneralized', 'OperatingSystemStateTypesSpecialized'
OsState OperatingSystemStateTypes `json:"osState,omitempty"`
// Snapshot - The snapshot.
Snapshot *SubResource `json:"snapshot,omitempty"`
@@ -7162,7 +7242,7 @@ type InnerError struct {
type InstanceViewStatus struct {
// Code - The status code.
Code *string `json:"code,omitempty"`
- // Level - The level code. Possible values include: 'Info', 'Warning', 'Error'
+ // Level - The level code. Possible values include: 'StatusLevelTypesInfo', 'StatusLevelTypesWarning', 'StatusLevelTypesError'
Level StatusLevelTypes `json:"level,omitempty"`
// DisplayStatus - The short localizable label for the status.
DisplayStatus *string `json:"displayStatus,omitempty"`
@@ -7276,7 +7356,7 @@ type LinuxParameters struct {
// LinuxPatchSettings specifies settings related to VM Guest Patching on Linux.
type LinuxPatchSettings struct {
- // PatchMode - Specifies the mode of VM Guest Patching to IaaS virtual machine.
Possible values are:
**ImageDefault** - The virtual machine's default patching configuration is used.
**AutomaticByPlatform** - The virtual machine will be automatically updated by the platform. The property provisionVMAgent must be true. Possible values include: 'ImageDefault', 'AutomaticByPlatform'
+ // PatchMode - Specifies the mode of VM Guest Patching to IaaS virtual machine.
Possible values are:
**ImageDefault** - The virtual machine's default patching configuration is used.
**AutomaticByPlatform** - The virtual machine will be automatically updated by the platform. The property provisionVMAgent must be true. Possible values include: 'LinuxVMGuestPatchModeImageDefault', 'LinuxVMGuestPatchModeAutomaticByPlatform'
PatchMode LinuxVMGuestPatchMode `json:"patchMode,omitempty"`
}
@@ -7608,7 +7688,7 @@ type ManagedArtifact struct {
// ManagedDiskParameters the parameters of a managed disk.
type ManagedDiskParameters struct {
- // StorageAccountType - Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS', 'StorageAccountTypesPremiumZRS', 'StorageAccountTypesStandardSSDZRS'
+ // StorageAccountType - Specifies the storage account type for the managed disk. Managed OS disk storage account type can only be set when you create the scale set. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS', 'StorageAccountTypesPremiumZRS', 'StorageAccountTypesStandardSSDZRS'
StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
// DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed disk.
DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
@@ -7773,17 +7853,17 @@ func (ovd OperationValueDisplay) MarshalJSON() ([]byte, error) {
// OrchestrationServiceStateInput the input for OrchestrationServiceState
type OrchestrationServiceStateInput struct {
- // ServiceName - The name of the service. Possible values include: 'AutomaticRepairs'
+ // ServiceName - The name of the service. Possible values include: 'OrchestrationServiceNamesAutomaticRepairs'
ServiceName OrchestrationServiceNames `json:"serviceName,omitempty"`
- // Action - The action to be performed. Possible values include: 'Resume', 'Suspend'
+ // Action - The action to be performed. Possible values include: 'OrchestrationServiceStateActionResume', 'OrchestrationServiceStateActionSuspend'
Action OrchestrationServiceStateAction `json:"action,omitempty"`
}
// OrchestrationServiceSummary summary for an orchestration service of a virtual machine scale set.
type OrchestrationServiceSummary struct {
- // ServiceName - READ-ONLY; The name of the service. Possible values include: 'AutomaticRepairs', 'DummyOrchestrationServiceName'
+ // ServiceName - READ-ONLY; The name of the service. Possible values include: 'OrchestrationServiceNamesAutomaticRepairs', 'OrchestrationServiceNamesDummyOrchestrationServiceName'
ServiceName OrchestrationServiceNames `json:"serviceName,omitempty"`
- // ServiceState - READ-ONLY; The current state of the service. Possible values include: 'NotRunning', 'Running', 'Suspended'
+ // ServiceState - READ-ONLY; The current state of the service. Possible values include: 'OrchestrationServiceStateNotRunning', 'OrchestrationServiceStateRunning', 'OrchestrationServiceStateSuspended'
ServiceState OrchestrationServiceState `json:"serviceState,omitempty"`
}
@@ -7797,7 +7877,7 @@ func (oss OrchestrationServiceSummary) MarshalJSON() ([]byte, error) {
// more information about disks, see [About disks and VHDs for Azure virtual
// machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
type OSDisk struct {
- // OsType - This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD.
Possible values are:
**Windows**
**Linux**. Possible values include: 'Windows', 'Linux'
+ // OsType - This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD.
Possible values are:
**Windows**
**Linux**. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux'
OsType OperatingSystemTypes `json:"osType,omitempty"`
// EncryptionSettings - Specifies the encryption settings for the OS Disk.
Minimum api-version: 2015-06-15
EncryptionSettings *DiskEncryptionSettings `json:"encryptionSettings,omitempty"`
@@ -7823,7 +7903,7 @@ type OSDisk struct {
// OSDiskImage contains the os disk image information.
type OSDiskImage struct {
- // OperatingSystem - The operating system of the osDiskImage. Possible values include: 'Windows', 'Linux'
+ // OperatingSystem - The operating system of the osDiskImage. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux'
OperatingSystem OperatingSystemTypes `json:"operatingSystem,omitempty"`
}
@@ -8271,7 +8351,7 @@ func (plrp PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) {
// PrivateLinkServiceConnectionState a collection of information about the state of the connection between
// service consumer and provider.
type PrivateLinkServiceConnectionState struct {
- // Status - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Possible values include: 'Pending', 'Approved', 'Rejected'
+ // Status - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Possible values include: 'PrivateEndpointServiceConnectionStatusPending', 'PrivateEndpointServiceConnectionStatusApproved', 'PrivateEndpointServiceConnectionStatusRejected'
Status PrivateEndpointServiceConnectionStatus `json:"status,omitempty"`
// Description - The reason for approval/rejection of the connection.
Description *string `json:"description,omitempty"`
@@ -8548,7 +8628,7 @@ func NewProximityPlacementGroupListResultPage(cur ProximityPlacementGroupListRes
// ProximityPlacementGroupProperties describes the properties of a Proximity Placement Group.
type ProximityPlacementGroupProperties struct {
- // ProximityPlacementGroupType - Specifies the type of the proximity placement group.
Possible values are:
**Standard** : Co-locate resources within an Azure region or Availability Zone.
**Ultra** : For future use. Possible values include: 'Standard', 'Ultra'
+ // ProximityPlacementGroupType - Specifies the type of the proximity placement group.
Possible values are:
**Standard** : Co-locate resources within an Azure region or Availability Zone.
**Ultra** : For future use. Possible values include: 'ProximityPlacementGroupTypeStandard', 'ProximityPlacementGroupTypeUltra'
ProximityPlacementGroupType ProximityPlacementGroupType `json:"proximityPlacementGroupType,omitempty"`
// VirtualMachines - READ-ONLY; A list of references to all virtual machines in the proximity placement group.
VirtualMachines *[]SubResourceWithColocationStatus `json:"virtualMachines,omitempty"`
@@ -8657,7 +8737,7 @@ func (rrs RegionalReplicationStatus) MarshalJSON() ([]byte, error) {
// ReplicationStatus this is the replication status of the gallery Image Version.
type ReplicationStatus struct {
- // AggregatedState - READ-ONLY; This is the aggregated replication status based on all the regional replication status flags. Possible values include: 'Unknown', 'InProgress', 'Completed', 'Failed'
+ // AggregatedState - READ-ONLY; This is the aggregated replication status based on all the regional replication status flags. Possible values include: 'AggregatedReplicationStateUnknown', 'AggregatedReplicationStateInProgress', 'AggregatedReplicationStateCompleted', 'AggregatedReplicationStateFailed'
AggregatedState AggregatedReplicationState `json:"aggregatedState,omitempty"`
// Summary - READ-ONLY; This is a summary of replication status for each region.
Summary *[]RegionalReplicationStatus `json:"summary,omitempty"`
@@ -8671,7 +8751,7 @@ func (rs ReplicationStatus) MarshalJSON() ([]byte, error) {
// RequestRateByIntervalInput api request input for LogAnalytics getRequestRateByInterval Api.
type RequestRateByIntervalInput struct {
- // IntervalLength - Interval value in minutes used to create LogAnalytics call rate logs. Possible values include: 'ThreeMins', 'FiveMins', 'ThirtyMins', 'SixtyMins'
+ // IntervalLength - Interval value in minutes used to create LogAnalytics call rate logs. Possible values include: 'IntervalInMinsThreeMins', 'IntervalInMinsFiveMins', 'IntervalInMinsThirtyMins', 'IntervalInMinsSixtyMins'
IntervalLength IntervalInMins `json:"intervalLength,omitempty"`
// BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.
BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"`
@@ -8841,13 +8921,13 @@ func (rsri ResourceSkuRestrictionInfo) MarshalJSON() ([]byte, error) {
// ResourceSkuRestrictions describes scaling information of a SKU.
type ResourceSkuRestrictions struct {
- // Type - READ-ONLY; The type of restrictions. Possible values include: 'Location', 'Zone'
+ // Type - READ-ONLY; The type of restrictions. Possible values include: 'ResourceSkuRestrictionsTypeLocation', 'ResourceSkuRestrictionsTypeZone'
Type ResourceSkuRestrictionsType `json:"type,omitempty"`
// Values - READ-ONLY; The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted.
Values *[]string `json:"values,omitempty"`
// RestrictionInfo - READ-ONLY; The information about the restriction where the SKU cannot be used.
RestrictionInfo *ResourceSkuRestrictionInfo `json:"restrictionInfo,omitempty"`
- // ReasonCode - READ-ONLY; The reason for restriction. Possible values include: 'QuotaID', 'NotAvailableForSubscription'
+ // ReasonCode - READ-ONLY; The reason for restriction. Possible values include: 'ResourceSkuRestrictionsReasonCodeQuotaID', 'ResourceSkuRestrictionsReasonCodeNotAvailableForSubscription'
ReasonCode ResourceSkuRestrictionsReasonCode `json:"reasonCode,omitempty"`
}
@@ -9261,7 +9341,7 @@ type RollingUpgradeRunningStatus struct {
Code RollingUpgradeStatusCode `json:"code,omitempty"`
// StartTime - READ-ONLY; Start time of the upgrade.
StartTime *date.Time `json:"startTime,omitempty"`
- // LastAction - READ-ONLY; The last action performed on the rolling upgrade. Possible values include: 'Start', 'Cancel'
+ // LastAction - READ-ONLY; The last action performed on the rolling upgrade. Possible values include: 'RollingUpgradeActionTypeStart', 'RollingUpgradeActionTypeCancel'
LastAction RollingUpgradeActionType `json:"lastAction,omitempty"`
// LastActionTime - READ-ONLY; Last action time of the upgrade.
LastActionTime *date.Time `json:"lastActionTime,omitempty"`
@@ -9402,7 +9482,7 @@ type RunCommandDocument struct {
Schema *string `json:"$schema,omitempty"`
// ID - The VM run command id.
ID *string `json:"id,omitempty"`
- // OsType - The Operating System type. Possible values include: 'Windows', 'Linux'
+ // OsType - The Operating System type. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux'
OsType OperatingSystemTypes `json:"osType,omitempty"`
// Label - The VM run command label.
Label *string `json:"label,omitempty"`
@@ -9416,7 +9496,7 @@ type RunCommandDocumentBase struct {
Schema *string `json:"$schema,omitempty"`
// ID - The VM run command id.
ID *string `json:"id,omitempty"`
- // OsType - The Operating System type. Possible values include: 'Windows', 'Linux'
+ // OsType - The Operating System type. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux'
OsType OperatingSystemTypes `json:"osType,omitempty"`
// Label - The VM run command label.
Label *string `json:"label,omitempty"`
@@ -9968,9 +10048,9 @@ func NewSnapshotListPage(cur SnapshotList, getNextPage func(context.Context, Sna
type SnapshotProperties struct {
// TimeCreated - READ-ONLY; The time when the snapshot was created.
TimeCreated *date.Time `json:"timeCreated,omitempty"`
- // OsType - The Operating System type. Possible values include: 'Windows', 'Linux'
+ // OsType - The Operating System type. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux'
OsType OperatingSystemTypes `json:"osType,omitempty"`
- // HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2'
+ // HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'HyperVGenerationV1', 'HyperVGenerationV2'
HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"`
// PurchasePlan - Purchase plan information for the image from which the source disk for the snapshot was originally created.
PurchasePlan *PurchasePlan `json:"purchasePlan,omitempty"`
@@ -9980,7 +10060,7 @@ type SnapshotProperties struct {
DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
// DiskSizeBytes - READ-ONLY; The size of the disk in bytes. This field is read only.
DiskSizeBytes *int64 `json:"diskSizeBytes,omitempty"`
- // DiskState - The state of the snapshot. Possible values include: 'Unattached', 'Attached', 'Reserved', 'ActiveSAS', 'ReadyToUpload', 'ActiveUpload'
+ // DiskState - The state of the snapshot. Possible values include: 'DiskStateUnattached', 'DiskStateAttached', 'DiskStateReserved', 'DiskStateActiveSAS', 'DiskStateReadyToUpload', 'DiskStateActiveUpload'
DiskState DiskState `json:"diskState,omitempty"`
// UniqueID - READ-ONLY; Unique Guid identifying the resource.
UniqueID *string `json:"uniqueId,omitempty"`
@@ -9992,7 +10072,7 @@ type SnapshotProperties struct {
Incremental *bool `json:"incremental,omitempty"`
// Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
Encryption *Encryption `json:"encryption,omitempty"`
- // NetworkAccessPolicy - Possible values include: 'AllowAll', 'AllowPrivate', 'DenyAll'
+ // NetworkAccessPolicy - Possible values include: 'NetworkAccessPolicyAllowAll', 'NetworkAccessPolicyAllowPrivate', 'NetworkAccessPolicyDenyAll'
NetworkAccessPolicy NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"`
// DiskAccessID - ARM id of the DiskAccess resource for using private endpoints on disks.
DiskAccessID *string `json:"diskAccessId,omitempty"`
@@ -10331,7 +10411,7 @@ func (su *SnapshotUpdate) UnmarshalJSON(body []byte) error {
// SnapshotUpdateProperties snapshot resource update properties.
type SnapshotUpdateProperties struct {
- // OsType - the Operating System type. Possible values include: 'Windows', 'Linux'
+ // OsType - the Operating System type. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux'
OsType OperatingSystemTypes `json:"osType,omitempty"`
// DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
@@ -10339,7 +10419,7 @@ type SnapshotUpdateProperties struct {
EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`
// Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
Encryption *Encryption `json:"encryption,omitempty"`
- // NetworkAccessPolicy - Possible values include: 'AllowAll', 'AllowPrivate', 'DenyAll'
+ // NetworkAccessPolicy - Possible values include: 'NetworkAccessPolicyAllowAll', 'NetworkAccessPolicyAllowPrivate', 'NetworkAccessPolicyDenyAll'
NetworkAccessPolicy NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"`
// DiskAccessID - ARM id of the DiskAccess resource for using private endpoints on disks.
DiskAccessID *string `json:"diskAccessId,omitempty"`
@@ -10877,7 +10957,7 @@ func (uohs UpgradeOperationHistoryStatus) MarshalJSON() ([]byte, error) {
// UpgradePolicy describes an upgrade policy - automatic, manual, or rolling.
type UpgradePolicy struct {
- // Mode - Specifies the mode of an upgrade to virtual machines in the scale set.
Possible values are:
**Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.
**Automatic** - All virtual machines in the scale set are automatically updated at the same time. Possible values include: 'Automatic', 'Manual', 'Rolling'
+ // Mode - Specifies the mode of an upgrade to virtual machines in the scale set.
Possible values are:
**Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.
**Automatic** - All virtual machines in the scale set are automatically updated at the same time. Possible values include: 'UpgradeModeAutomatic', 'UpgradeModeManual', 'UpgradeModeRolling'
Mode UpgradeMode `json:"mode,omitempty"`
// RollingUpgradePolicy - The configuration parameters used while performing a rolling upgrade.
RollingUpgradePolicy *RollingUpgradePolicy `json:"rollingUpgradePolicy,omitempty"`
@@ -11900,7 +11980,7 @@ func (vmir VirtualMachineImageResource) MarshalJSON() ([]byte, error) {
type VirtualMachineInstallPatchesParameters struct {
// MaximumDuration - Specifies the maximum amount of time that the operation will run. It must be an ISO 8601-compliant duration string such as PT4H (4 hours)
MaximumDuration *string `json:"maximumDuration,omitempty"`
- // RebootSetting - Defines when it is acceptable to reboot a VM during a software update operation. Possible values include: 'IfRequired', 'Never', 'Always'
+ // RebootSetting - Defines when it is acceptable to reboot a VM during a software update operation. Possible values include: 'VMGuestPatchRebootSettingIfRequired', 'VMGuestPatchRebootSettingNever', 'VMGuestPatchRebootSettingAlways'
RebootSetting VMGuestPatchRebootSetting `json:"rebootSetting,omitempty"`
// WindowsParameters - Input for InstallPatches on a Windows VM, as directly received by the API
WindowsParameters *WindowsParameters `json:"windowsParameters,omitempty"`
@@ -12231,9 +12311,9 @@ type VirtualMachineProperties struct {
VirtualMachineScaleSet *SubResource `json:"virtualMachineScaleSet,omitempty"`
// ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine should be assigned to.
Minimum api-version: 2018-04-01.
ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`
- // Priority - Specifies the priority for the virtual machine.
Minimum api-version: 2019-03-01. Possible values include: 'Regular', 'Low', 'Spot'
+ // Priority - Specifies the priority for the virtual machine.
Minimum api-version: 2019-03-01. Possible values include: 'VirtualMachinePriorityTypesRegular', 'VirtualMachinePriorityTypesLow', 'VirtualMachinePriorityTypesSpot'
Priority VirtualMachinePriorityTypes `json:"priority,omitempty"`
- // EvictionPolicy - Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set.
For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01.
For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete'
+ // EvictionPolicy - Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set.
For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01.
For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. Possible values include: 'VirtualMachineEvictionPolicyTypesDeallocate', 'VirtualMachineEvictionPolicyTypesDelete'
EvictionPolicy VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"`
// BillingProfile - Specifies the billing related details of a Azure Spot virtual machine.
Minimum api-version: 2019-03-01.
BillingProfile *BillingProfile `json:"billingProfile,omitempty"`
@@ -13725,7 +13805,7 @@ type VirtualMachineScaleSetIPConfigurationProperties struct {
Primary *bool `json:"primary,omitempty"`
// PublicIPAddressConfiguration - The publicIPAddressConfiguration.
PublicIPAddressConfiguration *VirtualMachineScaleSetPublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"`
- // PrivateIPAddressVersion - Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
+ // PrivateIPAddressVersion - Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPVersionIPv4', 'IPVersionIPv6'
PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
// ApplicationGatewayBackendAddressPools - Specifies an array of references to backend address pools of application gateways. A scale set can reference backend address pools of multiple application gateways. Multiple scale sets cannot use the same application gateway.
ApplicationGatewayBackendAddressPools *[]SubResource `json:"applicationGatewayBackendAddressPools,omitempty"`
@@ -14510,7 +14590,7 @@ type VirtualMachineScaleSetOSDisk struct {
DiffDiskSettings *DiffDiskSettings `json:"diffDiskSettings,omitempty"`
// DiskSizeGB - Specifies the size of the operating system disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.
This value cannot be larger than 1023 GB
DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
- // OsType - This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD.
Possible values are:
**Windows**
**Linux**. Possible values include: 'Windows', 'Linux'
+ // OsType - This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD.
Possible values are:
**Windows**
**Linux**. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux'
OsType OperatingSystemTypes `json:"osType,omitempty"`
// Image - Specifies information about the unmanaged user image to base the scale set on.
Image *VirtualHardDisk `json:"image,omitempty"`
@@ -14568,7 +14648,7 @@ type VirtualMachineScaleSetProperties struct {
AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
// ScaleInPolicy - Specifies the scale-in policy that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in.
ScaleInPolicy *ScaleInPolicy `json:"scaleInPolicy,omitempty"`
- // OrchestrationMode - Specifies the orchestration mode for the virtual machine scale set. Possible values include: 'Uniform', 'Flexible'
+ // OrchestrationMode - Specifies the orchestration mode for the virtual machine scale set. Possible values include: 'OrchestrationModeUniform', 'OrchestrationModeFlexible'
OrchestrationMode OrchestrationMode `json:"orchestrationMode,omitempty"`
}
@@ -14688,7 +14768,7 @@ type VirtualMachineScaleSetPublicIPAddressConfigurationProperties struct {
IPTags *[]VirtualMachineScaleSetIPTag `json:"ipTags,omitempty"`
// PublicIPPrefix - The PublicIPPrefix from which to allocate publicIP addresses.
PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
- // PublicIPAddressVersion - Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
+ // PublicIPAddressVersion - Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPVersionIPv4', 'IPVersionIPv6'
PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
}
@@ -15556,7 +15636,7 @@ type VirtualMachineScaleSetUpdateIPConfigurationProperties struct {
Primary *bool `json:"primary,omitempty"`
// PublicIPAddressConfiguration - The publicIPAddressConfiguration.
PublicIPAddressConfiguration *VirtualMachineScaleSetUpdatePublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"`
- // PrivateIPAddressVersion - Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
+ // PrivateIPAddressVersion - Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPVersionIPv4', 'IPVersionIPv6'
PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
// ApplicationGatewayBackendAddressPools - The application gateway backend address pools.
ApplicationGatewayBackendAddressPools *[]SubResource `json:"applicationGatewayBackendAddressPools,omitempty"`
@@ -16516,9 +16596,9 @@ type VirtualMachineScaleSetVMProfile struct {
ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"`
// LicenseType - Specifies that the image or disk that is being used was licensed on-premises.
Possible values for Windows Server operating system are:
Windows_Client
Windows_Server
Possible values for Linux Server operating system are:
RHEL_BYOS (for RHEL)
SLES_BYOS (for SUSE)
For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)
[Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)
Minimum api-version: 2015-06-15
LicenseType *string `json:"licenseType,omitempty"`
- // Priority - Specifies the priority for the virtual machines in the scale set.
Minimum api-version: 2017-10-30-preview. Possible values include: 'Regular', 'Low', 'Spot'
+ // Priority - Specifies the priority for the virtual machines in the scale set.
Minimum api-version: 2017-10-30-preview. Possible values include: 'VirtualMachinePriorityTypesRegular', 'VirtualMachinePriorityTypesLow', 'VirtualMachinePriorityTypesSpot'
Priority VirtualMachinePriorityTypes `json:"priority,omitempty"`
- // EvictionPolicy - Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set.
For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01.
For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. Possible values include: 'Deallocate', 'Delete'
+ // EvictionPolicy - Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set.
For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01.
For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. Possible values include: 'VirtualMachineEvictionPolicyTypesDeallocate', 'VirtualMachineEvictionPolicyTypesDelete'
EvictionPolicy VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"`
// BillingProfile - Specifies the billing related details of a Azure Spot VMSS.
Minimum api-version: 2019-03-01.
BillingProfile *BillingProfile `json:"billingProfile,omitempty"`
@@ -17949,7 +18029,7 @@ type WinRMConfiguration struct {
// WinRMListener describes Protocol and thumbprint of Windows Remote Management listener
type WinRMListener struct {
- // Protocol - Specifies the protocol of WinRM listener.
Possible values are:
**http**
**https**. Possible values include: 'HTTP', 'HTTPS'
+ // Protocol - Specifies the protocol of WinRM listener.
Possible values are:
**http**
**https**. Possible values include: 'ProtocolTypesHTTP', 'ProtocolTypesHTTPS'
Protocol ProtocolTypes `json:"protocol,omitempty"`
// CertificateURL - This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8:
{
"data":"",
"dataType":"pfx",
"password":""
}
CertificateURL *string `json:"certificateUrl,omitempty"`
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/snapshots.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/snapshots.go
index bec313dd1aa6..a33f86841054 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/snapshots.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/snapshots.go
@@ -76,7 +76,7 @@ func (client SnapshotsClient) CreateOrUpdate(ctx context.Context, resourceGroupN
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -111,6 +111,7 @@ func (client SnapshotsClient) CreateOrUpdatePreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client SnapshotsClient) CreateOrUpdateSender(req *http.Request) (future SnapshotsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -158,7 +159,7 @@ func (client SnapshotsClient) Delete(ctx context.Context, resourceGroupName stri
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -190,6 +191,7 @@ func (client SnapshotsClient) DeletePreparer(ctx context.Context, resourceGroupN
// http.Response Body if it receives an error.
func (client SnapshotsClient) DeleteSender(req *http.Request) (future SnapshotsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -320,7 +322,7 @@ func (client SnapshotsClient) GrantAccess(ctx context.Context, resourceGroupName
result, err = client.GrantAccessSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "GrantAccess", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "GrantAccess", result.Response(), "Failure sending request")
return
}
@@ -354,6 +356,7 @@ func (client SnapshotsClient) GrantAccessPreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client SnapshotsClient) GrantAccessSender(req *http.Request) (future SnapshotsGrantAccessFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -630,7 +633,7 @@ func (client SnapshotsClient) RevokeAccess(ctx context.Context, resourceGroupNam
result, err = client.RevokeAccessSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "RevokeAccess", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "RevokeAccess", result.Response(), "Failure sending request")
return
}
@@ -662,6 +665,7 @@ func (client SnapshotsClient) RevokeAccessPreparer(ctx context.Context, resource
// http.Response Body if it receives an error.
func (client SnapshotsClient) RevokeAccessSender(req *http.Request) (future SnapshotsRevokeAccessFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -709,7 +713,7 @@ func (client SnapshotsClient) Update(ctx context.Context, resourceGroupName stri
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -743,6 +747,7 @@ func (client SnapshotsClient) UpdatePreparer(ctx context.Context, resourceGroupN
// http.Response Body if it receives an error.
func (client SnapshotsClient) UpdateSender(req *http.Request) (future SnapshotsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachineextensions.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachineextensions.go
index 2b86103c94ea..2a8c6aa5a99d 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachineextensions.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachineextensions.go
@@ -56,7 +56,7 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdate(ctx context.Context,
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -91,6 +91,7 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdatePreparer(ctx context.
// http.Response Body if it receives an error.
func (client VirtualMachineExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineExtensionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -138,7 +139,7 @@ func (client VirtualMachineExtensionsClient) Delete(ctx context.Context, resourc
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -171,6 +172,7 @@ func (client VirtualMachineExtensionsClient) DeletePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VirtualMachineExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineExtensionsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -380,7 +382,7 @@ func (client VirtualMachineExtensionsClient) Update(ctx context.Context, resourc
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -415,6 +417,7 @@ func (client VirtualMachineExtensionsClient) UpdatePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VirtualMachineExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineExtensionsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachineruncommands.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachineruncommands.go
index 54b53b69cbe7..07aedda44bda 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachineruncommands.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachineruncommands.go
@@ -57,7 +57,7 @@ func (client VirtualMachineRunCommandsClient) CreateOrUpdate(ctx context.Context
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -92,6 +92,7 @@ func (client VirtualMachineRunCommandsClient) CreateOrUpdatePreparer(ctx context
// http.Response Body if it receives an error.
func (client VirtualMachineRunCommandsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineRunCommandsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -139,7 +140,7 @@ func (client VirtualMachineRunCommandsClient) Delete(ctx context.Context, resour
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -172,6 +173,7 @@ func (client VirtualMachineRunCommandsClient) DeletePreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client VirtualMachineRunCommandsClient) DeleteSender(req *http.Request) (future VirtualMachineRunCommandsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -627,7 +629,7 @@ func (client VirtualMachineRunCommandsClient) Update(ctx context.Context, resour
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -662,6 +664,7 @@ func (client VirtualMachineRunCommandsClient) UpdatePreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client VirtualMachineRunCommandsClient) UpdateSender(req *http.Request) (future VirtualMachineRunCommandsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachines.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachines.go
index 2fa040a0e2e0..73ab326f9310 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachines.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachines.go
@@ -54,7 +54,7 @@ func (client VirtualMachinesClient) AssessPatches(ctx context.Context, resourceG
result, err = client.AssessPatchesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "AssessPatches", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "AssessPatches", result.Response(), "Failure sending request")
return
}
@@ -86,6 +86,7 @@ func (client VirtualMachinesClient) AssessPatchesPreparer(ctx context.Context, r
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) AssessPatchesSender(req *http.Request) (future VirtualMachinesAssessPatchesFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -142,7 +143,7 @@ func (client VirtualMachinesClient) Capture(ctx context.Context, resourceGroupNa
result, err = client.CaptureSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Capture", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Capture", result.Response(), "Failure sending request")
return
}
@@ -176,6 +177,7 @@ func (client VirtualMachinesClient) CapturePreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) CaptureSender(req *http.Request) (future VirtualMachinesCaptureFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -223,7 +225,7 @@ func (client VirtualMachinesClient) ConvertToManagedDisks(ctx context.Context, r
result, err = client.ConvertToManagedDisksSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ConvertToManagedDisks", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ConvertToManagedDisks", result.Response(), "Failure sending request")
return
}
@@ -255,6 +257,7 @@ func (client VirtualMachinesClient) ConvertToManagedDisksPreparer(ctx context.Co
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) ConvertToManagedDisksSender(req *http.Request) (future VirtualMachinesConvertToManagedDisksFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -323,7 +326,7 @@ func (client VirtualMachinesClient) CreateOrUpdate(ctx context.Context, resource
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -358,6 +361,7 @@ func (client VirtualMachinesClient) CreateOrUpdatePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachinesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -405,7 +409,7 @@ func (client VirtualMachinesClient) Deallocate(ctx context.Context, resourceGrou
result, err = client.DeallocateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Deallocate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Deallocate", result.Response(), "Failure sending request")
return
}
@@ -437,6 +441,7 @@ func (client VirtualMachinesClient) DeallocatePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) DeallocateSender(req *http.Request) (future VirtualMachinesDeallocateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -483,7 +488,7 @@ func (client VirtualMachinesClient) Delete(ctx context.Context, resourceGroupNam
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -518,6 +523,7 @@ func (client VirtualMachinesClient) DeletePreparer(ctx context.Context, resource
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) DeleteSender(req *http.Request) (future VirtualMachinesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -729,7 +735,7 @@ func (client VirtualMachinesClient) InstallPatches(ctx context.Context, resource
result, err = client.InstallPatchesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "InstallPatches", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "InstallPatches", result.Response(), "Failure sending request")
return
}
@@ -763,6 +769,7 @@ func (client VirtualMachinesClient) InstallPatchesPreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) InstallPatchesSender(req *http.Request) (future VirtualMachinesInstallPatchesFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1319,7 +1326,7 @@ func (client VirtualMachinesClient) PerformMaintenance(ctx context.Context, reso
result, err = client.PerformMaintenanceSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PerformMaintenance", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PerformMaintenance", result.Response(), "Failure sending request")
return
}
@@ -1351,6 +1358,7 @@ func (client VirtualMachinesClient) PerformMaintenancePreparer(ctx context.Conte
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) PerformMaintenanceSender(req *http.Request) (future VirtualMachinesPerformMaintenanceFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1400,7 +1408,7 @@ func (client VirtualMachinesClient) PowerOff(ctx context.Context, resourceGroupN
result, err = client.PowerOffSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PowerOff", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PowerOff", result.Response(), "Failure sending request")
return
}
@@ -1437,6 +1445,7 @@ func (client VirtualMachinesClient) PowerOffPreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) PowerOffSender(req *http.Request) (future VirtualMachinesPowerOffFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1482,7 +1491,7 @@ func (client VirtualMachinesClient) Reapply(ctx context.Context, resourceGroupNa
result, err = client.ReapplySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reapply", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reapply", result.Response(), "Failure sending request")
return
}
@@ -1514,6 +1523,7 @@ func (client VirtualMachinesClient) ReapplyPreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) ReapplySender(req *http.Request) (future VirtualMachinesReapplyFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1559,7 +1569,7 @@ func (client VirtualMachinesClient) Redeploy(ctx context.Context, resourceGroupN
result, err = client.RedeploySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Redeploy", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Redeploy", result.Response(), "Failure sending request")
return
}
@@ -1591,6 +1601,7 @@ func (client VirtualMachinesClient) RedeployPreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) RedeploySender(req *http.Request) (future VirtualMachinesRedeployFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1637,7 +1648,7 @@ func (client VirtualMachinesClient) Reimage(ctx context.Context, resourceGroupNa
result, err = client.ReimageSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reimage", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reimage", result.Response(), "Failure sending request")
return
}
@@ -1674,6 +1685,7 @@ func (client VirtualMachinesClient) ReimagePreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) ReimageSender(req *http.Request) (future VirtualMachinesReimageFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1719,7 +1731,7 @@ func (client VirtualMachinesClient) Restart(ctx context.Context, resourceGroupNa
result, err = client.RestartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Restart", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Restart", result.Response(), "Failure sending request")
return
}
@@ -1751,6 +1763,7 @@ func (client VirtualMachinesClient) RestartPreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) RestartSender(req *http.Request) (future VirtualMachinesRestartFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1885,7 +1898,7 @@ func (client VirtualMachinesClient) RunCommand(ctx context.Context, resourceGrou
result, err = client.RunCommandSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "RunCommand", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "RunCommand", result.Response(), "Failure sending request")
return
}
@@ -1919,6 +1932,7 @@ func (client VirtualMachinesClient) RunCommandPreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) RunCommandSender(req *http.Request) (future VirtualMachinesRunCommandFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -2040,7 +2054,7 @@ func (client VirtualMachinesClient) Start(ctx context.Context, resourceGroupName
result, err = client.StartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Start", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Start", result.Response(), "Failure sending request")
return
}
@@ -2072,6 +2086,7 @@ func (client VirtualMachinesClient) StartPreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) StartSender(req *http.Request) (future VirtualMachinesStartFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -2118,7 +2133,7 @@ func (client VirtualMachinesClient) Update(ctx context.Context, resourceGroupNam
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -2152,6 +2167,7 @@ func (client VirtualMachinesClient) UpdatePreparer(ctx context.Context, resource
// http.Response Body if it receives an error.
func (client VirtualMachinesClient) UpdateSender(req *http.Request) (future VirtualMachinesUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachinescalesetextensions.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachinescalesetextensions.go
index 391520fdd46f..7f49b888897c 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachinescalesetextensions.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachinescalesetextensions.go
@@ -56,7 +56,7 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdate(ctx context.
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -92,6 +92,7 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdatePreparer(ctx
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetExtensionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -139,7 +140,7 @@ func (client VirtualMachineScaleSetExtensionsClient) Delete(ctx context.Context,
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -172,6 +173,7 @@ func (client VirtualMachineScaleSetExtensionsClient) DeletePreparer(ctx context.
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetExtensionsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -419,7 +421,7 @@ func (client VirtualMachineScaleSetExtensionsClient) Update(ctx context.Context,
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -456,6 +458,7 @@ func (client VirtualMachineScaleSetExtensionsClient) UpdatePreparer(ctx context.
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetExtensionsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachinescalesetrollingupgrades.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachinescalesetrollingupgrades.go
index 9a2747ea62e1..c834b8bdf9be 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachinescalesetrollingupgrades.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachinescalesetrollingupgrades.go
@@ -55,7 +55,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) Cancel(ctx context.Con
result, err = client.CancelSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "Cancel", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "Cancel", result.Response(), "Failure sending request")
return
}
@@ -87,6 +87,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) CancelPreparer(ctx con
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetRollingUpgradesClient) CancelSender(req *http.Request) (future VirtualMachineScaleSetRollingUpgradesCancelFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -210,7 +211,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgrade(
result, err = client.StartExtensionUpgradeSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartExtensionUpgrade", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartExtensionUpgrade", result.Response(), "Failure sending request")
return
}
@@ -242,6 +243,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeP
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeSender(req *http.Request) (future VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -288,7 +290,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgrade(ctx con
result, err = client.StartOSUpgradeSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartOSUpgrade", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartOSUpgrade", result.Response(), "Failure sending request")
return
}
@@ -320,6 +322,7 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradePreparer
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradeSender(req *http.Request) (future VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachinescalesets.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachinescalesets.go
index 909df89996f1..52282335a259 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachinescalesets.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachinescalesets.go
@@ -158,7 +158,7 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdate(ctx context.Context,
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -192,6 +192,7 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdatePreparer(ctx context.C
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -240,7 +241,7 @@ func (client VirtualMachineScaleSetsClient) Deallocate(ctx context.Context, reso
result, err = client.DeallocateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Deallocate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Deallocate", result.Response(), "Failure sending request")
return
}
@@ -277,6 +278,7 @@ func (client VirtualMachineScaleSetsClient) DeallocatePreparer(ctx context.Conte
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) DeallocateSender(req *http.Request) (future VirtualMachineScaleSetsDeallocateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -323,7 +325,7 @@ func (client VirtualMachineScaleSetsClient) Delete(ctx context.Context, resource
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -358,6 +360,7 @@ func (client VirtualMachineScaleSetsClient) DeletePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -412,7 +415,7 @@ func (client VirtualMachineScaleSetsClient) DeleteInstances(ctx context.Context,
result, err = client.DeleteInstancesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "DeleteInstances", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "DeleteInstances", result.Response(), "Failure sending request")
return
}
@@ -449,6 +452,7 @@ func (client VirtualMachineScaleSetsClient) DeleteInstancesPreparer(ctx context.
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) DeleteInstancesSender(req *http.Request) (future VirtualMachineScaleSetsDeleteInstancesFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1318,7 +1322,7 @@ func (client VirtualMachineScaleSetsClient) PerformMaintenance(ctx context.Conte
result, err = client.PerformMaintenanceSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PerformMaintenance", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PerformMaintenance", result.Response(), "Failure sending request")
return
}
@@ -1355,6 +1359,7 @@ func (client VirtualMachineScaleSetsClient) PerformMaintenancePreparer(ctx conte
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) PerformMaintenanceSender(req *http.Request) (future VirtualMachineScaleSetsPerformMaintenanceFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1405,7 +1410,7 @@ func (client VirtualMachineScaleSetsClient) PowerOff(ctx context.Context, resour
result, err = client.PowerOffSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PowerOff", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PowerOff", result.Response(), "Failure sending request")
return
}
@@ -1447,6 +1452,7 @@ func (client VirtualMachineScaleSetsClient) PowerOffPreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) PowerOffSender(req *http.Request) (future VirtualMachineScaleSetsPowerOffFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1494,7 +1500,7 @@ func (client VirtualMachineScaleSetsClient) Redeploy(ctx context.Context, resour
result, err = client.RedeploySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Redeploy", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Redeploy", result.Response(), "Failure sending request")
return
}
@@ -1531,6 +1537,7 @@ func (client VirtualMachineScaleSetsClient) RedeployPreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) RedeploySender(req *http.Request) (future VirtualMachineScaleSetsRedeployFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1578,7 +1585,7 @@ func (client VirtualMachineScaleSetsClient) Reimage(ctx context.Context, resourc
result, err = client.ReimageSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Reimage", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Reimage", result.Response(), "Failure sending request")
return
}
@@ -1615,6 +1622,7 @@ func (client VirtualMachineScaleSetsClient) ReimagePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) ReimageSender(req *http.Request) (future VirtualMachineScaleSetsReimageFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1662,7 +1670,7 @@ func (client VirtualMachineScaleSetsClient) ReimageAll(ctx context.Context, reso
result, err = client.ReimageAllSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ReimageAll", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ReimageAll", result.Response(), "Failure sending request")
return
}
@@ -1699,6 +1707,7 @@ func (client VirtualMachineScaleSetsClient) ReimageAllPreparer(ctx context.Conte
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) ReimageAllSender(req *http.Request) (future VirtualMachineScaleSetsReimageAllFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1745,7 +1754,7 @@ func (client VirtualMachineScaleSetsClient) Restart(ctx context.Context, resourc
result, err = client.RestartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Restart", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Restart", result.Response(), "Failure sending request")
return
}
@@ -1782,6 +1791,7 @@ func (client VirtualMachineScaleSetsClient) RestartPreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) RestartSender(req *http.Request) (future VirtualMachineScaleSetsRestartFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1828,7 +1838,7 @@ func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceState(ctx con
result, err = client.SetOrchestrationServiceStateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "SetOrchestrationServiceState", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "SetOrchestrationServiceState", result.Response(), "Failure sending request")
return
}
@@ -1862,6 +1872,7 @@ func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceStatePreparer
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceStateSender(req *http.Request) (future VirtualMachineScaleSetsSetOrchestrationServiceStateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1908,7 +1919,7 @@ func (client VirtualMachineScaleSetsClient) Start(ctx context.Context, resourceG
result, err = client.StartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Start", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Start", result.Response(), "Failure sending request")
return
}
@@ -1945,6 +1956,7 @@ func (client VirtualMachineScaleSetsClient) StartPreparer(ctx context.Context, r
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) StartSender(req *http.Request) (future VirtualMachineScaleSetsStartFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1991,7 +2003,7 @@ func (client VirtualMachineScaleSetsClient) Update(ctx context.Context, resource
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -2025,6 +2037,7 @@ func (client VirtualMachineScaleSetsClient) UpdatePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -2078,7 +2091,7 @@ func (client VirtualMachineScaleSetsClient) UpdateInstances(ctx context.Context,
result, err = client.UpdateInstancesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "UpdateInstances", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "UpdateInstances", result.Response(), "Failure sending request")
return
}
@@ -2112,6 +2125,7 @@ func (client VirtualMachineScaleSetsClient) UpdateInstancesPreparer(ctx context.
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetsClient) UpdateInstancesSender(req *http.Request) (future VirtualMachineScaleSetsUpdateInstancesFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachinescalesetvmextensions.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachinescalesetvmextensions.go
index 04657720b31f..4c44738c6f5a 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachinescalesetvmextensions.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachinescalesetvmextensions.go
@@ -58,7 +58,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdate(ctx contex
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -96,6 +96,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdatePreparer(ct
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -144,7 +145,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) Delete(ctx context.Contex
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -178,6 +179,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) DeletePreparer(ctx contex
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetVMExtensionsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -392,7 +394,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) Update(ctx context.Contex
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -430,6 +432,7 @@ func (client VirtualMachineScaleSetVMExtensionsClient) UpdatePreparer(ctx contex
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetVMExtensionsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachinescalesetvmruncommands.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachinescalesetvmruncommands.go
index 497b56a50596..f4a8843d6d7e 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachinescalesetvmruncommands.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachinescalesetvmruncommands.go
@@ -58,7 +58,7 @@ func (client VirtualMachineScaleSetVMRunCommandsClient) CreateOrUpdate(ctx conte
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -94,6 +94,7 @@ func (client VirtualMachineScaleSetVMRunCommandsClient) CreateOrUpdatePreparer(c
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMRunCommandsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -142,7 +143,7 @@ func (client VirtualMachineScaleSetVMRunCommandsClient) Delete(ctx context.Conte
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -176,6 +177,7 @@ func (client VirtualMachineScaleSetVMRunCommandsClient) DeletePreparer(ctx conte
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMRunCommandsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetVMRunCommandsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -432,7 +434,7 @@ func (client VirtualMachineScaleSetVMRunCommandsClient) Update(ctx context.Conte
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -468,6 +470,7 @@ func (client VirtualMachineScaleSetVMRunCommandsClient) UpdatePreparer(ctx conte
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMRunCommandsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetVMRunCommandsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachinescalesetvms.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachinescalesetvms.go
index fcbd9da1e04b..249df3139c55 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachinescalesetvms.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute/virtualmachinescalesetvms.go
@@ -58,7 +58,7 @@ func (client VirtualMachineScaleSetVMsClient) Deallocate(ctx context.Context, re
result, err = client.DeallocateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Deallocate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Deallocate", result.Response(), "Failure sending request")
return
}
@@ -91,6 +91,7 @@ func (client VirtualMachineScaleSetVMsClient) DeallocatePreparer(ctx context.Con
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) DeallocateSender(req *http.Request) (future VirtualMachineScaleSetVMsDeallocateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -139,7 +140,7 @@ func (client VirtualMachineScaleSetVMsClient) Delete(ctx context.Context, resour
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -175,6 +176,7 @@ func (client VirtualMachineScaleSetVMsClient) DeletePreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetVMsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -512,7 +514,7 @@ func (client VirtualMachineScaleSetVMsClient) PerformMaintenance(ctx context.Con
result, err = client.PerformMaintenanceSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PerformMaintenance", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PerformMaintenance", result.Response(), "Failure sending request")
return
}
@@ -545,6 +547,7 @@ func (client VirtualMachineScaleSetVMsClient) PerformMaintenancePreparer(ctx con
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) PerformMaintenanceSender(req *http.Request) (future VirtualMachineScaleSetVMsPerformMaintenanceFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -595,7 +598,7 @@ func (client VirtualMachineScaleSetVMsClient) PowerOff(ctx context.Context, reso
result, err = client.PowerOffSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PowerOff", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PowerOff", result.Response(), "Failure sending request")
return
}
@@ -633,6 +636,7 @@ func (client VirtualMachineScaleSetVMsClient) PowerOffPreparer(ctx context.Conte
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) PowerOffSender(req *http.Request) (future VirtualMachineScaleSetVMsPowerOffFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -680,7 +684,7 @@ func (client VirtualMachineScaleSetVMsClient) Redeploy(ctx context.Context, reso
result, err = client.RedeploySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Redeploy", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Redeploy", result.Response(), "Failure sending request")
return
}
@@ -713,6 +717,7 @@ func (client VirtualMachineScaleSetVMsClient) RedeployPreparer(ctx context.Conte
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) RedeploySender(req *http.Request) (future VirtualMachineScaleSetVMsRedeployFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -760,7 +765,7 @@ func (client VirtualMachineScaleSetVMsClient) Reimage(ctx context.Context, resou
result, err = client.ReimageSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Reimage", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Reimage", result.Response(), "Failure sending request")
return
}
@@ -798,6 +803,7 @@ func (client VirtualMachineScaleSetVMsClient) ReimagePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) ReimageSender(req *http.Request) (future VirtualMachineScaleSetVMsReimageFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -845,7 +851,7 @@ func (client VirtualMachineScaleSetVMsClient) ReimageAll(ctx context.Context, re
result, err = client.ReimageAllSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "ReimageAll", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "ReimageAll", result.Response(), "Failure sending request")
return
}
@@ -878,6 +884,7 @@ func (client VirtualMachineScaleSetVMsClient) ReimageAllPreparer(ctx context.Con
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) ReimageAllSender(req *http.Request) (future VirtualMachineScaleSetVMsReimageAllFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -924,7 +931,7 @@ func (client VirtualMachineScaleSetVMsClient) Restart(ctx context.Context, resou
result, err = client.RestartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Restart", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Restart", result.Response(), "Failure sending request")
return
}
@@ -957,6 +964,7 @@ func (client VirtualMachineScaleSetVMsClient) RestartPreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) RestartSender(req *http.Request) (future VirtualMachineScaleSetVMsRestartFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1095,7 +1103,7 @@ func (client VirtualMachineScaleSetVMsClient) RunCommand(ctx context.Context, re
result, err = client.RunCommandSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "RunCommand", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "RunCommand", result.Response(), "Failure sending request")
return
}
@@ -1130,6 +1138,7 @@ func (client VirtualMachineScaleSetVMsClient) RunCommandPreparer(ctx context.Con
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) RunCommandSender(req *http.Request) (future VirtualMachineScaleSetVMsRunCommandFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1254,7 +1263,7 @@ func (client VirtualMachineScaleSetVMsClient) Start(ctx context.Context, resourc
result, err = client.StartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Start", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Start", result.Response(), "Failure sending request")
return
}
@@ -1287,6 +1296,7 @@ func (client VirtualMachineScaleSetVMsClient) StartPreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) StartSender(req *http.Request) (future VirtualMachineScaleSetVMsStartFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1355,7 +1365,7 @@ func (client VirtualMachineScaleSetVMsClient) Update(ctx context.Context, resour
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -1394,6 +1404,7 @@ func (client VirtualMachineScaleSetVMsClient) UpdatePreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client VirtualMachineScaleSetVMsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetVMsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/CHANGELOG.md b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/CHANGELOG.md
new file mode 100644
index 000000000000..52911e4cc5e4
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/CHANGELOG.md
@@ -0,0 +1,2 @@
+# Change History
+
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/_meta.json b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/_meta.json
new file mode 100644
index 000000000000..ee881857d1cc
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/_meta.json
@@ -0,0 +1,11 @@
+{
+ "commit": "bd64220293a403f70ae8beebd56fb86951007acf",
+ "readme": "/_/azure-rest-api-specs/specification/compute/resource-manager/readme.md",
+ "tag": "package-2021-07-01",
+ "use": "@microsoft.azure/autorest.go@2.1.187",
+ "repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
+ "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2021-07-01 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix /_/azure-rest-api-specs/specification/compute/resource-manager/readme.md",
+ "additional_properties": {
+ "additional_options": "--go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix"
+ }
+}
\ No newline at end of file
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/availabilitysets.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/availabilitysets.go
new file mode 100644
index 000000000000..7953c6555084
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/availabilitysets.go
@@ -0,0 +1,652 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// AvailabilitySetsClient is the compute Client
+type AvailabilitySetsClient struct {
+ BaseClient
+}
+
+// NewAvailabilitySetsClient creates an instance of the AvailabilitySetsClient client.
+func NewAvailabilitySetsClient(subscriptionID string) AvailabilitySetsClient {
+ return NewAvailabilitySetsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewAvailabilitySetsClientWithBaseURI creates an instance of the AvailabilitySetsClient client using a custom
+// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
+// stack).
+func NewAvailabilitySetsClientWithBaseURI(baseURI string, subscriptionID string) AvailabilitySetsClient {
+ return AvailabilitySetsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate create or update an availability set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// availabilitySetName - the name of the availability set.
+// parameters - parameters supplied to the Create Availability Set operation.
+func (client AvailabilitySetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, availabilitySetName string, parameters AvailabilitySet) (result AvailabilitySet, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, availabilitySetName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client AvailabilitySetsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, availabilitySetName string, parameters AvailabilitySet) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "availabilitySetName": autorest.Encode("path", availabilitySetName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client AvailabilitySetsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client AvailabilitySetsClient) CreateOrUpdateResponder(resp *http.Response) (result AvailabilitySet, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete delete an availability set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// availabilitySetName - the name of the availability set.
+func (client AvailabilitySetsClient) Delete(ctx context.Context, resourceGroupName string, availabilitySetName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, availabilitySetName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Delete", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client AvailabilitySetsClient) DeletePreparer(ctx context.Context, resourceGroupName string, availabilitySetName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "availabilitySetName": autorest.Encode("path", availabilitySetName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client AvailabilitySetsClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client AvailabilitySetsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get retrieves information about an availability set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// availabilitySetName - the name of the availability set.
+func (client AvailabilitySetsClient) Get(ctx context.Context, resourceGroupName string, availabilitySetName string) (result AvailabilitySet, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, availabilitySetName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client AvailabilitySetsClient) GetPreparer(ctx context.Context, resourceGroupName string, availabilitySetName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "availabilitySetName": autorest.Encode("path", availabilitySetName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client AvailabilitySetsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client AvailabilitySetsClient) GetResponder(resp *http.Response) (result AvailabilitySet, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List lists all availability sets in a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client AvailabilitySetsClient) List(ctx context.Context, resourceGroupName string) (result AvailabilitySetListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.List")
+ defer func() {
+ sc := -1
+ if result.aslr.Response.Response != nil {
+ sc = result.aslr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.aslr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.aslr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "List", resp, "Failure responding to request")
+ return
+ }
+ if result.aslr.hasNextLink() && result.aslr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client AvailabilitySetsClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client AvailabilitySetsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client AvailabilitySetsClient) ListResponder(resp *http.Response) (result AvailabilitySetListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client AvailabilitySetsClient) listNextResults(ctx context.Context, lastResults AvailabilitySetListResult) (result AvailabilitySetListResult, err error) {
+ req, err := lastResults.availabilitySetListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client AvailabilitySetsClient) ListComplete(ctx context.Context, resourceGroupName string) (result AvailabilitySetListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx, resourceGroupName)
+ return
+}
+
+// ListAvailableSizes lists all available virtual machine sizes that can be used to create a new virtual machine in an
+// existing availability set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// availabilitySetName - the name of the availability set.
+func (client AvailabilitySetsClient) ListAvailableSizes(ctx context.Context, resourceGroupName string, availabilitySetName string) (result VirtualMachineSizeListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.ListAvailableSizes")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListAvailableSizesPreparer(ctx, resourceGroupName, availabilitySetName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "ListAvailableSizes", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListAvailableSizesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "ListAvailableSizes", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListAvailableSizesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "ListAvailableSizes", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// ListAvailableSizesPreparer prepares the ListAvailableSizes request.
+func (client AvailabilitySetsClient) ListAvailableSizesPreparer(ctx context.Context, resourceGroupName string, availabilitySetName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "availabilitySetName": autorest.Encode("path", availabilitySetName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListAvailableSizesSender sends the ListAvailableSizes request. The method will close the
+// http.Response Body if it receives an error.
+func (client AvailabilitySetsClient) ListAvailableSizesSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListAvailableSizesResponder handles the response to the ListAvailableSizes request. The method always
+// closes the http.Response Body.
+func (client AvailabilitySetsClient) ListAvailableSizesResponder(resp *http.Response) (result VirtualMachineSizeListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListBySubscription lists all availability sets in a subscription.
+// Parameters:
+// expand - the expand expression to apply to the operation. Allowed values are 'instanceView'.
+func (client AvailabilitySetsClient) ListBySubscription(ctx context.Context, expand string) (result AvailabilitySetListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.aslr.Response.Response != nil {
+ sc = result.aslr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listBySubscriptionNextResults
+ req, err := client.ListBySubscriptionPreparer(ctx, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "ListBySubscription", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListBySubscriptionSender(req)
+ if err != nil {
+ result.aslr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "ListBySubscription", resp, "Failure sending request")
+ return
+ }
+
+ result.aslr, err = client.ListBySubscriptionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "ListBySubscription", resp, "Failure responding to request")
+ return
+ }
+ if result.aslr.hasNextLink() && result.aslr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListBySubscriptionPreparer prepares the ListBySubscription request.
+func (client AvailabilitySetsClient) ListBySubscriptionPreparer(ctx context.Context, expand string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(expand) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/availabilitySets", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListBySubscriptionSender sends the ListBySubscription request. The method will close the
+// http.Response Body if it receives an error.
+func (client AvailabilitySetsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always
+// closes the http.Response Body.
+func (client AvailabilitySetsClient) ListBySubscriptionResponder(resp *http.Response) (result AvailabilitySetListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listBySubscriptionNextResults retrieves the next set of results, if any.
+func (client AvailabilitySetsClient) listBySubscriptionNextResults(ctx context.Context, lastResults AvailabilitySetListResult) (result AvailabilitySetListResult, err error) {
+ req, err := lastResults.availabilitySetListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListBySubscriptionSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "listBySubscriptionNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListBySubscriptionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required.
+func (client AvailabilitySetsClient) ListBySubscriptionComplete(ctx context.Context, expand string) (result AvailabilitySetListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListBySubscription(ctx, expand)
+ return
+}
+
+// Update update an availability set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// availabilitySetName - the name of the availability set.
+// parameters - parameters supplied to the Update Availability Set operation.
+func (client AvailabilitySetsClient) Update(ctx context.Context, resourceGroupName string, availabilitySetName string, parameters AvailabilitySetUpdate) (result AvailabilitySet, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, availabilitySetName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Update", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client AvailabilitySetsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, availabilitySetName string, parameters AvailabilitySetUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "availabilitySetName": autorest.Encode("path", availabilitySetName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client AvailabilitySetsClient) UpdateSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client AvailabilitySetsClient) UpdateResponder(resp *http.Response) (result AvailabilitySet, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/capacityreservationgroups.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/capacityreservationgroups.go
new file mode 100644
index 000000000000..a525a29711a9
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/capacityreservationgroups.go
@@ -0,0 +1,596 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// CapacityReservationGroupsClient is the compute Client
+type CapacityReservationGroupsClient struct {
+ BaseClient
+}
+
+// NewCapacityReservationGroupsClient creates an instance of the CapacityReservationGroupsClient client.
+func NewCapacityReservationGroupsClient(subscriptionID string) CapacityReservationGroupsClient {
+ return NewCapacityReservationGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewCapacityReservationGroupsClientWithBaseURI creates an instance of the CapacityReservationGroupsClient client
+// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign
+// clouds, Azure stack).
+func NewCapacityReservationGroupsClientWithBaseURI(baseURI string, subscriptionID string) CapacityReservationGroupsClient {
+ return CapacityReservationGroupsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate the operation to create or update a capacity reservation group. When updating a capacity reservation
+// group, only tags may be modified. Please refer to https://aka.ms/CapacityReservation for more details.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// capacityReservationGroupName - the name of the capacity reservation group.
+// parameters - parameters supplied to the Create capacity reservation Group.
+func (client CapacityReservationGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, parameters CapacityReservationGroup) (result CapacityReservationGroup, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationGroupsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, capacityReservationGroupName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client CapacityReservationGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, parameters CapacityReservationGroup) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "capacityReservationGroupName": autorest.Encode("path", capacityReservationGroupName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client CapacityReservationGroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client CapacityReservationGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result CapacityReservationGroup, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete the operation to delete a capacity reservation group. This operation is allowed only if all the associated
+// resources are disassociated from the reservation group and all capacity reservations under the reservation group
+// have also been deleted. Please refer to https://aka.ms/CapacityReservation for more details.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// capacityReservationGroupName - the name of the capacity reservation group.
+func (client CapacityReservationGroupsClient) Delete(ctx context.Context, resourceGroupName string, capacityReservationGroupName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationGroupsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, capacityReservationGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "Delete", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client CapacityReservationGroupsClient) DeletePreparer(ctx context.Context, resourceGroupName string, capacityReservationGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "capacityReservationGroupName": autorest.Encode("path", capacityReservationGroupName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client CapacityReservationGroupsClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client CapacityReservationGroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get the operation that retrieves information about a capacity reservation group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// capacityReservationGroupName - the name of the capacity reservation group.
+// expand - the expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance
+// views of the capacity reservations under the capacity reservation group which is a snapshot of the runtime
+// properties of a capacity reservation that is managed by the platform and can change outside of control plane
+// operations.
+func (client CapacityReservationGroupsClient) Get(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, expand CapacityReservationGroupInstanceViewTypes) (result CapacityReservationGroup, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationGroupsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, capacityReservationGroupName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client CapacityReservationGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, expand CapacityReservationGroupInstanceViewTypes) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "capacityReservationGroupName": autorest.Encode("path", capacityReservationGroupName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(string(expand)) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client CapacityReservationGroupsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client CapacityReservationGroupsClient) GetResponder(resp *http.Response) (result CapacityReservationGroup, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByResourceGroup lists all of the capacity reservation groups in the specified resource group. Use the nextLink
+// property in the response to get the next page of capacity reservation groups.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// expand - the expand expression to apply on the operation. Based on the expand param(s) specified we return
+// Virtual Machine or ScaleSet VM Instance or both resource Ids which are associated to capacity reservation
+// group in the response.
+func (client CapacityReservationGroupsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, expand ExpandTypesForGetCapacityReservationGroups) (result CapacityReservationGroupListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationGroupsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.crglr.Response.Response != nil {
+ sc = result.crglr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.crglr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.crglr, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "ListByResourceGroup", resp, "Failure responding to request")
+ return
+ }
+ if result.crglr.hasNextLink() && result.crglr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client CapacityReservationGroupsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string, expand ExpandTypesForGetCapacityReservationGroups) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(string(expand)) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client CapacityReservationGroupsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client CapacityReservationGroupsClient) ListByResourceGroupResponder(resp *http.Response) (result CapacityReservationGroupListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByResourceGroupNextResults retrieves the next set of results, if any.
+func (client CapacityReservationGroupsClient) listByResourceGroupNextResults(ctx context.Context, lastResults CapacityReservationGroupListResult) (result CapacityReservationGroupListResult, err error) {
+ req, err := lastResults.capacityReservationGroupListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client CapacityReservationGroupsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, expand ExpandTypesForGetCapacityReservationGroups) (result CapacityReservationGroupListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationGroupsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByResourceGroup(ctx, resourceGroupName, expand)
+ return
+}
+
+// ListBySubscription lists all of the capacity reservation groups in the subscription. Use the nextLink property in
+// the response to get the next page of capacity reservation groups.
+// Parameters:
+// expand - the expand expression to apply on the operation. Based on the expand param(s) specified we return
+// Virtual Machine or ScaleSet VM Instance or both resource Ids which are associated to capacity reservation
+// group in the response.
+func (client CapacityReservationGroupsClient) ListBySubscription(ctx context.Context, expand ExpandTypesForGetCapacityReservationGroups) (result CapacityReservationGroupListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationGroupsClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.crglr.Response.Response != nil {
+ sc = result.crglr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listBySubscriptionNextResults
+ req, err := client.ListBySubscriptionPreparer(ctx, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "ListBySubscription", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListBySubscriptionSender(req)
+ if err != nil {
+ result.crglr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "ListBySubscription", resp, "Failure sending request")
+ return
+ }
+
+ result.crglr, err = client.ListBySubscriptionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "ListBySubscription", resp, "Failure responding to request")
+ return
+ }
+ if result.crglr.hasNextLink() && result.crglr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListBySubscriptionPreparer prepares the ListBySubscription request.
+func (client CapacityReservationGroupsClient) ListBySubscriptionPreparer(ctx context.Context, expand ExpandTypesForGetCapacityReservationGroups) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(string(expand)) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/capacityReservationGroups", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListBySubscriptionSender sends the ListBySubscription request. The method will close the
+// http.Response Body if it receives an error.
+func (client CapacityReservationGroupsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always
+// closes the http.Response Body.
+func (client CapacityReservationGroupsClient) ListBySubscriptionResponder(resp *http.Response) (result CapacityReservationGroupListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listBySubscriptionNextResults retrieves the next set of results, if any.
+func (client CapacityReservationGroupsClient) listBySubscriptionNextResults(ctx context.Context, lastResults CapacityReservationGroupListResult) (result CapacityReservationGroupListResult, err error) {
+ req, err := lastResults.capacityReservationGroupListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListBySubscriptionSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "listBySubscriptionNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListBySubscriptionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required.
+func (client CapacityReservationGroupsClient) ListBySubscriptionComplete(ctx context.Context, expand ExpandTypesForGetCapacityReservationGroups) (result CapacityReservationGroupListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationGroupsClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListBySubscription(ctx, expand)
+ return
+}
+
+// Update the operation to update a capacity reservation group. When updating a capacity reservation group, only tags
+// may be modified.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// capacityReservationGroupName - the name of the capacity reservation group.
+// parameters - parameters supplied to the Update capacity reservation Group operation.
+func (client CapacityReservationGroupsClient) Update(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, parameters CapacityReservationGroupUpdate) (result CapacityReservationGroup, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationGroupsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, capacityReservationGroupName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationGroupsClient", "Update", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client CapacityReservationGroupsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, parameters CapacityReservationGroupUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "capacityReservationGroupName": autorest.Encode("path", capacityReservationGroupName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client CapacityReservationGroupsClient) UpdateSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client CapacityReservationGroupsClient) UpdateResponder(resp *http.Response) (result CapacityReservationGroup, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/capacityreservations.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/capacityreservations.go
new file mode 100644
index 000000000000..fc894216ae13
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/capacityreservations.go
@@ -0,0 +1,493 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// CapacityReservationsClient is the compute Client
+type CapacityReservationsClient struct {
+ BaseClient
+}
+
+// NewCapacityReservationsClient creates an instance of the CapacityReservationsClient client.
+func NewCapacityReservationsClient(subscriptionID string) CapacityReservationsClient {
+ return NewCapacityReservationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewCapacityReservationsClientWithBaseURI creates an instance of the CapacityReservationsClient client using a custom
+// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
+// stack).
+func NewCapacityReservationsClientWithBaseURI(baseURI string, subscriptionID string) CapacityReservationsClient {
+ return CapacityReservationsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate the operation to create or update a capacity reservation. Please note some properties can be set only
+// during capacity reservation creation. Please refer to https://aka.ms/CapacityReservation for more details.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// capacityReservationGroupName - the name of the capacity reservation group.
+// capacityReservationName - the name of the capacity reservation.
+// parameters - parameters supplied to the Create capacity reservation.
+func (client CapacityReservationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, parameters CapacityReservation) (result CapacityReservationsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("compute.CapacityReservationsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, capacityReservationGroupName, capacityReservationName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client CapacityReservationsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, parameters CapacityReservation) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "capacityReservationGroupName": autorest.Encode("path", capacityReservationGroupName),
+ "capacityReservationName": autorest.Encode("path", capacityReservationName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client CapacityReservationsClient) CreateOrUpdateSender(req *http.Request) (future CapacityReservationsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client CapacityReservationsClient) CreateOrUpdateResponder(resp *http.Response) (result CapacityReservation, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete the operation to delete a capacity reservation. This operation is allowed only when all the associated
+// resources are disassociated from the capacity reservation. Please refer to https://aka.ms/CapacityReservation for
+// more details.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// capacityReservationGroupName - the name of the capacity reservation group.
+// capacityReservationName - the name of the capacity reservation.
+func (client CapacityReservationsClient) Delete(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string) (result CapacityReservationsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, capacityReservationGroupName, capacityReservationName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client CapacityReservationsClient) DeletePreparer(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "capacityReservationGroupName": autorest.Encode("path", capacityReservationGroupName),
+ "capacityReservationName": autorest.Encode("path", capacityReservationName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client CapacityReservationsClient) DeleteSender(req *http.Request) (future CapacityReservationsDeleteFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client CapacityReservationsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get the operation that retrieves information about the capacity reservation.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// capacityReservationGroupName - the name of the capacity reservation group.
+// capacityReservationName - the name of the capacity reservation.
+// expand - the expand expression to apply on the operation. 'InstanceView' retrieves a snapshot of the runtime
+// properties of the capacity reservation that is managed by the platform and can change outside of control
+// plane operations.
+func (client CapacityReservationsClient) Get(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, expand CapacityReservationInstanceViewTypes) (result CapacityReservation, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, capacityReservationGroupName, capacityReservationName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client CapacityReservationsClient) GetPreparer(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, expand CapacityReservationInstanceViewTypes) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "capacityReservationGroupName": autorest.Encode("path", capacityReservationGroupName),
+ "capacityReservationName": autorest.Encode("path", capacityReservationName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(string(expand)) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client CapacityReservationsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client CapacityReservationsClient) GetResponder(resp *http.Response) (result CapacityReservation, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByCapacityReservationGroup lists all of the capacity reservations in the specified capacity reservation group.
+// Use the nextLink property in the response to get the next page of capacity reservations.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// capacityReservationGroupName - the name of the capacity reservation group.
+func (client CapacityReservationsClient) ListByCapacityReservationGroup(ctx context.Context, resourceGroupName string, capacityReservationGroupName string) (result CapacityReservationListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationsClient.ListByCapacityReservationGroup")
+ defer func() {
+ sc := -1
+ if result.crlr.Response.Response != nil {
+ sc = result.crlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByCapacityReservationGroupNextResults
+ req, err := client.ListByCapacityReservationGroupPreparer(ctx, resourceGroupName, capacityReservationGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "ListByCapacityReservationGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByCapacityReservationGroupSender(req)
+ if err != nil {
+ result.crlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "ListByCapacityReservationGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.crlr, err = client.ListByCapacityReservationGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "ListByCapacityReservationGroup", resp, "Failure responding to request")
+ return
+ }
+ if result.crlr.hasNextLink() && result.crlr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListByCapacityReservationGroupPreparer prepares the ListByCapacityReservationGroup request.
+func (client CapacityReservationsClient) ListByCapacityReservationGroupPreparer(ctx context.Context, resourceGroupName string, capacityReservationGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "capacityReservationGroupName": autorest.Encode("path", capacityReservationGroupName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByCapacityReservationGroupSender sends the ListByCapacityReservationGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client CapacityReservationsClient) ListByCapacityReservationGroupSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByCapacityReservationGroupResponder handles the response to the ListByCapacityReservationGroup request. The method always
+// closes the http.Response Body.
+func (client CapacityReservationsClient) ListByCapacityReservationGroupResponder(resp *http.Response) (result CapacityReservationListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByCapacityReservationGroupNextResults retrieves the next set of results, if any.
+func (client CapacityReservationsClient) listByCapacityReservationGroupNextResults(ctx context.Context, lastResults CapacityReservationListResult) (result CapacityReservationListResult, err error) {
+ req, err := lastResults.capacityReservationListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "listByCapacityReservationGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByCapacityReservationGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "listByCapacityReservationGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByCapacityReservationGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "listByCapacityReservationGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByCapacityReservationGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client CapacityReservationsClient) ListByCapacityReservationGroupComplete(ctx context.Context, resourceGroupName string, capacityReservationGroupName string) (result CapacityReservationListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationsClient.ListByCapacityReservationGroup")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByCapacityReservationGroup(ctx, resourceGroupName, capacityReservationGroupName)
+ return
+}
+
+// Update the operation to update a capacity reservation.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// capacityReservationGroupName - the name of the capacity reservation group.
+// capacityReservationName - the name of the capacity reservation.
+// parameters - parameters supplied to the Update capacity reservation operation.
+func (client CapacityReservationsClient) Update(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, parameters CapacityReservationUpdate) (result CapacityReservationsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationsClient.Update")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, capacityReservationGroupName, capacityReservationName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationsClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client CapacityReservationsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, capacityReservationGroupName string, capacityReservationName string, parameters CapacityReservationUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "capacityReservationGroupName": autorest.Encode("path", capacityReservationGroupName),
+ "capacityReservationName": autorest.Encode("path", capacityReservationName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client CapacityReservationsClient) UpdateSender(req *http.Request) (future CapacityReservationsUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client CapacityReservationsClient) UpdateResponder(resp *http.Response) (result CapacityReservation, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/client.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/client.go
new file mode 100644
index 000000000000..1812f27feb99
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/client.go
@@ -0,0 +1,41 @@
+// Package compute implements the Azure ARM Compute service API version .
+//
+// Compute Client
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "github.com/Azure/go-autorest/autorest"
+)
+
+const (
+ // DefaultBaseURI is the default URI used for the service Compute
+ DefaultBaseURI = "https://management.azure.com"
+)
+
+// BaseClient is the base client for Compute.
+type BaseClient struct {
+ autorest.Client
+ BaseURI string
+ SubscriptionID string
+}
+
+// New creates an instance of the BaseClient client.
+func New(subscriptionID string) BaseClient {
+ return NewWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with
+// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
+ return BaseClient{
+ Client: autorest.NewClientWithUserAgent(UserAgent()),
+ BaseURI: baseURI,
+ SubscriptionID: subscriptionID,
+ }
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/cloudserviceoperatingsystems.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/cloudserviceoperatingsystems.go
new file mode 100644
index 000000000000..7dfce08d9096
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/cloudserviceoperatingsystems.go
@@ -0,0 +1,422 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// CloudServiceOperatingSystemsClient is the compute Client
+type CloudServiceOperatingSystemsClient struct {
+ BaseClient
+}
+
+// NewCloudServiceOperatingSystemsClient creates an instance of the CloudServiceOperatingSystemsClient client.
+func NewCloudServiceOperatingSystemsClient(subscriptionID string) CloudServiceOperatingSystemsClient {
+ return NewCloudServiceOperatingSystemsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewCloudServiceOperatingSystemsClientWithBaseURI creates an instance of the CloudServiceOperatingSystemsClient
+// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI
+// (sovereign clouds, Azure stack).
+func NewCloudServiceOperatingSystemsClientWithBaseURI(baseURI string, subscriptionID string) CloudServiceOperatingSystemsClient {
+ return CloudServiceOperatingSystemsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// GetOSFamily gets properties of a guest operating system family that can be specified in the XML service
+// configuration (.cscfg) for a cloud service.
+// Parameters:
+// location - name of the location that the OS family pertains to.
+// osFamilyName - name of the OS family.
+func (client CloudServiceOperatingSystemsClient) GetOSFamily(ctx context.Context, location string, osFamilyName string) (result OSFamily, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceOperatingSystemsClient.GetOSFamily")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetOSFamilyPreparer(ctx, location, osFamilyName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "GetOSFamily", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetOSFamilySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "GetOSFamily", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetOSFamilyResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "GetOSFamily", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetOSFamilyPreparer prepares the GetOSFamily request.
+func (client CloudServiceOperatingSystemsClient) GetOSFamilyPreparer(ctx context.Context, location string, osFamilyName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "osFamilyName": autorest.Encode("path", osFamilyName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/cloudServiceOsFamilies/{osFamilyName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetOSFamilySender sends the GetOSFamily request. The method will close the
+// http.Response Body if it receives an error.
+func (client CloudServiceOperatingSystemsClient) GetOSFamilySender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetOSFamilyResponder handles the response to the GetOSFamily request. The method always
+// closes the http.Response Body.
+func (client CloudServiceOperatingSystemsClient) GetOSFamilyResponder(resp *http.Response) (result OSFamily, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetOSVersion gets properties of a guest operating system version that can be specified in the XML service
+// configuration (.cscfg) for a cloud service.
+// Parameters:
+// location - name of the location that the OS version pertains to.
+// osVersionName - name of the OS version.
+func (client CloudServiceOperatingSystemsClient) GetOSVersion(ctx context.Context, location string, osVersionName string) (result OSVersion, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceOperatingSystemsClient.GetOSVersion")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetOSVersionPreparer(ctx, location, osVersionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "GetOSVersion", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetOSVersionSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "GetOSVersion", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetOSVersionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "GetOSVersion", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetOSVersionPreparer prepares the GetOSVersion request.
+func (client CloudServiceOperatingSystemsClient) GetOSVersionPreparer(ctx context.Context, location string, osVersionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "osVersionName": autorest.Encode("path", osVersionName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/cloudServiceOsVersions/{osVersionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetOSVersionSender sends the GetOSVersion request. The method will close the
+// http.Response Body if it receives an error.
+func (client CloudServiceOperatingSystemsClient) GetOSVersionSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetOSVersionResponder handles the response to the GetOSVersion request. The method always
+// closes the http.Response Body.
+func (client CloudServiceOperatingSystemsClient) GetOSVersionResponder(resp *http.Response) (result OSVersion, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListOSFamilies gets a list of all guest operating system families available to be specified in the XML service
+// configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next page of OS
+// Families. Do this till nextLink is null to fetch all the OS Families.
+// Parameters:
+// location - name of the location that the OS families pertain to.
+func (client CloudServiceOperatingSystemsClient) ListOSFamilies(ctx context.Context, location string) (result OSFamilyListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceOperatingSystemsClient.ListOSFamilies")
+ defer func() {
+ sc := -1
+ if result.oflr.Response.Response != nil {
+ sc = result.oflr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listOSFamiliesNextResults
+ req, err := client.ListOSFamiliesPreparer(ctx, location)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "ListOSFamilies", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListOSFamiliesSender(req)
+ if err != nil {
+ result.oflr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "ListOSFamilies", resp, "Failure sending request")
+ return
+ }
+
+ result.oflr, err = client.ListOSFamiliesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "ListOSFamilies", resp, "Failure responding to request")
+ return
+ }
+ if result.oflr.hasNextLink() && result.oflr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListOSFamiliesPreparer prepares the ListOSFamilies request.
+func (client CloudServiceOperatingSystemsClient) ListOSFamiliesPreparer(ctx context.Context, location string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/cloudServiceOsFamilies", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListOSFamiliesSender sends the ListOSFamilies request. The method will close the
+// http.Response Body if it receives an error.
+func (client CloudServiceOperatingSystemsClient) ListOSFamiliesSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListOSFamiliesResponder handles the response to the ListOSFamilies request. The method always
+// closes the http.Response Body.
+func (client CloudServiceOperatingSystemsClient) ListOSFamiliesResponder(resp *http.Response) (result OSFamilyListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listOSFamiliesNextResults retrieves the next set of results, if any.
+func (client CloudServiceOperatingSystemsClient) listOSFamiliesNextResults(ctx context.Context, lastResults OSFamilyListResult) (result OSFamilyListResult, err error) {
+ req, err := lastResults.oSFamilyListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "listOSFamiliesNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListOSFamiliesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "listOSFamiliesNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListOSFamiliesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "listOSFamiliesNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListOSFamiliesComplete enumerates all values, automatically crossing page boundaries as required.
+func (client CloudServiceOperatingSystemsClient) ListOSFamiliesComplete(ctx context.Context, location string) (result OSFamilyListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceOperatingSystemsClient.ListOSFamilies")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListOSFamilies(ctx, location)
+ return
+}
+
+// ListOSVersions gets a list of all guest operating system versions available to be specified in the XML service
+// configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next page of OS
+// versions. Do this till nextLink is null to fetch all the OS versions.
+// Parameters:
+// location - name of the location that the OS versions pertain to.
+func (client CloudServiceOperatingSystemsClient) ListOSVersions(ctx context.Context, location string) (result OSVersionListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceOperatingSystemsClient.ListOSVersions")
+ defer func() {
+ sc := -1
+ if result.ovlr.Response.Response != nil {
+ sc = result.ovlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listOSVersionsNextResults
+ req, err := client.ListOSVersionsPreparer(ctx, location)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "ListOSVersions", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListOSVersionsSender(req)
+ if err != nil {
+ result.ovlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "ListOSVersions", resp, "Failure sending request")
+ return
+ }
+
+ result.ovlr, err = client.ListOSVersionsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "ListOSVersions", resp, "Failure responding to request")
+ return
+ }
+ if result.ovlr.hasNextLink() && result.ovlr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListOSVersionsPreparer prepares the ListOSVersions request.
+func (client CloudServiceOperatingSystemsClient) ListOSVersionsPreparer(ctx context.Context, location string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/cloudServiceOsVersions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListOSVersionsSender sends the ListOSVersions request. The method will close the
+// http.Response Body if it receives an error.
+func (client CloudServiceOperatingSystemsClient) ListOSVersionsSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListOSVersionsResponder handles the response to the ListOSVersions request. The method always
+// closes the http.Response Body.
+func (client CloudServiceOperatingSystemsClient) ListOSVersionsResponder(resp *http.Response) (result OSVersionListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listOSVersionsNextResults retrieves the next set of results, if any.
+func (client CloudServiceOperatingSystemsClient) listOSVersionsNextResults(ctx context.Context, lastResults OSVersionListResult) (result OSVersionListResult, err error) {
+ req, err := lastResults.oSVersionListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "listOSVersionsNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListOSVersionsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "listOSVersionsNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListOSVersionsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceOperatingSystemsClient", "listOSVersionsNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListOSVersionsComplete enumerates all values, automatically crossing page boundaries as required.
+func (client CloudServiceOperatingSystemsClient) ListOSVersionsComplete(ctx context.Context, location string) (result OSVersionListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceOperatingSystemsClient.ListOSVersions")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListOSVersions(ctx, location)
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/cloudserviceroleinstances.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/cloudserviceroleinstances.go
new file mode 100644
index 000000000000..4edea0aec5d7
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/cloudserviceroleinstances.go
@@ -0,0 +1,699 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// CloudServiceRoleInstancesClient is the compute Client
+type CloudServiceRoleInstancesClient struct {
+ BaseClient
+}
+
+// NewCloudServiceRoleInstancesClient creates an instance of the CloudServiceRoleInstancesClient client.
+func NewCloudServiceRoleInstancesClient(subscriptionID string) CloudServiceRoleInstancesClient {
+ return NewCloudServiceRoleInstancesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewCloudServiceRoleInstancesClientWithBaseURI creates an instance of the CloudServiceRoleInstancesClient client
+// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign
+// clouds, Azure stack).
+func NewCloudServiceRoleInstancesClientWithBaseURI(baseURI string, subscriptionID string) CloudServiceRoleInstancesClient {
+ return CloudServiceRoleInstancesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Delete deletes a role instance from a cloud service.
+// Parameters:
+// roleInstanceName - name of the role instance.
+func (client CloudServiceRoleInstancesClient) Delete(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string) (result CloudServiceRoleInstancesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceRoleInstancesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, roleInstanceName, resourceGroupName, cloudServiceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client CloudServiceRoleInstancesClient) DeletePreparer(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "cloudServiceName": autorest.Encode("path", cloudServiceName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "roleInstanceName": autorest.Encode("path", roleInstanceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client CloudServiceRoleInstancesClient) DeleteSender(req *http.Request) (future CloudServiceRoleInstancesDeleteFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client CloudServiceRoleInstancesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get gets a role instance from a cloud service.
+// Parameters:
+// roleInstanceName - name of the role instance.
+// expand - the expand expression to apply to the operation. 'UserData' is not supported for cloud services.
+func (client CloudServiceRoleInstancesClient) Get(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string, expand InstanceViewTypes) (result RoleInstance, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceRoleInstancesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, roleInstanceName, resourceGroupName, cloudServiceName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client CloudServiceRoleInstancesClient) GetPreparer(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string, expand InstanceViewTypes) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "cloudServiceName": autorest.Encode("path", cloudServiceName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "roleInstanceName": autorest.Encode("path", roleInstanceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(string(expand)) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client CloudServiceRoleInstancesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client CloudServiceRoleInstancesClient) GetResponder(resp *http.Response) (result RoleInstance, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetInstanceView retrieves information about the run-time state of a role instance in a cloud service.
+// Parameters:
+// roleInstanceName - name of the role instance.
+func (client CloudServiceRoleInstancesClient) GetInstanceView(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string) (result RoleInstanceInstanceView, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceRoleInstancesClient.GetInstanceView")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetInstanceViewPreparer(ctx, roleInstanceName, resourceGroupName, cloudServiceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "GetInstanceView", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetInstanceViewSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "GetInstanceView", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetInstanceViewResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "GetInstanceView", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetInstanceViewPreparer prepares the GetInstanceView request.
+func (client CloudServiceRoleInstancesClient) GetInstanceViewPreparer(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "cloudServiceName": autorest.Encode("path", cloudServiceName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "roleInstanceName": autorest.Encode("path", roleInstanceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/instanceView", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetInstanceViewSender sends the GetInstanceView request. The method will close the
+// http.Response Body if it receives an error.
+func (client CloudServiceRoleInstancesClient) GetInstanceViewSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetInstanceViewResponder handles the response to the GetInstanceView request. The method always
+// closes the http.Response Body.
+func (client CloudServiceRoleInstancesClient) GetInstanceViewResponder(resp *http.Response) (result RoleInstanceInstanceView, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetRemoteDesktopFile gets a remote desktop file for a role instance in a cloud service.
+// Parameters:
+// roleInstanceName - name of the role instance.
+func (client CloudServiceRoleInstancesClient) GetRemoteDesktopFile(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string) (result ReadCloser, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceRoleInstancesClient.GetRemoteDesktopFile")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetRemoteDesktopFilePreparer(ctx, roleInstanceName, resourceGroupName, cloudServiceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "GetRemoteDesktopFile", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetRemoteDesktopFileSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "GetRemoteDesktopFile", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetRemoteDesktopFileResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "GetRemoteDesktopFile", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetRemoteDesktopFilePreparer prepares the GetRemoteDesktopFile request.
+func (client CloudServiceRoleInstancesClient) GetRemoteDesktopFilePreparer(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "cloudServiceName": autorest.Encode("path", cloudServiceName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "roleInstanceName": autorest.Encode("path", roleInstanceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/remoteDesktopFile", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetRemoteDesktopFileSender sends the GetRemoteDesktopFile request. The method will close the
+// http.Response Body if it receives an error.
+func (client CloudServiceRoleInstancesClient) GetRemoteDesktopFileSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetRemoteDesktopFileResponder handles the response to the GetRemoteDesktopFile request. The method always
+// closes the http.Response Body.
+func (client CloudServiceRoleInstancesClient) GetRemoteDesktopFileResponder(resp *http.Response) (result ReadCloser, err error) {
+ result.Value = &resp.Body
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK))
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List gets the list of all role instances in a cloud service. Use nextLink property in the response to get the next
+// page of role instances. Do this till nextLink is null to fetch all the role instances.
+// Parameters:
+// expand - the expand expression to apply to the operation. 'UserData' is not supported for cloud services.
+func (client CloudServiceRoleInstancesClient) List(ctx context.Context, resourceGroupName string, cloudServiceName string, expand InstanceViewTypes) (result RoleInstanceListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceRoleInstancesClient.List")
+ defer func() {
+ sc := -1
+ if result.rilr.Response.Response != nil {
+ sc = result.rilr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName, cloudServiceName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.rilr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.rilr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "List", resp, "Failure responding to request")
+ return
+ }
+ if result.rilr.hasNextLink() && result.rilr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client CloudServiceRoleInstancesClient) ListPreparer(ctx context.Context, resourceGroupName string, cloudServiceName string, expand InstanceViewTypes) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "cloudServiceName": autorest.Encode("path", cloudServiceName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(string(expand)) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client CloudServiceRoleInstancesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client CloudServiceRoleInstancesClient) ListResponder(resp *http.Response) (result RoleInstanceListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client CloudServiceRoleInstancesClient) listNextResults(ctx context.Context, lastResults RoleInstanceListResult) (result RoleInstanceListResult, err error) {
+ req, err := lastResults.roleInstanceListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client CloudServiceRoleInstancesClient) ListComplete(ctx context.Context, resourceGroupName string, cloudServiceName string, expand InstanceViewTypes) (result RoleInstanceListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceRoleInstancesClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx, resourceGroupName, cloudServiceName, expand)
+ return
+}
+
+// Rebuild the Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web roles
+// or worker roles and initializes the storage resources that are used by them. If you do not want to initialize
+// storage resources, you can use Reimage Role Instance.
+// Parameters:
+// roleInstanceName - name of the role instance.
+func (client CloudServiceRoleInstancesClient) Rebuild(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string) (result CloudServiceRoleInstancesRebuildFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceRoleInstancesClient.Rebuild")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.RebuildPreparer(ctx, roleInstanceName, resourceGroupName, cloudServiceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "Rebuild", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.RebuildSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "Rebuild", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// RebuildPreparer prepares the Rebuild request.
+func (client CloudServiceRoleInstancesClient) RebuildPreparer(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "cloudServiceName": autorest.Encode("path", cloudServiceName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "roleInstanceName": autorest.Encode("path", roleInstanceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/rebuild", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RebuildSender sends the Rebuild request. The method will close the
+// http.Response Body if it receives an error.
+func (client CloudServiceRoleInstancesClient) RebuildSender(req *http.Request) (future CloudServiceRoleInstancesRebuildFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// RebuildResponder handles the response to the Rebuild request. The method always
+// closes the http.Response Body.
+func (client CloudServiceRoleInstancesClient) RebuildResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Reimage the Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web roles
+// or worker roles.
+// Parameters:
+// roleInstanceName - name of the role instance.
+func (client CloudServiceRoleInstancesClient) Reimage(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string) (result CloudServiceRoleInstancesReimageFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceRoleInstancesClient.Reimage")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ReimagePreparer(ctx, roleInstanceName, resourceGroupName, cloudServiceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "Reimage", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ReimageSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "Reimage", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ReimagePreparer prepares the Reimage request.
+func (client CloudServiceRoleInstancesClient) ReimagePreparer(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "cloudServiceName": autorest.Encode("path", cloudServiceName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "roleInstanceName": autorest.Encode("path", roleInstanceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/reimage", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ReimageSender sends the Reimage request. The method will close the
+// http.Response Body if it receives an error.
+func (client CloudServiceRoleInstancesClient) ReimageSender(req *http.Request) (future CloudServiceRoleInstancesReimageFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// ReimageResponder handles the response to the Reimage request. The method always
+// closes the http.Response Body.
+func (client CloudServiceRoleInstancesClient) ReimageResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Restart the Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud service.
+// Parameters:
+// roleInstanceName - name of the role instance.
+func (client CloudServiceRoleInstancesClient) Restart(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string) (result CloudServiceRoleInstancesRestartFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceRoleInstancesClient.Restart")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.RestartPreparer(ctx, roleInstanceName, resourceGroupName, cloudServiceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "Restart", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.RestartSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesClient", "Restart", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// RestartPreparer prepares the Restart request.
+func (client CloudServiceRoleInstancesClient) RestartPreparer(ctx context.Context, roleInstanceName string, resourceGroupName string, cloudServiceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "cloudServiceName": autorest.Encode("path", cloudServiceName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "roleInstanceName": autorest.Encode("path", roleInstanceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/restart", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RestartSender sends the Restart request. The method will close the
+// http.Response Body if it receives an error.
+func (client CloudServiceRoleInstancesClient) RestartSender(req *http.Request) (future CloudServiceRoleInstancesRestartFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// RestartResponder handles the response to the Restart request. The method always
+// closes the http.Response Body.
+func (client CloudServiceRoleInstancesClient) RestartResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/cloudserviceroles.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/cloudserviceroles.go
new file mode 100644
index 000000000000..dac28bd988b1
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/cloudserviceroles.go
@@ -0,0 +1,224 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// CloudServiceRolesClient is the compute Client
+type CloudServiceRolesClient struct {
+ BaseClient
+}
+
+// NewCloudServiceRolesClient creates an instance of the CloudServiceRolesClient client.
+func NewCloudServiceRolesClient(subscriptionID string) CloudServiceRolesClient {
+ return NewCloudServiceRolesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewCloudServiceRolesClientWithBaseURI creates an instance of the CloudServiceRolesClient client using a custom
+// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
+// stack).
+func NewCloudServiceRolesClientWithBaseURI(baseURI string, subscriptionID string) CloudServiceRolesClient {
+ return CloudServiceRolesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Get gets a role from a cloud service.
+// Parameters:
+// roleName - name of the role.
+func (client CloudServiceRolesClient) Get(ctx context.Context, roleName string, resourceGroupName string, cloudServiceName string) (result CloudServiceRole, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceRolesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, roleName, resourceGroupName, cloudServiceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceRolesClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceRolesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceRolesClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client CloudServiceRolesClient) GetPreparer(ctx context.Context, roleName string, resourceGroupName string, cloudServiceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "cloudServiceName": autorest.Encode("path", cloudServiceName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "roleName": autorest.Encode("path", roleName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roles/{roleName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client CloudServiceRolesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client CloudServiceRolesClient) GetResponder(resp *http.Response) (result CloudServiceRole, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List gets a list of all roles in a cloud service. Use nextLink property in the response to get the next page of
+// roles. Do this till nextLink is null to fetch all the roles.
+func (client CloudServiceRolesClient) List(ctx context.Context, resourceGroupName string, cloudServiceName string) (result CloudServiceRoleListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceRolesClient.List")
+ defer func() {
+ sc := -1
+ if result.csrlr.Response.Response != nil {
+ sc = result.csrlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName, cloudServiceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceRolesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.csrlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceRolesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.csrlr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceRolesClient", "List", resp, "Failure responding to request")
+ return
+ }
+ if result.csrlr.hasNextLink() && result.csrlr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client CloudServiceRolesClient) ListPreparer(ctx context.Context, resourceGroupName string, cloudServiceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "cloudServiceName": autorest.Encode("path", cloudServiceName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roles", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client CloudServiceRolesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client CloudServiceRolesClient) ListResponder(resp *http.Response) (result CloudServiceRoleListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client CloudServiceRolesClient) listNextResults(ctx context.Context, lastResults CloudServiceRoleListResult) (result CloudServiceRoleListResult, err error) {
+ req, err := lastResults.cloudServiceRoleListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.CloudServiceRolesClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.CloudServiceRolesClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceRolesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client CloudServiceRolesClient) ListComplete(ctx context.Context, resourceGroupName string, cloudServiceName string) (result CloudServiceRoleListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceRolesClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx, resourceGroupName, cloudServiceName)
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/cloudservices.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/cloudservices.go
new file mode 100644
index 000000000000..7086dd644a08
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/cloudservices.go
@@ -0,0 +1,1198 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// CloudServicesClient is the compute Client
+type CloudServicesClient struct {
+ BaseClient
+}
+
+// NewCloudServicesClient creates an instance of the CloudServicesClient client.
+func NewCloudServicesClient(subscriptionID string) CloudServicesClient {
+ return NewCloudServicesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewCloudServicesClientWithBaseURI creates an instance of the CloudServicesClient client using a custom endpoint.
+// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewCloudServicesClientWithBaseURI(baseURI string, subscriptionID string) CloudServicesClient {
+ return CloudServicesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate create or update a cloud service. Please note some properties can be set only during cloud service
+// creation.
+// Parameters:
+// resourceGroupName - name of the resource group.
+// cloudServiceName - name of the cloud service.
+// parameters - the cloud service object.
+func (client CloudServicesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters *CloudService) (result CloudServicesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("compute.CloudServicesClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, cloudServiceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client CloudServicesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters *CloudService) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "cloudServiceName": autorest.Encode("path", cloudServiceName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ parameters.ID = nil
+ parameters.Name = nil
+ parameters.Type = nil
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if parameters != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(parameters))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client CloudServicesClient) CreateOrUpdateSender(req *http.Request) (future CloudServicesCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client CloudServicesClient) CreateOrUpdateResponder(resp *http.Response) (result CloudService, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete deletes a cloud service.
+// Parameters:
+// resourceGroupName - name of the resource group.
+// cloudServiceName - name of the cloud service.
+func (client CloudServicesClient) Delete(ctx context.Context, resourceGroupName string, cloudServiceName string) (result CloudServicesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, cloudServiceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client CloudServicesClient) DeletePreparer(ctx context.Context, resourceGroupName string, cloudServiceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "cloudServiceName": autorest.Encode("path", cloudServiceName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client CloudServicesClient) DeleteSender(req *http.Request) (future CloudServicesDeleteFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client CloudServicesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// DeleteInstances deletes role instances in a cloud service.
+// Parameters:
+// resourceGroupName - name of the resource group.
+// cloudServiceName - name of the cloud service.
+// parameters - list of cloud service role instance names.
+func (client CloudServicesClient) DeleteInstances(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters *RoleInstances) (result CloudServicesDeleteInstancesFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesClient.DeleteInstances")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.RoleInstances", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("compute.CloudServicesClient", "DeleteInstances", err.Error())
+ }
+
+ req, err := client.DeleteInstancesPreparer(ctx, resourceGroupName, cloudServiceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "DeleteInstances", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteInstancesSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "DeleteInstances", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeleteInstancesPreparer prepares the DeleteInstances request.
+func (client CloudServicesClient) DeleteInstancesPreparer(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters *RoleInstances) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "cloudServiceName": autorest.Encode("path", cloudServiceName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/delete", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if parameters != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(parameters))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteInstancesSender sends the DeleteInstances request. The method will close the
+// http.Response Body if it receives an error.
+func (client CloudServicesClient) DeleteInstancesSender(req *http.Request) (future CloudServicesDeleteInstancesFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// DeleteInstancesResponder handles the response to the DeleteInstances request. The method always
+// closes the http.Response Body.
+func (client CloudServicesClient) DeleteInstancesResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get display information about a cloud service.
+// Parameters:
+// resourceGroupName - name of the resource group.
+// cloudServiceName - name of the cloud service.
+func (client CloudServicesClient) Get(ctx context.Context, resourceGroupName string, cloudServiceName string) (result CloudService, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, cloudServiceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client CloudServicesClient) GetPreparer(ctx context.Context, resourceGroupName string, cloudServiceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "cloudServiceName": autorest.Encode("path", cloudServiceName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client CloudServicesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client CloudServicesClient) GetResponder(resp *http.Response) (result CloudService, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetInstanceView gets the status of a cloud service.
+// Parameters:
+// resourceGroupName - name of the resource group.
+// cloudServiceName - name of the cloud service.
+func (client CloudServicesClient) GetInstanceView(ctx context.Context, resourceGroupName string, cloudServiceName string) (result CloudServiceInstanceView, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesClient.GetInstanceView")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetInstanceViewPreparer(ctx, resourceGroupName, cloudServiceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "GetInstanceView", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetInstanceViewSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "GetInstanceView", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetInstanceViewResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "GetInstanceView", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetInstanceViewPreparer prepares the GetInstanceView request.
+func (client CloudServicesClient) GetInstanceViewPreparer(ctx context.Context, resourceGroupName string, cloudServiceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "cloudServiceName": autorest.Encode("path", cloudServiceName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/instanceView", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetInstanceViewSender sends the GetInstanceView request. The method will close the
+// http.Response Body if it receives an error.
+func (client CloudServicesClient) GetInstanceViewSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetInstanceViewResponder handles the response to the GetInstanceView request. The method always
+// closes the http.Response Body.
+func (client CloudServicesClient) GetInstanceViewResponder(resp *http.Response) (result CloudServiceInstanceView, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List gets a list of all cloud services under a resource group. Use nextLink property in the response to get the next
+// page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services.
+// Parameters:
+// resourceGroupName - name of the resource group.
+func (client CloudServicesClient) List(ctx context.Context, resourceGroupName string) (result CloudServiceListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesClient.List")
+ defer func() {
+ sc := -1
+ if result.cslr.Response.Response != nil {
+ sc = result.cslr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.cslr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.cslr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "List", resp, "Failure responding to request")
+ return
+ }
+ if result.cslr.hasNextLink() && result.cslr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client CloudServicesClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client CloudServicesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client CloudServicesClient) ListResponder(resp *http.Response) (result CloudServiceListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client CloudServicesClient) listNextResults(ctx context.Context, lastResults CloudServiceListResult) (result CloudServiceListResult, err error) {
+ req, err := lastResults.cloudServiceListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.CloudServicesClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.CloudServicesClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client CloudServicesClient) ListComplete(ctx context.Context, resourceGroupName string) (result CloudServiceListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx, resourceGroupName)
+ return
+}
+
+// ListAll gets a list of all cloud services in the subscription, regardless of the associated resource group. Use
+// nextLink property in the response to get the next page of Cloud Services. Do this till nextLink is null to fetch all
+// the Cloud Services.
+func (client CloudServicesClient) ListAll(ctx context.Context) (result CloudServiceListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesClient.ListAll")
+ defer func() {
+ sc := -1
+ if result.cslr.Response.Response != nil {
+ sc = result.cslr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listAllNextResults
+ req, err := client.ListAllPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "ListAll", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListAllSender(req)
+ if err != nil {
+ result.cslr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "ListAll", resp, "Failure sending request")
+ return
+ }
+
+ result.cslr, err = client.ListAllResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "ListAll", resp, "Failure responding to request")
+ return
+ }
+ if result.cslr.hasNextLink() && result.cslr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListAllPreparer prepares the ListAll request.
+func (client CloudServicesClient) ListAllPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/cloudServices", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListAllSender sends the ListAll request. The method will close the
+// http.Response Body if it receives an error.
+func (client CloudServicesClient) ListAllSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListAllResponder handles the response to the ListAll request. The method always
+// closes the http.Response Body.
+func (client CloudServicesClient) ListAllResponder(resp *http.Response) (result CloudServiceListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listAllNextResults retrieves the next set of results, if any.
+func (client CloudServicesClient) listAllNextResults(ctx context.Context, lastResults CloudServiceListResult) (result CloudServiceListResult, err error) {
+ req, err := lastResults.cloudServiceListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.CloudServicesClient", "listAllNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListAllSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.CloudServicesClient", "listAllNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListAllResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "listAllNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
+func (client CloudServicesClient) ListAllComplete(ctx context.Context) (result CloudServiceListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesClient.ListAll")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListAll(ctx)
+ return
+}
+
+// PowerOff power off the cloud service. Note that resources are still attached and you are getting charged for the
+// resources.
+// Parameters:
+// resourceGroupName - name of the resource group.
+// cloudServiceName - name of the cloud service.
+func (client CloudServicesClient) PowerOff(ctx context.Context, resourceGroupName string, cloudServiceName string) (result CloudServicesPowerOffFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesClient.PowerOff")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.PowerOffPreparer(ctx, resourceGroupName, cloudServiceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "PowerOff", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.PowerOffSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "PowerOff", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// PowerOffPreparer prepares the PowerOff request.
+func (client CloudServicesClient) PowerOffPreparer(ctx context.Context, resourceGroupName string, cloudServiceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "cloudServiceName": autorest.Encode("path", cloudServiceName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/poweroff", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// PowerOffSender sends the PowerOff request. The method will close the
+// http.Response Body if it receives an error.
+func (client CloudServicesClient) PowerOffSender(req *http.Request) (future CloudServicesPowerOffFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// PowerOffResponder handles the response to the PowerOff request. The method always
+// closes the http.Response Body.
+func (client CloudServicesClient) PowerOffResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Rebuild rebuild Role Instances reinstalls the operating system on instances of web roles or worker roles and
+// initializes the storage resources that are used by them. If you do not want to initialize storage resources, you can
+// use Reimage Role Instances.
+// Parameters:
+// resourceGroupName - name of the resource group.
+// cloudServiceName - name of the cloud service.
+// parameters - list of cloud service role instance names.
+func (client CloudServicesClient) Rebuild(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters *RoleInstances) (result CloudServicesRebuildFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesClient.Rebuild")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.RoleInstances", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("compute.CloudServicesClient", "Rebuild", err.Error())
+ }
+
+ req, err := client.RebuildPreparer(ctx, resourceGroupName, cloudServiceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "Rebuild", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.RebuildSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "Rebuild", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// RebuildPreparer prepares the Rebuild request.
+func (client CloudServicesClient) RebuildPreparer(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters *RoleInstances) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "cloudServiceName": autorest.Encode("path", cloudServiceName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/rebuild", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if parameters != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(parameters))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RebuildSender sends the Rebuild request. The method will close the
+// http.Response Body if it receives an error.
+func (client CloudServicesClient) RebuildSender(req *http.Request) (future CloudServicesRebuildFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// RebuildResponder handles the response to the Rebuild request. The method always
+// closes the http.Response Body.
+func (client CloudServicesClient) RebuildResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Reimage reimage asynchronous operation reinstalls the operating system on instances of web roles or worker roles.
+// Parameters:
+// resourceGroupName - name of the resource group.
+// cloudServiceName - name of the cloud service.
+// parameters - list of cloud service role instance names.
+func (client CloudServicesClient) Reimage(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters *RoleInstances) (result CloudServicesReimageFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesClient.Reimage")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.RoleInstances", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("compute.CloudServicesClient", "Reimage", err.Error())
+ }
+
+ req, err := client.ReimagePreparer(ctx, resourceGroupName, cloudServiceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "Reimage", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ReimageSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "Reimage", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ReimagePreparer prepares the Reimage request.
+func (client CloudServicesClient) ReimagePreparer(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters *RoleInstances) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "cloudServiceName": autorest.Encode("path", cloudServiceName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/reimage", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if parameters != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(parameters))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ReimageSender sends the Reimage request. The method will close the
+// http.Response Body if it receives an error.
+func (client CloudServicesClient) ReimageSender(req *http.Request) (future CloudServicesReimageFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// ReimageResponder handles the response to the Reimage request. The method always
+// closes the http.Response Body.
+func (client CloudServicesClient) ReimageResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Restart restarts one or more role instances in a cloud service.
+// Parameters:
+// resourceGroupName - name of the resource group.
+// cloudServiceName - name of the cloud service.
+// parameters - list of cloud service role instance names.
+func (client CloudServicesClient) Restart(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters *RoleInstances) (result CloudServicesRestartFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesClient.Restart")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.RoleInstances", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("compute.CloudServicesClient", "Restart", err.Error())
+ }
+
+ req, err := client.RestartPreparer(ctx, resourceGroupName, cloudServiceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "Restart", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.RestartSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "Restart", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// RestartPreparer prepares the Restart request.
+func (client CloudServicesClient) RestartPreparer(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters *RoleInstances) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "cloudServiceName": autorest.Encode("path", cloudServiceName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/restart", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if parameters != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(parameters))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RestartSender sends the Restart request. The method will close the
+// http.Response Body if it receives an error.
+func (client CloudServicesClient) RestartSender(req *http.Request) (future CloudServicesRestartFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// RestartResponder handles the response to the Restart request. The method always
+// closes the http.Response Body.
+func (client CloudServicesClient) RestartResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Start starts the cloud service.
+// Parameters:
+// resourceGroupName - name of the resource group.
+// cloudServiceName - name of the cloud service.
+func (client CloudServicesClient) Start(ctx context.Context, resourceGroupName string, cloudServiceName string) (result CloudServicesStartFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesClient.Start")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.StartPreparer(ctx, resourceGroupName, cloudServiceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "Start", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.StartSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "Start", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// StartPreparer prepares the Start request.
+func (client CloudServicesClient) StartPreparer(ctx context.Context, resourceGroupName string, cloudServiceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "cloudServiceName": autorest.Encode("path", cloudServiceName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/start", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// StartSender sends the Start request. The method will close the
+// http.Response Body if it receives an error.
+func (client CloudServicesClient) StartSender(req *http.Request) (future CloudServicesStartFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// StartResponder handles the response to the Start request. The method always
+// closes the http.Response Body.
+func (client CloudServicesClient) StartResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Update update a cloud service.
+// Parameters:
+// resourceGroupName - name of the resource group.
+// cloudServiceName - name of the cloud service.
+// parameters - the cloud service object.
+func (client CloudServicesClient) Update(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters *CloudServiceUpdate) (result CloudServicesUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesClient.Update")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, cloudServiceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client CloudServicesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, cloudServiceName string, parameters *CloudServiceUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "cloudServiceName": autorest.Encode("path", cloudServiceName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if parameters != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(parameters))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client CloudServicesClient) UpdateSender(req *http.Request) (future CloudServicesUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client CloudServicesClient) UpdateResponder(resp *http.Response) (result CloudService, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/cloudservicesupdatedomain.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/cloudservicesupdatedomain.go
new file mode 100644
index 000000000000..eabe4deefce2
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/cloudservicesupdatedomain.go
@@ -0,0 +1,319 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// CloudServicesUpdateDomainClient is the compute Client
+type CloudServicesUpdateDomainClient struct {
+ BaseClient
+}
+
+// NewCloudServicesUpdateDomainClient creates an instance of the CloudServicesUpdateDomainClient client.
+func NewCloudServicesUpdateDomainClient(subscriptionID string) CloudServicesUpdateDomainClient {
+ return NewCloudServicesUpdateDomainClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewCloudServicesUpdateDomainClientWithBaseURI creates an instance of the CloudServicesUpdateDomainClient client
+// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign
+// clouds, Azure stack).
+func NewCloudServicesUpdateDomainClientWithBaseURI(baseURI string, subscriptionID string) CloudServicesUpdateDomainClient {
+ return CloudServicesUpdateDomainClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// GetUpdateDomain gets the specified update domain of a cloud service. Use nextLink property in the response to get
+// the next page of update domains. Do this till nextLink is null to fetch all the update domains.
+// Parameters:
+// resourceGroupName - name of the resource group.
+// cloudServiceName - name of the cloud service.
+// updateDomain - specifies an integer value that identifies the update domain. Update domains are identified
+// with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on.
+func (client CloudServicesUpdateDomainClient) GetUpdateDomain(ctx context.Context, resourceGroupName string, cloudServiceName string, updateDomain int32) (result UpdateDomain, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesUpdateDomainClient.GetUpdateDomain")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetUpdateDomainPreparer(ctx, resourceGroupName, cloudServiceName, updateDomain)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesUpdateDomainClient", "GetUpdateDomain", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetUpdateDomainSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesUpdateDomainClient", "GetUpdateDomain", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetUpdateDomainResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesUpdateDomainClient", "GetUpdateDomain", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetUpdateDomainPreparer prepares the GetUpdateDomain request.
+func (client CloudServicesUpdateDomainClient) GetUpdateDomainPreparer(ctx context.Context, resourceGroupName string, cloudServiceName string, updateDomain int32) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "cloudServiceName": autorest.Encode("path", cloudServiceName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "updateDomain": autorest.Encode("path", updateDomain),
+ }
+
+ const APIVersion = "2021-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/updateDomains/{updateDomain}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetUpdateDomainSender sends the GetUpdateDomain request. The method will close the
+// http.Response Body if it receives an error.
+func (client CloudServicesUpdateDomainClient) GetUpdateDomainSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetUpdateDomainResponder handles the response to the GetUpdateDomain request. The method always
+// closes the http.Response Body.
+func (client CloudServicesUpdateDomainClient) GetUpdateDomainResponder(resp *http.Response) (result UpdateDomain, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListUpdateDomains gets a list of all update domains in a cloud service.
+// Parameters:
+// resourceGroupName - name of the resource group.
+// cloudServiceName - name of the cloud service.
+func (client CloudServicesUpdateDomainClient) ListUpdateDomains(ctx context.Context, resourceGroupName string, cloudServiceName string) (result UpdateDomainListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesUpdateDomainClient.ListUpdateDomains")
+ defer func() {
+ sc := -1
+ if result.udlr.Response.Response != nil {
+ sc = result.udlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listUpdateDomainsNextResults
+ req, err := client.ListUpdateDomainsPreparer(ctx, resourceGroupName, cloudServiceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesUpdateDomainClient", "ListUpdateDomains", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListUpdateDomainsSender(req)
+ if err != nil {
+ result.udlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesUpdateDomainClient", "ListUpdateDomains", resp, "Failure sending request")
+ return
+ }
+
+ result.udlr, err = client.ListUpdateDomainsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesUpdateDomainClient", "ListUpdateDomains", resp, "Failure responding to request")
+ return
+ }
+ if result.udlr.hasNextLink() && result.udlr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListUpdateDomainsPreparer prepares the ListUpdateDomains request.
+func (client CloudServicesUpdateDomainClient) ListUpdateDomainsPreparer(ctx context.Context, resourceGroupName string, cloudServiceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "cloudServiceName": autorest.Encode("path", cloudServiceName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/updateDomains", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListUpdateDomainsSender sends the ListUpdateDomains request. The method will close the
+// http.Response Body if it receives an error.
+func (client CloudServicesUpdateDomainClient) ListUpdateDomainsSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListUpdateDomainsResponder handles the response to the ListUpdateDomains request. The method always
+// closes the http.Response Body.
+func (client CloudServicesUpdateDomainClient) ListUpdateDomainsResponder(resp *http.Response) (result UpdateDomainListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listUpdateDomainsNextResults retrieves the next set of results, if any.
+func (client CloudServicesUpdateDomainClient) listUpdateDomainsNextResults(ctx context.Context, lastResults UpdateDomainListResult) (result UpdateDomainListResult, err error) {
+ req, err := lastResults.updateDomainListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.CloudServicesUpdateDomainClient", "listUpdateDomainsNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListUpdateDomainsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.CloudServicesUpdateDomainClient", "listUpdateDomainsNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListUpdateDomainsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesUpdateDomainClient", "listUpdateDomainsNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListUpdateDomainsComplete enumerates all values, automatically crossing page boundaries as required.
+func (client CloudServicesUpdateDomainClient) ListUpdateDomainsComplete(ctx context.Context, resourceGroupName string, cloudServiceName string) (result UpdateDomainListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesUpdateDomainClient.ListUpdateDomains")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListUpdateDomains(ctx, resourceGroupName, cloudServiceName)
+ return
+}
+
+// WalkUpdateDomain updates the role instances in the specified update domain.
+// Parameters:
+// resourceGroupName - name of the resource group.
+// cloudServiceName - name of the cloud service.
+// updateDomain - specifies an integer value that identifies the update domain. Update domains are identified
+// with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on.
+// parameters - the update domain object.
+func (client CloudServicesUpdateDomainClient) WalkUpdateDomain(ctx context.Context, resourceGroupName string, cloudServiceName string, updateDomain int32, parameters *UpdateDomain) (result CloudServicesUpdateDomainWalkUpdateDomainFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServicesUpdateDomainClient.WalkUpdateDomain")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.WalkUpdateDomainPreparer(ctx, resourceGroupName, cloudServiceName, updateDomain, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesUpdateDomainClient", "WalkUpdateDomain", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.WalkUpdateDomainSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesUpdateDomainClient", "WalkUpdateDomain", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// WalkUpdateDomainPreparer prepares the WalkUpdateDomain request.
+func (client CloudServicesUpdateDomainClient) WalkUpdateDomainPreparer(ctx context.Context, resourceGroupName string, cloudServiceName string, updateDomain int32, parameters *UpdateDomain) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "cloudServiceName": autorest.Encode("path", cloudServiceName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "updateDomain": autorest.Encode("path", updateDomain),
+ }
+
+ const APIVersion = "2021-03-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ parameters.ID = nil
+ parameters.Name = nil
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/updateDomains/{updateDomain}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if parameters != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(parameters))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// WalkUpdateDomainSender sends the WalkUpdateDomain request. The method will close the
+// http.Response Body if it receives an error.
+func (client CloudServicesUpdateDomainClient) WalkUpdateDomainSender(req *http.Request) (future CloudServicesUpdateDomainWalkUpdateDomainFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// WalkUpdateDomainResponder handles the response to the WalkUpdateDomain request. The method always
+// closes the http.Response Body.
+func (client CloudServicesUpdateDomainClient) WalkUpdateDomainResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/communitygalleries.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/communitygalleries.go
new file mode 100644
index 000000000000..99596387171d
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/communitygalleries.go
@@ -0,0 +1,108 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// CommunityGalleriesClient is the compute Client
+type CommunityGalleriesClient struct {
+ BaseClient
+}
+
+// NewCommunityGalleriesClient creates an instance of the CommunityGalleriesClient client.
+func NewCommunityGalleriesClient(subscriptionID string) CommunityGalleriesClient {
+ return NewCommunityGalleriesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewCommunityGalleriesClientWithBaseURI creates an instance of the CommunityGalleriesClient client using a custom
+// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
+// stack).
+func NewCommunityGalleriesClientWithBaseURI(baseURI string, subscriptionID string) CommunityGalleriesClient {
+ return CommunityGalleriesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Get get a community gallery by gallery public name.
+// Parameters:
+// location - resource location.
+// publicGalleryName - the public name of the community gallery.
+func (client CommunityGalleriesClient) Get(ctx context.Context, location string, publicGalleryName string) (result CommunityGallery, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CommunityGalleriesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, location, publicGalleryName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CommunityGalleriesClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.CommunityGalleriesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CommunityGalleriesClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client CommunityGalleriesClient) GetPreparer(ctx context.Context, location string, publicGalleryName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "publicGalleryName": autorest.Encode("path", publicGalleryName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/communityGalleries/{publicGalleryName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client CommunityGalleriesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client CommunityGalleriesClient) GetResponder(resp *http.Response) (result CommunityGallery, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/communitygalleryimages.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/communitygalleryimages.go
new file mode 100644
index 000000000000..ef82a37bc941
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/communitygalleryimages.go
@@ -0,0 +1,110 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// CommunityGalleryImagesClient is the compute Client
+type CommunityGalleryImagesClient struct {
+ BaseClient
+}
+
+// NewCommunityGalleryImagesClient creates an instance of the CommunityGalleryImagesClient client.
+func NewCommunityGalleryImagesClient(subscriptionID string) CommunityGalleryImagesClient {
+ return NewCommunityGalleryImagesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewCommunityGalleryImagesClientWithBaseURI creates an instance of the CommunityGalleryImagesClient client using a
+// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds,
+// Azure stack).
+func NewCommunityGalleryImagesClientWithBaseURI(baseURI string, subscriptionID string) CommunityGalleryImagesClient {
+ return CommunityGalleryImagesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Get get a community gallery image.
+// Parameters:
+// location - resource location.
+// publicGalleryName - the public name of the community gallery.
+// galleryImageName - the name of the community gallery image definition.
+func (client CommunityGalleryImagesClient) Get(ctx context.Context, location string, publicGalleryName string, galleryImageName string) (result CommunityGalleryImage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CommunityGalleryImagesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, location, publicGalleryName, galleryImageName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CommunityGalleryImagesClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.CommunityGalleryImagesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CommunityGalleryImagesClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client CommunityGalleryImagesClient) GetPreparer(ctx context.Context, location string, publicGalleryName string, galleryImageName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryImageName": autorest.Encode("path", galleryImageName),
+ "location": autorest.Encode("path", location),
+ "publicGalleryName": autorest.Encode("path", publicGalleryName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/communityGalleries/{publicGalleryName}/images/{galleryImageName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client CommunityGalleryImagesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client CommunityGalleryImagesClient) GetResponder(resp *http.Response) (result CommunityGalleryImage, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/communitygalleryimageversions.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/communitygalleryimageversions.go
new file mode 100644
index 000000000000..03d67523dff7
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/communitygalleryimageversions.go
@@ -0,0 +1,114 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// CommunityGalleryImageVersionsClient is the compute Client
+type CommunityGalleryImageVersionsClient struct {
+ BaseClient
+}
+
+// NewCommunityGalleryImageVersionsClient creates an instance of the CommunityGalleryImageVersionsClient client.
+func NewCommunityGalleryImageVersionsClient(subscriptionID string) CommunityGalleryImageVersionsClient {
+ return NewCommunityGalleryImageVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewCommunityGalleryImageVersionsClientWithBaseURI creates an instance of the CommunityGalleryImageVersionsClient
+// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI
+// (sovereign clouds, Azure stack).
+func NewCommunityGalleryImageVersionsClientWithBaseURI(baseURI string, subscriptionID string) CommunityGalleryImageVersionsClient {
+ return CommunityGalleryImageVersionsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Get get a community gallery image version.
+// Parameters:
+// location - resource location.
+// publicGalleryName - the public name of the community gallery.
+// galleryImageName - the name of the community gallery image definition.
+// galleryImageVersionName - the name of the community gallery image version. Needs to follow semantic version
+// name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit
+// integer. Format: ..
+func (client CommunityGalleryImageVersionsClient) Get(ctx context.Context, location string, publicGalleryName string, galleryImageName string, galleryImageVersionName string) (result CommunityGalleryImageVersion, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CommunityGalleryImageVersionsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, location, publicGalleryName, galleryImageName, galleryImageVersionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CommunityGalleryImageVersionsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.CommunityGalleryImageVersionsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CommunityGalleryImageVersionsClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client CommunityGalleryImageVersionsClient) GetPreparer(ctx context.Context, location string, publicGalleryName string, galleryImageName string, galleryImageVersionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryImageName": autorest.Encode("path", galleryImageName),
+ "galleryImageVersionName": autorest.Encode("path", galleryImageVersionName),
+ "location": autorest.Encode("path", location),
+ "publicGalleryName": autorest.Encode("path", publicGalleryName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/communityGalleries/{publicGalleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client CommunityGalleryImageVersionsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client CommunityGalleryImageVersionsClient) GetResponder(resp *http.Response) (result CommunityGalleryImageVersion, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/dedicatedhostgroups.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/dedicatedhostgroups.go
new file mode 100644
index 000000000000..67ace3df4d8e
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/dedicatedhostgroups.go
@@ -0,0 +1,589 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// DedicatedHostGroupsClient is the compute Client
+type DedicatedHostGroupsClient struct {
+ BaseClient
+}
+
+// NewDedicatedHostGroupsClient creates an instance of the DedicatedHostGroupsClient client.
+func NewDedicatedHostGroupsClient(subscriptionID string) DedicatedHostGroupsClient {
+ return NewDedicatedHostGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewDedicatedHostGroupsClientWithBaseURI creates an instance of the DedicatedHostGroupsClient client using a custom
+// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
+// stack).
+func NewDedicatedHostGroupsClientWithBaseURI(baseURI string, subscriptionID string) DedicatedHostGroupsClient {
+ return DedicatedHostGroupsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate create or update a dedicated host group. For details of Dedicated Host and Dedicated Host Groups
+// please see [Dedicated Host Documentation] (https://go.microsoft.com/fwlink/?linkid=2082596)
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// hostGroupName - the name of the dedicated host group.
+// parameters - parameters supplied to the Create Dedicated Host Group.
+func (client DedicatedHostGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, hostGroupName string, parameters DedicatedHostGroup) (result DedicatedHostGroup, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.DedicatedHostGroupProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.DedicatedHostGroupProperties.PlatformFaultDomainCount", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil}}},
+ }}}}}); err != nil {
+ return result, validation.NewError("compute.DedicatedHostGroupsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, hostGroupName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client DedicatedHostGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, hostGroupName string, parameters DedicatedHostGroup) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "hostGroupName": autorest.Encode("path", hostGroupName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client DedicatedHostGroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client DedicatedHostGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result DedicatedHostGroup, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete delete a dedicated host group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// hostGroupName - the name of the dedicated host group.
+func (client DedicatedHostGroupsClient) Delete(ctx context.Context, resourceGroupName string, hostGroupName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, hostGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Delete", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client DedicatedHostGroupsClient) DeletePreparer(ctx context.Context, resourceGroupName string, hostGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "hostGroupName": autorest.Encode("path", hostGroupName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client DedicatedHostGroupsClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client DedicatedHostGroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get retrieves information about a dedicated host group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// hostGroupName - the name of the dedicated host group.
+// expand - the expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance
+// views of the dedicated hosts under the dedicated host group. 'UserData' is not supported for dedicated host
+// group.
+func (client DedicatedHostGroupsClient) Get(ctx context.Context, resourceGroupName string, hostGroupName string, expand InstanceViewTypes) (result DedicatedHostGroup, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, hostGroupName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client DedicatedHostGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, hostGroupName string, expand InstanceViewTypes) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "hostGroupName": autorest.Encode("path", hostGroupName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(string(expand)) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client DedicatedHostGroupsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client DedicatedHostGroupsClient) GetResponder(resp *http.Response) (result DedicatedHostGroup, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByResourceGroup lists all of the dedicated host groups in the specified resource group. Use the nextLink
+// property in the response to get the next page of dedicated host groups.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client DedicatedHostGroupsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result DedicatedHostGroupListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.dhglr.Response.Response != nil {
+ sc = result.dhglr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.dhglr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.dhglr, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "ListByResourceGroup", resp, "Failure responding to request")
+ return
+ }
+ if result.dhglr.hasNextLink() && result.dhglr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client DedicatedHostGroupsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client DedicatedHostGroupsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client DedicatedHostGroupsClient) ListByResourceGroupResponder(resp *http.Response) (result DedicatedHostGroupListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByResourceGroupNextResults retrieves the next set of results, if any.
+func (client DedicatedHostGroupsClient) listByResourceGroupNextResults(ctx context.Context, lastResults DedicatedHostGroupListResult) (result DedicatedHostGroupListResult, err error) {
+ req, err := lastResults.dedicatedHostGroupListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DedicatedHostGroupsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result DedicatedHostGroupListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByResourceGroup(ctx, resourceGroupName)
+ return
+}
+
+// ListBySubscription lists all of the dedicated host groups in the subscription. Use the nextLink property in the
+// response to get the next page of dedicated host groups.
+func (client DedicatedHostGroupsClient) ListBySubscription(ctx context.Context) (result DedicatedHostGroupListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupsClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.dhglr.Response.Response != nil {
+ sc = result.dhglr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listBySubscriptionNextResults
+ req, err := client.ListBySubscriptionPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "ListBySubscription", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListBySubscriptionSender(req)
+ if err != nil {
+ result.dhglr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "ListBySubscription", resp, "Failure sending request")
+ return
+ }
+
+ result.dhglr, err = client.ListBySubscriptionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "ListBySubscription", resp, "Failure responding to request")
+ return
+ }
+ if result.dhglr.hasNextLink() && result.dhglr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListBySubscriptionPreparer prepares the ListBySubscription request.
+func (client DedicatedHostGroupsClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/hostGroups", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListBySubscriptionSender sends the ListBySubscription request. The method will close the
+// http.Response Body if it receives an error.
+func (client DedicatedHostGroupsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always
+// closes the http.Response Body.
+func (client DedicatedHostGroupsClient) ListBySubscriptionResponder(resp *http.Response) (result DedicatedHostGroupListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listBySubscriptionNextResults retrieves the next set of results, if any.
+func (client DedicatedHostGroupsClient) listBySubscriptionNextResults(ctx context.Context, lastResults DedicatedHostGroupListResult) (result DedicatedHostGroupListResult, err error) {
+ req, err := lastResults.dedicatedHostGroupListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListBySubscriptionSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "listBySubscriptionNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListBySubscriptionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DedicatedHostGroupsClient) ListBySubscriptionComplete(ctx context.Context) (result DedicatedHostGroupListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupsClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListBySubscription(ctx)
+ return
+}
+
+// Update update an dedicated host group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// hostGroupName - the name of the dedicated host group.
+// parameters - parameters supplied to the Update Dedicated Host Group operation.
+func (client DedicatedHostGroupsClient) Update(ctx context.Context, resourceGroupName string, hostGroupName string, parameters DedicatedHostGroupUpdate) (result DedicatedHostGroup, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, hostGroupName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostGroupsClient", "Update", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client DedicatedHostGroupsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, hostGroupName string, parameters DedicatedHostGroupUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "hostGroupName": autorest.Encode("path", hostGroupName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client DedicatedHostGroupsClient) UpdateSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client DedicatedHostGroupsClient) UpdateResponder(resp *http.Response) (result DedicatedHostGroup, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/dedicatedhosts.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/dedicatedhosts.go
new file mode 100644
index 000000000000..a58e6b2b84bb
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/dedicatedhosts.go
@@ -0,0 +1,492 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// DedicatedHostsClient is the compute Client
+type DedicatedHostsClient struct {
+ BaseClient
+}
+
+// NewDedicatedHostsClient creates an instance of the DedicatedHostsClient client.
+func NewDedicatedHostsClient(subscriptionID string) DedicatedHostsClient {
+ return NewDedicatedHostsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewDedicatedHostsClientWithBaseURI creates an instance of the DedicatedHostsClient client using a custom endpoint.
+// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewDedicatedHostsClientWithBaseURI(baseURI string, subscriptionID string) DedicatedHostsClient {
+ return DedicatedHostsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate create or update a dedicated host .
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// hostGroupName - the name of the dedicated host group.
+// hostName - the name of the dedicated host .
+// parameters - parameters supplied to the Create Dedicated Host.
+func (client DedicatedHostsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, parameters DedicatedHost) (result DedicatedHostsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.DedicatedHostProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.DedicatedHostProperties.PlatformFaultDomain", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil}}},
+ }},
+ {Target: "parameters.Sku", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("compute.DedicatedHostsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, hostGroupName, hostName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client DedicatedHostsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, parameters DedicatedHost) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "hostGroupName": autorest.Encode("path", hostGroupName),
+ "hostName": autorest.Encode("path", hostName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client DedicatedHostsClient) CreateOrUpdateSender(req *http.Request) (future DedicatedHostsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client DedicatedHostsClient) CreateOrUpdateResponder(resp *http.Response) (result DedicatedHost, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete delete a dedicated host.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// hostGroupName - the name of the dedicated host group.
+// hostName - the name of the dedicated host.
+func (client DedicatedHostsClient) Delete(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string) (result DedicatedHostsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, hostGroupName, hostName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client DedicatedHostsClient) DeletePreparer(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "hostGroupName": autorest.Encode("path", hostGroupName),
+ "hostName": autorest.Encode("path", hostName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client DedicatedHostsClient) DeleteSender(req *http.Request) (future DedicatedHostsDeleteFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client DedicatedHostsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get retrieves information about a dedicated host.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// hostGroupName - the name of the dedicated host group.
+// hostName - the name of the dedicated host.
+// expand - the expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance
+// views of the dedicated host. 'UserData' is not supported for dedicated host.
+func (client DedicatedHostsClient) Get(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, expand InstanceViewTypes) (result DedicatedHost, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, hostGroupName, hostName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client DedicatedHostsClient) GetPreparer(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, expand InstanceViewTypes) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "hostGroupName": autorest.Encode("path", hostGroupName),
+ "hostName": autorest.Encode("path", hostName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(string(expand)) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client DedicatedHostsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client DedicatedHostsClient) GetResponder(resp *http.Response) (result DedicatedHost, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByHostGroup lists all of the dedicated hosts in the specified dedicated host group. Use the nextLink property in
+// the response to get the next page of dedicated hosts.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// hostGroupName - the name of the dedicated host group.
+func (client DedicatedHostsClient) ListByHostGroup(ctx context.Context, resourceGroupName string, hostGroupName string) (result DedicatedHostListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostsClient.ListByHostGroup")
+ defer func() {
+ sc := -1
+ if result.dhlr.Response.Response != nil {
+ sc = result.dhlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByHostGroupNextResults
+ req, err := client.ListByHostGroupPreparer(ctx, resourceGroupName, hostGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "ListByHostGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByHostGroupSender(req)
+ if err != nil {
+ result.dhlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "ListByHostGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.dhlr, err = client.ListByHostGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "ListByHostGroup", resp, "Failure responding to request")
+ return
+ }
+ if result.dhlr.hasNextLink() && result.dhlr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListByHostGroupPreparer prepares the ListByHostGroup request.
+func (client DedicatedHostsClient) ListByHostGroupPreparer(ctx context.Context, resourceGroupName string, hostGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "hostGroupName": autorest.Encode("path", hostGroupName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByHostGroupSender sends the ListByHostGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client DedicatedHostsClient) ListByHostGroupSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByHostGroupResponder handles the response to the ListByHostGroup request. The method always
+// closes the http.Response Body.
+func (client DedicatedHostsClient) ListByHostGroupResponder(resp *http.Response) (result DedicatedHostListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByHostGroupNextResults retrieves the next set of results, if any.
+func (client DedicatedHostsClient) listByHostGroupNextResults(ctx context.Context, lastResults DedicatedHostListResult) (result DedicatedHostListResult, err error) {
+ req, err := lastResults.dedicatedHostListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "listByHostGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByHostGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "listByHostGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByHostGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "listByHostGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByHostGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DedicatedHostsClient) ListByHostGroupComplete(ctx context.Context, resourceGroupName string, hostGroupName string) (result DedicatedHostListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostsClient.ListByHostGroup")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByHostGroup(ctx, resourceGroupName, hostGroupName)
+ return
+}
+
+// Update update an dedicated host .
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// hostGroupName - the name of the dedicated host group.
+// hostName - the name of the dedicated host .
+// parameters - parameters supplied to the Update Dedicated Host operation.
+func (client DedicatedHostsClient) Update(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, parameters DedicatedHostUpdate) (result DedicatedHostsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostsClient.Update")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, hostGroupName, hostName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client DedicatedHostsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, hostGroupName string, hostName string, parameters DedicatedHostUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "hostGroupName": autorest.Encode("path", hostGroupName),
+ "hostName": autorest.Encode("path", hostName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}/hosts/{hostName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client DedicatedHostsClient) UpdateSender(req *http.Request) (future DedicatedHostsUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client DedicatedHostsClient) UpdateResponder(resp *http.Response) (result DedicatedHost, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/diskaccesses.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/diskaccesses.go
new file mode 100644
index 000000000000..618db0d550a5
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/diskaccesses.go
@@ -0,0 +1,1045 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// DiskAccessesClient is the compute Client
+type DiskAccessesClient struct {
+ BaseClient
+}
+
+// NewDiskAccessesClient creates an instance of the DiskAccessesClient client.
+func NewDiskAccessesClient(subscriptionID string) DiskAccessesClient {
+ return NewDiskAccessesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewDiskAccessesClientWithBaseURI creates an instance of the DiskAccessesClient client using a custom endpoint. Use
+// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewDiskAccessesClientWithBaseURI(baseURI string, subscriptionID string) DiskAccessesClient {
+ return DiskAccessesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates a disk access resource
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// diskAccessName - the name of the disk access resource that is being created. The name can't be changed after
+// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The
+// maximum name length is 80 characters.
+// diskAccess - disk access object supplied in the body of the Put disk access operation.
+func (client DiskAccessesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, diskAccessName string, diskAccess DiskAccess) (result DiskAccessesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, diskAccessName, diskAccess)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client DiskAccessesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, diskAccessName string, diskAccess DiskAccess) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskAccessName": autorest.Encode("path", diskAccessName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}", pathParameters),
+ autorest.WithJSON(diskAccess),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client DiskAccessesClient) CreateOrUpdateSender(req *http.Request) (future DiskAccessesCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client DiskAccessesClient) CreateOrUpdateResponder(resp *http.Response) (result DiskAccess, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete deletes a disk access resource.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// diskAccessName - the name of the disk access resource that is being created. The name can't be changed after
+// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The
+// maximum name length is 80 characters.
+func (client DiskAccessesClient) Delete(ctx context.Context, resourceGroupName string, diskAccessName string) (result DiskAccessesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, diskAccessName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client DiskAccessesClient) DeletePreparer(ctx context.Context, resourceGroupName string, diskAccessName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskAccessName": autorest.Encode("path", diskAccessName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client DiskAccessesClient) DeleteSender(req *http.Request) (future DiskAccessesDeleteFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client DiskAccessesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// DeleteAPrivateEndpointConnection deletes a private endpoint connection under a disk access resource.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// diskAccessName - the name of the disk access resource that is being created. The name can't be changed after
+// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The
+// maximum name length is 80 characters.
+// privateEndpointConnectionName - the name of the private endpoint connection.
+func (client DiskAccessesClient) DeleteAPrivateEndpointConnection(ctx context.Context, resourceGroupName string, diskAccessName string, privateEndpointConnectionName string) (result DiskAccessesDeleteAPrivateEndpointConnectionFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.DeleteAPrivateEndpointConnection")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeleteAPrivateEndpointConnectionPreparer(ctx, resourceGroupName, diskAccessName, privateEndpointConnectionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "DeleteAPrivateEndpointConnection", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteAPrivateEndpointConnectionSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "DeleteAPrivateEndpointConnection", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeleteAPrivateEndpointConnectionPreparer prepares the DeleteAPrivateEndpointConnection request.
+func (client DiskAccessesClient) DeleteAPrivateEndpointConnectionPreparer(ctx context.Context, resourceGroupName string, diskAccessName string, privateEndpointConnectionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskAccessName": autorest.Encode("path", diskAccessName),
+ "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteAPrivateEndpointConnectionSender sends the DeleteAPrivateEndpointConnection request. The method will close the
+// http.Response Body if it receives an error.
+func (client DiskAccessesClient) DeleteAPrivateEndpointConnectionSender(req *http.Request) (future DiskAccessesDeleteAPrivateEndpointConnectionFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// DeleteAPrivateEndpointConnectionResponder handles the response to the DeleteAPrivateEndpointConnection request. The method always
+// closes the http.Response Body.
+func (client DiskAccessesClient) DeleteAPrivateEndpointConnectionResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get gets information about a disk access resource.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// diskAccessName - the name of the disk access resource that is being created. The name can't be changed after
+// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The
+// maximum name length is 80 characters.
+func (client DiskAccessesClient) Get(ctx context.Context, resourceGroupName string, diskAccessName string) (result DiskAccess, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, diskAccessName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client DiskAccessesClient) GetPreparer(ctx context.Context, resourceGroupName string, diskAccessName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskAccessName": autorest.Encode("path", diskAccessName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client DiskAccessesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client DiskAccessesClient) GetResponder(resp *http.Response) (result DiskAccess, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetAPrivateEndpointConnection gets information about a private endpoint connection under a disk access resource.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// diskAccessName - the name of the disk access resource that is being created. The name can't be changed after
+// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The
+// maximum name length is 80 characters.
+// privateEndpointConnectionName - the name of the private endpoint connection.
+func (client DiskAccessesClient) GetAPrivateEndpointConnection(ctx context.Context, resourceGroupName string, diskAccessName string, privateEndpointConnectionName string) (result PrivateEndpointConnection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.GetAPrivateEndpointConnection")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetAPrivateEndpointConnectionPreparer(ctx, resourceGroupName, diskAccessName, privateEndpointConnectionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "GetAPrivateEndpointConnection", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetAPrivateEndpointConnectionSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "GetAPrivateEndpointConnection", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetAPrivateEndpointConnectionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "GetAPrivateEndpointConnection", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetAPrivateEndpointConnectionPreparer prepares the GetAPrivateEndpointConnection request.
+func (client DiskAccessesClient) GetAPrivateEndpointConnectionPreparer(ctx context.Context, resourceGroupName string, diskAccessName string, privateEndpointConnectionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskAccessName": autorest.Encode("path", diskAccessName),
+ "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetAPrivateEndpointConnectionSender sends the GetAPrivateEndpointConnection request. The method will close the
+// http.Response Body if it receives an error.
+func (client DiskAccessesClient) GetAPrivateEndpointConnectionSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetAPrivateEndpointConnectionResponder handles the response to the GetAPrivateEndpointConnection request. The method always
+// closes the http.Response Body.
+func (client DiskAccessesClient) GetAPrivateEndpointConnectionResponder(resp *http.Response) (result PrivateEndpointConnection, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetPrivateLinkResources gets the private link resources possible under disk access resource
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// diskAccessName - the name of the disk access resource that is being created. The name can't be changed after
+// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The
+// maximum name length is 80 characters.
+func (client DiskAccessesClient) GetPrivateLinkResources(ctx context.Context, resourceGroupName string, diskAccessName string) (result PrivateLinkResourceListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.GetPrivateLinkResources")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPrivateLinkResourcesPreparer(ctx, resourceGroupName, diskAccessName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "GetPrivateLinkResources", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetPrivateLinkResourcesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "GetPrivateLinkResources", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetPrivateLinkResourcesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "GetPrivateLinkResources", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPrivateLinkResourcesPreparer prepares the GetPrivateLinkResources request.
+func (client DiskAccessesClient) GetPrivateLinkResourcesPreparer(ctx context.Context, resourceGroupName string, diskAccessName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskAccessName": autorest.Encode("path", diskAccessName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateLinkResources", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetPrivateLinkResourcesSender sends the GetPrivateLinkResources request. The method will close the
+// http.Response Body if it receives an error.
+func (client DiskAccessesClient) GetPrivateLinkResourcesSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetPrivateLinkResourcesResponder handles the response to the GetPrivateLinkResources request. The method always
+// closes the http.Response Body.
+func (client DiskAccessesClient) GetPrivateLinkResourcesResponder(resp *http.Response) (result PrivateLinkResourceListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List lists all the disk access resources under a subscription.
+func (client DiskAccessesClient) List(ctx context.Context) (result DiskAccessListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.List")
+ defer func() {
+ sc := -1
+ if result.dal.Response.Response != nil {
+ sc = result.dal.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.dal.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.dal, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "List", resp, "Failure responding to request")
+ return
+ }
+ if result.dal.hasNextLink() && result.dal.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client DiskAccessesClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/diskAccesses", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client DiskAccessesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client DiskAccessesClient) ListResponder(resp *http.Response) (result DiskAccessList, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client DiskAccessesClient) listNextResults(ctx context.Context, lastResults DiskAccessList) (result DiskAccessList, err error) {
+ req, err := lastResults.diskAccessListPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DiskAccessesClient) ListComplete(ctx context.Context) (result DiskAccessListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx)
+ return
+}
+
+// ListByResourceGroup lists all the disk access resources under a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client DiskAccessesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result DiskAccessListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.dal.Response.Response != nil {
+ sc = result.dal.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.dal.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.dal, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "ListByResourceGroup", resp, "Failure responding to request")
+ return
+ }
+ if result.dal.hasNextLink() && result.dal.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client DiskAccessesClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client DiskAccessesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client DiskAccessesClient) ListByResourceGroupResponder(resp *http.Response) (result DiskAccessList, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByResourceGroupNextResults retrieves the next set of results, if any.
+func (client DiskAccessesClient) listByResourceGroupNextResults(ctx context.Context, lastResults DiskAccessList) (result DiskAccessList, err error) {
+ req, err := lastResults.diskAccessListPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DiskAccessesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result DiskAccessListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByResourceGroup(ctx, resourceGroupName)
+ return
+}
+
+// ListPrivateEndpointConnections list information about private endpoint connections under a disk access resource
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// diskAccessName - the name of the disk access resource that is being created. The name can't be changed after
+// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The
+// maximum name length is 80 characters.
+func (client DiskAccessesClient) ListPrivateEndpointConnections(ctx context.Context, resourceGroupName string, diskAccessName string) (result PrivateEndpointConnectionListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.ListPrivateEndpointConnections")
+ defer func() {
+ sc := -1
+ if result.peclr.Response.Response != nil {
+ sc = result.peclr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listPrivateEndpointConnectionsNextResults
+ req, err := client.ListPrivateEndpointConnectionsPreparer(ctx, resourceGroupName, diskAccessName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "ListPrivateEndpointConnections", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListPrivateEndpointConnectionsSender(req)
+ if err != nil {
+ result.peclr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "ListPrivateEndpointConnections", resp, "Failure sending request")
+ return
+ }
+
+ result.peclr, err = client.ListPrivateEndpointConnectionsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "ListPrivateEndpointConnections", resp, "Failure responding to request")
+ return
+ }
+ if result.peclr.hasNextLink() && result.peclr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListPrivateEndpointConnectionsPreparer prepares the ListPrivateEndpointConnections request.
+func (client DiskAccessesClient) ListPrivateEndpointConnectionsPreparer(ctx context.Context, resourceGroupName string, diskAccessName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskAccessName": autorest.Encode("path", diskAccessName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListPrivateEndpointConnectionsSender sends the ListPrivateEndpointConnections request. The method will close the
+// http.Response Body if it receives an error.
+func (client DiskAccessesClient) ListPrivateEndpointConnectionsSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListPrivateEndpointConnectionsResponder handles the response to the ListPrivateEndpointConnections request. The method always
+// closes the http.Response Body.
+func (client DiskAccessesClient) ListPrivateEndpointConnectionsResponder(resp *http.Response) (result PrivateEndpointConnectionListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listPrivateEndpointConnectionsNextResults retrieves the next set of results, if any.
+func (client DiskAccessesClient) listPrivateEndpointConnectionsNextResults(ctx context.Context, lastResults PrivateEndpointConnectionListResult) (result PrivateEndpointConnectionListResult, err error) {
+ req, err := lastResults.privateEndpointConnectionListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "listPrivateEndpointConnectionsNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListPrivateEndpointConnectionsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "listPrivateEndpointConnectionsNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListPrivateEndpointConnectionsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "listPrivateEndpointConnectionsNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListPrivateEndpointConnectionsComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DiskAccessesClient) ListPrivateEndpointConnectionsComplete(ctx context.Context, resourceGroupName string, diskAccessName string) (result PrivateEndpointConnectionListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.ListPrivateEndpointConnections")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListPrivateEndpointConnections(ctx, resourceGroupName, diskAccessName)
+ return
+}
+
+// Update updates (patches) a disk access resource.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// diskAccessName - the name of the disk access resource that is being created. The name can't be changed after
+// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The
+// maximum name length is 80 characters.
+// diskAccess - disk access object supplied in the body of the Patch disk access operation.
+func (client DiskAccessesClient) Update(ctx context.Context, resourceGroupName string, diskAccessName string, diskAccess DiskAccessUpdate) (result DiskAccessesUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.Update")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, diskAccessName, diskAccess)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client DiskAccessesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, diskAccessName string, diskAccess DiskAccessUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskAccessName": autorest.Encode("path", diskAccessName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}", pathParameters),
+ autorest.WithJSON(diskAccess),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client DiskAccessesClient) UpdateSender(req *http.Request) (future DiskAccessesUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client DiskAccessesClient) UpdateResponder(resp *http.Response) (result DiskAccess, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// UpdateAPrivateEndpointConnection approve or reject a private endpoint connection under disk access resource, this
+// can't be used to create a new private endpoint connection.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// diskAccessName - the name of the disk access resource that is being created. The name can't be changed after
+// the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The
+// maximum name length is 80 characters.
+// privateEndpointConnectionName - the name of the private endpoint connection.
+// privateEndpointConnection - private endpoint connection object supplied in the body of the Put private
+// endpoint connection operation.
+func (client DiskAccessesClient) UpdateAPrivateEndpointConnection(ctx context.Context, resourceGroupName string, diskAccessName string, privateEndpointConnectionName string, privateEndpointConnection PrivateEndpointConnection) (result DiskAccessesUpdateAPrivateEndpointConnectionFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessesClient.UpdateAPrivateEndpointConnection")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: privateEndpointConnection,
+ Constraints: []validation.Constraint{{Target: "privateEndpointConnection.PrivateEndpointConnectionProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "privateEndpointConnection.PrivateEndpointConnectionProperties.PrivateLinkServiceConnectionState", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("compute.DiskAccessesClient", "UpdateAPrivateEndpointConnection", err.Error())
+ }
+
+ req, err := client.UpdateAPrivateEndpointConnectionPreparer(ctx, resourceGroupName, diskAccessName, privateEndpointConnectionName, privateEndpointConnection)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "UpdateAPrivateEndpointConnection", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateAPrivateEndpointConnectionSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesClient", "UpdateAPrivateEndpointConnection", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdateAPrivateEndpointConnectionPreparer prepares the UpdateAPrivateEndpointConnection request.
+func (client DiskAccessesClient) UpdateAPrivateEndpointConnectionPreparer(ctx context.Context, resourceGroupName string, diskAccessName string, privateEndpointConnectionName string, privateEndpointConnection PrivateEndpointConnection) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskAccessName": autorest.Encode("path", diskAccessName),
+ "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ privateEndpointConnection.ID = nil
+ privateEndpointConnection.Name = nil
+ privateEndpointConnection.Type = nil
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters),
+ autorest.WithJSON(privateEndpointConnection),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateAPrivateEndpointConnectionSender sends the UpdateAPrivateEndpointConnection request. The method will close the
+// http.Response Body if it receives an error.
+func (client DiskAccessesClient) UpdateAPrivateEndpointConnectionSender(req *http.Request) (future DiskAccessesUpdateAPrivateEndpointConnectionFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// UpdateAPrivateEndpointConnectionResponder handles the response to the UpdateAPrivateEndpointConnection request. The method always
+// closes the http.Response Body.
+func (client DiskAccessesClient) UpdateAPrivateEndpointConnectionResponder(resp *http.Response) (result PrivateEndpointConnection, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/diskencryptionsets.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/diskencryptionsets.go
new file mode 100644
index 000000000000..af979a6e8909
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/diskencryptionsets.go
@@ -0,0 +1,719 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// DiskEncryptionSetsClient is the compute Client
+type DiskEncryptionSetsClient struct {
+ BaseClient
+}
+
+// NewDiskEncryptionSetsClient creates an instance of the DiskEncryptionSetsClient client.
+func NewDiskEncryptionSetsClient(subscriptionID string) DiskEncryptionSetsClient {
+ return NewDiskEncryptionSetsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewDiskEncryptionSetsClientWithBaseURI creates an instance of the DiskEncryptionSetsClient client using a custom
+// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
+// stack).
+func NewDiskEncryptionSetsClientWithBaseURI(baseURI string, subscriptionID string) DiskEncryptionSetsClient {
+ return DiskEncryptionSetsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates a disk encryption set
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// diskEncryptionSetName - the name of the disk encryption set that is being created. The name can't be changed
+// after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The
+// maximum name length is 80 characters.
+// diskEncryptionSet - disk encryption set object supplied in the body of the Put disk encryption set
+// operation.
+func (client DiskEncryptionSetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, diskEncryptionSet DiskEncryptionSet) (result DiskEncryptionSetsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: diskEncryptionSet,
+ Constraints: []validation.Constraint{{Target: "diskEncryptionSet.EncryptionSetProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "diskEncryptionSet.EncryptionSetProperties.ActiveKey", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "diskEncryptionSet.EncryptionSetProperties.ActiveKey.KeyURL", Name: validation.Null, Rule: true, Chain: nil}}},
+ }}}}}); err != nil {
+ return result, validation.NewError("compute.DiskEncryptionSetsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, diskEncryptionSetName, diskEncryptionSet)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client DiskEncryptionSetsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, diskEncryptionSet DiskEncryptionSet) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskEncryptionSetName": autorest.Encode("path", diskEncryptionSetName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}", pathParameters),
+ autorest.WithJSON(diskEncryptionSet),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client DiskEncryptionSetsClient) CreateOrUpdateSender(req *http.Request) (future DiskEncryptionSetsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client DiskEncryptionSetsClient) CreateOrUpdateResponder(resp *http.Response) (result DiskEncryptionSet, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete deletes a disk encryption set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// diskEncryptionSetName - the name of the disk encryption set that is being created. The name can't be changed
+// after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The
+// maximum name length is 80 characters.
+func (client DiskEncryptionSetsClient) Delete(ctx context.Context, resourceGroupName string, diskEncryptionSetName string) (result DiskEncryptionSetsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, diskEncryptionSetName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client DiskEncryptionSetsClient) DeletePreparer(ctx context.Context, resourceGroupName string, diskEncryptionSetName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskEncryptionSetName": autorest.Encode("path", diskEncryptionSetName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client DiskEncryptionSetsClient) DeleteSender(req *http.Request) (future DiskEncryptionSetsDeleteFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client DiskEncryptionSetsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get gets information about a disk encryption set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// diskEncryptionSetName - the name of the disk encryption set that is being created. The name can't be changed
+// after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The
+// maximum name length is 80 characters.
+func (client DiskEncryptionSetsClient) Get(ctx context.Context, resourceGroupName string, diskEncryptionSetName string) (result DiskEncryptionSet, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, diskEncryptionSetName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client DiskEncryptionSetsClient) GetPreparer(ctx context.Context, resourceGroupName string, diskEncryptionSetName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskEncryptionSetName": autorest.Encode("path", diskEncryptionSetName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client DiskEncryptionSetsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client DiskEncryptionSetsClient) GetResponder(resp *http.Response) (result DiskEncryptionSet, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List lists all the disk encryption sets under a subscription.
+func (client DiskEncryptionSetsClient) List(ctx context.Context) (result DiskEncryptionSetListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.List")
+ defer func() {
+ sc := -1
+ if result.desl.Response.Response != nil {
+ sc = result.desl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.desl.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.desl, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "List", resp, "Failure responding to request")
+ return
+ }
+ if result.desl.hasNextLink() && result.desl.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client DiskEncryptionSetsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/diskEncryptionSets", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client DiskEncryptionSetsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client DiskEncryptionSetsClient) ListResponder(resp *http.Response) (result DiskEncryptionSetList, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client DiskEncryptionSetsClient) listNextResults(ctx context.Context, lastResults DiskEncryptionSetList) (result DiskEncryptionSetList, err error) {
+ req, err := lastResults.diskEncryptionSetListPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DiskEncryptionSetsClient) ListComplete(ctx context.Context) (result DiskEncryptionSetListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx)
+ return
+}
+
+// ListAssociatedResources lists all resources that are encrypted with this disk encryption set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// diskEncryptionSetName - the name of the disk encryption set that is being created. The name can't be changed
+// after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The
+// maximum name length is 80 characters.
+func (client DiskEncryptionSetsClient) ListAssociatedResources(ctx context.Context, resourceGroupName string, diskEncryptionSetName string) (result ResourceURIListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.ListAssociatedResources")
+ defer func() {
+ sc := -1
+ if result.rul.Response.Response != nil {
+ sc = result.rul.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listAssociatedResourcesNextResults
+ req, err := client.ListAssociatedResourcesPreparer(ctx, resourceGroupName, diskEncryptionSetName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "ListAssociatedResources", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListAssociatedResourcesSender(req)
+ if err != nil {
+ result.rul.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "ListAssociatedResources", resp, "Failure sending request")
+ return
+ }
+
+ result.rul, err = client.ListAssociatedResourcesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "ListAssociatedResources", resp, "Failure responding to request")
+ return
+ }
+ if result.rul.hasNextLink() && result.rul.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListAssociatedResourcesPreparer prepares the ListAssociatedResources request.
+func (client DiskEncryptionSetsClient) ListAssociatedResourcesPreparer(ctx context.Context, resourceGroupName string, diskEncryptionSetName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskEncryptionSetName": autorest.Encode("path", diskEncryptionSetName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}/associatedResources", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListAssociatedResourcesSender sends the ListAssociatedResources request. The method will close the
+// http.Response Body if it receives an error.
+func (client DiskEncryptionSetsClient) ListAssociatedResourcesSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListAssociatedResourcesResponder handles the response to the ListAssociatedResources request. The method always
+// closes the http.Response Body.
+func (client DiskEncryptionSetsClient) ListAssociatedResourcesResponder(resp *http.Response) (result ResourceURIList, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listAssociatedResourcesNextResults retrieves the next set of results, if any.
+func (client DiskEncryptionSetsClient) listAssociatedResourcesNextResults(ctx context.Context, lastResults ResourceURIList) (result ResourceURIList, err error) {
+ req, err := lastResults.resourceURIListPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "listAssociatedResourcesNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListAssociatedResourcesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "listAssociatedResourcesNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListAssociatedResourcesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "listAssociatedResourcesNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListAssociatedResourcesComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DiskEncryptionSetsClient) ListAssociatedResourcesComplete(ctx context.Context, resourceGroupName string, diskEncryptionSetName string) (result ResourceURIListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.ListAssociatedResources")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListAssociatedResources(ctx, resourceGroupName, diskEncryptionSetName)
+ return
+}
+
+// ListByResourceGroup lists all the disk encryption sets under a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client DiskEncryptionSetsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result DiskEncryptionSetListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.desl.Response.Response != nil {
+ sc = result.desl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.desl.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.desl, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "ListByResourceGroup", resp, "Failure responding to request")
+ return
+ }
+ if result.desl.hasNextLink() && result.desl.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client DiskEncryptionSetsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client DiskEncryptionSetsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client DiskEncryptionSetsClient) ListByResourceGroupResponder(resp *http.Response) (result DiskEncryptionSetList, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByResourceGroupNextResults retrieves the next set of results, if any.
+func (client DiskEncryptionSetsClient) listByResourceGroupNextResults(ctx context.Context, lastResults DiskEncryptionSetList) (result DiskEncryptionSetList, err error) {
+ req, err := lastResults.diskEncryptionSetListPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DiskEncryptionSetsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result DiskEncryptionSetListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByResourceGroup(ctx, resourceGroupName)
+ return
+}
+
+// Update updates (patches) a disk encryption set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// diskEncryptionSetName - the name of the disk encryption set that is being created. The name can't be changed
+// after the disk encryption set is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The
+// maximum name length is 80 characters.
+// diskEncryptionSet - disk encryption set object supplied in the body of the Patch disk encryption set
+// operation.
+func (client DiskEncryptionSetsClient) Update(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, diskEncryptionSet DiskEncryptionSetUpdate) (result DiskEncryptionSetsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetsClient.Update")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, diskEncryptionSetName, diskEncryptionSet)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client DiskEncryptionSetsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, diskEncryptionSetName string, diskEncryptionSet DiskEncryptionSetUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskEncryptionSetName": autorest.Encode("path", diskEncryptionSetName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}", pathParameters),
+ autorest.WithJSON(diskEncryptionSet),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client DiskEncryptionSetsClient) UpdateSender(req *http.Request) (future DiskEncryptionSetsUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client DiskEncryptionSetsClient) UpdateResponder(resp *http.Response) (result DiskEncryptionSet, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/diskrestorepoint.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/diskrestorepoint.go
new file mode 100644
index 000000000000..d1fe4a66bc2e
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/diskrestorepoint.go
@@ -0,0 +1,407 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// DiskRestorePointClient is the compute Client
+type DiskRestorePointClient struct {
+ BaseClient
+}
+
+// NewDiskRestorePointClient creates an instance of the DiskRestorePointClient client.
+func NewDiskRestorePointClient(subscriptionID string) DiskRestorePointClient {
+ return NewDiskRestorePointClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewDiskRestorePointClientWithBaseURI creates an instance of the DiskRestorePointClient client using a custom
+// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
+// stack).
+func NewDiskRestorePointClientWithBaseURI(baseURI string, subscriptionID string) DiskRestorePointClient {
+ return DiskRestorePointClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Get get disk restorePoint resource
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// restorePointCollectionName - the name of the restore point collection that the disk restore point belongs.
+// VMRestorePointName - the name of the vm restore point that the disk disk restore point belongs.
+// diskRestorePointName - the name of the disk restore point created.
+func (client DiskRestorePointClient) Get(ctx context.Context, resourceGroupName string, restorePointCollectionName string, VMRestorePointName string, diskRestorePointName string) (result DiskRestorePoint, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskRestorePointClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, restorePointCollectionName, VMRestorePointName, diskRestorePointName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client DiskRestorePointClient) GetPreparer(ctx context.Context, resourceGroupName string, restorePointCollectionName string, VMRestorePointName string, diskRestorePointName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskRestorePointName": autorest.Encode("path", diskRestorePointName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "restorePointCollectionName": autorest.Encode("path", restorePointCollectionName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmRestorePointName": autorest.Encode("path", VMRestorePointName),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client DiskRestorePointClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client DiskRestorePointClient) GetResponder(resp *http.Response) (result DiskRestorePoint, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GrantAccess grants access to a diskRestorePoint.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// restorePointCollectionName - the name of the restore point collection that the disk restore point belongs.
+// VMRestorePointName - the name of the vm restore point that the disk disk restore point belongs.
+// diskRestorePointName - the name of the disk restore point created.
+// grantAccessData - access data object supplied in the body of the get disk access operation.
+func (client DiskRestorePointClient) GrantAccess(ctx context.Context, resourceGroupName string, restorePointCollectionName string, VMRestorePointName string, diskRestorePointName string, grantAccessData GrantAccessData) (result DiskRestorePointGrantAccessFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskRestorePointClient.GrantAccess")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: grantAccessData,
+ Constraints: []validation.Constraint{{Target: "grantAccessData.DurationInSeconds", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("compute.DiskRestorePointClient", "GrantAccess", err.Error())
+ }
+
+ req, err := client.GrantAccessPreparer(ctx, resourceGroupName, restorePointCollectionName, VMRestorePointName, diskRestorePointName, grantAccessData)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "GrantAccess", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.GrantAccessSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "GrantAccess", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// GrantAccessPreparer prepares the GrantAccess request.
+func (client DiskRestorePointClient) GrantAccessPreparer(ctx context.Context, resourceGroupName string, restorePointCollectionName string, VMRestorePointName string, diskRestorePointName string, grantAccessData GrantAccessData) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskRestorePointName": autorest.Encode("path", diskRestorePointName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "restorePointCollectionName": autorest.Encode("path", restorePointCollectionName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmRestorePointName": autorest.Encode("path", VMRestorePointName),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/beginGetAccess", pathParameters),
+ autorest.WithJSON(grantAccessData),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GrantAccessSender sends the GrantAccess request. The method will close the
+// http.Response Body if it receives an error.
+func (client DiskRestorePointClient) GrantAccessSender(req *http.Request) (future DiskRestorePointGrantAccessFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// GrantAccessResponder handles the response to the GrantAccess request. The method always
+// closes the http.Response Body.
+func (client DiskRestorePointClient) GrantAccessResponder(resp *http.Response) (result AccessURI, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByRestorePoint lists diskRestorePoints under a vmRestorePoint.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// restorePointCollectionName - the name of the restore point collection that the disk restore point belongs.
+// VMRestorePointName - the name of the vm restore point that the disk disk restore point belongs.
+func (client DiskRestorePointClient) ListByRestorePoint(ctx context.Context, resourceGroupName string, restorePointCollectionName string, VMRestorePointName string) (result DiskRestorePointListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskRestorePointClient.ListByRestorePoint")
+ defer func() {
+ sc := -1
+ if result.drpl.Response.Response != nil {
+ sc = result.drpl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByRestorePointNextResults
+ req, err := client.ListByRestorePointPreparer(ctx, resourceGroupName, restorePointCollectionName, VMRestorePointName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "ListByRestorePoint", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByRestorePointSender(req)
+ if err != nil {
+ result.drpl.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "ListByRestorePoint", resp, "Failure sending request")
+ return
+ }
+
+ result.drpl, err = client.ListByRestorePointResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "ListByRestorePoint", resp, "Failure responding to request")
+ return
+ }
+ if result.drpl.hasNextLink() && result.drpl.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListByRestorePointPreparer prepares the ListByRestorePoint request.
+func (client DiskRestorePointClient) ListByRestorePointPreparer(ctx context.Context, resourceGroupName string, restorePointCollectionName string, VMRestorePointName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "restorePointCollectionName": autorest.Encode("path", restorePointCollectionName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmRestorePointName": autorest.Encode("path", VMRestorePointName),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByRestorePointSender sends the ListByRestorePoint request. The method will close the
+// http.Response Body if it receives an error.
+func (client DiskRestorePointClient) ListByRestorePointSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByRestorePointResponder handles the response to the ListByRestorePoint request. The method always
+// closes the http.Response Body.
+func (client DiskRestorePointClient) ListByRestorePointResponder(resp *http.Response) (result DiskRestorePointList, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByRestorePointNextResults retrieves the next set of results, if any.
+func (client DiskRestorePointClient) listByRestorePointNextResults(ctx context.Context, lastResults DiskRestorePointList) (result DiskRestorePointList, err error) {
+ req, err := lastResults.diskRestorePointListPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "listByRestorePointNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByRestorePointSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "listByRestorePointNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByRestorePointResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "listByRestorePointNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByRestorePointComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DiskRestorePointClient) ListByRestorePointComplete(ctx context.Context, resourceGroupName string, restorePointCollectionName string, VMRestorePointName string) (result DiskRestorePointListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskRestorePointClient.ListByRestorePoint")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByRestorePoint(ctx, resourceGroupName, restorePointCollectionName, VMRestorePointName)
+ return
+}
+
+// RevokeAccess revokes access to a diskRestorePoint.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// restorePointCollectionName - the name of the restore point collection that the disk restore point belongs.
+// VMRestorePointName - the name of the vm restore point that the disk disk restore point belongs.
+// diskRestorePointName - the name of the disk restore point created.
+func (client DiskRestorePointClient) RevokeAccess(ctx context.Context, resourceGroupName string, restorePointCollectionName string, VMRestorePointName string, diskRestorePointName string) (result DiskRestorePointRevokeAccessFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskRestorePointClient.RevokeAccess")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.RevokeAccessPreparer(ctx, resourceGroupName, restorePointCollectionName, VMRestorePointName, diskRestorePointName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "RevokeAccess", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.RevokeAccessSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskRestorePointClient", "RevokeAccess", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// RevokeAccessPreparer prepares the RevokeAccess request.
+func (client DiskRestorePointClient) RevokeAccessPreparer(ctx context.Context, resourceGroupName string, restorePointCollectionName string, VMRestorePointName string, diskRestorePointName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskRestorePointName": autorest.Encode("path", diskRestorePointName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "restorePointCollectionName": autorest.Encode("path", restorePointCollectionName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmRestorePointName": autorest.Encode("path", VMRestorePointName),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/endGetAccess", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RevokeAccessSender sends the RevokeAccess request. The method will close the
+// http.Response Body if it receives an error.
+func (client DiskRestorePointClient) RevokeAccessSender(req *http.Request) (future DiskRestorePointRevokeAccessFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// RevokeAccessResponder handles the response to the RevokeAccess request. The method always
+// closes the http.Response Body.
+func (client DiskRestorePointClient) RevokeAccessResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/disks.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/disks.go
new file mode 100644
index 000000000000..4aec8ae542ff
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/disks.go
@@ -0,0 +1,779 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// DisksClient is the compute Client
+type DisksClient struct {
+ BaseClient
+}
+
+// NewDisksClient creates an instance of the DisksClient client.
+func NewDisksClient(subscriptionID string) DisksClient {
+ return NewDisksClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewDisksClientWithBaseURI creates an instance of the DisksClient client using a custom endpoint. Use this when
+// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewDisksClientWithBaseURI(baseURI string, subscriptionID string) DisksClient {
+ return DisksClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates a disk.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// diskName - the name of the managed disk that is being created. The name can't be changed after the disk is
+// created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80
+// characters.
+// disk - disk object supplied in the body of the Put disk operation.
+func (client DisksClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, diskName string, disk Disk) (result DisksCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: disk,
+ Constraints: []validation.Constraint{{Target: "disk.DiskProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "disk.DiskProperties.PurchasePlan", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "disk.DiskProperties.PurchasePlan.Publisher", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "disk.DiskProperties.PurchasePlan.Name", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "disk.DiskProperties.PurchasePlan.Product", Name: validation.Null, Rule: true, Chain: nil},
+ }},
+ {Target: "disk.DiskProperties.CreationData", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "disk.DiskProperties.CreationData.ImageReference", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "disk.DiskProperties.CreationData.ImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}},
+ {Target: "disk.DiskProperties.CreationData.GalleryImageReference", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "disk.DiskProperties.CreationData.GalleryImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}},
+ }},
+ {Target: "disk.DiskProperties.EncryptionSettingsCollection", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "disk.DiskProperties.EncryptionSettingsCollection.Enabled", Name: validation.Null, Rule: true, Chain: nil}}},
+ }}}}}); err != nil {
+ return result, validation.NewError("compute.DisksClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, diskName, disk)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client DisksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, diskName string, disk Disk) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskName": autorest.Encode("path", diskName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ disk.ManagedBy = nil
+ disk.ManagedByExtended = nil
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}", pathParameters),
+ autorest.WithJSON(disk),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client DisksClient) CreateOrUpdateSender(req *http.Request) (future DisksCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client DisksClient) CreateOrUpdateResponder(resp *http.Response) (result Disk, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete deletes a disk.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// diskName - the name of the managed disk that is being created. The name can't be changed after the disk is
+// created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80
+// characters.
+func (client DisksClient) Delete(ctx context.Context, resourceGroupName string, diskName string) (result DisksDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.Delete")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, diskName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client DisksClient) DeletePreparer(ctx context.Context, resourceGroupName string, diskName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskName": autorest.Encode("path", diskName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client DisksClient) DeleteSender(req *http.Request) (future DisksDeleteFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client DisksClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get gets information about a disk.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// diskName - the name of the managed disk that is being created. The name can't be changed after the disk is
+// created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80
+// characters.
+func (client DisksClient) Get(ctx context.Context, resourceGroupName string, diskName string) (result Disk, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, diskName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client DisksClient) GetPreparer(ctx context.Context, resourceGroupName string, diskName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskName": autorest.Encode("path", diskName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client DisksClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client DisksClient) GetResponder(resp *http.Response) (result Disk, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GrantAccess grants access to a disk.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// diskName - the name of the managed disk that is being created. The name can't be changed after the disk is
+// created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80
+// characters.
+// grantAccessData - access data object supplied in the body of the get disk access operation.
+func (client DisksClient) GrantAccess(ctx context.Context, resourceGroupName string, diskName string, grantAccessData GrantAccessData) (result DisksGrantAccessFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.GrantAccess")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: grantAccessData,
+ Constraints: []validation.Constraint{{Target: "grantAccessData.DurationInSeconds", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("compute.DisksClient", "GrantAccess", err.Error())
+ }
+
+ req, err := client.GrantAccessPreparer(ctx, resourceGroupName, diskName, grantAccessData)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "GrantAccess", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.GrantAccessSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "GrantAccess", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// GrantAccessPreparer prepares the GrantAccess request.
+func (client DisksClient) GrantAccessPreparer(ctx context.Context, resourceGroupName string, diskName string, grantAccessData GrantAccessData) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskName": autorest.Encode("path", diskName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/beginGetAccess", pathParameters),
+ autorest.WithJSON(grantAccessData),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GrantAccessSender sends the GrantAccess request. The method will close the
+// http.Response Body if it receives an error.
+func (client DisksClient) GrantAccessSender(req *http.Request) (future DisksGrantAccessFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// GrantAccessResponder handles the response to the GrantAccess request. The method always
+// closes the http.Response Body.
+func (client DisksClient) GrantAccessResponder(resp *http.Response) (result AccessURI, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List lists all the disks under a subscription.
+func (client DisksClient) List(ctx context.Context) (result DiskListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.List")
+ defer func() {
+ sc := -1
+ if result.dl.Response.Response != nil {
+ sc = result.dl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.dl.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.dl, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "List", resp, "Failure responding to request")
+ return
+ }
+ if result.dl.hasNextLink() && result.dl.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client DisksClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/disks", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client DisksClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client DisksClient) ListResponder(resp *http.Response) (result DiskList, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client DisksClient) listNextResults(ctx context.Context, lastResults DiskList) (result DiskList, err error) {
+ req, err := lastResults.diskListPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.DisksClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.DisksClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DisksClient) ListComplete(ctx context.Context) (result DiskListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx)
+ return
+}
+
+// ListByResourceGroup lists all the disks under a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client DisksClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result DiskListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.dl.Response.Response != nil {
+ sc = result.dl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.dl.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.dl, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "ListByResourceGroup", resp, "Failure responding to request")
+ return
+ }
+ if result.dl.hasNextLink() && result.dl.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client DisksClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client DisksClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client DisksClient) ListByResourceGroupResponder(resp *http.Response) (result DiskList, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByResourceGroupNextResults retrieves the next set of results, if any.
+func (client DisksClient) listByResourceGroupNextResults(ctx context.Context, lastResults DiskList) (result DiskList, err error) {
+ req, err := lastResults.diskListPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.DisksClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.DisksClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DisksClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result DiskListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByResourceGroup(ctx, resourceGroupName)
+ return
+}
+
+// RevokeAccess revokes access to a disk.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// diskName - the name of the managed disk that is being created. The name can't be changed after the disk is
+// created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80
+// characters.
+func (client DisksClient) RevokeAccess(ctx context.Context, resourceGroupName string, diskName string) (result DisksRevokeAccessFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.RevokeAccess")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.RevokeAccessPreparer(ctx, resourceGroupName, diskName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "RevokeAccess", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.RevokeAccessSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "RevokeAccess", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// RevokeAccessPreparer prepares the RevokeAccess request.
+func (client DisksClient) RevokeAccessPreparer(ctx context.Context, resourceGroupName string, diskName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskName": autorest.Encode("path", diskName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/endGetAccess", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RevokeAccessSender sends the RevokeAccess request. The method will close the
+// http.Response Body if it receives an error.
+func (client DisksClient) RevokeAccessSender(req *http.Request) (future DisksRevokeAccessFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// RevokeAccessResponder handles the response to the RevokeAccess request. The method always
+// closes the http.Response Body.
+func (client DisksClient) RevokeAccessResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Update updates (patches) a disk.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// diskName - the name of the managed disk that is being created. The name can't be changed after the disk is
+// created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80
+// characters.
+// disk - disk object supplied in the body of the Patch disk operation.
+func (client DisksClient) Update(ctx context.Context, resourceGroupName string, diskName string, disk DiskUpdate) (result DisksUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.Update")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, diskName, disk)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client DisksClient) UpdatePreparer(ctx context.Context, resourceGroupName string, diskName string, disk DiskUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "diskName": autorest.Encode("path", diskName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}", pathParameters),
+ autorest.WithJSON(disk),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client DisksClient) UpdateSender(req *http.Request) (future DisksUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client DisksClient) UpdateResponder(resp *http.Response) (result Disk, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/enums.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/enums.go
new file mode 100644
index 000000000000..1edd7683383f
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/enums.go
@@ -0,0 +1,2042 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// AccessLevel enumerates the values for access level.
+type AccessLevel string
+
+const (
+ // AccessLevelNone ...
+ AccessLevelNone AccessLevel = "None"
+ // AccessLevelRead ...
+ AccessLevelRead AccessLevel = "Read"
+ // AccessLevelWrite ...
+ AccessLevelWrite AccessLevel = "Write"
+)
+
+// PossibleAccessLevelValues returns an array of possible values for the AccessLevel const type.
+func PossibleAccessLevelValues() []AccessLevel {
+ return []AccessLevel{AccessLevelNone, AccessLevelRead, AccessLevelWrite}
+}
+
+// AggregatedReplicationState enumerates the values for aggregated replication state.
+type AggregatedReplicationState string
+
+const (
+ // AggregatedReplicationStateCompleted ...
+ AggregatedReplicationStateCompleted AggregatedReplicationState = "Completed"
+ // AggregatedReplicationStateFailed ...
+ AggregatedReplicationStateFailed AggregatedReplicationState = "Failed"
+ // AggregatedReplicationStateInProgress ...
+ AggregatedReplicationStateInProgress AggregatedReplicationState = "InProgress"
+ // AggregatedReplicationStateUnknown ...
+ AggregatedReplicationStateUnknown AggregatedReplicationState = "Unknown"
+)
+
+// PossibleAggregatedReplicationStateValues returns an array of possible values for the AggregatedReplicationState const type.
+func PossibleAggregatedReplicationStateValues() []AggregatedReplicationState {
+ return []AggregatedReplicationState{AggregatedReplicationStateCompleted, AggregatedReplicationStateFailed, AggregatedReplicationStateInProgress, AggregatedReplicationStateUnknown}
+}
+
+// AvailabilitySetSkuTypes enumerates the values for availability set sku types.
+type AvailabilitySetSkuTypes string
+
+const (
+ // AvailabilitySetSkuTypesAligned ...
+ AvailabilitySetSkuTypesAligned AvailabilitySetSkuTypes = "Aligned"
+ // AvailabilitySetSkuTypesClassic ...
+ AvailabilitySetSkuTypesClassic AvailabilitySetSkuTypes = "Classic"
+)
+
+// PossibleAvailabilitySetSkuTypesValues returns an array of possible values for the AvailabilitySetSkuTypes const type.
+func PossibleAvailabilitySetSkuTypesValues() []AvailabilitySetSkuTypes {
+ return []AvailabilitySetSkuTypes{AvailabilitySetSkuTypesAligned, AvailabilitySetSkuTypesClassic}
+}
+
+// CachingTypes enumerates the values for caching types.
+type CachingTypes string
+
+const (
+ // CachingTypesNone ...
+ CachingTypesNone CachingTypes = "None"
+ // CachingTypesReadOnly ...
+ CachingTypesReadOnly CachingTypes = "ReadOnly"
+ // CachingTypesReadWrite ...
+ CachingTypesReadWrite CachingTypes = "ReadWrite"
+)
+
+// PossibleCachingTypesValues returns an array of possible values for the CachingTypes const type.
+func PossibleCachingTypesValues() []CachingTypes {
+ return []CachingTypes{CachingTypesNone, CachingTypesReadOnly, CachingTypesReadWrite}
+}
+
+// CapacityReservationGroupInstanceViewTypes enumerates the values for capacity reservation group instance view
+// types.
+type CapacityReservationGroupInstanceViewTypes string
+
+const (
+ // CapacityReservationGroupInstanceViewTypesInstanceView ...
+ CapacityReservationGroupInstanceViewTypesInstanceView CapacityReservationGroupInstanceViewTypes = "instanceView"
+)
+
+// PossibleCapacityReservationGroupInstanceViewTypesValues returns an array of possible values for the CapacityReservationGroupInstanceViewTypes const type.
+func PossibleCapacityReservationGroupInstanceViewTypesValues() []CapacityReservationGroupInstanceViewTypes {
+ return []CapacityReservationGroupInstanceViewTypes{CapacityReservationGroupInstanceViewTypesInstanceView}
+}
+
+// CapacityReservationInstanceViewTypes enumerates the values for capacity reservation instance view types.
+type CapacityReservationInstanceViewTypes string
+
+const (
+ // CapacityReservationInstanceViewTypesInstanceView ...
+ CapacityReservationInstanceViewTypesInstanceView CapacityReservationInstanceViewTypes = "instanceView"
+)
+
+// PossibleCapacityReservationInstanceViewTypesValues returns an array of possible values for the CapacityReservationInstanceViewTypes const type.
+func PossibleCapacityReservationInstanceViewTypesValues() []CapacityReservationInstanceViewTypes {
+ return []CapacityReservationInstanceViewTypes{CapacityReservationInstanceViewTypesInstanceView}
+}
+
+// CloudServiceUpgradeMode enumerates the values for cloud service upgrade mode.
+type CloudServiceUpgradeMode string
+
+const (
+ // CloudServiceUpgradeModeAuto ...
+ CloudServiceUpgradeModeAuto CloudServiceUpgradeMode = "Auto"
+ // CloudServiceUpgradeModeManual ...
+ CloudServiceUpgradeModeManual CloudServiceUpgradeMode = "Manual"
+ // CloudServiceUpgradeModeSimultaneous ...
+ CloudServiceUpgradeModeSimultaneous CloudServiceUpgradeMode = "Simultaneous"
+)
+
+// PossibleCloudServiceUpgradeModeValues returns an array of possible values for the CloudServiceUpgradeMode const type.
+func PossibleCloudServiceUpgradeModeValues() []CloudServiceUpgradeMode {
+ return []CloudServiceUpgradeMode{CloudServiceUpgradeModeAuto, CloudServiceUpgradeModeManual, CloudServiceUpgradeModeSimultaneous}
+}
+
+// ComponentNames enumerates the values for component names.
+type ComponentNames string
+
+const (
+ // ComponentNamesMicrosoftWindowsShellSetup ...
+ ComponentNamesMicrosoftWindowsShellSetup ComponentNames = "Microsoft-Windows-Shell-Setup"
+)
+
+// PossibleComponentNamesValues returns an array of possible values for the ComponentNames const type.
+func PossibleComponentNamesValues() []ComponentNames {
+ return []ComponentNames{ComponentNamesMicrosoftWindowsShellSetup}
+}
+
+// ConsistencyModeTypes enumerates the values for consistency mode types.
+type ConsistencyModeTypes string
+
+const (
+ // ConsistencyModeTypesApplicationConsistent ...
+ ConsistencyModeTypesApplicationConsistent ConsistencyModeTypes = "ApplicationConsistent"
+ // ConsistencyModeTypesCrashConsistent ...
+ ConsistencyModeTypesCrashConsistent ConsistencyModeTypes = "CrashConsistent"
+ // ConsistencyModeTypesFileSystemConsistent ...
+ ConsistencyModeTypesFileSystemConsistent ConsistencyModeTypes = "FileSystemConsistent"
+)
+
+// PossibleConsistencyModeTypesValues returns an array of possible values for the ConsistencyModeTypes const type.
+func PossibleConsistencyModeTypesValues() []ConsistencyModeTypes {
+ return []ConsistencyModeTypes{ConsistencyModeTypesApplicationConsistent, ConsistencyModeTypesCrashConsistent, ConsistencyModeTypesFileSystemConsistent}
+}
+
+// DedicatedHostLicenseTypes enumerates the values for dedicated host license types.
+type DedicatedHostLicenseTypes string
+
+const (
+ // DedicatedHostLicenseTypesNone ...
+ DedicatedHostLicenseTypesNone DedicatedHostLicenseTypes = "None"
+ // DedicatedHostLicenseTypesWindowsServerHybrid ...
+ DedicatedHostLicenseTypesWindowsServerHybrid DedicatedHostLicenseTypes = "Windows_Server_Hybrid"
+ // DedicatedHostLicenseTypesWindowsServerPerpetual ...
+ DedicatedHostLicenseTypesWindowsServerPerpetual DedicatedHostLicenseTypes = "Windows_Server_Perpetual"
+)
+
+// PossibleDedicatedHostLicenseTypesValues returns an array of possible values for the DedicatedHostLicenseTypes const type.
+func PossibleDedicatedHostLicenseTypesValues() []DedicatedHostLicenseTypes {
+ return []DedicatedHostLicenseTypes{DedicatedHostLicenseTypesNone, DedicatedHostLicenseTypesWindowsServerHybrid, DedicatedHostLicenseTypesWindowsServerPerpetual}
+}
+
+// DeleteOptions enumerates the values for delete options.
+type DeleteOptions string
+
+const (
+ // DeleteOptionsDelete ...
+ DeleteOptionsDelete DeleteOptions = "Delete"
+ // DeleteOptionsDetach ...
+ DeleteOptionsDetach DeleteOptions = "Detach"
+)
+
+// PossibleDeleteOptionsValues returns an array of possible values for the DeleteOptions const type.
+func PossibleDeleteOptionsValues() []DeleteOptions {
+ return []DeleteOptions{DeleteOptionsDelete, DeleteOptionsDetach}
+}
+
+// DiffDiskOptions enumerates the values for diff disk options.
+type DiffDiskOptions string
+
+const (
+ // DiffDiskOptionsLocal ...
+ DiffDiskOptionsLocal DiffDiskOptions = "Local"
+)
+
+// PossibleDiffDiskOptionsValues returns an array of possible values for the DiffDiskOptions const type.
+func PossibleDiffDiskOptionsValues() []DiffDiskOptions {
+ return []DiffDiskOptions{DiffDiskOptionsLocal}
+}
+
+// DiffDiskPlacement enumerates the values for diff disk placement.
+type DiffDiskPlacement string
+
+const (
+ // DiffDiskPlacementCacheDisk ...
+ DiffDiskPlacementCacheDisk DiffDiskPlacement = "CacheDisk"
+ // DiffDiskPlacementResourceDisk ...
+ DiffDiskPlacementResourceDisk DiffDiskPlacement = "ResourceDisk"
+)
+
+// PossibleDiffDiskPlacementValues returns an array of possible values for the DiffDiskPlacement const type.
+func PossibleDiffDiskPlacementValues() []DiffDiskPlacement {
+ return []DiffDiskPlacement{DiffDiskPlacementCacheDisk, DiffDiskPlacementResourceDisk}
+}
+
+// DiskCreateOption enumerates the values for disk create option.
+type DiskCreateOption string
+
+const (
+ // DiskCreateOptionAttach Disk will be attached to a VM.
+ DiskCreateOptionAttach DiskCreateOption = "Attach"
+ // DiskCreateOptionCopy Create a new disk or snapshot by copying from a disk or snapshot specified by the
+ // given sourceResourceId.
+ DiskCreateOptionCopy DiskCreateOption = "Copy"
+ // DiskCreateOptionCopyStart Create a new disk by using a deep copy process, where the resource creation is
+ // considered complete only after all data has been copied from the source.
+ DiskCreateOptionCopyStart DiskCreateOption = "CopyStart"
+ // DiskCreateOptionEmpty Create an empty data disk of a size given by diskSizeGB.
+ DiskCreateOptionEmpty DiskCreateOption = "Empty"
+ // DiskCreateOptionFromImage Create a new disk from a platform image specified by the given imageReference
+ // or galleryImageReference.
+ DiskCreateOptionFromImage DiskCreateOption = "FromImage"
+ // DiskCreateOptionImport Create a disk by importing from a blob specified by a sourceUri in a storage
+ // account specified by storageAccountId.
+ DiskCreateOptionImport DiskCreateOption = "Import"
+ // DiskCreateOptionRestore Create a new disk by copying from a backup recovery point.
+ DiskCreateOptionRestore DiskCreateOption = "Restore"
+ // DiskCreateOptionUpload Create a new disk by obtaining a write token and using it to directly upload the
+ // contents of the disk.
+ DiskCreateOptionUpload DiskCreateOption = "Upload"
+)
+
+// PossibleDiskCreateOptionValues returns an array of possible values for the DiskCreateOption const type.
+func PossibleDiskCreateOptionValues() []DiskCreateOption {
+ return []DiskCreateOption{DiskCreateOptionAttach, DiskCreateOptionCopy, DiskCreateOptionCopyStart, DiskCreateOptionEmpty, DiskCreateOptionFromImage, DiskCreateOptionImport, DiskCreateOptionRestore, DiskCreateOptionUpload}
+}
+
+// DiskCreateOptionTypes enumerates the values for disk create option types.
+type DiskCreateOptionTypes string
+
+const (
+ // DiskCreateOptionTypesAttach ...
+ DiskCreateOptionTypesAttach DiskCreateOptionTypes = "Attach"
+ // DiskCreateOptionTypesEmpty ...
+ DiskCreateOptionTypesEmpty DiskCreateOptionTypes = "Empty"
+ // DiskCreateOptionTypesFromImage ...
+ DiskCreateOptionTypesFromImage DiskCreateOptionTypes = "FromImage"
+)
+
+// PossibleDiskCreateOptionTypesValues returns an array of possible values for the DiskCreateOptionTypes const type.
+func PossibleDiskCreateOptionTypesValues() []DiskCreateOptionTypes {
+ return []DiskCreateOptionTypes{DiskCreateOptionTypesAttach, DiskCreateOptionTypesEmpty, DiskCreateOptionTypesFromImage}
+}
+
+// DiskDeleteOptionTypes enumerates the values for disk delete option types.
+type DiskDeleteOptionTypes string
+
+const (
+ // DiskDeleteOptionTypesDelete ...
+ DiskDeleteOptionTypesDelete DiskDeleteOptionTypes = "Delete"
+ // DiskDeleteOptionTypesDetach ...
+ DiskDeleteOptionTypesDetach DiskDeleteOptionTypes = "Detach"
+)
+
+// PossibleDiskDeleteOptionTypesValues returns an array of possible values for the DiskDeleteOptionTypes const type.
+func PossibleDiskDeleteOptionTypesValues() []DiskDeleteOptionTypes {
+ return []DiskDeleteOptionTypes{DiskDeleteOptionTypesDelete, DiskDeleteOptionTypesDetach}
+}
+
+// DiskDetachOptionTypes enumerates the values for disk detach option types.
+type DiskDetachOptionTypes string
+
+const (
+ // DiskDetachOptionTypesForceDetach ...
+ DiskDetachOptionTypesForceDetach DiskDetachOptionTypes = "ForceDetach"
+)
+
+// PossibleDiskDetachOptionTypesValues returns an array of possible values for the DiskDetachOptionTypes const type.
+func PossibleDiskDetachOptionTypesValues() []DiskDetachOptionTypes {
+ return []DiskDetachOptionTypes{DiskDetachOptionTypesForceDetach}
+}
+
+// DiskEncryptionSetIdentityType enumerates the values for disk encryption set identity type.
+type DiskEncryptionSetIdentityType string
+
+const (
+ // DiskEncryptionSetIdentityTypeNone ...
+ DiskEncryptionSetIdentityTypeNone DiskEncryptionSetIdentityType = "None"
+ // DiskEncryptionSetIdentityTypeSystemAssigned ...
+ DiskEncryptionSetIdentityTypeSystemAssigned DiskEncryptionSetIdentityType = "SystemAssigned"
+)
+
+// PossibleDiskEncryptionSetIdentityTypeValues returns an array of possible values for the DiskEncryptionSetIdentityType const type.
+func PossibleDiskEncryptionSetIdentityTypeValues() []DiskEncryptionSetIdentityType {
+ return []DiskEncryptionSetIdentityType{DiskEncryptionSetIdentityTypeNone, DiskEncryptionSetIdentityTypeSystemAssigned}
+}
+
+// DiskEncryptionSetType enumerates the values for disk encryption set type.
+type DiskEncryptionSetType string
+
+const (
+ // DiskEncryptionSetTypeEncryptionAtRestWithCustomerKey Resource using diskEncryptionSet would be encrypted
+ // at rest with Customer managed key that can be changed and revoked by a customer.
+ DiskEncryptionSetTypeEncryptionAtRestWithCustomerKey DiskEncryptionSetType = "EncryptionAtRestWithCustomerKey"
+ // DiskEncryptionSetTypeEncryptionAtRestWithPlatformAndCustomerKeys Resource using diskEncryptionSet would
+ // be encrypted at rest with two layers of encryption. One of the keys is Customer managed and the other
+ // key is Platform managed.
+ DiskEncryptionSetTypeEncryptionAtRestWithPlatformAndCustomerKeys DiskEncryptionSetType = "EncryptionAtRestWithPlatformAndCustomerKeys"
+)
+
+// PossibleDiskEncryptionSetTypeValues returns an array of possible values for the DiskEncryptionSetType const type.
+func PossibleDiskEncryptionSetTypeValues() []DiskEncryptionSetType {
+ return []DiskEncryptionSetType{DiskEncryptionSetTypeEncryptionAtRestWithCustomerKey, DiskEncryptionSetTypeEncryptionAtRestWithPlatformAndCustomerKeys}
+}
+
+// DiskSecurityTypes enumerates the values for disk security types.
+type DiskSecurityTypes string
+
+const (
+ // DiskSecurityTypesTrustedLaunch Trusted Launch provides security features such as secure boot and virtual
+ // Trusted Platform Module (vTPM)
+ DiskSecurityTypesTrustedLaunch DiskSecurityTypes = "TrustedLaunch"
+)
+
+// PossibleDiskSecurityTypesValues returns an array of possible values for the DiskSecurityTypes const type.
+func PossibleDiskSecurityTypesValues() []DiskSecurityTypes {
+ return []DiskSecurityTypes{DiskSecurityTypesTrustedLaunch}
+}
+
+// DiskState enumerates the values for disk state.
+type DiskState string
+
+const (
+ // DiskStateActiveSAS The disk currently has an Active SAS Uri associated with it.
+ DiskStateActiveSAS DiskState = "ActiveSAS"
+ // DiskStateActiveSASFrozen The disk is attached to a VM in hibernated state and has an active SAS URI
+ // associated with it.
+ DiskStateActiveSASFrozen DiskState = "ActiveSASFrozen"
+ // DiskStateActiveUpload A disk is created for upload and a write token has been issued for uploading to
+ // it.
+ DiskStateActiveUpload DiskState = "ActiveUpload"
+ // DiskStateAttached The disk is currently attached to a running VM.
+ DiskStateAttached DiskState = "Attached"
+ // DiskStateFrozen The disk is attached to a VM which is in hibernated state.
+ DiskStateFrozen DiskState = "Frozen"
+ // DiskStateReadyToUpload A disk is ready to be created by upload by requesting a write token.
+ DiskStateReadyToUpload DiskState = "ReadyToUpload"
+ // DiskStateReserved The disk is attached to a stopped-deallocated VM.
+ DiskStateReserved DiskState = "Reserved"
+ // DiskStateUnattached The disk is not being used and can be attached to a VM.
+ DiskStateUnattached DiskState = "Unattached"
+)
+
+// PossibleDiskStateValues returns an array of possible values for the DiskState const type.
+func PossibleDiskStateValues() []DiskState {
+ return []DiskState{DiskStateActiveSAS, DiskStateActiveSASFrozen, DiskStateActiveUpload, DiskStateAttached, DiskStateFrozen, DiskStateReadyToUpload, DiskStateReserved, DiskStateUnattached}
+}
+
+// DiskStorageAccountTypes enumerates the values for disk storage account types.
+type DiskStorageAccountTypes string
+
+const (
+ // DiskStorageAccountTypesPremiumLRS Premium SSD locally redundant storage. Best for production and
+ // performance sensitive workloads.
+ DiskStorageAccountTypesPremiumLRS DiskStorageAccountTypes = "Premium_LRS"
+ // DiskStorageAccountTypesPremiumZRS Premium SSD zone redundant storage. Best for the production workloads
+ // that need storage resiliency against zone failures.
+ DiskStorageAccountTypesPremiumZRS DiskStorageAccountTypes = "Premium_ZRS"
+ // DiskStorageAccountTypesStandardLRS Standard HDD locally redundant storage. Best for backup,
+ // non-critical, and infrequent access.
+ DiskStorageAccountTypesStandardLRS DiskStorageAccountTypes = "Standard_LRS"
+ // DiskStorageAccountTypesStandardSSDLRS Standard SSD locally redundant storage. Best for web servers,
+ // lightly used enterprise applications and dev/test.
+ DiskStorageAccountTypesStandardSSDLRS DiskStorageAccountTypes = "StandardSSD_LRS"
+ // DiskStorageAccountTypesStandardSSDZRS Standard SSD zone redundant storage. Best for web servers, lightly
+ // used enterprise applications and dev/test that need storage resiliency against zone failures.
+ DiskStorageAccountTypesStandardSSDZRS DiskStorageAccountTypes = "StandardSSD_ZRS"
+ // DiskStorageAccountTypesUltraSSDLRS Ultra SSD locally redundant storage. Best for IO-intensive workloads
+ // such as SAP HANA, top tier databases (for example, SQL, Oracle), and other transaction-heavy workloads.
+ DiskStorageAccountTypesUltraSSDLRS DiskStorageAccountTypes = "UltraSSD_LRS"
+)
+
+// PossibleDiskStorageAccountTypesValues returns an array of possible values for the DiskStorageAccountTypes const type.
+func PossibleDiskStorageAccountTypesValues() []DiskStorageAccountTypes {
+ return []DiskStorageAccountTypes{DiskStorageAccountTypesPremiumLRS, DiskStorageAccountTypesPremiumZRS, DiskStorageAccountTypesStandardLRS, DiskStorageAccountTypesStandardSSDLRS, DiskStorageAccountTypesStandardSSDZRS, DiskStorageAccountTypesUltraSSDLRS}
+}
+
+// EncryptionType enumerates the values for encryption type.
+type EncryptionType string
+
+const (
+ // EncryptionTypeEncryptionAtRestWithCustomerKey Disk is encrypted at rest with Customer managed key that
+ // can be changed and revoked by a customer.
+ EncryptionTypeEncryptionAtRestWithCustomerKey EncryptionType = "EncryptionAtRestWithCustomerKey"
+ // EncryptionTypeEncryptionAtRestWithPlatformAndCustomerKeys Disk is encrypted at rest with 2 layers of
+ // encryption. One of the keys is Customer managed and the other key is Platform managed.
+ EncryptionTypeEncryptionAtRestWithPlatformAndCustomerKeys EncryptionType = "EncryptionAtRestWithPlatformAndCustomerKeys"
+ // EncryptionTypeEncryptionAtRestWithPlatformKey Disk is encrypted at rest with Platform managed key. It is
+ // the default encryption type. This is not a valid encryption type for disk encryption sets.
+ EncryptionTypeEncryptionAtRestWithPlatformKey EncryptionType = "EncryptionAtRestWithPlatformKey"
+)
+
+// PossibleEncryptionTypeValues returns an array of possible values for the EncryptionType const type.
+func PossibleEncryptionTypeValues() []EncryptionType {
+ return []EncryptionType{EncryptionTypeEncryptionAtRestWithCustomerKey, EncryptionTypeEncryptionAtRestWithPlatformAndCustomerKeys, EncryptionTypeEncryptionAtRestWithPlatformKey}
+}
+
+// ExecutionState enumerates the values for execution state.
+type ExecutionState string
+
+const (
+ // ExecutionStateCanceled ...
+ ExecutionStateCanceled ExecutionState = "Canceled"
+ // ExecutionStateFailed ...
+ ExecutionStateFailed ExecutionState = "Failed"
+ // ExecutionStatePending ...
+ ExecutionStatePending ExecutionState = "Pending"
+ // ExecutionStateRunning ...
+ ExecutionStateRunning ExecutionState = "Running"
+ // ExecutionStateSucceeded ...
+ ExecutionStateSucceeded ExecutionState = "Succeeded"
+ // ExecutionStateTimedOut ...
+ ExecutionStateTimedOut ExecutionState = "TimedOut"
+ // ExecutionStateUnknown ...
+ ExecutionStateUnknown ExecutionState = "Unknown"
+)
+
+// PossibleExecutionStateValues returns an array of possible values for the ExecutionState const type.
+func PossibleExecutionStateValues() []ExecutionState {
+ return []ExecutionState{ExecutionStateCanceled, ExecutionStateFailed, ExecutionStatePending, ExecutionStateRunning, ExecutionStateSucceeded, ExecutionStateTimedOut, ExecutionStateUnknown}
+}
+
+// ExpandTypesForGetCapacityReservationGroups enumerates the values for expand types for get capacity
+// reservation groups.
+type ExpandTypesForGetCapacityReservationGroups string
+
+const (
+ // ExpandTypesForGetCapacityReservationGroupsVirtualMachineScaleSetVMsref ...
+ ExpandTypesForGetCapacityReservationGroupsVirtualMachineScaleSetVMsref ExpandTypesForGetCapacityReservationGroups = "virtualMachineScaleSetVMs/$ref"
+ // ExpandTypesForGetCapacityReservationGroupsVirtualMachinesref ...
+ ExpandTypesForGetCapacityReservationGroupsVirtualMachinesref ExpandTypesForGetCapacityReservationGroups = "virtualMachines/$ref"
+)
+
+// PossibleExpandTypesForGetCapacityReservationGroupsValues returns an array of possible values for the ExpandTypesForGetCapacityReservationGroups const type.
+func PossibleExpandTypesForGetCapacityReservationGroupsValues() []ExpandTypesForGetCapacityReservationGroups {
+ return []ExpandTypesForGetCapacityReservationGroups{ExpandTypesForGetCapacityReservationGroupsVirtualMachineScaleSetVMsref, ExpandTypesForGetCapacityReservationGroupsVirtualMachinesref}
+}
+
+// ExpandTypesForGetVMScaleSets enumerates the values for expand types for get vm scale sets.
+type ExpandTypesForGetVMScaleSets string
+
+const (
+ // ExpandTypesForGetVMScaleSetsUserData ...
+ ExpandTypesForGetVMScaleSetsUserData ExpandTypesForGetVMScaleSets = "userData"
+)
+
+// PossibleExpandTypesForGetVMScaleSetsValues returns an array of possible values for the ExpandTypesForGetVMScaleSets const type.
+func PossibleExpandTypesForGetVMScaleSetsValues() []ExpandTypesForGetVMScaleSets {
+ return []ExpandTypesForGetVMScaleSets{ExpandTypesForGetVMScaleSetsUserData}
+}
+
+// ExtendedLocationType enumerates the values for extended location type.
+type ExtendedLocationType string
+
+const (
+ // ExtendedLocationTypeEdgeZone ...
+ ExtendedLocationTypeEdgeZone ExtendedLocationType = "EdgeZone"
+)
+
+// PossibleExtendedLocationTypeValues returns an array of possible values for the ExtendedLocationType const type.
+func PossibleExtendedLocationTypeValues() []ExtendedLocationType {
+ return []ExtendedLocationType{ExtendedLocationTypeEdgeZone}
+}
+
+// ExtendedLocationTypes enumerates the values for extended location types.
+type ExtendedLocationTypes string
+
+const (
+ // ExtendedLocationTypesEdgeZone ...
+ ExtendedLocationTypesEdgeZone ExtendedLocationTypes = "EdgeZone"
+)
+
+// PossibleExtendedLocationTypesValues returns an array of possible values for the ExtendedLocationTypes const type.
+func PossibleExtendedLocationTypesValues() []ExtendedLocationTypes {
+ return []ExtendedLocationTypes{ExtendedLocationTypesEdgeZone}
+}
+
+// GallerySharingPermissionTypes enumerates the values for gallery sharing permission types.
+type GallerySharingPermissionTypes string
+
+const (
+ // GallerySharingPermissionTypesGroups ...
+ GallerySharingPermissionTypesGroups GallerySharingPermissionTypes = "Groups"
+ // GallerySharingPermissionTypesPrivate ...
+ GallerySharingPermissionTypesPrivate GallerySharingPermissionTypes = "Private"
+)
+
+// PossibleGallerySharingPermissionTypesValues returns an array of possible values for the GallerySharingPermissionTypes const type.
+func PossibleGallerySharingPermissionTypesValues() []GallerySharingPermissionTypes {
+ return []GallerySharingPermissionTypes{GallerySharingPermissionTypesGroups, GallerySharingPermissionTypesPrivate}
+}
+
+// HostCaching enumerates the values for host caching.
+type HostCaching string
+
+const (
+ // HostCachingNone ...
+ HostCachingNone HostCaching = "None"
+ // HostCachingReadOnly ...
+ HostCachingReadOnly HostCaching = "ReadOnly"
+ // HostCachingReadWrite ...
+ HostCachingReadWrite HostCaching = "ReadWrite"
+)
+
+// PossibleHostCachingValues returns an array of possible values for the HostCaching const type.
+func PossibleHostCachingValues() []HostCaching {
+ return []HostCaching{HostCachingNone, HostCachingReadOnly, HostCachingReadWrite}
+}
+
+// HyperVGeneration enumerates the values for hyper v generation.
+type HyperVGeneration string
+
+const (
+ // HyperVGenerationV1 ...
+ HyperVGenerationV1 HyperVGeneration = "V1"
+ // HyperVGenerationV2 ...
+ HyperVGenerationV2 HyperVGeneration = "V2"
+)
+
+// PossibleHyperVGenerationValues returns an array of possible values for the HyperVGeneration const type.
+func PossibleHyperVGenerationValues() []HyperVGeneration {
+ return []HyperVGeneration{HyperVGenerationV1, HyperVGenerationV2}
+}
+
+// HyperVGenerationType enumerates the values for hyper v generation type.
+type HyperVGenerationType string
+
+const (
+ // HyperVGenerationTypeV1 ...
+ HyperVGenerationTypeV1 HyperVGenerationType = "V1"
+ // HyperVGenerationTypeV2 ...
+ HyperVGenerationTypeV2 HyperVGenerationType = "V2"
+)
+
+// PossibleHyperVGenerationTypeValues returns an array of possible values for the HyperVGenerationType const type.
+func PossibleHyperVGenerationTypeValues() []HyperVGenerationType {
+ return []HyperVGenerationType{HyperVGenerationTypeV1, HyperVGenerationTypeV2}
+}
+
+// HyperVGenerationTypes enumerates the values for hyper v generation types.
+type HyperVGenerationTypes string
+
+const (
+ // HyperVGenerationTypesV1 ...
+ HyperVGenerationTypesV1 HyperVGenerationTypes = "V1"
+ // HyperVGenerationTypesV2 ...
+ HyperVGenerationTypesV2 HyperVGenerationTypes = "V2"
+)
+
+// PossibleHyperVGenerationTypesValues returns an array of possible values for the HyperVGenerationTypes const type.
+func PossibleHyperVGenerationTypesValues() []HyperVGenerationTypes {
+ return []HyperVGenerationTypes{HyperVGenerationTypesV1, HyperVGenerationTypesV2}
+}
+
+// InstanceViewTypes enumerates the values for instance view types.
+type InstanceViewTypes string
+
+const (
+ // InstanceViewTypesInstanceView ...
+ InstanceViewTypesInstanceView InstanceViewTypes = "instanceView"
+ // InstanceViewTypesUserData ...
+ InstanceViewTypesUserData InstanceViewTypes = "userData"
+)
+
+// PossibleInstanceViewTypesValues returns an array of possible values for the InstanceViewTypes const type.
+func PossibleInstanceViewTypesValues() []InstanceViewTypes {
+ return []InstanceViewTypes{InstanceViewTypesInstanceView, InstanceViewTypesUserData}
+}
+
+// IntervalInMins enumerates the values for interval in mins.
+type IntervalInMins string
+
+const (
+ // IntervalInMinsFiveMins ...
+ IntervalInMinsFiveMins IntervalInMins = "FiveMins"
+ // IntervalInMinsSixtyMins ...
+ IntervalInMinsSixtyMins IntervalInMins = "SixtyMins"
+ // IntervalInMinsThirtyMins ...
+ IntervalInMinsThirtyMins IntervalInMins = "ThirtyMins"
+ // IntervalInMinsThreeMins ...
+ IntervalInMinsThreeMins IntervalInMins = "ThreeMins"
+)
+
+// PossibleIntervalInMinsValues returns an array of possible values for the IntervalInMins const type.
+func PossibleIntervalInMinsValues() []IntervalInMins {
+ return []IntervalInMins{IntervalInMinsFiveMins, IntervalInMinsSixtyMins, IntervalInMinsThirtyMins, IntervalInMinsThreeMins}
+}
+
+// IPVersion enumerates the values for ip version.
+type IPVersion string
+
+const (
+ // IPVersionIPv4 ...
+ IPVersionIPv4 IPVersion = "IPv4"
+ // IPVersionIPv6 ...
+ IPVersionIPv6 IPVersion = "IPv6"
+)
+
+// PossibleIPVersionValues returns an array of possible values for the IPVersion const type.
+func PossibleIPVersionValues() []IPVersion {
+ return []IPVersion{IPVersionIPv4, IPVersionIPv6}
+}
+
+// IPVersions enumerates the values for ip versions.
+type IPVersions string
+
+const (
+ // IPVersionsIPv4 ...
+ IPVersionsIPv4 IPVersions = "IPv4"
+ // IPVersionsIPv6 ...
+ IPVersionsIPv6 IPVersions = "IPv6"
+)
+
+// PossibleIPVersionsValues returns an array of possible values for the IPVersions const type.
+func PossibleIPVersionsValues() []IPVersions {
+ return []IPVersions{IPVersionsIPv4, IPVersionsIPv6}
+}
+
+// LinuxPatchAssessmentMode enumerates the values for linux patch assessment mode.
+type LinuxPatchAssessmentMode string
+
+const (
+ // LinuxPatchAssessmentModeAutomaticByPlatform ...
+ LinuxPatchAssessmentModeAutomaticByPlatform LinuxPatchAssessmentMode = "AutomaticByPlatform"
+ // LinuxPatchAssessmentModeImageDefault ...
+ LinuxPatchAssessmentModeImageDefault LinuxPatchAssessmentMode = "ImageDefault"
+)
+
+// PossibleLinuxPatchAssessmentModeValues returns an array of possible values for the LinuxPatchAssessmentMode const type.
+func PossibleLinuxPatchAssessmentModeValues() []LinuxPatchAssessmentMode {
+ return []LinuxPatchAssessmentMode{LinuxPatchAssessmentModeAutomaticByPlatform, LinuxPatchAssessmentModeImageDefault}
+}
+
+// LinuxVMGuestPatchMode enumerates the values for linux vm guest patch mode.
+type LinuxVMGuestPatchMode string
+
+const (
+ // LinuxVMGuestPatchModeAutomaticByPlatform ...
+ LinuxVMGuestPatchModeAutomaticByPlatform LinuxVMGuestPatchMode = "AutomaticByPlatform"
+ // LinuxVMGuestPatchModeImageDefault ...
+ LinuxVMGuestPatchModeImageDefault LinuxVMGuestPatchMode = "ImageDefault"
+)
+
+// PossibleLinuxVMGuestPatchModeValues returns an array of possible values for the LinuxVMGuestPatchMode const type.
+func PossibleLinuxVMGuestPatchModeValues() []LinuxVMGuestPatchMode {
+ return []LinuxVMGuestPatchMode{LinuxVMGuestPatchModeAutomaticByPlatform, LinuxVMGuestPatchModeImageDefault}
+}
+
+// MaintenanceOperationResultCodeTypes enumerates the values for maintenance operation result code types.
+type MaintenanceOperationResultCodeTypes string
+
+const (
+ // MaintenanceOperationResultCodeTypesMaintenanceAborted ...
+ MaintenanceOperationResultCodeTypesMaintenanceAborted MaintenanceOperationResultCodeTypes = "MaintenanceAborted"
+ // MaintenanceOperationResultCodeTypesMaintenanceCompleted ...
+ MaintenanceOperationResultCodeTypesMaintenanceCompleted MaintenanceOperationResultCodeTypes = "MaintenanceCompleted"
+ // MaintenanceOperationResultCodeTypesNone ...
+ MaintenanceOperationResultCodeTypesNone MaintenanceOperationResultCodeTypes = "None"
+ // MaintenanceOperationResultCodeTypesRetryLater ...
+ MaintenanceOperationResultCodeTypesRetryLater MaintenanceOperationResultCodeTypes = "RetryLater"
+)
+
+// PossibleMaintenanceOperationResultCodeTypesValues returns an array of possible values for the MaintenanceOperationResultCodeTypes const type.
+func PossibleMaintenanceOperationResultCodeTypesValues() []MaintenanceOperationResultCodeTypes {
+ return []MaintenanceOperationResultCodeTypes{MaintenanceOperationResultCodeTypesMaintenanceAborted, MaintenanceOperationResultCodeTypesMaintenanceCompleted, MaintenanceOperationResultCodeTypesNone, MaintenanceOperationResultCodeTypesRetryLater}
+}
+
+// NetworkAccessPolicy enumerates the values for network access policy.
+type NetworkAccessPolicy string
+
+const (
+ // NetworkAccessPolicyAllowAll The disk can be exported or uploaded to from any network.
+ NetworkAccessPolicyAllowAll NetworkAccessPolicy = "AllowAll"
+ // NetworkAccessPolicyAllowPrivate The disk can be exported or uploaded to using a DiskAccess resource's
+ // private endpoints.
+ NetworkAccessPolicyAllowPrivate NetworkAccessPolicy = "AllowPrivate"
+ // NetworkAccessPolicyDenyAll The disk cannot be exported.
+ NetworkAccessPolicyDenyAll NetworkAccessPolicy = "DenyAll"
+)
+
+// PossibleNetworkAccessPolicyValues returns an array of possible values for the NetworkAccessPolicy const type.
+func PossibleNetworkAccessPolicyValues() []NetworkAccessPolicy {
+ return []NetworkAccessPolicy{NetworkAccessPolicyAllowAll, NetworkAccessPolicyAllowPrivate, NetworkAccessPolicyDenyAll}
+}
+
+// NetworkAPIVersion enumerates the values for network api version.
+type NetworkAPIVersion string
+
+const (
+ // NetworkAPIVersionTwoZeroTwoZeroHyphenMinusOneOneHyphenMinusZeroOne ...
+ NetworkAPIVersionTwoZeroTwoZeroHyphenMinusOneOneHyphenMinusZeroOne NetworkAPIVersion = "2020-11-01"
+)
+
+// PossibleNetworkAPIVersionValues returns an array of possible values for the NetworkAPIVersion const type.
+func PossibleNetworkAPIVersionValues() []NetworkAPIVersion {
+ return []NetworkAPIVersion{NetworkAPIVersionTwoZeroTwoZeroHyphenMinusOneOneHyphenMinusZeroOne}
+}
+
+// OperatingSystemStateTypes enumerates the values for operating system state types.
+type OperatingSystemStateTypes string
+
+const (
+ // OperatingSystemStateTypesGeneralized Generalized image. Needs to be provisioned during deployment time.
+ OperatingSystemStateTypesGeneralized OperatingSystemStateTypes = "Generalized"
+ // OperatingSystemStateTypesSpecialized Specialized image. Contains already provisioned OS Disk.
+ OperatingSystemStateTypesSpecialized OperatingSystemStateTypes = "Specialized"
+)
+
+// PossibleOperatingSystemStateTypesValues returns an array of possible values for the OperatingSystemStateTypes const type.
+func PossibleOperatingSystemStateTypesValues() []OperatingSystemStateTypes {
+ return []OperatingSystemStateTypes{OperatingSystemStateTypesGeneralized, OperatingSystemStateTypesSpecialized}
+}
+
+// OperatingSystemType enumerates the values for operating system type.
+type OperatingSystemType string
+
+const (
+ // OperatingSystemTypeLinux ...
+ OperatingSystemTypeLinux OperatingSystemType = "Linux"
+ // OperatingSystemTypeWindows ...
+ OperatingSystemTypeWindows OperatingSystemType = "Windows"
+)
+
+// PossibleOperatingSystemTypeValues returns an array of possible values for the OperatingSystemType const type.
+func PossibleOperatingSystemTypeValues() []OperatingSystemType {
+ return []OperatingSystemType{OperatingSystemTypeLinux, OperatingSystemTypeWindows}
+}
+
+// OperatingSystemTypes enumerates the values for operating system types.
+type OperatingSystemTypes string
+
+const (
+ // OperatingSystemTypesLinux ...
+ OperatingSystemTypesLinux OperatingSystemTypes = "Linux"
+ // OperatingSystemTypesWindows ...
+ OperatingSystemTypesWindows OperatingSystemTypes = "Windows"
+)
+
+// PossibleOperatingSystemTypesValues returns an array of possible values for the OperatingSystemTypes const type.
+func PossibleOperatingSystemTypesValues() []OperatingSystemTypes {
+ return []OperatingSystemTypes{OperatingSystemTypesLinux, OperatingSystemTypesWindows}
+}
+
+// OrchestrationMode enumerates the values for orchestration mode.
+type OrchestrationMode string
+
+const (
+ // OrchestrationModeFlexible ...
+ OrchestrationModeFlexible OrchestrationMode = "Flexible"
+ // OrchestrationModeUniform ...
+ OrchestrationModeUniform OrchestrationMode = "Uniform"
+)
+
+// PossibleOrchestrationModeValues returns an array of possible values for the OrchestrationMode const type.
+func PossibleOrchestrationModeValues() []OrchestrationMode {
+ return []OrchestrationMode{OrchestrationModeFlexible, OrchestrationModeUniform}
+}
+
+// OrchestrationServiceNames enumerates the values for orchestration service names.
+type OrchestrationServiceNames string
+
+const (
+ // OrchestrationServiceNamesAutomaticRepairs ...
+ OrchestrationServiceNamesAutomaticRepairs OrchestrationServiceNames = "AutomaticRepairs"
+)
+
+// PossibleOrchestrationServiceNamesValues returns an array of possible values for the OrchestrationServiceNames const type.
+func PossibleOrchestrationServiceNamesValues() []OrchestrationServiceNames {
+ return []OrchestrationServiceNames{OrchestrationServiceNamesAutomaticRepairs}
+}
+
+// OrchestrationServiceState enumerates the values for orchestration service state.
+type OrchestrationServiceState string
+
+const (
+ // OrchestrationServiceStateNotRunning ...
+ OrchestrationServiceStateNotRunning OrchestrationServiceState = "NotRunning"
+ // OrchestrationServiceStateRunning ...
+ OrchestrationServiceStateRunning OrchestrationServiceState = "Running"
+ // OrchestrationServiceStateSuspended ...
+ OrchestrationServiceStateSuspended OrchestrationServiceState = "Suspended"
+)
+
+// PossibleOrchestrationServiceStateValues returns an array of possible values for the OrchestrationServiceState const type.
+func PossibleOrchestrationServiceStateValues() []OrchestrationServiceState {
+ return []OrchestrationServiceState{OrchestrationServiceStateNotRunning, OrchestrationServiceStateRunning, OrchestrationServiceStateSuspended}
+}
+
+// OrchestrationServiceStateAction enumerates the values for orchestration service state action.
+type OrchestrationServiceStateAction string
+
+const (
+ // OrchestrationServiceStateActionResume ...
+ OrchestrationServiceStateActionResume OrchestrationServiceStateAction = "Resume"
+ // OrchestrationServiceStateActionSuspend ...
+ OrchestrationServiceStateActionSuspend OrchestrationServiceStateAction = "Suspend"
+)
+
+// PossibleOrchestrationServiceStateActionValues returns an array of possible values for the OrchestrationServiceStateAction const type.
+func PossibleOrchestrationServiceStateActionValues() []OrchestrationServiceStateAction {
+ return []OrchestrationServiceStateAction{OrchestrationServiceStateActionResume, OrchestrationServiceStateActionSuspend}
+}
+
+// PassNames enumerates the values for pass names.
+type PassNames string
+
+const (
+ // PassNamesOobeSystem ...
+ PassNamesOobeSystem PassNames = "OobeSystem"
+)
+
+// PossiblePassNamesValues returns an array of possible values for the PassNames const type.
+func PossiblePassNamesValues() []PassNames {
+ return []PassNames{PassNamesOobeSystem}
+}
+
+// PatchAssessmentState enumerates the values for patch assessment state.
+type PatchAssessmentState string
+
+const (
+ // PatchAssessmentStateAvailable ...
+ PatchAssessmentStateAvailable PatchAssessmentState = "Available"
+ // PatchAssessmentStateUnknown ...
+ PatchAssessmentStateUnknown PatchAssessmentState = "Unknown"
+)
+
+// PossiblePatchAssessmentStateValues returns an array of possible values for the PatchAssessmentState const type.
+func PossiblePatchAssessmentStateValues() []PatchAssessmentState {
+ return []PatchAssessmentState{PatchAssessmentStateAvailable, PatchAssessmentStateUnknown}
+}
+
+// PatchInstallationState enumerates the values for patch installation state.
+type PatchInstallationState string
+
+const (
+ // PatchInstallationStateExcluded ...
+ PatchInstallationStateExcluded PatchInstallationState = "Excluded"
+ // PatchInstallationStateFailed ...
+ PatchInstallationStateFailed PatchInstallationState = "Failed"
+ // PatchInstallationStateInstalled ...
+ PatchInstallationStateInstalled PatchInstallationState = "Installed"
+ // PatchInstallationStateNotSelected ...
+ PatchInstallationStateNotSelected PatchInstallationState = "NotSelected"
+ // PatchInstallationStatePending ...
+ PatchInstallationStatePending PatchInstallationState = "Pending"
+ // PatchInstallationStateUnknown ...
+ PatchInstallationStateUnknown PatchInstallationState = "Unknown"
+)
+
+// PossiblePatchInstallationStateValues returns an array of possible values for the PatchInstallationState const type.
+func PossiblePatchInstallationStateValues() []PatchInstallationState {
+ return []PatchInstallationState{PatchInstallationStateExcluded, PatchInstallationStateFailed, PatchInstallationStateInstalled, PatchInstallationStateNotSelected, PatchInstallationStatePending, PatchInstallationStateUnknown}
+}
+
+// PatchOperationStatus enumerates the values for patch operation status.
+type PatchOperationStatus string
+
+const (
+ // PatchOperationStatusCompletedWithWarnings ...
+ PatchOperationStatusCompletedWithWarnings PatchOperationStatus = "CompletedWithWarnings"
+ // PatchOperationStatusFailed ...
+ PatchOperationStatusFailed PatchOperationStatus = "Failed"
+ // PatchOperationStatusInProgress ...
+ PatchOperationStatusInProgress PatchOperationStatus = "InProgress"
+ // PatchOperationStatusSucceeded ...
+ PatchOperationStatusSucceeded PatchOperationStatus = "Succeeded"
+ // PatchOperationStatusUnknown ...
+ PatchOperationStatusUnknown PatchOperationStatus = "Unknown"
+)
+
+// PossiblePatchOperationStatusValues returns an array of possible values for the PatchOperationStatus const type.
+func PossiblePatchOperationStatusValues() []PatchOperationStatus {
+ return []PatchOperationStatus{PatchOperationStatusCompletedWithWarnings, PatchOperationStatusFailed, PatchOperationStatusInProgress, PatchOperationStatusSucceeded, PatchOperationStatusUnknown}
+}
+
+// PrivateEndpointConnectionProvisioningState enumerates the values for private endpoint connection
+// provisioning state.
+type PrivateEndpointConnectionProvisioningState string
+
+const (
+ // PrivateEndpointConnectionProvisioningStateCreating ...
+ PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = "Creating"
+ // PrivateEndpointConnectionProvisioningStateDeleting ...
+ PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting"
+ // PrivateEndpointConnectionProvisioningStateFailed ...
+ PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = "Failed"
+ // PrivateEndpointConnectionProvisioningStateSucceeded ...
+ PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded"
+)
+
+// PossiblePrivateEndpointConnectionProvisioningStateValues returns an array of possible values for the PrivateEndpointConnectionProvisioningState const type.
+func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState {
+ return []PrivateEndpointConnectionProvisioningState{PrivateEndpointConnectionProvisioningStateCreating, PrivateEndpointConnectionProvisioningStateDeleting, PrivateEndpointConnectionProvisioningStateFailed, PrivateEndpointConnectionProvisioningStateSucceeded}
+}
+
+// PrivateEndpointServiceConnectionStatus enumerates the values for private endpoint service connection status.
+type PrivateEndpointServiceConnectionStatus string
+
+const (
+ // PrivateEndpointServiceConnectionStatusApproved ...
+ PrivateEndpointServiceConnectionStatusApproved PrivateEndpointServiceConnectionStatus = "Approved"
+ // PrivateEndpointServiceConnectionStatusPending ...
+ PrivateEndpointServiceConnectionStatusPending PrivateEndpointServiceConnectionStatus = "Pending"
+ // PrivateEndpointServiceConnectionStatusRejected ...
+ PrivateEndpointServiceConnectionStatusRejected PrivateEndpointServiceConnectionStatus = "Rejected"
+)
+
+// PossiblePrivateEndpointServiceConnectionStatusValues returns an array of possible values for the PrivateEndpointServiceConnectionStatus const type.
+func PossiblePrivateEndpointServiceConnectionStatusValues() []PrivateEndpointServiceConnectionStatus {
+ return []PrivateEndpointServiceConnectionStatus{PrivateEndpointServiceConnectionStatusApproved, PrivateEndpointServiceConnectionStatusPending, PrivateEndpointServiceConnectionStatusRejected}
+}
+
+// ProtocolTypes enumerates the values for protocol types.
+type ProtocolTypes string
+
+const (
+ // ProtocolTypesHTTP ...
+ ProtocolTypesHTTP ProtocolTypes = "Http"
+ // ProtocolTypesHTTPS ...
+ ProtocolTypesHTTPS ProtocolTypes = "Https"
+)
+
+// PossibleProtocolTypesValues returns an array of possible values for the ProtocolTypes const type.
+func PossibleProtocolTypesValues() []ProtocolTypes {
+ return []ProtocolTypes{ProtocolTypesHTTP, ProtocolTypesHTTPS}
+}
+
+// ProvisioningState enumerates the values for provisioning state.
+type ProvisioningState string
+
+const (
+ // ProvisioningStateCreating ...
+ ProvisioningStateCreating ProvisioningState = "Creating"
+ // ProvisioningStateDeleting ...
+ ProvisioningStateDeleting ProvisioningState = "Deleting"
+ // ProvisioningStateFailed ...
+ ProvisioningStateFailed ProvisioningState = "Failed"
+ // ProvisioningStateMigrating ...
+ ProvisioningStateMigrating ProvisioningState = "Migrating"
+ // ProvisioningStateSucceeded ...
+ ProvisioningStateSucceeded ProvisioningState = "Succeeded"
+ // ProvisioningStateUpdating ...
+ ProvisioningStateUpdating ProvisioningState = "Updating"
+)
+
+// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type.
+func PossibleProvisioningStateValues() []ProvisioningState {
+ return []ProvisioningState{ProvisioningStateCreating, ProvisioningStateDeleting, ProvisioningStateFailed, ProvisioningStateMigrating, ProvisioningStateSucceeded, ProvisioningStateUpdating}
+}
+
+// ProvisioningState1 enumerates the values for provisioning state 1.
+type ProvisioningState1 string
+
+const (
+ // ProvisioningState1Creating ...
+ ProvisioningState1Creating ProvisioningState1 = "Creating"
+ // ProvisioningState1Deleting ...
+ ProvisioningState1Deleting ProvisioningState1 = "Deleting"
+ // ProvisioningState1Failed ...
+ ProvisioningState1Failed ProvisioningState1 = "Failed"
+ // ProvisioningState1Migrating ...
+ ProvisioningState1Migrating ProvisioningState1 = "Migrating"
+ // ProvisioningState1Succeeded ...
+ ProvisioningState1Succeeded ProvisioningState1 = "Succeeded"
+ // ProvisioningState1Updating ...
+ ProvisioningState1Updating ProvisioningState1 = "Updating"
+)
+
+// PossibleProvisioningState1Values returns an array of possible values for the ProvisioningState1 const type.
+func PossibleProvisioningState1Values() []ProvisioningState1 {
+ return []ProvisioningState1{ProvisioningState1Creating, ProvisioningState1Deleting, ProvisioningState1Failed, ProvisioningState1Migrating, ProvisioningState1Succeeded, ProvisioningState1Updating}
+}
+
+// ProvisioningState2 enumerates the values for provisioning state 2.
+type ProvisioningState2 string
+
+const (
+ // ProvisioningState2Creating ...
+ ProvisioningState2Creating ProvisioningState2 = "Creating"
+ // ProvisioningState2Deleting ...
+ ProvisioningState2Deleting ProvisioningState2 = "Deleting"
+ // ProvisioningState2Failed ...
+ ProvisioningState2Failed ProvisioningState2 = "Failed"
+ // ProvisioningState2Migrating ...
+ ProvisioningState2Migrating ProvisioningState2 = "Migrating"
+ // ProvisioningState2Succeeded ...
+ ProvisioningState2Succeeded ProvisioningState2 = "Succeeded"
+ // ProvisioningState2Updating ...
+ ProvisioningState2Updating ProvisioningState2 = "Updating"
+)
+
+// PossibleProvisioningState2Values returns an array of possible values for the ProvisioningState2 const type.
+func PossibleProvisioningState2Values() []ProvisioningState2 {
+ return []ProvisioningState2{ProvisioningState2Creating, ProvisioningState2Deleting, ProvisioningState2Failed, ProvisioningState2Migrating, ProvisioningState2Succeeded, ProvisioningState2Updating}
+}
+
+// ProvisioningState3 enumerates the values for provisioning state 3.
+type ProvisioningState3 string
+
+const (
+ // ProvisioningState3Creating ...
+ ProvisioningState3Creating ProvisioningState3 = "Creating"
+ // ProvisioningState3Deleting ...
+ ProvisioningState3Deleting ProvisioningState3 = "Deleting"
+ // ProvisioningState3Failed ...
+ ProvisioningState3Failed ProvisioningState3 = "Failed"
+ // ProvisioningState3Migrating ...
+ ProvisioningState3Migrating ProvisioningState3 = "Migrating"
+ // ProvisioningState3Succeeded ...
+ ProvisioningState3Succeeded ProvisioningState3 = "Succeeded"
+ // ProvisioningState3Updating ...
+ ProvisioningState3Updating ProvisioningState3 = "Updating"
+)
+
+// PossibleProvisioningState3Values returns an array of possible values for the ProvisioningState3 const type.
+func PossibleProvisioningState3Values() []ProvisioningState3 {
+ return []ProvisioningState3{ProvisioningState3Creating, ProvisioningState3Deleting, ProvisioningState3Failed, ProvisioningState3Migrating, ProvisioningState3Succeeded, ProvisioningState3Updating}
+}
+
+// ProximityPlacementGroupType enumerates the values for proximity placement group type.
+type ProximityPlacementGroupType string
+
+const (
+ // ProximityPlacementGroupTypeStandard ...
+ ProximityPlacementGroupTypeStandard ProximityPlacementGroupType = "Standard"
+ // ProximityPlacementGroupTypeUltra ...
+ ProximityPlacementGroupTypeUltra ProximityPlacementGroupType = "Ultra"
+)
+
+// PossibleProximityPlacementGroupTypeValues returns an array of possible values for the ProximityPlacementGroupType const type.
+func PossibleProximityPlacementGroupTypeValues() []ProximityPlacementGroupType {
+ return []ProximityPlacementGroupType{ProximityPlacementGroupTypeStandard, ProximityPlacementGroupTypeUltra}
+}
+
+// PublicIPAddressSkuName enumerates the values for public ip address sku name.
+type PublicIPAddressSkuName string
+
+const (
+ // PublicIPAddressSkuNameBasic ...
+ PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic"
+ // PublicIPAddressSkuNameStandard ...
+ PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard"
+)
+
+// PossiblePublicIPAddressSkuNameValues returns an array of possible values for the PublicIPAddressSkuName const type.
+func PossiblePublicIPAddressSkuNameValues() []PublicIPAddressSkuName {
+ return []PublicIPAddressSkuName{PublicIPAddressSkuNameBasic, PublicIPAddressSkuNameStandard}
+}
+
+// PublicIPAddressSkuTier enumerates the values for public ip address sku tier.
+type PublicIPAddressSkuTier string
+
+const (
+ // PublicIPAddressSkuTierGlobal ...
+ PublicIPAddressSkuTierGlobal PublicIPAddressSkuTier = "Global"
+ // PublicIPAddressSkuTierRegional ...
+ PublicIPAddressSkuTierRegional PublicIPAddressSkuTier = "Regional"
+)
+
+// PossiblePublicIPAddressSkuTierValues returns an array of possible values for the PublicIPAddressSkuTier const type.
+func PossiblePublicIPAddressSkuTierValues() []PublicIPAddressSkuTier {
+ return []PublicIPAddressSkuTier{PublicIPAddressSkuTierGlobal, PublicIPAddressSkuTierRegional}
+}
+
+// PublicIPAllocationMethod enumerates the values for public ip allocation method.
+type PublicIPAllocationMethod string
+
+const (
+ // PublicIPAllocationMethodDynamic ...
+ PublicIPAllocationMethodDynamic PublicIPAllocationMethod = "Dynamic"
+ // PublicIPAllocationMethodStatic ...
+ PublicIPAllocationMethodStatic PublicIPAllocationMethod = "Static"
+)
+
+// PossiblePublicIPAllocationMethodValues returns an array of possible values for the PublicIPAllocationMethod const type.
+func PossiblePublicIPAllocationMethodValues() []PublicIPAllocationMethod {
+ return []PublicIPAllocationMethod{PublicIPAllocationMethodDynamic, PublicIPAllocationMethodStatic}
+}
+
+// PublicNetworkAccess enumerates the values for public network access.
+type PublicNetworkAccess string
+
+const (
+ // PublicNetworkAccessDisabled You cannot access the underlying data of the disk publicly on the internet
+ // even when NetworkAccessPolicy is set to AllowAll. You can access the data via the SAS URI only from your
+ // trusted Azure VNET when NetworkAccessPolicy is set to AllowPrivate.
+ PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled"
+ // PublicNetworkAccessEnabled You can generate a SAS URI to access the underlying data of the disk publicly
+ // on the internet when NetworkAccessPolicy is set to AllowAll. You can access the data via the SAS URI
+ // only from your trusted Azure VNET when NetworkAccessPolicy is set to AllowPrivate.
+ PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled"
+)
+
+// PossiblePublicNetworkAccessValues returns an array of possible values for the PublicNetworkAccess const type.
+func PossiblePublicNetworkAccessValues() []PublicNetworkAccess {
+ return []PublicNetworkAccess{PublicNetworkAccessDisabled, PublicNetworkAccessEnabled}
+}
+
+// ReplicationMode enumerates the values for replication mode.
+type ReplicationMode string
+
+const (
+ // ReplicationModeFull ...
+ ReplicationModeFull ReplicationMode = "Full"
+ // ReplicationModeShallow ...
+ ReplicationModeShallow ReplicationMode = "Shallow"
+)
+
+// PossibleReplicationModeValues returns an array of possible values for the ReplicationMode const type.
+func PossibleReplicationModeValues() []ReplicationMode {
+ return []ReplicationMode{ReplicationModeFull, ReplicationModeShallow}
+}
+
+// ReplicationState enumerates the values for replication state.
+type ReplicationState string
+
+const (
+ // ReplicationStateCompleted ...
+ ReplicationStateCompleted ReplicationState = "Completed"
+ // ReplicationStateFailed ...
+ ReplicationStateFailed ReplicationState = "Failed"
+ // ReplicationStateReplicating ...
+ ReplicationStateReplicating ReplicationState = "Replicating"
+ // ReplicationStateUnknown ...
+ ReplicationStateUnknown ReplicationState = "Unknown"
+)
+
+// PossibleReplicationStateValues returns an array of possible values for the ReplicationState const type.
+func PossibleReplicationStateValues() []ReplicationState {
+ return []ReplicationState{ReplicationStateCompleted, ReplicationStateFailed, ReplicationStateReplicating, ReplicationStateUnknown}
+}
+
+// ReplicationStatusTypes enumerates the values for replication status types.
+type ReplicationStatusTypes string
+
+const (
+ // ReplicationStatusTypesReplicationStatus ...
+ ReplicationStatusTypesReplicationStatus ReplicationStatusTypes = "ReplicationStatus"
+)
+
+// PossibleReplicationStatusTypesValues returns an array of possible values for the ReplicationStatusTypes const type.
+func PossibleReplicationStatusTypesValues() []ReplicationStatusTypes {
+ return []ReplicationStatusTypes{ReplicationStatusTypesReplicationStatus}
+}
+
+// ResourceIdentityType enumerates the values for resource identity type.
+type ResourceIdentityType string
+
+const (
+ // ResourceIdentityTypeNone ...
+ ResourceIdentityTypeNone ResourceIdentityType = "None"
+ // ResourceIdentityTypeSystemAssigned ...
+ ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned"
+ // ResourceIdentityTypeSystemAssignedUserAssigned ...
+ ResourceIdentityTypeSystemAssignedUserAssigned ResourceIdentityType = "SystemAssigned, UserAssigned"
+ // ResourceIdentityTypeUserAssigned ...
+ ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned"
+)
+
+// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type.
+func PossibleResourceIdentityTypeValues() []ResourceIdentityType {
+ return []ResourceIdentityType{ResourceIdentityTypeNone, ResourceIdentityTypeSystemAssigned, ResourceIdentityTypeSystemAssignedUserAssigned, ResourceIdentityTypeUserAssigned}
+}
+
+// ResourceSkuCapacityScaleType enumerates the values for resource sku capacity scale type.
+type ResourceSkuCapacityScaleType string
+
+const (
+ // ResourceSkuCapacityScaleTypeAutomatic ...
+ ResourceSkuCapacityScaleTypeAutomatic ResourceSkuCapacityScaleType = "Automatic"
+ // ResourceSkuCapacityScaleTypeManual ...
+ ResourceSkuCapacityScaleTypeManual ResourceSkuCapacityScaleType = "Manual"
+ // ResourceSkuCapacityScaleTypeNone ...
+ ResourceSkuCapacityScaleTypeNone ResourceSkuCapacityScaleType = "None"
+)
+
+// PossibleResourceSkuCapacityScaleTypeValues returns an array of possible values for the ResourceSkuCapacityScaleType const type.
+func PossibleResourceSkuCapacityScaleTypeValues() []ResourceSkuCapacityScaleType {
+ return []ResourceSkuCapacityScaleType{ResourceSkuCapacityScaleTypeAutomatic, ResourceSkuCapacityScaleTypeManual, ResourceSkuCapacityScaleTypeNone}
+}
+
+// ResourceSkuRestrictionsReasonCode enumerates the values for resource sku restrictions reason code.
+type ResourceSkuRestrictionsReasonCode string
+
+const (
+ // ResourceSkuRestrictionsReasonCodeNotAvailableForSubscription ...
+ ResourceSkuRestrictionsReasonCodeNotAvailableForSubscription ResourceSkuRestrictionsReasonCode = "NotAvailableForSubscription"
+ // ResourceSkuRestrictionsReasonCodeQuotaID ...
+ ResourceSkuRestrictionsReasonCodeQuotaID ResourceSkuRestrictionsReasonCode = "QuotaId"
+)
+
+// PossibleResourceSkuRestrictionsReasonCodeValues returns an array of possible values for the ResourceSkuRestrictionsReasonCode const type.
+func PossibleResourceSkuRestrictionsReasonCodeValues() []ResourceSkuRestrictionsReasonCode {
+ return []ResourceSkuRestrictionsReasonCode{ResourceSkuRestrictionsReasonCodeNotAvailableForSubscription, ResourceSkuRestrictionsReasonCodeQuotaID}
+}
+
+// ResourceSkuRestrictionsType enumerates the values for resource sku restrictions type.
+type ResourceSkuRestrictionsType string
+
+const (
+ // ResourceSkuRestrictionsTypeLocation ...
+ ResourceSkuRestrictionsTypeLocation ResourceSkuRestrictionsType = "Location"
+ // ResourceSkuRestrictionsTypeZone ...
+ ResourceSkuRestrictionsTypeZone ResourceSkuRestrictionsType = "Zone"
+)
+
+// PossibleResourceSkuRestrictionsTypeValues returns an array of possible values for the ResourceSkuRestrictionsType const type.
+func PossibleResourceSkuRestrictionsTypeValues() []ResourceSkuRestrictionsType {
+ return []ResourceSkuRestrictionsType{ResourceSkuRestrictionsTypeLocation, ResourceSkuRestrictionsTypeZone}
+}
+
+// RestorePointCollectionExpandOptions enumerates the values for restore point collection expand options.
+type RestorePointCollectionExpandOptions string
+
+const (
+ // RestorePointCollectionExpandOptionsRestorePoints ...
+ RestorePointCollectionExpandOptionsRestorePoints RestorePointCollectionExpandOptions = "restorePoints"
+)
+
+// PossibleRestorePointCollectionExpandOptionsValues returns an array of possible values for the RestorePointCollectionExpandOptions const type.
+func PossibleRestorePointCollectionExpandOptionsValues() []RestorePointCollectionExpandOptions {
+ return []RestorePointCollectionExpandOptions{RestorePointCollectionExpandOptionsRestorePoints}
+}
+
+// RollingUpgradeActionType enumerates the values for rolling upgrade action type.
+type RollingUpgradeActionType string
+
+const (
+ // RollingUpgradeActionTypeCancel ...
+ RollingUpgradeActionTypeCancel RollingUpgradeActionType = "Cancel"
+ // RollingUpgradeActionTypeStart ...
+ RollingUpgradeActionTypeStart RollingUpgradeActionType = "Start"
+)
+
+// PossibleRollingUpgradeActionTypeValues returns an array of possible values for the RollingUpgradeActionType const type.
+func PossibleRollingUpgradeActionTypeValues() []RollingUpgradeActionType {
+ return []RollingUpgradeActionType{RollingUpgradeActionTypeCancel, RollingUpgradeActionTypeStart}
+}
+
+// RollingUpgradeStatusCode enumerates the values for rolling upgrade status code.
+type RollingUpgradeStatusCode string
+
+const (
+ // RollingUpgradeStatusCodeCancelled ...
+ RollingUpgradeStatusCodeCancelled RollingUpgradeStatusCode = "Cancelled"
+ // RollingUpgradeStatusCodeCompleted ...
+ RollingUpgradeStatusCodeCompleted RollingUpgradeStatusCode = "Completed"
+ // RollingUpgradeStatusCodeFaulted ...
+ RollingUpgradeStatusCodeFaulted RollingUpgradeStatusCode = "Faulted"
+ // RollingUpgradeStatusCodeRollingForward ...
+ RollingUpgradeStatusCodeRollingForward RollingUpgradeStatusCode = "RollingForward"
+)
+
+// PossibleRollingUpgradeStatusCodeValues returns an array of possible values for the RollingUpgradeStatusCode const type.
+func PossibleRollingUpgradeStatusCodeValues() []RollingUpgradeStatusCode {
+ return []RollingUpgradeStatusCode{RollingUpgradeStatusCodeCancelled, RollingUpgradeStatusCodeCompleted, RollingUpgradeStatusCodeFaulted, RollingUpgradeStatusCodeRollingForward}
+}
+
+// SecurityTypes enumerates the values for security types.
+type SecurityTypes string
+
+const (
+ // SecurityTypesTrustedLaunch ...
+ SecurityTypesTrustedLaunch SecurityTypes = "TrustedLaunch"
+)
+
+// PossibleSecurityTypesValues returns an array of possible values for the SecurityTypes const type.
+func PossibleSecurityTypesValues() []SecurityTypes {
+ return []SecurityTypes{SecurityTypesTrustedLaunch}
+}
+
+// SelectPermissions enumerates the values for select permissions.
+type SelectPermissions string
+
+const (
+ // SelectPermissionsPermissions ...
+ SelectPermissionsPermissions SelectPermissions = "Permissions"
+)
+
+// PossibleSelectPermissionsValues returns an array of possible values for the SelectPermissions const type.
+func PossibleSelectPermissionsValues() []SelectPermissions {
+ return []SelectPermissions{SelectPermissionsPermissions}
+}
+
+// SettingNames enumerates the values for setting names.
+type SettingNames string
+
+const (
+ // SettingNamesAutoLogon ...
+ SettingNamesAutoLogon SettingNames = "AutoLogon"
+ // SettingNamesFirstLogonCommands ...
+ SettingNamesFirstLogonCommands SettingNames = "FirstLogonCommands"
+)
+
+// PossibleSettingNamesValues returns an array of possible values for the SettingNames const type.
+func PossibleSettingNamesValues() []SettingNames {
+ return []SettingNames{SettingNamesAutoLogon, SettingNamesFirstLogonCommands}
+}
+
+// SharedToValues enumerates the values for shared to values.
+type SharedToValues string
+
+const (
+ // SharedToValuesTenant ...
+ SharedToValuesTenant SharedToValues = "tenant"
+)
+
+// PossibleSharedToValuesValues returns an array of possible values for the SharedToValues const type.
+func PossibleSharedToValuesValues() []SharedToValues {
+ return []SharedToValues{SharedToValuesTenant}
+}
+
+// SharingProfileGroupTypes enumerates the values for sharing profile group types.
+type SharingProfileGroupTypes string
+
+const (
+ // SharingProfileGroupTypesAADTenants ...
+ SharingProfileGroupTypesAADTenants SharingProfileGroupTypes = "AADTenants"
+ // SharingProfileGroupTypesSubscriptions ...
+ SharingProfileGroupTypesSubscriptions SharingProfileGroupTypes = "Subscriptions"
+)
+
+// PossibleSharingProfileGroupTypesValues returns an array of possible values for the SharingProfileGroupTypes const type.
+func PossibleSharingProfileGroupTypesValues() []SharingProfileGroupTypes {
+ return []SharingProfileGroupTypes{SharingProfileGroupTypesAADTenants, SharingProfileGroupTypesSubscriptions}
+}
+
+// SharingUpdateOperationTypes enumerates the values for sharing update operation types.
+type SharingUpdateOperationTypes string
+
+const (
+ // SharingUpdateOperationTypesAdd ...
+ SharingUpdateOperationTypesAdd SharingUpdateOperationTypes = "Add"
+ // SharingUpdateOperationTypesRemove ...
+ SharingUpdateOperationTypesRemove SharingUpdateOperationTypes = "Remove"
+ // SharingUpdateOperationTypesReset ...
+ SharingUpdateOperationTypesReset SharingUpdateOperationTypes = "Reset"
+)
+
+// PossibleSharingUpdateOperationTypesValues returns an array of possible values for the SharingUpdateOperationTypes const type.
+func PossibleSharingUpdateOperationTypesValues() []SharingUpdateOperationTypes {
+ return []SharingUpdateOperationTypes{SharingUpdateOperationTypesAdd, SharingUpdateOperationTypesRemove, SharingUpdateOperationTypesReset}
+}
+
+// SnapshotStorageAccountTypes enumerates the values for snapshot storage account types.
+type SnapshotStorageAccountTypes string
+
+const (
+ // SnapshotStorageAccountTypesPremiumLRS Premium SSD locally redundant storage
+ SnapshotStorageAccountTypesPremiumLRS SnapshotStorageAccountTypes = "Premium_LRS"
+ // SnapshotStorageAccountTypesStandardLRS Standard HDD locally redundant storage
+ SnapshotStorageAccountTypesStandardLRS SnapshotStorageAccountTypes = "Standard_LRS"
+ // SnapshotStorageAccountTypesStandardZRS Standard zone redundant storage
+ SnapshotStorageAccountTypesStandardZRS SnapshotStorageAccountTypes = "Standard_ZRS"
+)
+
+// PossibleSnapshotStorageAccountTypesValues returns an array of possible values for the SnapshotStorageAccountTypes const type.
+func PossibleSnapshotStorageAccountTypesValues() []SnapshotStorageAccountTypes {
+ return []SnapshotStorageAccountTypes{SnapshotStorageAccountTypesPremiumLRS, SnapshotStorageAccountTypesStandardLRS, SnapshotStorageAccountTypesStandardZRS}
+}
+
+// StatusLevelTypes enumerates the values for status level types.
+type StatusLevelTypes string
+
+const (
+ // StatusLevelTypesError ...
+ StatusLevelTypesError StatusLevelTypes = "Error"
+ // StatusLevelTypesInfo ...
+ StatusLevelTypesInfo StatusLevelTypes = "Info"
+ // StatusLevelTypesWarning ...
+ StatusLevelTypesWarning StatusLevelTypes = "Warning"
+)
+
+// PossibleStatusLevelTypesValues returns an array of possible values for the StatusLevelTypes const type.
+func PossibleStatusLevelTypesValues() []StatusLevelTypes {
+ return []StatusLevelTypes{StatusLevelTypesError, StatusLevelTypesInfo, StatusLevelTypesWarning}
+}
+
+// StorageAccountType enumerates the values for storage account type.
+type StorageAccountType string
+
+const (
+ // StorageAccountTypePremiumLRS ...
+ StorageAccountTypePremiumLRS StorageAccountType = "Premium_LRS"
+ // StorageAccountTypeStandardLRS ...
+ StorageAccountTypeStandardLRS StorageAccountType = "Standard_LRS"
+ // StorageAccountTypeStandardZRS ...
+ StorageAccountTypeStandardZRS StorageAccountType = "Standard_ZRS"
+)
+
+// PossibleStorageAccountTypeValues returns an array of possible values for the StorageAccountType const type.
+func PossibleStorageAccountTypeValues() []StorageAccountType {
+ return []StorageAccountType{StorageAccountTypePremiumLRS, StorageAccountTypeStandardLRS, StorageAccountTypeStandardZRS}
+}
+
+// StorageAccountTypes enumerates the values for storage account types.
+type StorageAccountTypes string
+
+const (
+ // StorageAccountTypesPremiumLRS ...
+ StorageAccountTypesPremiumLRS StorageAccountTypes = "Premium_LRS"
+ // StorageAccountTypesPremiumZRS ...
+ StorageAccountTypesPremiumZRS StorageAccountTypes = "Premium_ZRS"
+ // StorageAccountTypesStandardLRS ...
+ StorageAccountTypesStandardLRS StorageAccountTypes = "Standard_LRS"
+ // StorageAccountTypesStandardSSDLRS ...
+ StorageAccountTypesStandardSSDLRS StorageAccountTypes = "StandardSSD_LRS"
+ // StorageAccountTypesStandardSSDZRS ...
+ StorageAccountTypesStandardSSDZRS StorageAccountTypes = "StandardSSD_ZRS"
+ // StorageAccountTypesUltraSSDLRS ...
+ StorageAccountTypesUltraSSDLRS StorageAccountTypes = "UltraSSD_LRS"
+)
+
+// PossibleStorageAccountTypesValues returns an array of possible values for the StorageAccountTypes const type.
+func PossibleStorageAccountTypesValues() []StorageAccountTypes {
+ return []StorageAccountTypes{StorageAccountTypesPremiumLRS, StorageAccountTypesPremiumZRS, StorageAccountTypesStandardLRS, StorageAccountTypesStandardSSDLRS, StorageAccountTypesStandardSSDZRS, StorageAccountTypesUltraSSDLRS}
+}
+
+// UpgradeMode enumerates the values for upgrade mode.
+type UpgradeMode string
+
+const (
+ // UpgradeModeAutomatic ...
+ UpgradeModeAutomatic UpgradeMode = "Automatic"
+ // UpgradeModeManual ...
+ UpgradeModeManual UpgradeMode = "Manual"
+ // UpgradeModeRolling ...
+ UpgradeModeRolling UpgradeMode = "Rolling"
+)
+
+// PossibleUpgradeModeValues returns an array of possible values for the UpgradeMode const type.
+func PossibleUpgradeModeValues() []UpgradeMode {
+ return []UpgradeMode{UpgradeModeAutomatic, UpgradeModeManual, UpgradeModeRolling}
+}
+
+// UpgradeOperationInvoker enumerates the values for upgrade operation invoker.
+type UpgradeOperationInvoker string
+
+const (
+ // UpgradeOperationInvokerPlatform ...
+ UpgradeOperationInvokerPlatform UpgradeOperationInvoker = "Platform"
+ // UpgradeOperationInvokerUnknown ...
+ UpgradeOperationInvokerUnknown UpgradeOperationInvoker = "Unknown"
+ // UpgradeOperationInvokerUser ...
+ UpgradeOperationInvokerUser UpgradeOperationInvoker = "User"
+)
+
+// PossibleUpgradeOperationInvokerValues returns an array of possible values for the UpgradeOperationInvoker const type.
+func PossibleUpgradeOperationInvokerValues() []UpgradeOperationInvoker {
+ return []UpgradeOperationInvoker{UpgradeOperationInvokerPlatform, UpgradeOperationInvokerUnknown, UpgradeOperationInvokerUser}
+}
+
+// UpgradeState enumerates the values for upgrade state.
+type UpgradeState string
+
+const (
+ // UpgradeStateCancelled ...
+ UpgradeStateCancelled UpgradeState = "Cancelled"
+ // UpgradeStateCompleted ...
+ UpgradeStateCompleted UpgradeState = "Completed"
+ // UpgradeStateFaulted ...
+ UpgradeStateFaulted UpgradeState = "Faulted"
+ // UpgradeStateRollingForward ...
+ UpgradeStateRollingForward UpgradeState = "RollingForward"
+)
+
+// PossibleUpgradeStateValues returns an array of possible values for the UpgradeState const type.
+func PossibleUpgradeStateValues() []UpgradeState {
+ return []UpgradeState{UpgradeStateCancelled, UpgradeStateCompleted, UpgradeStateFaulted, UpgradeStateRollingForward}
+}
+
+// VirtualMachineEvictionPolicyTypes enumerates the values for virtual machine eviction policy types.
+type VirtualMachineEvictionPolicyTypes string
+
+const (
+ // VirtualMachineEvictionPolicyTypesDeallocate ...
+ VirtualMachineEvictionPolicyTypesDeallocate VirtualMachineEvictionPolicyTypes = "Deallocate"
+ // VirtualMachineEvictionPolicyTypesDelete ...
+ VirtualMachineEvictionPolicyTypesDelete VirtualMachineEvictionPolicyTypes = "Delete"
+)
+
+// PossibleVirtualMachineEvictionPolicyTypesValues returns an array of possible values for the VirtualMachineEvictionPolicyTypes const type.
+func PossibleVirtualMachineEvictionPolicyTypesValues() []VirtualMachineEvictionPolicyTypes {
+ return []VirtualMachineEvictionPolicyTypes{VirtualMachineEvictionPolicyTypesDeallocate, VirtualMachineEvictionPolicyTypesDelete}
+}
+
+// VirtualMachinePriorityTypes enumerates the values for virtual machine priority types.
+type VirtualMachinePriorityTypes string
+
+const (
+ // VirtualMachinePriorityTypesLow ...
+ VirtualMachinePriorityTypesLow VirtualMachinePriorityTypes = "Low"
+ // VirtualMachinePriorityTypesRegular ...
+ VirtualMachinePriorityTypesRegular VirtualMachinePriorityTypes = "Regular"
+ // VirtualMachinePriorityTypesSpot ...
+ VirtualMachinePriorityTypesSpot VirtualMachinePriorityTypes = "Spot"
+)
+
+// PossibleVirtualMachinePriorityTypesValues returns an array of possible values for the VirtualMachinePriorityTypes const type.
+func PossibleVirtualMachinePriorityTypesValues() []VirtualMachinePriorityTypes {
+ return []VirtualMachinePriorityTypes{VirtualMachinePriorityTypesLow, VirtualMachinePriorityTypesRegular, VirtualMachinePriorityTypesSpot}
+}
+
+// VirtualMachineScaleSetScaleInRules enumerates the values for virtual machine scale set scale in rules.
+type VirtualMachineScaleSetScaleInRules string
+
+const (
+ // VirtualMachineScaleSetScaleInRulesDefault ...
+ VirtualMachineScaleSetScaleInRulesDefault VirtualMachineScaleSetScaleInRules = "Default"
+ // VirtualMachineScaleSetScaleInRulesNewestVM ...
+ VirtualMachineScaleSetScaleInRulesNewestVM VirtualMachineScaleSetScaleInRules = "NewestVM"
+ // VirtualMachineScaleSetScaleInRulesOldestVM ...
+ VirtualMachineScaleSetScaleInRulesOldestVM VirtualMachineScaleSetScaleInRules = "OldestVM"
+)
+
+// PossibleVirtualMachineScaleSetScaleInRulesValues returns an array of possible values for the VirtualMachineScaleSetScaleInRules const type.
+func PossibleVirtualMachineScaleSetScaleInRulesValues() []VirtualMachineScaleSetScaleInRules {
+ return []VirtualMachineScaleSetScaleInRules{VirtualMachineScaleSetScaleInRulesDefault, VirtualMachineScaleSetScaleInRulesNewestVM, VirtualMachineScaleSetScaleInRulesOldestVM}
+}
+
+// VirtualMachineScaleSetSkuScaleType enumerates the values for virtual machine scale set sku scale type.
+type VirtualMachineScaleSetSkuScaleType string
+
+const (
+ // VirtualMachineScaleSetSkuScaleTypeAutomatic ...
+ VirtualMachineScaleSetSkuScaleTypeAutomatic VirtualMachineScaleSetSkuScaleType = "Automatic"
+ // VirtualMachineScaleSetSkuScaleTypeNone ...
+ VirtualMachineScaleSetSkuScaleTypeNone VirtualMachineScaleSetSkuScaleType = "None"
+)
+
+// PossibleVirtualMachineScaleSetSkuScaleTypeValues returns an array of possible values for the VirtualMachineScaleSetSkuScaleType const type.
+func PossibleVirtualMachineScaleSetSkuScaleTypeValues() []VirtualMachineScaleSetSkuScaleType {
+ return []VirtualMachineScaleSetSkuScaleType{VirtualMachineScaleSetSkuScaleTypeAutomatic, VirtualMachineScaleSetSkuScaleTypeNone}
+}
+
+// VirtualMachineSizeTypes enumerates the values for virtual machine size types.
+type VirtualMachineSizeTypes string
+
+const (
+ // VirtualMachineSizeTypesBasicA0 ...
+ VirtualMachineSizeTypesBasicA0 VirtualMachineSizeTypes = "Basic_A0"
+ // VirtualMachineSizeTypesBasicA1 ...
+ VirtualMachineSizeTypesBasicA1 VirtualMachineSizeTypes = "Basic_A1"
+ // VirtualMachineSizeTypesBasicA2 ...
+ VirtualMachineSizeTypesBasicA2 VirtualMachineSizeTypes = "Basic_A2"
+ // VirtualMachineSizeTypesBasicA3 ...
+ VirtualMachineSizeTypesBasicA3 VirtualMachineSizeTypes = "Basic_A3"
+ // VirtualMachineSizeTypesBasicA4 ...
+ VirtualMachineSizeTypesBasicA4 VirtualMachineSizeTypes = "Basic_A4"
+ // VirtualMachineSizeTypesStandardA0 ...
+ VirtualMachineSizeTypesStandardA0 VirtualMachineSizeTypes = "Standard_A0"
+ // VirtualMachineSizeTypesStandardA1 ...
+ VirtualMachineSizeTypesStandardA1 VirtualMachineSizeTypes = "Standard_A1"
+ // VirtualMachineSizeTypesStandardA10 ...
+ VirtualMachineSizeTypesStandardA10 VirtualMachineSizeTypes = "Standard_A10"
+ // VirtualMachineSizeTypesStandardA11 ...
+ VirtualMachineSizeTypesStandardA11 VirtualMachineSizeTypes = "Standard_A11"
+ // VirtualMachineSizeTypesStandardA1V2 ...
+ VirtualMachineSizeTypesStandardA1V2 VirtualMachineSizeTypes = "Standard_A1_v2"
+ // VirtualMachineSizeTypesStandardA2 ...
+ VirtualMachineSizeTypesStandardA2 VirtualMachineSizeTypes = "Standard_A2"
+ // VirtualMachineSizeTypesStandardA2mV2 ...
+ VirtualMachineSizeTypesStandardA2mV2 VirtualMachineSizeTypes = "Standard_A2m_v2"
+ // VirtualMachineSizeTypesStandardA2V2 ...
+ VirtualMachineSizeTypesStandardA2V2 VirtualMachineSizeTypes = "Standard_A2_v2"
+ // VirtualMachineSizeTypesStandardA3 ...
+ VirtualMachineSizeTypesStandardA3 VirtualMachineSizeTypes = "Standard_A3"
+ // VirtualMachineSizeTypesStandardA4 ...
+ VirtualMachineSizeTypesStandardA4 VirtualMachineSizeTypes = "Standard_A4"
+ // VirtualMachineSizeTypesStandardA4mV2 ...
+ VirtualMachineSizeTypesStandardA4mV2 VirtualMachineSizeTypes = "Standard_A4m_v2"
+ // VirtualMachineSizeTypesStandardA4V2 ...
+ VirtualMachineSizeTypesStandardA4V2 VirtualMachineSizeTypes = "Standard_A4_v2"
+ // VirtualMachineSizeTypesStandardA5 ...
+ VirtualMachineSizeTypesStandardA5 VirtualMachineSizeTypes = "Standard_A5"
+ // VirtualMachineSizeTypesStandardA6 ...
+ VirtualMachineSizeTypesStandardA6 VirtualMachineSizeTypes = "Standard_A6"
+ // VirtualMachineSizeTypesStandardA7 ...
+ VirtualMachineSizeTypesStandardA7 VirtualMachineSizeTypes = "Standard_A7"
+ // VirtualMachineSizeTypesStandardA8 ...
+ VirtualMachineSizeTypesStandardA8 VirtualMachineSizeTypes = "Standard_A8"
+ // VirtualMachineSizeTypesStandardA8mV2 ...
+ VirtualMachineSizeTypesStandardA8mV2 VirtualMachineSizeTypes = "Standard_A8m_v2"
+ // VirtualMachineSizeTypesStandardA8V2 ...
+ VirtualMachineSizeTypesStandardA8V2 VirtualMachineSizeTypes = "Standard_A8_v2"
+ // VirtualMachineSizeTypesStandardA9 ...
+ VirtualMachineSizeTypesStandardA9 VirtualMachineSizeTypes = "Standard_A9"
+ // VirtualMachineSizeTypesStandardB1ms ...
+ VirtualMachineSizeTypesStandardB1ms VirtualMachineSizeTypes = "Standard_B1ms"
+ // VirtualMachineSizeTypesStandardB1s ...
+ VirtualMachineSizeTypesStandardB1s VirtualMachineSizeTypes = "Standard_B1s"
+ // VirtualMachineSizeTypesStandardB2ms ...
+ VirtualMachineSizeTypesStandardB2ms VirtualMachineSizeTypes = "Standard_B2ms"
+ // VirtualMachineSizeTypesStandardB2s ...
+ VirtualMachineSizeTypesStandardB2s VirtualMachineSizeTypes = "Standard_B2s"
+ // VirtualMachineSizeTypesStandardB4ms ...
+ VirtualMachineSizeTypesStandardB4ms VirtualMachineSizeTypes = "Standard_B4ms"
+ // VirtualMachineSizeTypesStandardB8ms ...
+ VirtualMachineSizeTypesStandardB8ms VirtualMachineSizeTypes = "Standard_B8ms"
+ // VirtualMachineSizeTypesStandardD1 ...
+ VirtualMachineSizeTypesStandardD1 VirtualMachineSizeTypes = "Standard_D1"
+ // VirtualMachineSizeTypesStandardD11 ...
+ VirtualMachineSizeTypesStandardD11 VirtualMachineSizeTypes = "Standard_D11"
+ // VirtualMachineSizeTypesStandardD11V2 ...
+ VirtualMachineSizeTypesStandardD11V2 VirtualMachineSizeTypes = "Standard_D11_v2"
+ // VirtualMachineSizeTypesStandardD12 ...
+ VirtualMachineSizeTypesStandardD12 VirtualMachineSizeTypes = "Standard_D12"
+ // VirtualMachineSizeTypesStandardD12V2 ...
+ VirtualMachineSizeTypesStandardD12V2 VirtualMachineSizeTypes = "Standard_D12_v2"
+ // VirtualMachineSizeTypesStandardD13 ...
+ VirtualMachineSizeTypesStandardD13 VirtualMachineSizeTypes = "Standard_D13"
+ // VirtualMachineSizeTypesStandardD13V2 ...
+ VirtualMachineSizeTypesStandardD13V2 VirtualMachineSizeTypes = "Standard_D13_v2"
+ // VirtualMachineSizeTypesStandardD14 ...
+ VirtualMachineSizeTypesStandardD14 VirtualMachineSizeTypes = "Standard_D14"
+ // VirtualMachineSizeTypesStandardD14V2 ...
+ VirtualMachineSizeTypesStandardD14V2 VirtualMachineSizeTypes = "Standard_D14_v2"
+ // VirtualMachineSizeTypesStandardD15V2 ...
+ VirtualMachineSizeTypesStandardD15V2 VirtualMachineSizeTypes = "Standard_D15_v2"
+ // VirtualMachineSizeTypesStandardD16sV3 ...
+ VirtualMachineSizeTypesStandardD16sV3 VirtualMachineSizeTypes = "Standard_D16s_v3"
+ // VirtualMachineSizeTypesStandardD16V3 ...
+ VirtualMachineSizeTypesStandardD16V3 VirtualMachineSizeTypes = "Standard_D16_v3"
+ // VirtualMachineSizeTypesStandardD1V2 ...
+ VirtualMachineSizeTypesStandardD1V2 VirtualMachineSizeTypes = "Standard_D1_v2"
+ // VirtualMachineSizeTypesStandardD2 ...
+ VirtualMachineSizeTypesStandardD2 VirtualMachineSizeTypes = "Standard_D2"
+ // VirtualMachineSizeTypesStandardD2sV3 ...
+ VirtualMachineSizeTypesStandardD2sV3 VirtualMachineSizeTypes = "Standard_D2s_v3"
+ // VirtualMachineSizeTypesStandardD2V2 ...
+ VirtualMachineSizeTypesStandardD2V2 VirtualMachineSizeTypes = "Standard_D2_v2"
+ // VirtualMachineSizeTypesStandardD2V3 ...
+ VirtualMachineSizeTypesStandardD2V3 VirtualMachineSizeTypes = "Standard_D2_v3"
+ // VirtualMachineSizeTypesStandardD3 ...
+ VirtualMachineSizeTypesStandardD3 VirtualMachineSizeTypes = "Standard_D3"
+ // VirtualMachineSizeTypesStandardD32sV3 ...
+ VirtualMachineSizeTypesStandardD32sV3 VirtualMachineSizeTypes = "Standard_D32s_v3"
+ // VirtualMachineSizeTypesStandardD32V3 ...
+ VirtualMachineSizeTypesStandardD32V3 VirtualMachineSizeTypes = "Standard_D32_v3"
+ // VirtualMachineSizeTypesStandardD3V2 ...
+ VirtualMachineSizeTypesStandardD3V2 VirtualMachineSizeTypes = "Standard_D3_v2"
+ // VirtualMachineSizeTypesStandardD4 ...
+ VirtualMachineSizeTypesStandardD4 VirtualMachineSizeTypes = "Standard_D4"
+ // VirtualMachineSizeTypesStandardD4sV3 ...
+ VirtualMachineSizeTypesStandardD4sV3 VirtualMachineSizeTypes = "Standard_D4s_v3"
+ // VirtualMachineSizeTypesStandardD4V2 ...
+ VirtualMachineSizeTypesStandardD4V2 VirtualMachineSizeTypes = "Standard_D4_v2"
+ // VirtualMachineSizeTypesStandardD4V3 ...
+ VirtualMachineSizeTypesStandardD4V3 VirtualMachineSizeTypes = "Standard_D4_v3"
+ // VirtualMachineSizeTypesStandardD5V2 ...
+ VirtualMachineSizeTypesStandardD5V2 VirtualMachineSizeTypes = "Standard_D5_v2"
+ // VirtualMachineSizeTypesStandardD64sV3 ...
+ VirtualMachineSizeTypesStandardD64sV3 VirtualMachineSizeTypes = "Standard_D64s_v3"
+ // VirtualMachineSizeTypesStandardD64V3 ...
+ VirtualMachineSizeTypesStandardD64V3 VirtualMachineSizeTypes = "Standard_D64_v3"
+ // VirtualMachineSizeTypesStandardD8sV3 ...
+ VirtualMachineSizeTypesStandardD8sV3 VirtualMachineSizeTypes = "Standard_D8s_v3"
+ // VirtualMachineSizeTypesStandardD8V3 ...
+ VirtualMachineSizeTypesStandardD8V3 VirtualMachineSizeTypes = "Standard_D8_v3"
+ // VirtualMachineSizeTypesStandardDS1 ...
+ VirtualMachineSizeTypesStandardDS1 VirtualMachineSizeTypes = "Standard_DS1"
+ // VirtualMachineSizeTypesStandardDS11 ...
+ VirtualMachineSizeTypesStandardDS11 VirtualMachineSizeTypes = "Standard_DS11"
+ // VirtualMachineSizeTypesStandardDS11V2 ...
+ VirtualMachineSizeTypesStandardDS11V2 VirtualMachineSizeTypes = "Standard_DS11_v2"
+ // VirtualMachineSizeTypesStandardDS12 ...
+ VirtualMachineSizeTypesStandardDS12 VirtualMachineSizeTypes = "Standard_DS12"
+ // VirtualMachineSizeTypesStandardDS12V2 ...
+ VirtualMachineSizeTypesStandardDS12V2 VirtualMachineSizeTypes = "Standard_DS12_v2"
+ // VirtualMachineSizeTypesStandardDS13 ...
+ VirtualMachineSizeTypesStandardDS13 VirtualMachineSizeTypes = "Standard_DS13"
+ // VirtualMachineSizeTypesStandardDS132V2 ...
+ VirtualMachineSizeTypesStandardDS132V2 VirtualMachineSizeTypes = "Standard_DS13-2_v2"
+ // VirtualMachineSizeTypesStandardDS134V2 ...
+ VirtualMachineSizeTypesStandardDS134V2 VirtualMachineSizeTypes = "Standard_DS13-4_v2"
+ // VirtualMachineSizeTypesStandardDS13V2 ...
+ VirtualMachineSizeTypesStandardDS13V2 VirtualMachineSizeTypes = "Standard_DS13_v2"
+ // VirtualMachineSizeTypesStandardDS14 ...
+ VirtualMachineSizeTypesStandardDS14 VirtualMachineSizeTypes = "Standard_DS14"
+ // VirtualMachineSizeTypesStandardDS144V2 ...
+ VirtualMachineSizeTypesStandardDS144V2 VirtualMachineSizeTypes = "Standard_DS14-4_v2"
+ // VirtualMachineSizeTypesStandardDS148V2 ...
+ VirtualMachineSizeTypesStandardDS148V2 VirtualMachineSizeTypes = "Standard_DS14-8_v2"
+ // VirtualMachineSizeTypesStandardDS14V2 ...
+ VirtualMachineSizeTypesStandardDS14V2 VirtualMachineSizeTypes = "Standard_DS14_v2"
+ // VirtualMachineSizeTypesStandardDS15V2 ...
+ VirtualMachineSizeTypesStandardDS15V2 VirtualMachineSizeTypes = "Standard_DS15_v2"
+ // VirtualMachineSizeTypesStandardDS1V2 ...
+ VirtualMachineSizeTypesStandardDS1V2 VirtualMachineSizeTypes = "Standard_DS1_v2"
+ // VirtualMachineSizeTypesStandardDS2 ...
+ VirtualMachineSizeTypesStandardDS2 VirtualMachineSizeTypes = "Standard_DS2"
+ // VirtualMachineSizeTypesStandardDS2V2 ...
+ VirtualMachineSizeTypesStandardDS2V2 VirtualMachineSizeTypes = "Standard_DS2_v2"
+ // VirtualMachineSizeTypesStandardDS3 ...
+ VirtualMachineSizeTypesStandardDS3 VirtualMachineSizeTypes = "Standard_DS3"
+ // VirtualMachineSizeTypesStandardDS3V2 ...
+ VirtualMachineSizeTypesStandardDS3V2 VirtualMachineSizeTypes = "Standard_DS3_v2"
+ // VirtualMachineSizeTypesStandardDS4 ...
+ VirtualMachineSizeTypesStandardDS4 VirtualMachineSizeTypes = "Standard_DS4"
+ // VirtualMachineSizeTypesStandardDS4V2 ...
+ VirtualMachineSizeTypesStandardDS4V2 VirtualMachineSizeTypes = "Standard_DS4_v2"
+ // VirtualMachineSizeTypesStandardDS5V2 ...
+ VirtualMachineSizeTypesStandardDS5V2 VirtualMachineSizeTypes = "Standard_DS5_v2"
+ // VirtualMachineSizeTypesStandardE16sV3 ...
+ VirtualMachineSizeTypesStandardE16sV3 VirtualMachineSizeTypes = "Standard_E16s_v3"
+ // VirtualMachineSizeTypesStandardE16V3 ...
+ VirtualMachineSizeTypesStandardE16V3 VirtualMachineSizeTypes = "Standard_E16_v3"
+ // VirtualMachineSizeTypesStandardE2sV3 ...
+ VirtualMachineSizeTypesStandardE2sV3 VirtualMachineSizeTypes = "Standard_E2s_v3"
+ // VirtualMachineSizeTypesStandardE2V3 ...
+ VirtualMachineSizeTypesStandardE2V3 VirtualMachineSizeTypes = "Standard_E2_v3"
+ // VirtualMachineSizeTypesStandardE3216V3 ...
+ VirtualMachineSizeTypesStandardE3216V3 VirtualMachineSizeTypes = "Standard_E32-16_v3"
+ // VirtualMachineSizeTypesStandardE328sV3 ...
+ VirtualMachineSizeTypesStandardE328sV3 VirtualMachineSizeTypes = "Standard_E32-8s_v3"
+ // VirtualMachineSizeTypesStandardE32sV3 ...
+ VirtualMachineSizeTypesStandardE32sV3 VirtualMachineSizeTypes = "Standard_E32s_v3"
+ // VirtualMachineSizeTypesStandardE32V3 ...
+ VirtualMachineSizeTypesStandardE32V3 VirtualMachineSizeTypes = "Standard_E32_v3"
+ // VirtualMachineSizeTypesStandardE4sV3 ...
+ VirtualMachineSizeTypesStandardE4sV3 VirtualMachineSizeTypes = "Standard_E4s_v3"
+ // VirtualMachineSizeTypesStandardE4V3 ...
+ VirtualMachineSizeTypesStandardE4V3 VirtualMachineSizeTypes = "Standard_E4_v3"
+ // VirtualMachineSizeTypesStandardE6416sV3 ...
+ VirtualMachineSizeTypesStandardE6416sV3 VirtualMachineSizeTypes = "Standard_E64-16s_v3"
+ // VirtualMachineSizeTypesStandardE6432sV3 ...
+ VirtualMachineSizeTypesStandardE6432sV3 VirtualMachineSizeTypes = "Standard_E64-32s_v3"
+ // VirtualMachineSizeTypesStandardE64sV3 ...
+ VirtualMachineSizeTypesStandardE64sV3 VirtualMachineSizeTypes = "Standard_E64s_v3"
+ // VirtualMachineSizeTypesStandardE64V3 ...
+ VirtualMachineSizeTypesStandardE64V3 VirtualMachineSizeTypes = "Standard_E64_v3"
+ // VirtualMachineSizeTypesStandardE8sV3 ...
+ VirtualMachineSizeTypesStandardE8sV3 VirtualMachineSizeTypes = "Standard_E8s_v3"
+ // VirtualMachineSizeTypesStandardE8V3 ...
+ VirtualMachineSizeTypesStandardE8V3 VirtualMachineSizeTypes = "Standard_E8_v3"
+ // VirtualMachineSizeTypesStandardF1 ...
+ VirtualMachineSizeTypesStandardF1 VirtualMachineSizeTypes = "Standard_F1"
+ // VirtualMachineSizeTypesStandardF16 ...
+ VirtualMachineSizeTypesStandardF16 VirtualMachineSizeTypes = "Standard_F16"
+ // VirtualMachineSizeTypesStandardF16s ...
+ VirtualMachineSizeTypesStandardF16s VirtualMachineSizeTypes = "Standard_F16s"
+ // VirtualMachineSizeTypesStandardF16sV2 ...
+ VirtualMachineSizeTypesStandardF16sV2 VirtualMachineSizeTypes = "Standard_F16s_v2"
+ // VirtualMachineSizeTypesStandardF1s ...
+ VirtualMachineSizeTypesStandardF1s VirtualMachineSizeTypes = "Standard_F1s"
+ // VirtualMachineSizeTypesStandardF2 ...
+ VirtualMachineSizeTypesStandardF2 VirtualMachineSizeTypes = "Standard_F2"
+ // VirtualMachineSizeTypesStandardF2s ...
+ VirtualMachineSizeTypesStandardF2s VirtualMachineSizeTypes = "Standard_F2s"
+ // VirtualMachineSizeTypesStandardF2sV2 ...
+ VirtualMachineSizeTypesStandardF2sV2 VirtualMachineSizeTypes = "Standard_F2s_v2"
+ // VirtualMachineSizeTypesStandardF32sV2 ...
+ VirtualMachineSizeTypesStandardF32sV2 VirtualMachineSizeTypes = "Standard_F32s_v2"
+ // VirtualMachineSizeTypesStandardF4 ...
+ VirtualMachineSizeTypesStandardF4 VirtualMachineSizeTypes = "Standard_F4"
+ // VirtualMachineSizeTypesStandardF4s ...
+ VirtualMachineSizeTypesStandardF4s VirtualMachineSizeTypes = "Standard_F4s"
+ // VirtualMachineSizeTypesStandardF4sV2 ...
+ VirtualMachineSizeTypesStandardF4sV2 VirtualMachineSizeTypes = "Standard_F4s_v2"
+ // VirtualMachineSizeTypesStandardF64sV2 ...
+ VirtualMachineSizeTypesStandardF64sV2 VirtualMachineSizeTypes = "Standard_F64s_v2"
+ // VirtualMachineSizeTypesStandardF72sV2 ...
+ VirtualMachineSizeTypesStandardF72sV2 VirtualMachineSizeTypes = "Standard_F72s_v2"
+ // VirtualMachineSizeTypesStandardF8 ...
+ VirtualMachineSizeTypesStandardF8 VirtualMachineSizeTypes = "Standard_F8"
+ // VirtualMachineSizeTypesStandardF8s ...
+ VirtualMachineSizeTypesStandardF8s VirtualMachineSizeTypes = "Standard_F8s"
+ // VirtualMachineSizeTypesStandardF8sV2 ...
+ VirtualMachineSizeTypesStandardF8sV2 VirtualMachineSizeTypes = "Standard_F8s_v2"
+ // VirtualMachineSizeTypesStandardG1 ...
+ VirtualMachineSizeTypesStandardG1 VirtualMachineSizeTypes = "Standard_G1"
+ // VirtualMachineSizeTypesStandardG2 ...
+ VirtualMachineSizeTypesStandardG2 VirtualMachineSizeTypes = "Standard_G2"
+ // VirtualMachineSizeTypesStandardG3 ...
+ VirtualMachineSizeTypesStandardG3 VirtualMachineSizeTypes = "Standard_G3"
+ // VirtualMachineSizeTypesStandardG4 ...
+ VirtualMachineSizeTypesStandardG4 VirtualMachineSizeTypes = "Standard_G4"
+ // VirtualMachineSizeTypesStandardG5 ...
+ VirtualMachineSizeTypesStandardG5 VirtualMachineSizeTypes = "Standard_G5"
+ // VirtualMachineSizeTypesStandardGS1 ...
+ VirtualMachineSizeTypesStandardGS1 VirtualMachineSizeTypes = "Standard_GS1"
+ // VirtualMachineSizeTypesStandardGS2 ...
+ VirtualMachineSizeTypesStandardGS2 VirtualMachineSizeTypes = "Standard_GS2"
+ // VirtualMachineSizeTypesStandardGS3 ...
+ VirtualMachineSizeTypesStandardGS3 VirtualMachineSizeTypes = "Standard_GS3"
+ // VirtualMachineSizeTypesStandardGS4 ...
+ VirtualMachineSizeTypesStandardGS4 VirtualMachineSizeTypes = "Standard_GS4"
+ // VirtualMachineSizeTypesStandardGS44 ...
+ VirtualMachineSizeTypesStandardGS44 VirtualMachineSizeTypes = "Standard_GS4-4"
+ // VirtualMachineSizeTypesStandardGS48 ...
+ VirtualMachineSizeTypesStandardGS48 VirtualMachineSizeTypes = "Standard_GS4-8"
+ // VirtualMachineSizeTypesStandardGS5 ...
+ VirtualMachineSizeTypesStandardGS5 VirtualMachineSizeTypes = "Standard_GS5"
+ // VirtualMachineSizeTypesStandardGS516 ...
+ VirtualMachineSizeTypesStandardGS516 VirtualMachineSizeTypes = "Standard_GS5-16"
+ // VirtualMachineSizeTypesStandardGS58 ...
+ VirtualMachineSizeTypesStandardGS58 VirtualMachineSizeTypes = "Standard_GS5-8"
+ // VirtualMachineSizeTypesStandardH16 ...
+ VirtualMachineSizeTypesStandardH16 VirtualMachineSizeTypes = "Standard_H16"
+ // VirtualMachineSizeTypesStandardH16m ...
+ VirtualMachineSizeTypesStandardH16m VirtualMachineSizeTypes = "Standard_H16m"
+ // VirtualMachineSizeTypesStandardH16mr ...
+ VirtualMachineSizeTypesStandardH16mr VirtualMachineSizeTypes = "Standard_H16mr"
+ // VirtualMachineSizeTypesStandardH16r ...
+ VirtualMachineSizeTypesStandardH16r VirtualMachineSizeTypes = "Standard_H16r"
+ // VirtualMachineSizeTypesStandardH8 ...
+ VirtualMachineSizeTypesStandardH8 VirtualMachineSizeTypes = "Standard_H8"
+ // VirtualMachineSizeTypesStandardH8m ...
+ VirtualMachineSizeTypesStandardH8m VirtualMachineSizeTypes = "Standard_H8m"
+ // VirtualMachineSizeTypesStandardL16s ...
+ VirtualMachineSizeTypesStandardL16s VirtualMachineSizeTypes = "Standard_L16s"
+ // VirtualMachineSizeTypesStandardL32s ...
+ VirtualMachineSizeTypesStandardL32s VirtualMachineSizeTypes = "Standard_L32s"
+ // VirtualMachineSizeTypesStandardL4s ...
+ VirtualMachineSizeTypesStandardL4s VirtualMachineSizeTypes = "Standard_L4s"
+ // VirtualMachineSizeTypesStandardL8s ...
+ VirtualMachineSizeTypesStandardL8s VirtualMachineSizeTypes = "Standard_L8s"
+ // VirtualMachineSizeTypesStandardM12832ms ...
+ VirtualMachineSizeTypesStandardM12832ms VirtualMachineSizeTypes = "Standard_M128-32ms"
+ // VirtualMachineSizeTypesStandardM12864ms ...
+ VirtualMachineSizeTypesStandardM12864ms VirtualMachineSizeTypes = "Standard_M128-64ms"
+ // VirtualMachineSizeTypesStandardM128ms ...
+ VirtualMachineSizeTypesStandardM128ms VirtualMachineSizeTypes = "Standard_M128ms"
+ // VirtualMachineSizeTypesStandardM128s ...
+ VirtualMachineSizeTypesStandardM128s VirtualMachineSizeTypes = "Standard_M128s"
+ // VirtualMachineSizeTypesStandardM6416ms ...
+ VirtualMachineSizeTypesStandardM6416ms VirtualMachineSizeTypes = "Standard_M64-16ms"
+ // VirtualMachineSizeTypesStandardM6432ms ...
+ VirtualMachineSizeTypesStandardM6432ms VirtualMachineSizeTypes = "Standard_M64-32ms"
+ // VirtualMachineSizeTypesStandardM64ms ...
+ VirtualMachineSizeTypesStandardM64ms VirtualMachineSizeTypes = "Standard_M64ms"
+ // VirtualMachineSizeTypesStandardM64s ...
+ VirtualMachineSizeTypesStandardM64s VirtualMachineSizeTypes = "Standard_M64s"
+ // VirtualMachineSizeTypesStandardNC12 ...
+ VirtualMachineSizeTypesStandardNC12 VirtualMachineSizeTypes = "Standard_NC12"
+ // VirtualMachineSizeTypesStandardNC12sV2 ...
+ VirtualMachineSizeTypesStandardNC12sV2 VirtualMachineSizeTypes = "Standard_NC12s_v2"
+ // VirtualMachineSizeTypesStandardNC12sV3 ...
+ VirtualMachineSizeTypesStandardNC12sV3 VirtualMachineSizeTypes = "Standard_NC12s_v3"
+ // VirtualMachineSizeTypesStandardNC24 ...
+ VirtualMachineSizeTypesStandardNC24 VirtualMachineSizeTypes = "Standard_NC24"
+ // VirtualMachineSizeTypesStandardNC24r ...
+ VirtualMachineSizeTypesStandardNC24r VirtualMachineSizeTypes = "Standard_NC24r"
+ // VirtualMachineSizeTypesStandardNC24rsV2 ...
+ VirtualMachineSizeTypesStandardNC24rsV2 VirtualMachineSizeTypes = "Standard_NC24rs_v2"
+ // VirtualMachineSizeTypesStandardNC24rsV3 ...
+ VirtualMachineSizeTypesStandardNC24rsV3 VirtualMachineSizeTypes = "Standard_NC24rs_v3"
+ // VirtualMachineSizeTypesStandardNC24sV2 ...
+ VirtualMachineSizeTypesStandardNC24sV2 VirtualMachineSizeTypes = "Standard_NC24s_v2"
+ // VirtualMachineSizeTypesStandardNC24sV3 ...
+ VirtualMachineSizeTypesStandardNC24sV3 VirtualMachineSizeTypes = "Standard_NC24s_v3"
+ // VirtualMachineSizeTypesStandardNC6 ...
+ VirtualMachineSizeTypesStandardNC6 VirtualMachineSizeTypes = "Standard_NC6"
+ // VirtualMachineSizeTypesStandardNC6sV2 ...
+ VirtualMachineSizeTypesStandardNC6sV2 VirtualMachineSizeTypes = "Standard_NC6s_v2"
+ // VirtualMachineSizeTypesStandardNC6sV3 ...
+ VirtualMachineSizeTypesStandardNC6sV3 VirtualMachineSizeTypes = "Standard_NC6s_v3"
+ // VirtualMachineSizeTypesStandardND12s ...
+ VirtualMachineSizeTypesStandardND12s VirtualMachineSizeTypes = "Standard_ND12s"
+ // VirtualMachineSizeTypesStandardND24rs ...
+ VirtualMachineSizeTypesStandardND24rs VirtualMachineSizeTypes = "Standard_ND24rs"
+ // VirtualMachineSizeTypesStandardND24s ...
+ VirtualMachineSizeTypesStandardND24s VirtualMachineSizeTypes = "Standard_ND24s"
+ // VirtualMachineSizeTypesStandardND6s ...
+ VirtualMachineSizeTypesStandardND6s VirtualMachineSizeTypes = "Standard_ND6s"
+ // VirtualMachineSizeTypesStandardNV12 ...
+ VirtualMachineSizeTypesStandardNV12 VirtualMachineSizeTypes = "Standard_NV12"
+ // VirtualMachineSizeTypesStandardNV24 ...
+ VirtualMachineSizeTypesStandardNV24 VirtualMachineSizeTypes = "Standard_NV24"
+ // VirtualMachineSizeTypesStandardNV6 ...
+ VirtualMachineSizeTypesStandardNV6 VirtualMachineSizeTypes = "Standard_NV6"
+)
+
+// PossibleVirtualMachineSizeTypesValues returns an array of possible values for the VirtualMachineSizeTypes const type.
+func PossibleVirtualMachineSizeTypesValues() []VirtualMachineSizeTypes {
+ return []VirtualMachineSizeTypes{VirtualMachineSizeTypesBasicA0, VirtualMachineSizeTypesBasicA1, VirtualMachineSizeTypesBasicA2, VirtualMachineSizeTypesBasicA3, VirtualMachineSizeTypesBasicA4, VirtualMachineSizeTypesStandardA0, VirtualMachineSizeTypesStandardA1, VirtualMachineSizeTypesStandardA10, VirtualMachineSizeTypesStandardA11, VirtualMachineSizeTypesStandardA1V2, VirtualMachineSizeTypesStandardA2, VirtualMachineSizeTypesStandardA2mV2, VirtualMachineSizeTypesStandardA2V2, VirtualMachineSizeTypesStandardA3, VirtualMachineSizeTypesStandardA4, VirtualMachineSizeTypesStandardA4mV2, VirtualMachineSizeTypesStandardA4V2, VirtualMachineSizeTypesStandardA5, VirtualMachineSizeTypesStandardA6, VirtualMachineSizeTypesStandardA7, VirtualMachineSizeTypesStandardA8, VirtualMachineSizeTypesStandardA8mV2, VirtualMachineSizeTypesStandardA8V2, VirtualMachineSizeTypesStandardA9, VirtualMachineSizeTypesStandardB1ms, VirtualMachineSizeTypesStandardB1s, VirtualMachineSizeTypesStandardB2ms, VirtualMachineSizeTypesStandardB2s, VirtualMachineSizeTypesStandardB4ms, VirtualMachineSizeTypesStandardB8ms, VirtualMachineSizeTypesStandardD1, VirtualMachineSizeTypesStandardD11, VirtualMachineSizeTypesStandardD11V2, VirtualMachineSizeTypesStandardD12, VirtualMachineSizeTypesStandardD12V2, VirtualMachineSizeTypesStandardD13, VirtualMachineSizeTypesStandardD13V2, VirtualMachineSizeTypesStandardD14, VirtualMachineSizeTypesStandardD14V2, VirtualMachineSizeTypesStandardD15V2, VirtualMachineSizeTypesStandardD16sV3, VirtualMachineSizeTypesStandardD16V3, VirtualMachineSizeTypesStandardD1V2, VirtualMachineSizeTypesStandardD2, VirtualMachineSizeTypesStandardD2sV3, VirtualMachineSizeTypesStandardD2V2, VirtualMachineSizeTypesStandardD2V3, VirtualMachineSizeTypesStandardD3, VirtualMachineSizeTypesStandardD32sV3, VirtualMachineSizeTypesStandardD32V3, VirtualMachineSizeTypesStandardD3V2, VirtualMachineSizeTypesStandardD4, VirtualMachineSizeTypesStandardD4sV3, VirtualMachineSizeTypesStandardD4V2, VirtualMachineSizeTypesStandardD4V3, VirtualMachineSizeTypesStandardD5V2, VirtualMachineSizeTypesStandardD64sV3, VirtualMachineSizeTypesStandardD64V3, VirtualMachineSizeTypesStandardD8sV3, VirtualMachineSizeTypesStandardD8V3, VirtualMachineSizeTypesStandardDS1, VirtualMachineSizeTypesStandardDS11, VirtualMachineSizeTypesStandardDS11V2, VirtualMachineSizeTypesStandardDS12, VirtualMachineSizeTypesStandardDS12V2, VirtualMachineSizeTypesStandardDS13, VirtualMachineSizeTypesStandardDS132V2, VirtualMachineSizeTypesStandardDS134V2, VirtualMachineSizeTypesStandardDS13V2, VirtualMachineSizeTypesStandardDS14, VirtualMachineSizeTypesStandardDS144V2, VirtualMachineSizeTypesStandardDS148V2, VirtualMachineSizeTypesStandardDS14V2, VirtualMachineSizeTypesStandardDS15V2, VirtualMachineSizeTypesStandardDS1V2, VirtualMachineSizeTypesStandardDS2, VirtualMachineSizeTypesStandardDS2V2, VirtualMachineSizeTypesStandardDS3, VirtualMachineSizeTypesStandardDS3V2, VirtualMachineSizeTypesStandardDS4, VirtualMachineSizeTypesStandardDS4V2, VirtualMachineSizeTypesStandardDS5V2, VirtualMachineSizeTypesStandardE16sV3, VirtualMachineSizeTypesStandardE16V3, VirtualMachineSizeTypesStandardE2sV3, VirtualMachineSizeTypesStandardE2V3, VirtualMachineSizeTypesStandardE3216V3, VirtualMachineSizeTypesStandardE328sV3, VirtualMachineSizeTypesStandardE32sV3, VirtualMachineSizeTypesStandardE32V3, VirtualMachineSizeTypesStandardE4sV3, VirtualMachineSizeTypesStandardE4V3, VirtualMachineSizeTypesStandardE6416sV3, VirtualMachineSizeTypesStandardE6432sV3, VirtualMachineSizeTypesStandardE64sV3, VirtualMachineSizeTypesStandardE64V3, VirtualMachineSizeTypesStandardE8sV3, VirtualMachineSizeTypesStandardE8V3, VirtualMachineSizeTypesStandardF1, VirtualMachineSizeTypesStandardF16, VirtualMachineSizeTypesStandardF16s, VirtualMachineSizeTypesStandardF16sV2, VirtualMachineSizeTypesStandardF1s, VirtualMachineSizeTypesStandardF2, VirtualMachineSizeTypesStandardF2s, VirtualMachineSizeTypesStandardF2sV2, VirtualMachineSizeTypesStandardF32sV2, VirtualMachineSizeTypesStandardF4, VirtualMachineSizeTypesStandardF4s, VirtualMachineSizeTypesStandardF4sV2, VirtualMachineSizeTypesStandardF64sV2, VirtualMachineSizeTypesStandardF72sV2, VirtualMachineSizeTypesStandardF8, VirtualMachineSizeTypesStandardF8s, VirtualMachineSizeTypesStandardF8sV2, VirtualMachineSizeTypesStandardG1, VirtualMachineSizeTypesStandardG2, VirtualMachineSizeTypesStandardG3, VirtualMachineSizeTypesStandardG4, VirtualMachineSizeTypesStandardG5, VirtualMachineSizeTypesStandardGS1, VirtualMachineSizeTypesStandardGS2, VirtualMachineSizeTypesStandardGS3, VirtualMachineSizeTypesStandardGS4, VirtualMachineSizeTypesStandardGS44, VirtualMachineSizeTypesStandardGS48, VirtualMachineSizeTypesStandardGS5, VirtualMachineSizeTypesStandardGS516, VirtualMachineSizeTypesStandardGS58, VirtualMachineSizeTypesStandardH16, VirtualMachineSizeTypesStandardH16m, VirtualMachineSizeTypesStandardH16mr, VirtualMachineSizeTypesStandardH16r, VirtualMachineSizeTypesStandardH8, VirtualMachineSizeTypesStandardH8m, VirtualMachineSizeTypesStandardL16s, VirtualMachineSizeTypesStandardL32s, VirtualMachineSizeTypesStandardL4s, VirtualMachineSizeTypesStandardL8s, VirtualMachineSizeTypesStandardM12832ms, VirtualMachineSizeTypesStandardM12864ms, VirtualMachineSizeTypesStandardM128ms, VirtualMachineSizeTypesStandardM128s, VirtualMachineSizeTypesStandardM6416ms, VirtualMachineSizeTypesStandardM6432ms, VirtualMachineSizeTypesStandardM64ms, VirtualMachineSizeTypesStandardM64s, VirtualMachineSizeTypesStandardNC12, VirtualMachineSizeTypesStandardNC12sV2, VirtualMachineSizeTypesStandardNC12sV3, VirtualMachineSizeTypesStandardNC24, VirtualMachineSizeTypesStandardNC24r, VirtualMachineSizeTypesStandardNC24rsV2, VirtualMachineSizeTypesStandardNC24rsV3, VirtualMachineSizeTypesStandardNC24sV2, VirtualMachineSizeTypesStandardNC24sV3, VirtualMachineSizeTypesStandardNC6, VirtualMachineSizeTypesStandardNC6sV2, VirtualMachineSizeTypesStandardNC6sV3, VirtualMachineSizeTypesStandardND12s, VirtualMachineSizeTypesStandardND24rs, VirtualMachineSizeTypesStandardND24s, VirtualMachineSizeTypesStandardND6s, VirtualMachineSizeTypesStandardNV12, VirtualMachineSizeTypesStandardNV24, VirtualMachineSizeTypesStandardNV6}
+}
+
+// VMDiskTypes enumerates the values for vm disk types.
+type VMDiskTypes string
+
+const (
+ // VMDiskTypesNone ...
+ VMDiskTypesNone VMDiskTypes = "None"
+ // VMDiskTypesUnmanaged ...
+ VMDiskTypesUnmanaged VMDiskTypes = "Unmanaged"
+)
+
+// PossibleVMDiskTypesValues returns an array of possible values for the VMDiskTypes const type.
+func PossibleVMDiskTypesValues() []VMDiskTypes {
+ return []VMDiskTypes{VMDiskTypesNone, VMDiskTypesUnmanaged}
+}
+
+// VMGuestPatchClassificationLinux enumerates the values for vm guest patch classification linux.
+type VMGuestPatchClassificationLinux string
+
+const (
+ // VMGuestPatchClassificationLinuxCritical ...
+ VMGuestPatchClassificationLinuxCritical VMGuestPatchClassificationLinux = "Critical"
+ // VMGuestPatchClassificationLinuxOther ...
+ VMGuestPatchClassificationLinuxOther VMGuestPatchClassificationLinux = "Other"
+ // VMGuestPatchClassificationLinuxSecurity ...
+ VMGuestPatchClassificationLinuxSecurity VMGuestPatchClassificationLinux = "Security"
+)
+
+// PossibleVMGuestPatchClassificationLinuxValues returns an array of possible values for the VMGuestPatchClassificationLinux const type.
+func PossibleVMGuestPatchClassificationLinuxValues() []VMGuestPatchClassificationLinux {
+ return []VMGuestPatchClassificationLinux{VMGuestPatchClassificationLinuxCritical, VMGuestPatchClassificationLinuxOther, VMGuestPatchClassificationLinuxSecurity}
+}
+
+// VMGuestPatchClassificationWindows enumerates the values for vm guest patch classification windows.
+type VMGuestPatchClassificationWindows string
+
+const (
+ // VMGuestPatchClassificationWindowsCritical ...
+ VMGuestPatchClassificationWindowsCritical VMGuestPatchClassificationWindows = "Critical"
+ // VMGuestPatchClassificationWindowsDefinition ...
+ VMGuestPatchClassificationWindowsDefinition VMGuestPatchClassificationWindows = "Definition"
+ // VMGuestPatchClassificationWindowsFeaturePack ...
+ VMGuestPatchClassificationWindowsFeaturePack VMGuestPatchClassificationWindows = "FeaturePack"
+ // VMGuestPatchClassificationWindowsSecurity ...
+ VMGuestPatchClassificationWindowsSecurity VMGuestPatchClassificationWindows = "Security"
+ // VMGuestPatchClassificationWindowsServicePack ...
+ VMGuestPatchClassificationWindowsServicePack VMGuestPatchClassificationWindows = "ServicePack"
+ // VMGuestPatchClassificationWindowsTools ...
+ VMGuestPatchClassificationWindowsTools VMGuestPatchClassificationWindows = "Tools"
+ // VMGuestPatchClassificationWindowsUpdateRollUp ...
+ VMGuestPatchClassificationWindowsUpdateRollUp VMGuestPatchClassificationWindows = "UpdateRollUp"
+ // VMGuestPatchClassificationWindowsUpdates ...
+ VMGuestPatchClassificationWindowsUpdates VMGuestPatchClassificationWindows = "Updates"
+)
+
+// PossibleVMGuestPatchClassificationWindowsValues returns an array of possible values for the VMGuestPatchClassificationWindows const type.
+func PossibleVMGuestPatchClassificationWindowsValues() []VMGuestPatchClassificationWindows {
+ return []VMGuestPatchClassificationWindows{VMGuestPatchClassificationWindowsCritical, VMGuestPatchClassificationWindowsDefinition, VMGuestPatchClassificationWindowsFeaturePack, VMGuestPatchClassificationWindowsSecurity, VMGuestPatchClassificationWindowsServicePack, VMGuestPatchClassificationWindowsTools, VMGuestPatchClassificationWindowsUpdateRollUp, VMGuestPatchClassificationWindowsUpdates}
+}
+
+// VMGuestPatchRebootBehavior enumerates the values for vm guest patch reboot behavior.
+type VMGuestPatchRebootBehavior string
+
+const (
+ // VMGuestPatchRebootBehaviorAlwaysRequiresReboot ...
+ VMGuestPatchRebootBehaviorAlwaysRequiresReboot VMGuestPatchRebootBehavior = "AlwaysRequiresReboot"
+ // VMGuestPatchRebootBehaviorCanRequestReboot ...
+ VMGuestPatchRebootBehaviorCanRequestReboot VMGuestPatchRebootBehavior = "CanRequestReboot"
+ // VMGuestPatchRebootBehaviorNeverReboots ...
+ VMGuestPatchRebootBehaviorNeverReboots VMGuestPatchRebootBehavior = "NeverReboots"
+ // VMGuestPatchRebootBehaviorUnknown ...
+ VMGuestPatchRebootBehaviorUnknown VMGuestPatchRebootBehavior = "Unknown"
+)
+
+// PossibleVMGuestPatchRebootBehaviorValues returns an array of possible values for the VMGuestPatchRebootBehavior const type.
+func PossibleVMGuestPatchRebootBehaviorValues() []VMGuestPatchRebootBehavior {
+ return []VMGuestPatchRebootBehavior{VMGuestPatchRebootBehaviorAlwaysRequiresReboot, VMGuestPatchRebootBehaviorCanRequestReboot, VMGuestPatchRebootBehaviorNeverReboots, VMGuestPatchRebootBehaviorUnknown}
+}
+
+// VMGuestPatchRebootSetting enumerates the values for vm guest patch reboot setting.
+type VMGuestPatchRebootSetting string
+
+const (
+ // VMGuestPatchRebootSettingAlways ...
+ VMGuestPatchRebootSettingAlways VMGuestPatchRebootSetting = "Always"
+ // VMGuestPatchRebootSettingIfRequired ...
+ VMGuestPatchRebootSettingIfRequired VMGuestPatchRebootSetting = "IfRequired"
+ // VMGuestPatchRebootSettingNever ...
+ VMGuestPatchRebootSettingNever VMGuestPatchRebootSetting = "Never"
+)
+
+// PossibleVMGuestPatchRebootSettingValues returns an array of possible values for the VMGuestPatchRebootSetting const type.
+func PossibleVMGuestPatchRebootSettingValues() []VMGuestPatchRebootSetting {
+ return []VMGuestPatchRebootSetting{VMGuestPatchRebootSettingAlways, VMGuestPatchRebootSettingIfRequired, VMGuestPatchRebootSettingNever}
+}
+
+// VMGuestPatchRebootStatus enumerates the values for vm guest patch reboot status.
+type VMGuestPatchRebootStatus string
+
+const (
+ // VMGuestPatchRebootStatusCompleted ...
+ VMGuestPatchRebootStatusCompleted VMGuestPatchRebootStatus = "Completed"
+ // VMGuestPatchRebootStatusFailed ...
+ VMGuestPatchRebootStatusFailed VMGuestPatchRebootStatus = "Failed"
+ // VMGuestPatchRebootStatusNotNeeded ...
+ VMGuestPatchRebootStatusNotNeeded VMGuestPatchRebootStatus = "NotNeeded"
+ // VMGuestPatchRebootStatusRequired ...
+ VMGuestPatchRebootStatusRequired VMGuestPatchRebootStatus = "Required"
+ // VMGuestPatchRebootStatusStarted ...
+ VMGuestPatchRebootStatusStarted VMGuestPatchRebootStatus = "Started"
+ // VMGuestPatchRebootStatusUnknown ...
+ VMGuestPatchRebootStatusUnknown VMGuestPatchRebootStatus = "Unknown"
+)
+
+// PossibleVMGuestPatchRebootStatusValues returns an array of possible values for the VMGuestPatchRebootStatus const type.
+func PossibleVMGuestPatchRebootStatusValues() []VMGuestPatchRebootStatus {
+ return []VMGuestPatchRebootStatus{VMGuestPatchRebootStatusCompleted, VMGuestPatchRebootStatusFailed, VMGuestPatchRebootStatusNotNeeded, VMGuestPatchRebootStatusRequired, VMGuestPatchRebootStatusStarted, VMGuestPatchRebootStatusUnknown}
+}
+
+// WindowsPatchAssessmentMode enumerates the values for windows patch assessment mode.
+type WindowsPatchAssessmentMode string
+
+const (
+ // WindowsPatchAssessmentModeAutomaticByPlatform ...
+ WindowsPatchAssessmentModeAutomaticByPlatform WindowsPatchAssessmentMode = "AutomaticByPlatform"
+ // WindowsPatchAssessmentModeImageDefault ...
+ WindowsPatchAssessmentModeImageDefault WindowsPatchAssessmentMode = "ImageDefault"
+)
+
+// PossibleWindowsPatchAssessmentModeValues returns an array of possible values for the WindowsPatchAssessmentMode const type.
+func PossibleWindowsPatchAssessmentModeValues() []WindowsPatchAssessmentMode {
+ return []WindowsPatchAssessmentMode{WindowsPatchAssessmentModeAutomaticByPlatform, WindowsPatchAssessmentModeImageDefault}
+}
+
+// WindowsVMGuestPatchMode enumerates the values for windows vm guest patch mode.
+type WindowsVMGuestPatchMode string
+
+const (
+ // WindowsVMGuestPatchModeAutomaticByOS ...
+ WindowsVMGuestPatchModeAutomaticByOS WindowsVMGuestPatchMode = "AutomaticByOS"
+ // WindowsVMGuestPatchModeAutomaticByPlatform ...
+ WindowsVMGuestPatchModeAutomaticByPlatform WindowsVMGuestPatchMode = "AutomaticByPlatform"
+ // WindowsVMGuestPatchModeManual ...
+ WindowsVMGuestPatchModeManual WindowsVMGuestPatchMode = "Manual"
+)
+
+// PossibleWindowsVMGuestPatchModeValues returns an array of possible values for the WindowsVMGuestPatchMode const type.
+func PossibleWindowsVMGuestPatchModeValues() []WindowsVMGuestPatchMode {
+ return []WindowsVMGuestPatchMode{WindowsVMGuestPatchModeAutomaticByOS, WindowsVMGuestPatchModeAutomaticByPlatform, WindowsVMGuestPatchModeManual}
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/galleries.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/galleries.go
new file mode 100644
index 000000000000..9730526f7605
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/galleries.go
@@ -0,0 +1,584 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// GalleriesClient is the compute Client
+type GalleriesClient struct {
+ BaseClient
+}
+
+// NewGalleriesClient creates an instance of the GalleriesClient client.
+func NewGalleriesClient(subscriptionID string) GalleriesClient {
+ return NewGalleriesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewGalleriesClientWithBaseURI creates an instance of the GalleriesClient client using a custom endpoint. Use this
+// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewGalleriesClientWithBaseURI(baseURI string, subscriptionID string) GalleriesClient {
+ return GalleriesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate create or update a Shared Image Gallery.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Image Gallery. The allowed characters are alphabets and numbers with
+// dots and periods allowed in the middle. The maximum length is 80 characters.
+// gallery - parameters supplied to the create or update Shared Image Gallery operation.
+func (client GalleriesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, gallery Gallery) (result GalleriesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, galleryName, gallery)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client GalleriesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, gallery Gallery) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}", pathParameters),
+ autorest.WithJSON(gallery),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleriesClient) CreateOrUpdateSender(req *http.Request) (future GalleriesCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client GalleriesClient) CreateOrUpdateResponder(resp *http.Response) (result Gallery, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete delete a Shared Image Gallery.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Image Gallery to be deleted.
+func (client GalleriesClient) Delete(ctx context.Context, resourceGroupName string, galleryName string) (result GalleriesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, galleryName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client GalleriesClient) DeletePreparer(ctx context.Context, resourceGroupName string, galleryName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleriesClient) DeleteSender(req *http.Request) (future GalleriesDeleteFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client GalleriesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get retrieves information about a Shared Image Gallery.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Image Gallery.
+// selectParameter - the select expression to apply on the operation.
+func (client GalleriesClient) Get(ctx context.Context, resourceGroupName string, galleryName string, selectParameter SelectPermissions) (result Gallery, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, galleryName, selectParameter)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client GalleriesClient) GetPreparer(ctx context.Context, resourceGroupName string, galleryName string, selectParameter SelectPermissions) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(string(selectParameter)) > 0 {
+ queryParameters["$select"] = autorest.Encode("query", selectParameter)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleriesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client GalleriesClient) GetResponder(resp *http.Response) (result Gallery, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List list galleries under a subscription.
+func (client GalleriesClient) List(ctx context.Context) (result GalleryListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.List")
+ defer func() {
+ sc := -1
+ if result.gl.Response.Response != nil {
+ sc = result.gl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.gl.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.gl, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "List", resp, "Failure responding to request")
+ return
+ }
+ if result.gl.hasNextLink() && result.gl.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client GalleriesClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/galleries", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleriesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client GalleriesClient) ListResponder(resp *http.Response) (result GalleryList, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client GalleriesClient) listNextResults(ctx context.Context, lastResults GalleryList) (result GalleryList, err error) {
+ req, err := lastResults.galleryListPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.GalleriesClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.GalleriesClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client GalleriesClient) ListComplete(ctx context.Context) (result GalleryListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx)
+ return
+}
+
+// ListByResourceGroup list galleries under a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client GalleriesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result GalleryListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.gl.Response.Response != nil {
+ sc = result.gl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.gl.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.gl, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "ListByResourceGroup", resp, "Failure responding to request")
+ return
+ }
+ if result.gl.hasNextLink() && result.gl.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client GalleriesClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleriesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client GalleriesClient) ListByResourceGroupResponder(resp *http.Response) (result GalleryList, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByResourceGroupNextResults retrieves the next set of results, if any.
+func (client GalleriesClient) listByResourceGroupNextResults(ctx context.Context, lastResults GalleryList) (result GalleryList, err error) {
+ req, err := lastResults.galleryListPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.GalleriesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.GalleriesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client GalleriesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result GalleryListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByResourceGroup(ctx, resourceGroupName)
+ return
+}
+
+// Update update a Shared Image Gallery.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Image Gallery. The allowed characters are alphabets and numbers with
+// dots and periods allowed in the middle. The maximum length is 80 characters.
+// gallery - parameters supplied to the update Shared Image Gallery operation.
+func (client GalleriesClient) Update(ctx context.Context, resourceGroupName string, galleryName string, gallery GalleryUpdate) (result GalleriesUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.Update")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, gallery)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client GalleriesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, gallery GalleryUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}", pathParameters),
+ autorest.WithJSON(gallery),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleriesClient) UpdateSender(req *http.Request) (future GalleriesUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client GalleriesClient) UpdateResponder(resp *http.Response) (result Gallery, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/galleryapplications.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/galleryapplications.go
new file mode 100644
index 000000000000..f496086291f8
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/galleryapplications.go
@@ -0,0 +1,485 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// GalleryApplicationsClient is the compute Client
+type GalleryApplicationsClient struct {
+ BaseClient
+}
+
+// NewGalleryApplicationsClient creates an instance of the GalleryApplicationsClient client.
+func NewGalleryApplicationsClient(subscriptionID string) GalleryApplicationsClient {
+ return NewGalleryApplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewGalleryApplicationsClientWithBaseURI creates an instance of the GalleryApplicationsClient client using a custom
+// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
+// stack).
+func NewGalleryApplicationsClientWithBaseURI(baseURI string, subscriptionID string) GalleryApplicationsClient {
+ return GalleryApplicationsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate create or update a gallery Application Definition.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Application Gallery in which the Application Definition is to be
+// created.
+// galleryApplicationName - the name of the gallery Application Definition to be created or updated. The
+// allowed characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The
+// maximum length is 80 characters.
+// galleryApplication - parameters supplied to the create or update gallery Application operation.
+func (client GalleryApplicationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplication) (result GalleryApplicationsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplication)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client GalleryApplicationsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplication) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryApplicationName": autorest.Encode("path", galleryApplicationName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}", pathParameters),
+ autorest.WithJSON(galleryApplication),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryApplicationsClient) CreateOrUpdateSender(req *http.Request) (future GalleryApplicationsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client GalleryApplicationsClient) CreateOrUpdateResponder(resp *http.Response) (result GalleryApplication, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete delete a gallery Application.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Application Gallery in which the Application Definition is to be
+// deleted.
+// galleryApplicationName - the name of the gallery Application Definition to be deleted.
+func (client GalleryApplicationsClient) Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (result GalleryApplicationsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, galleryName, galleryApplicationName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client GalleryApplicationsClient) DeletePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryApplicationName": autorest.Encode("path", galleryApplicationName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryApplicationsClient) DeleteSender(req *http.Request) (future GalleryApplicationsDeleteFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client GalleryApplicationsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get retrieves information about a gallery Application Definition.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Application Gallery from which the Application Definitions are to be
+// retrieved.
+// galleryApplicationName - the name of the gallery Application Definition to be retrieved.
+func (client GalleryApplicationsClient) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (result GalleryApplication, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, galleryName, galleryApplicationName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client GalleryApplicationsClient) GetPreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryApplicationName": autorest.Encode("path", galleryApplicationName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryApplicationsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client GalleryApplicationsClient) GetResponder(resp *http.Response) (result GalleryApplication, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByGallery list gallery Application Definitions in a gallery.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Application Gallery from which Application Definitions are to be
+// listed.
+func (client GalleryApplicationsClient) ListByGallery(ctx context.Context, resourceGroupName string, galleryName string) (result GalleryApplicationListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationsClient.ListByGallery")
+ defer func() {
+ sc := -1
+ if result.gal.Response.Response != nil {
+ sc = result.gal.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByGalleryNextResults
+ req, err := client.ListByGalleryPreparer(ctx, resourceGroupName, galleryName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "ListByGallery", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByGallerySender(req)
+ if err != nil {
+ result.gal.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "ListByGallery", resp, "Failure sending request")
+ return
+ }
+
+ result.gal, err = client.ListByGalleryResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "ListByGallery", resp, "Failure responding to request")
+ return
+ }
+ if result.gal.hasNextLink() && result.gal.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListByGalleryPreparer prepares the ListByGallery request.
+func (client GalleryApplicationsClient) ListByGalleryPreparer(ctx context.Context, resourceGroupName string, galleryName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByGallerySender sends the ListByGallery request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryApplicationsClient) ListByGallerySender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByGalleryResponder handles the response to the ListByGallery request. The method always
+// closes the http.Response Body.
+func (client GalleryApplicationsClient) ListByGalleryResponder(resp *http.Response) (result GalleryApplicationList, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByGalleryNextResults retrieves the next set of results, if any.
+func (client GalleryApplicationsClient) listByGalleryNextResults(ctx context.Context, lastResults GalleryApplicationList) (result GalleryApplicationList, err error) {
+ req, err := lastResults.galleryApplicationListPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "listByGalleryNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByGallerySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "listByGalleryNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByGalleryResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "listByGalleryNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByGalleryComplete enumerates all values, automatically crossing page boundaries as required.
+func (client GalleryApplicationsClient) ListByGalleryComplete(ctx context.Context, resourceGroupName string, galleryName string) (result GalleryApplicationListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationsClient.ListByGallery")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByGallery(ctx, resourceGroupName, galleryName)
+ return
+}
+
+// Update update a gallery Application Definition.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Application Gallery in which the Application Definition is to be
+// updated.
+// galleryApplicationName - the name of the gallery Application Definition to be updated. The allowed
+// characters are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum
+// length is 80 characters.
+// galleryApplication - parameters supplied to the update gallery Application operation.
+func (client GalleryApplicationsClient) Update(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplicationUpdate) (result GalleryApplicationsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationsClient.Update")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplication)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client GalleryApplicationsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplication GalleryApplicationUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryApplicationName": autorest.Encode("path", galleryApplicationName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}", pathParameters),
+ autorest.WithJSON(galleryApplication),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryApplicationsClient) UpdateSender(req *http.Request) (future GalleryApplicationsUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client GalleryApplicationsClient) UpdateResponder(resp *http.Response) (result GalleryApplication, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/galleryapplicationversions.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/galleryapplicationversions.go
new file mode 100644
index 000000000000..947fae104d74
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/galleryapplicationversions.go
@@ -0,0 +1,516 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// GalleryApplicationVersionsClient is the compute Client
+type GalleryApplicationVersionsClient struct {
+ BaseClient
+}
+
+// NewGalleryApplicationVersionsClient creates an instance of the GalleryApplicationVersionsClient client.
+func NewGalleryApplicationVersionsClient(subscriptionID string) GalleryApplicationVersionsClient {
+ return NewGalleryApplicationVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewGalleryApplicationVersionsClientWithBaseURI creates an instance of the GalleryApplicationVersionsClient client
+// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign
+// clouds, Azure stack).
+func NewGalleryApplicationVersionsClientWithBaseURI(baseURI string, subscriptionID string) GalleryApplicationVersionsClient {
+ return GalleryApplicationVersionsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate create or update a gallery Application Version.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Application Gallery in which the Application Definition resides.
+// galleryApplicationName - the name of the gallery Application Definition in which the Application Version is
+// to be created.
+// galleryApplicationVersionName - the name of the gallery Application Version to be created. Needs to follow
+// semantic version name pattern: The allowed characters are digit and period. Digits must be within the range
+// of a 32-bit integer. Format: ..
+// galleryApplicationVersion - parameters supplied to the create or update gallery Application Version
+// operation.
+func (client GalleryApplicationVersionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersion) (result GalleryApplicationVersionsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: galleryApplicationVersion,
+ Constraints: []validation.Constraint{{Target: "galleryApplicationVersion.GalleryApplicationVersionProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "galleryApplicationVersion.GalleryApplicationVersionProperties.PublishingProfile", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "galleryApplicationVersion.GalleryApplicationVersionProperties.PublishingProfile.Source", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "galleryApplicationVersion.GalleryApplicationVersionProperties.PublishingProfile.Source.MediaLink", Name: validation.Null, Rule: true, Chain: nil}}},
+ {Target: "galleryApplicationVersion.GalleryApplicationVersionProperties.PublishingProfile.ManageActions", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "galleryApplicationVersion.GalleryApplicationVersionProperties.PublishingProfile.ManageActions.Install", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "galleryApplicationVersion.GalleryApplicationVersionProperties.PublishingProfile.ManageActions.Remove", Name: validation.Null, Rule: true, Chain: nil},
+ }},
+ }},
+ }}}}}); err != nil {
+ return result, validation.NewError("compute.GalleryApplicationVersionsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName, galleryApplicationVersion)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client GalleryApplicationVersionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersion) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryApplicationName": autorest.Encode("path", galleryApplicationName),
+ "galleryApplicationVersionName": autorest.Encode("path", galleryApplicationVersionName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}", pathParameters),
+ autorest.WithJSON(galleryApplicationVersion),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryApplicationVersionsClient) CreateOrUpdateSender(req *http.Request) (future GalleryApplicationVersionsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client GalleryApplicationVersionsClient) CreateOrUpdateResponder(resp *http.Response) (result GalleryApplicationVersion, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete delete a gallery Application Version.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Application Gallery in which the Application Definition resides.
+// galleryApplicationName - the name of the gallery Application Definition in which the Application Version
+// resides.
+// galleryApplicationVersionName - the name of the gallery Application Version to be deleted.
+func (client GalleryApplicationVersionsClient) Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string) (result GalleryApplicationVersionsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client GalleryApplicationVersionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryApplicationName": autorest.Encode("path", galleryApplicationName),
+ "galleryApplicationVersionName": autorest.Encode("path", galleryApplicationVersionName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryApplicationVersionsClient) DeleteSender(req *http.Request) (future GalleryApplicationVersionsDeleteFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client GalleryApplicationVersionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get retrieves information about a gallery Application Version.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Application Gallery in which the Application Definition resides.
+// galleryApplicationName - the name of the gallery Application Definition in which the Application Version
+// resides.
+// galleryApplicationVersionName - the name of the gallery Application Version to be retrieved.
+// expand - the expand expression to apply on the operation.
+func (client GalleryApplicationVersionsClient) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, expand ReplicationStatusTypes) (result GalleryApplicationVersion, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client GalleryApplicationVersionsClient) GetPreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, expand ReplicationStatusTypes) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryApplicationName": autorest.Encode("path", galleryApplicationName),
+ "galleryApplicationVersionName": autorest.Encode("path", galleryApplicationVersionName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(string(expand)) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryApplicationVersionsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client GalleryApplicationVersionsClient) GetResponder(resp *http.Response) (result GalleryApplicationVersion, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByGalleryApplication list gallery Application Versions in a gallery Application Definition.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Application Gallery in which the Application Definition resides.
+// galleryApplicationName - the name of the Shared Application Gallery Application Definition from which the
+// Application Versions are to be listed.
+func (client GalleryApplicationVersionsClient) ListByGalleryApplication(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (result GalleryApplicationVersionListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionsClient.ListByGalleryApplication")
+ defer func() {
+ sc := -1
+ if result.gavl.Response.Response != nil {
+ sc = result.gavl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByGalleryApplicationNextResults
+ req, err := client.ListByGalleryApplicationPreparer(ctx, resourceGroupName, galleryName, galleryApplicationName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "ListByGalleryApplication", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByGalleryApplicationSender(req)
+ if err != nil {
+ result.gavl.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "ListByGalleryApplication", resp, "Failure sending request")
+ return
+ }
+
+ result.gavl, err = client.ListByGalleryApplicationResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "ListByGalleryApplication", resp, "Failure responding to request")
+ return
+ }
+ if result.gavl.hasNextLink() && result.gavl.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListByGalleryApplicationPreparer prepares the ListByGalleryApplication request.
+func (client GalleryApplicationVersionsClient) ListByGalleryApplicationPreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryApplicationName": autorest.Encode("path", galleryApplicationName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByGalleryApplicationSender sends the ListByGalleryApplication request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryApplicationVersionsClient) ListByGalleryApplicationSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByGalleryApplicationResponder handles the response to the ListByGalleryApplication request. The method always
+// closes the http.Response Body.
+func (client GalleryApplicationVersionsClient) ListByGalleryApplicationResponder(resp *http.Response) (result GalleryApplicationVersionList, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByGalleryApplicationNextResults retrieves the next set of results, if any.
+func (client GalleryApplicationVersionsClient) listByGalleryApplicationNextResults(ctx context.Context, lastResults GalleryApplicationVersionList) (result GalleryApplicationVersionList, err error) {
+ req, err := lastResults.galleryApplicationVersionListPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "listByGalleryApplicationNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByGalleryApplicationSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "listByGalleryApplicationNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByGalleryApplicationResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "listByGalleryApplicationNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByGalleryApplicationComplete enumerates all values, automatically crossing page boundaries as required.
+func (client GalleryApplicationVersionsClient) ListByGalleryApplicationComplete(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string) (result GalleryApplicationVersionListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionsClient.ListByGalleryApplication")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByGalleryApplication(ctx, resourceGroupName, galleryName, galleryApplicationName)
+ return
+}
+
+// Update update a gallery Application Version.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Application Gallery in which the Application Definition resides.
+// galleryApplicationName - the name of the gallery Application Definition in which the Application Version is
+// to be updated.
+// galleryApplicationVersionName - the name of the gallery Application Version to be updated. Needs to follow
+// semantic version name pattern: The allowed characters are digit and period. Digits must be within the range
+// of a 32-bit integer. Format: ..
+// galleryApplicationVersion - parameters supplied to the update gallery Application Version operation.
+func (client GalleryApplicationVersionsClient) Update(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersionUpdate) (result GalleryApplicationVersionsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionsClient.Update")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, galleryApplicationName, galleryApplicationVersionName, galleryApplicationVersion)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client GalleryApplicationVersionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryApplicationName string, galleryApplicationVersionName string, galleryApplicationVersion GalleryApplicationVersionUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryApplicationName": autorest.Encode("path", galleryApplicationName),
+ "galleryApplicationVersionName": autorest.Encode("path", galleryApplicationVersionName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{galleryApplicationName}/versions/{galleryApplicationVersionName}", pathParameters),
+ autorest.WithJSON(galleryApplicationVersion),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryApplicationVersionsClient) UpdateSender(req *http.Request) (future GalleryApplicationVersionsUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client GalleryApplicationVersionsClient) UpdateResponder(resp *http.Response) (result GalleryApplicationVersion, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/galleryimages.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/galleryimages.go
new file mode 100644
index 000000000000..bf16351b3ec6
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/galleryimages.go
@@ -0,0 +1,492 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// GalleryImagesClient is the compute Client
+type GalleryImagesClient struct {
+ BaseClient
+}
+
+// NewGalleryImagesClient creates an instance of the GalleryImagesClient client.
+func NewGalleryImagesClient(subscriptionID string) GalleryImagesClient {
+ return NewGalleryImagesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewGalleryImagesClientWithBaseURI creates an instance of the GalleryImagesClient client using a custom endpoint.
+// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewGalleryImagesClientWithBaseURI(baseURI string, subscriptionID string) GalleryImagesClient {
+ return GalleryImagesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate create or update a gallery image definition.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Image Gallery in which the Image Definition is to be created.
+// galleryImageName - the name of the gallery image definition to be created or updated. The allowed characters
+// are alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80
+// characters.
+// galleryImage - parameters supplied to the create or update gallery image operation.
+func (client GalleryImagesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImage) (result GalleryImagesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: galleryImage,
+ Constraints: []validation.Constraint{{Target: "galleryImage.GalleryImageProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "galleryImage.GalleryImageProperties.Identifier", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "galleryImage.GalleryImageProperties.Identifier.Publisher", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "galleryImage.GalleryImageProperties.Identifier.Offer", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "galleryImage.GalleryImageProperties.Identifier.Sku", Name: validation.Null, Rule: true, Chain: nil},
+ }},
+ }}}}}); err != nil {
+ return result, validation.NewError("compute.GalleryImagesClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, galleryName, galleryImageName, galleryImage)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client GalleryImagesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImage) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryImageName": autorest.Encode("path", galleryImageName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}", pathParameters),
+ autorest.WithJSON(galleryImage),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryImagesClient) CreateOrUpdateSender(req *http.Request) (future GalleryImagesCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client GalleryImagesClient) CreateOrUpdateResponder(resp *http.Response) (result GalleryImage, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete delete a gallery image.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Image Gallery in which the Image Definition is to be deleted.
+// galleryImageName - the name of the gallery image definition to be deleted.
+func (client GalleryImagesClient) Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result GalleryImagesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, galleryName, galleryImageName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client GalleryImagesClient) DeletePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryImageName": autorest.Encode("path", galleryImageName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryImagesClient) DeleteSender(req *http.Request) (future GalleryImagesDeleteFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client GalleryImagesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get retrieves information about a gallery image definition.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Image Gallery from which the Image Definitions are to be retrieved.
+// galleryImageName - the name of the gallery image definition to be retrieved.
+func (client GalleryImagesClient) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result GalleryImage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, galleryName, galleryImageName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client GalleryImagesClient) GetPreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryImageName": autorest.Encode("path", galleryImageName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryImagesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client GalleryImagesClient) GetResponder(resp *http.Response) (result GalleryImage, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByGallery list gallery image definitions in a gallery.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Image Gallery from which Image Definitions are to be listed.
+func (client GalleryImagesClient) ListByGallery(ctx context.Context, resourceGroupName string, galleryName string) (result GalleryImageListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.ListByGallery")
+ defer func() {
+ sc := -1
+ if result.gil.Response.Response != nil {
+ sc = result.gil.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByGalleryNextResults
+ req, err := client.ListByGalleryPreparer(ctx, resourceGroupName, galleryName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "ListByGallery", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByGallerySender(req)
+ if err != nil {
+ result.gil.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "ListByGallery", resp, "Failure sending request")
+ return
+ }
+
+ result.gil, err = client.ListByGalleryResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "ListByGallery", resp, "Failure responding to request")
+ return
+ }
+ if result.gil.hasNextLink() && result.gil.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListByGalleryPreparer prepares the ListByGallery request.
+func (client GalleryImagesClient) ListByGalleryPreparer(ctx context.Context, resourceGroupName string, galleryName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByGallerySender sends the ListByGallery request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryImagesClient) ListByGallerySender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByGalleryResponder handles the response to the ListByGallery request. The method always
+// closes the http.Response Body.
+func (client GalleryImagesClient) ListByGalleryResponder(resp *http.Response) (result GalleryImageList, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByGalleryNextResults retrieves the next set of results, if any.
+func (client GalleryImagesClient) listByGalleryNextResults(ctx context.Context, lastResults GalleryImageList) (result GalleryImageList, err error) {
+ req, err := lastResults.galleryImageListPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "listByGalleryNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByGallerySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "listByGalleryNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByGalleryResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "listByGalleryNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByGalleryComplete enumerates all values, automatically crossing page boundaries as required.
+func (client GalleryImagesClient) ListByGalleryComplete(ctx context.Context, resourceGroupName string, galleryName string) (result GalleryImageListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.ListByGallery")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByGallery(ctx, resourceGroupName, galleryName)
+ return
+}
+
+// Update update a gallery image definition.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Image Gallery in which the Image Definition is to be updated.
+// galleryImageName - the name of the gallery image definition to be updated. The allowed characters are
+// alphabets and numbers with dots, dashes, and periods allowed in the middle. The maximum length is 80
+// characters.
+// galleryImage - parameters supplied to the update gallery image operation.
+func (client GalleryImagesClient) Update(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImageUpdate) (result GalleryImagesUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.Update")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, galleryImageName, galleryImage)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client GalleryImagesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImageUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryImageName": autorest.Encode("path", galleryImageName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}", pathParameters),
+ autorest.WithJSON(galleryImage),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryImagesClient) UpdateSender(req *http.Request) (future GalleryImagesUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client GalleryImagesClient) UpdateResponder(resp *http.Response) (result GalleryImage, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/galleryimageversions.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/galleryimageversions.go
new file mode 100644
index 000000000000..0ee7a395b9ea
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/galleryimageversions.go
@@ -0,0 +1,503 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// GalleryImageVersionsClient is the compute Client
+type GalleryImageVersionsClient struct {
+ BaseClient
+}
+
+// NewGalleryImageVersionsClient creates an instance of the GalleryImageVersionsClient client.
+func NewGalleryImageVersionsClient(subscriptionID string) GalleryImageVersionsClient {
+ return NewGalleryImageVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewGalleryImageVersionsClientWithBaseURI creates an instance of the GalleryImageVersionsClient client using a custom
+// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
+// stack).
+func NewGalleryImageVersionsClientWithBaseURI(baseURI string, subscriptionID string) GalleryImageVersionsClient {
+ return GalleryImageVersionsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate create or update a gallery image version.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Image Gallery in which the Image Definition resides.
+// galleryImageName - the name of the gallery image definition in which the Image Version is to be created.
+// galleryImageVersionName - the name of the gallery image version to be created. Needs to follow semantic
+// version name pattern: The allowed characters are digit and period. Digits must be within the range of a
+// 32-bit integer. Format: ..
+// galleryImageVersion - parameters supplied to the create or update gallery image version operation.
+func (client GalleryImageVersionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion GalleryImageVersion) (result GalleryImageVersionsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: galleryImageVersion,
+ Constraints: []validation.Constraint{{Target: "galleryImageVersion.GalleryImageVersionProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "galleryImageVersion.GalleryImageVersionProperties.StorageProfile", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("compute.GalleryImageVersionsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client GalleryImageVersionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion GalleryImageVersion) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryImageName": autorest.Encode("path", galleryImageName),
+ "galleryImageVersionName": autorest.Encode("path", galleryImageVersionName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", pathParameters),
+ autorest.WithJSON(galleryImageVersion),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryImageVersionsClient) CreateOrUpdateSender(req *http.Request) (future GalleryImageVersionsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client GalleryImageVersionsClient) CreateOrUpdateResponder(resp *http.Response) (result GalleryImageVersion, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete delete a gallery image version.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Image Gallery in which the Image Definition resides.
+// galleryImageName - the name of the gallery image definition in which the Image Version resides.
+// galleryImageVersionName - the name of the gallery image version to be deleted.
+func (client GalleryImageVersionsClient) Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string) (result GalleryImageVersionsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, galleryName, galleryImageName, galleryImageVersionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client GalleryImageVersionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryImageName": autorest.Encode("path", galleryImageName),
+ "galleryImageVersionName": autorest.Encode("path", galleryImageVersionName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryImageVersionsClient) DeleteSender(req *http.Request) (future GalleryImageVersionsDeleteFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client GalleryImageVersionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get retrieves information about a gallery image version.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Image Gallery in which the Image Definition resides.
+// galleryImageName - the name of the gallery image definition in which the Image Version resides.
+// galleryImageVersionName - the name of the gallery image version to be retrieved.
+// expand - the expand expression to apply on the operation.
+func (client GalleryImageVersionsClient) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, expand ReplicationStatusTypes) (result GalleryImageVersion, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client GalleryImageVersionsClient) GetPreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, expand ReplicationStatusTypes) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryImageName": autorest.Encode("path", galleryImageName),
+ "galleryImageVersionName": autorest.Encode("path", galleryImageVersionName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(string(expand)) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryImageVersionsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client GalleryImageVersionsClient) GetResponder(resp *http.Response) (result GalleryImageVersion, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByGalleryImage list gallery image versions in a gallery image definition.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Image Gallery in which the Image Definition resides.
+// galleryImageName - the name of the Shared Image Gallery Image Definition from which the Image Versions are
+// to be listed.
+func (client GalleryImageVersionsClient) ListByGalleryImage(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result GalleryImageVersionListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.ListByGalleryImage")
+ defer func() {
+ sc := -1
+ if result.givl.Response.Response != nil {
+ sc = result.givl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByGalleryImageNextResults
+ req, err := client.ListByGalleryImagePreparer(ctx, resourceGroupName, galleryName, galleryImageName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "ListByGalleryImage", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByGalleryImageSender(req)
+ if err != nil {
+ result.givl.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "ListByGalleryImage", resp, "Failure sending request")
+ return
+ }
+
+ result.givl, err = client.ListByGalleryImageResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "ListByGalleryImage", resp, "Failure responding to request")
+ return
+ }
+ if result.givl.hasNextLink() && result.givl.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListByGalleryImagePreparer prepares the ListByGalleryImage request.
+func (client GalleryImageVersionsClient) ListByGalleryImagePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryImageName": autorest.Encode("path", galleryImageName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByGalleryImageSender sends the ListByGalleryImage request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryImageVersionsClient) ListByGalleryImageSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByGalleryImageResponder handles the response to the ListByGalleryImage request. The method always
+// closes the http.Response Body.
+func (client GalleryImageVersionsClient) ListByGalleryImageResponder(resp *http.Response) (result GalleryImageVersionList, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByGalleryImageNextResults retrieves the next set of results, if any.
+func (client GalleryImageVersionsClient) listByGalleryImageNextResults(ctx context.Context, lastResults GalleryImageVersionList) (result GalleryImageVersionList, err error) {
+ req, err := lastResults.galleryImageVersionListPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "listByGalleryImageNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByGalleryImageSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "listByGalleryImageNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByGalleryImageResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "listByGalleryImageNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByGalleryImageComplete enumerates all values, automatically crossing page boundaries as required.
+func (client GalleryImageVersionsClient) ListByGalleryImageComplete(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result GalleryImageVersionListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.ListByGalleryImage")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByGalleryImage(ctx, resourceGroupName, galleryName, galleryImageName)
+ return
+}
+
+// Update update a gallery image version.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Image Gallery in which the Image Definition resides.
+// galleryImageName - the name of the gallery image definition in which the Image Version is to be updated.
+// galleryImageVersionName - the name of the gallery image version to be updated. Needs to follow semantic
+// version name pattern: The allowed characters are digit and period. Digits must be within the range of a
+// 32-bit integer. Format: ..
+// galleryImageVersion - parameters supplied to the update gallery image version operation.
+func (client GalleryImageVersionsClient) Update(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion GalleryImageVersionUpdate) (result GalleryImageVersionsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.Update")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, galleryImageVersion)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client GalleryImageVersionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion GalleryImageVersionUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryImageName": autorest.Encode("path", galleryImageName),
+ "galleryImageVersionName": autorest.Encode("path", galleryImageVersionName),
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}", pathParameters),
+ autorest.WithJSON(galleryImageVersion),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client GalleryImageVersionsClient) UpdateSender(req *http.Request) (future GalleryImageVersionsUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client GalleryImageVersionsClient) UpdateResponder(resp *http.Response) (result GalleryImageVersion, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/gallerysharingprofile.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/gallerysharingprofile.go
new file mode 100644
index 000000000000..eab53278bb40
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/gallerysharingprofile.go
@@ -0,0 +1,114 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// GallerySharingProfileClient is the compute Client
+type GallerySharingProfileClient struct {
+ BaseClient
+}
+
+// NewGallerySharingProfileClient creates an instance of the GallerySharingProfileClient client.
+func NewGallerySharingProfileClient(subscriptionID string) GallerySharingProfileClient {
+ return NewGallerySharingProfileClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewGallerySharingProfileClientWithBaseURI creates an instance of the GallerySharingProfileClient client using a
+// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds,
+// Azure stack).
+func NewGallerySharingProfileClientWithBaseURI(baseURI string, subscriptionID string) GallerySharingProfileClient {
+ return GallerySharingProfileClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Update update sharing profile of a gallery.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// galleryName - the name of the Shared Image Gallery.
+// sharingUpdate - parameters supplied to the update gallery sharing profile.
+func (client GallerySharingProfileClient) Update(ctx context.Context, resourceGroupName string, galleryName string, sharingUpdate SharingUpdate) (result GallerySharingProfileUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GallerySharingProfileClient.Update")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, galleryName, sharingUpdate)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GallerySharingProfileClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GallerySharingProfileClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client GallerySharingProfileClient) UpdatePreparer(ctx context.Context, resourceGroupName string, galleryName string, sharingUpdate SharingUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryName": autorest.Encode("path", galleryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/share", pathParameters),
+ autorest.WithJSON(sharingUpdate),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client GallerySharingProfileClient) UpdateSender(req *http.Request) (future GallerySharingProfileUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client GallerySharingProfileClient) UpdateResponder(resp *http.Response) (result SharingUpdate, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/images.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/images.go
new file mode 100644
index 000000000000..66a9bcbd0c44
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/images.go
@@ -0,0 +1,583 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// ImagesClient is the compute Client
+type ImagesClient struct {
+ BaseClient
+}
+
+// NewImagesClient creates an instance of the ImagesClient client.
+func NewImagesClient(subscriptionID string) ImagesClient {
+ return NewImagesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewImagesClientWithBaseURI creates an instance of the ImagesClient client using a custom endpoint. Use this when
+// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewImagesClientWithBaseURI(baseURI string, subscriptionID string) ImagesClient {
+ return ImagesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate create or update an image.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// imageName - the name of the image.
+// parameters - parameters supplied to the Create Image operation.
+func (client ImagesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, imageName string, parameters Image) (result ImagesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, imageName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client ImagesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, imageName string, parameters Image) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "imageName": autorest.Encode("path", imageName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client ImagesClient) CreateOrUpdateSender(req *http.Request) (future ImagesCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client ImagesClient) CreateOrUpdateResponder(resp *http.Response) (result Image, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete deletes an Image.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// imageName - the name of the image.
+func (client ImagesClient) Delete(ctx context.Context, resourceGroupName string, imageName string) (result ImagesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, imageName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client ImagesClient) DeletePreparer(ctx context.Context, resourceGroupName string, imageName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "imageName": autorest.Encode("path", imageName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client ImagesClient) DeleteSender(req *http.Request) (future ImagesDeleteFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client ImagesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get gets an image.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// imageName - the name of the image.
+// expand - the expand expression to apply on the operation.
+func (client ImagesClient) Get(ctx context.Context, resourceGroupName string, imageName string, expand string) (result Image, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, imageName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ImagesClient) GetPreparer(ctx context.Context, resourceGroupName string, imageName string, expand string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "imageName": autorest.Encode("path", imageName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(expand) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client ImagesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client ImagesClient) GetResponder(resp *http.Response) (result Image, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List gets the list of Images in the subscription. Use nextLink property in the response to get the next page of
+// Images. Do this till nextLink is null to fetch all the Images.
+func (client ImagesClient) List(ctx context.Context) (result ImageListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.List")
+ defer func() {
+ sc := -1
+ if result.ilr.Response.Response != nil {
+ sc = result.ilr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.ilr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.ilr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "List", resp, "Failure responding to request")
+ return
+ }
+ if result.ilr.hasNextLink() && result.ilr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ImagesClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/images", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client ImagesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client ImagesClient) ListResponder(resp *http.Response) (result ImageListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client ImagesClient) listNextResults(ctx context.Context, lastResults ImageListResult) (result ImageListResult, err error) {
+ req, err := lastResults.imageListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.ImagesClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.ImagesClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ImagesClient) ListComplete(ctx context.Context) (result ImageListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx)
+ return
+}
+
+// ListByResourceGroup gets the list of images under a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client ImagesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ImageListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.ilr.Response.Response != nil {
+ sc = result.ilr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.ilr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.ilr, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "ListByResourceGroup", resp, "Failure responding to request")
+ return
+ }
+ if result.ilr.hasNextLink() && result.ilr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client ImagesClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client ImagesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client ImagesClient) ListByResourceGroupResponder(resp *http.Response) (result ImageListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByResourceGroupNextResults retrieves the next set of results, if any.
+func (client ImagesClient) listByResourceGroupNextResults(ctx context.Context, lastResults ImageListResult) (result ImageListResult, err error) {
+ req, err := lastResults.imageListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.ImagesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.ImagesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ImagesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ImageListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByResourceGroup(ctx, resourceGroupName)
+ return
+}
+
+// Update update an image.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// imageName - the name of the image.
+// parameters - parameters supplied to the Update Image operation.
+func (client ImagesClient) Update(ctx context.Context, resourceGroupName string, imageName string, parameters ImageUpdate) (result ImagesUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.Update")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, imageName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client ImagesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, imageName string, parameters ImageUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "imageName": autorest.Encode("path", imageName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client ImagesClient) UpdateSender(req *http.Request) (future ImagesUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client ImagesClient) UpdateResponder(resp *http.Response) (result Image, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/loganalytics.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/loganalytics.go
new file mode 100644
index 000000000000..ec30f9cc8c61
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/loganalytics.go
@@ -0,0 +1,206 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// LogAnalyticsClient is the compute Client
+type LogAnalyticsClient struct {
+ BaseClient
+}
+
+// NewLogAnalyticsClient creates an instance of the LogAnalyticsClient client.
+func NewLogAnalyticsClient(subscriptionID string) LogAnalyticsClient {
+ return NewLogAnalyticsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewLogAnalyticsClientWithBaseURI creates an instance of the LogAnalyticsClient client using a custom endpoint. Use
+// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewLogAnalyticsClientWithBaseURI(baseURI string, subscriptionID string) LogAnalyticsClient {
+ return LogAnalyticsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// ExportRequestRateByInterval export logs that show Api requests made by this subscription in the given time window to
+// show throttling activities.
+// Parameters:
+// parameters - parameters supplied to the LogAnalytics getRequestRateByInterval Api.
+// location - the location upon which virtual-machine-sizes is queried.
+func (client LogAnalyticsClient) ExportRequestRateByInterval(ctx context.Context, parameters RequestRateByIntervalInput, location string) (result LogAnalyticsExportRequestRateByIntervalFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LogAnalyticsClient.ExportRequestRateByInterval")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: location,
+ Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("compute.LogAnalyticsClient", "ExportRequestRateByInterval", err.Error())
+ }
+
+ req, err := client.ExportRequestRateByIntervalPreparer(ctx, parameters, location)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportRequestRateByInterval", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ExportRequestRateByIntervalSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportRequestRateByInterval", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ExportRequestRateByIntervalPreparer prepares the ExportRequestRateByInterval request.
+func (client LogAnalyticsClient) ExportRequestRateByIntervalPreparer(ctx context.Context, parameters RequestRateByIntervalInput, location string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getRequestRateByInterval", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ExportRequestRateByIntervalSender sends the ExportRequestRateByInterval request. The method will close the
+// http.Response Body if it receives an error.
+func (client LogAnalyticsClient) ExportRequestRateByIntervalSender(req *http.Request) (future LogAnalyticsExportRequestRateByIntervalFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// ExportRequestRateByIntervalResponder handles the response to the ExportRequestRateByInterval request. The method always
+// closes the http.Response Body.
+func (client LogAnalyticsClient) ExportRequestRateByIntervalResponder(resp *http.Response) (result LogAnalyticsOperationResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ExportThrottledRequests export logs that show total throttled Api requests for this subscription in the given time
+// window.
+// Parameters:
+// parameters - parameters supplied to the LogAnalytics getThrottledRequests Api.
+// location - the location upon which virtual-machine-sizes is queried.
+func (client LogAnalyticsClient) ExportThrottledRequests(ctx context.Context, parameters ThrottledRequestsInput, location string) (result LogAnalyticsExportThrottledRequestsFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LogAnalyticsClient.ExportThrottledRequests")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: location,
+ Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("compute.LogAnalyticsClient", "ExportThrottledRequests", err.Error())
+ }
+
+ req, err := client.ExportThrottledRequestsPreparer(ctx, parameters, location)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportThrottledRequests", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ExportThrottledRequestsSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.LogAnalyticsClient", "ExportThrottledRequests", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ExportThrottledRequestsPreparer prepares the ExportThrottledRequests request.
+func (client LogAnalyticsClient) ExportThrottledRequestsPreparer(ctx context.Context, parameters ThrottledRequestsInput, location string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/logAnalytics/apiAccess/getThrottledRequests", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ExportThrottledRequestsSender sends the ExportThrottledRequests request. The method will close the
+// http.Response Body if it receives an error.
+func (client LogAnalyticsClient) ExportThrottledRequestsSender(req *http.Request) (future LogAnalyticsExportThrottledRequestsFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// ExportThrottledRequestsResponder handles the response to the ExportThrottledRequests request. The method always
+// closes the http.Response Body.
+func (client LogAnalyticsClient) ExportThrottledRequestsResponder(resp *http.Response) (result LogAnalyticsOperationResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/models.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/models.go
new file mode 100644
index 000000000000..9718eb39f588
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/models.go
@@ -0,0 +1,23422 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "encoding/json"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/date"
+ "github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
+ "io"
+ "net/http"
+)
+
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
+
+// AccessURI a disk access SAS uri.
+type AccessURI struct {
+ autorest.Response `json:"-"`
+ // AccessSAS - READ-ONLY; A SAS uri for accessing a disk.
+ AccessSAS *string `json:"accessSAS,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for AccessURI.
+func (au AccessURI) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// AdditionalCapabilities enables or disables a capability on the virtual machine or virtual machine scale
+// set.
+type AdditionalCapabilities struct {
+ // UltraSSDEnabled - The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled.
+ UltraSSDEnabled *bool `json:"ultraSSDEnabled,omitempty"`
+ // HibernationEnabled - The flag that enables or disables hibernation capability on the VM.
+ HibernationEnabled *bool `json:"hibernationEnabled,omitempty"`
+}
+
+// AdditionalUnattendContent specifies additional XML formatted information that can be included in the
+// Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name,
+// and the pass in which the content is applied.
+type AdditionalUnattendContent struct {
+ // PassName - The pass name. Currently, the only allowable value is OobeSystem. Possible values include: 'PassNamesOobeSystem'
+ PassName PassNames `json:"passName,omitempty"`
+ // ComponentName - The component name. Currently, the only allowable value is Microsoft-Windows-Shell-Setup. Possible values include: 'ComponentNamesMicrosoftWindowsShellSetup'
+ ComponentName ComponentNames `json:"componentName,omitempty"`
+ // SettingName - Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon. Possible values include: 'SettingNamesAutoLogon', 'SettingNamesFirstLogonCommands'
+ SettingName SettingNames `json:"settingName,omitempty"`
+ // Content - Specifies the XML formatted content that is added to the unattend.xml file for the specified path and component. The XML must be less than 4KB and must include the root element for the setting or feature that is being inserted.
+ Content *string `json:"content,omitempty"`
+}
+
+// APIEntityReference the API entity reference.
+type APIEntityReference struct {
+ // ID - The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
+ ID *string `json:"id,omitempty"`
+}
+
+// APIError api error.
+type APIError struct {
+ // Details - The Api error details
+ Details *[]APIErrorBase `json:"details,omitempty"`
+ // Innererror - The Api inner error
+ Innererror *InnerError `json:"innererror,omitempty"`
+ // Code - The error code.
+ Code *string `json:"code,omitempty"`
+ // Target - The target of the particular error.
+ Target *string `json:"target,omitempty"`
+ // Message - The error message.
+ Message *string `json:"message,omitempty"`
+}
+
+// APIErrorBase api error base.
+type APIErrorBase struct {
+ // Code - The error code.
+ Code *string `json:"code,omitempty"`
+ // Target - The target of the particular error.
+ Target *string `json:"target,omitempty"`
+ // Message - The error message.
+ Message *string `json:"message,omitempty"`
+}
+
+// ApplicationProfile contains the list of gallery applications that should be made available to the
+// VM/VMSS
+type ApplicationProfile struct {
+ // GalleryApplications - Specifies the gallery applications that should be made available to the VM/VMSS
+ GalleryApplications *[]VMGalleryApplication `json:"galleryApplications,omitempty"`
+}
+
+// AutomaticOSUpgradePolicy the configuration parameters used for performing automatic OS upgrade.
+type AutomaticOSUpgradePolicy struct {
+ // EnableAutomaticOSUpgrade - Indicates whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available. Default value is false.
If this is set to true for Windows based scale sets, [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) is automatically set to false and cannot be set to true.
+ EnableAutomaticOSUpgrade *bool `json:"enableAutomaticOSUpgrade,omitempty"`
+ // DisableAutomaticRollback - Whether OS image rollback feature should be disabled. Default value is false.
+ DisableAutomaticRollback *bool `json:"disableAutomaticRollback,omitempty"`
+}
+
+// AutomaticOSUpgradeProperties describes automatic OS upgrade properties on the image.
+type AutomaticOSUpgradeProperties struct {
+ // AutomaticOSUpgradeSupported - Specifies whether automatic OS upgrade is supported on the image.
+ AutomaticOSUpgradeSupported *bool `json:"automaticOSUpgradeSupported,omitempty"`
+}
+
+// AutomaticRepairsPolicy specifies the configuration parameters for automatic repairs on the virtual
+// machine scale set.
+type AutomaticRepairsPolicy struct {
+ // Enabled - Specifies whether automatic repairs should be enabled on the virtual machine scale set. The default value is false.
+ Enabled *bool `json:"enabled,omitempty"`
+ // GracePeriod - The amount of time for which automatic repairs are suspended due to a state change on VM. The grace time starts after the state change has completed. This helps avoid premature or accidental repairs. The time duration should be specified in ISO 8601 format. The minimum allowed grace period is 30 minutes (PT30M), which is also the default value. The maximum allowed grace period is 90 minutes (PT90M).
+ GracePeriod *string `json:"gracePeriod,omitempty"`
+}
+
+// AvailabilitySet specifies information about the availability set that the virtual machine should be
+// assigned to. Virtual machines specified in the same availability set are allocated to different nodes to
+// maximize availability. For more information about availability sets, see [Availability sets
+// overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview).
For
+// more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in
+// Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates)
Currently, a
+// VM can only be added to availability set at creation time. An existing VM cannot be added to an
+// availability set.
+type AvailabilitySet struct {
+ autorest.Response `json:"-"`
+ *AvailabilitySetProperties `json:"properties,omitempty"`
+ // Sku - Sku of the availability set, only name is required to be set. See AvailabilitySetSkuTypes for possible set of values. Use 'Aligned' for virtual machines with managed disks and 'Classic' for virtual machines with unmanaged disks. Default value is 'Classic'.
+ Sku *Sku `json:"sku,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for AvailabilitySet.
+func (as AvailabilitySet) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if as.AvailabilitySetProperties != nil {
+ objectMap["properties"] = as.AvailabilitySetProperties
+ }
+ if as.Sku != nil {
+ objectMap["sku"] = as.Sku
+ }
+ if as.Location != nil {
+ objectMap["location"] = as.Location
+ }
+ if as.Tags != nil {
+ objectMap["tags"] = as.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for AvailabilitySet struct.
+func (as *AvailabilitySet) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var availabilitySetProperties AvailabilitySetProperties
+ err = json.Unmarshal(*v, &availabilitySetProperties)
+ if err != nil {
+ return err
+ }
+ as.AvailabilitySetProperties = &availabilitySetProperties
+ }
+ case "sku":
+ if v != nil {
+ var sku Sku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ as.Sku = &sku
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ as.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ as.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ as.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ as.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ as.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// AvailabilitySetListResult the List Availability Set operation response.
+type AvailabilitySetListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of availability sets
+ Value *[]AvailabilitySet `json:"value,omitempty"`
+ // NextLink - The URI to fetch the next page of AvailabilitySets. Call ListNext() with this URI to fetch the next page of AvailabilitySets.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// AvailabilitySetListResultIterator provides access to a complete listing of AvailabilitySet values.
+type AvailabilitySetListResultIterator struct {
+ i int
+ page AvailabilitySetListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *AvailabilitySetListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *AvailabilitySetListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter AvailabilitySetListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter AvailabilitySetListResultIterator) Response() AvailabilitySetListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter AvailabilitySetListResultIterator) Value() AvailabilitySet {
+ if !iter.page.NotDone() {
+ return AvailabilitySet{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the AvailabilitySetListResultIterator type.
+func NewAvailabilitySetListResultIterator(page AvailabilitySetListResultPage) AvailabilitySetListResultIterator {
+ return AvailabilitySetListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (aslr AvailabilitySetListResult) IsEmpty() bool {
+ return aslr.Value == nil || len(*aslr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (aslr AvailabilitySetListResult) hasNextLink() bool {
+ return aslr.NextLink != nil && len(*aslr.NextLink) != 0
+}
+
+// availabilitySetListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (aslr AvailabilitySetListResult) availabilitySetListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !aslr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(aslr.NextLink)))
+}
+
+// AvailabilitySetListResultPage contains a page of AvailabilitySet values.
+type AvailabilitySetListResultPage struct {
+ fn func(context.Context, AvailabilitySetListResult) (AvailabilitySetListResult, error)
+ aslr AvailabilitySetListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *AvailabilitySetListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.aslr)
+ if err != nil {
+ return err
+ }
+ page.aslr = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *AvailabilitySetListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page AvailabilitySetListResultPage) NotDone() bool {
+ return !page.aslr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page AvailabilitySetListResultPage) Response() AvailabilitySetListResult {
+ return page.aslr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page AvailabilitySetListResultPage) Values() []AvailabilitySet {
+ if page.aslr.IsEmpty() {
+ return nil
+ }
+ return *page.aslr.Value
+}
+
+// Creates a new instance of the AvailabilitySetListResultPage type.
+func NewAvailabilitySetListResultPage(cur AvailabilitySetListResult, getNextPage func(context.Context, AvailabilitySetListResult) (AvailabilitySetListResult, error)) AvailabilitySetListResultPage {
+ return AvailabilitySetListResultPage{
+ fn: getNextPage,
+ aslr: cur,
+ }
+}
+
+// AvailabilitySetProperties the instance view of a resource.
+type AvailabilitySetProperties struct {
+ // PlatformUpdateDomainCount - Update Domain count.
+ PlatformUpdateDomainCount *int32 `json:"platformUpdateDomainCount,omitempty"`
+ // PlatformFaultDomainCount - Fault Domain count.
+ PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"`
+ // VirtualMachines - A list of references to all virtual machines in the availability set.
+ VirtualMachines *[]SubResource `json:"virtualMachines,omitempty"`
+ // ProximityPlacementGroup - Specifies information about the proximity placement group that the availability set should be assigned to.
Minimum api-version: 2018-04-01.
+ ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`
+ // Statuses - READ-ONLY; The resource status information.
+ Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for AvailabilitySetProperties.
+func (asp AvailabilitySetProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if asp.PlatformUpdateDomainCount != nil {
+ objectMap["platformUpdateDomainCount"] = asp.PlatformUpdateDomainCount
+ }
+ if asp.PlatformFaultDomainCount != nil {
+ objectMap["platformFaultDomainCount"] = asp.PlatformFaultDomainCount
+ }
+ if asp.VirtualMachines != nil {
+ objectMap["virtualMachines"] = asp.VirtualMachines
+ }
+ if asp.ProximityPlacementGroup != nil {
+ objectMap["proximityPlacementGroup"] = asp.ProximityPlacementGroup
+ }
+ return json.Marshal(objectMap)
+}
+
+// AvailabilitySetUpdate specifies information about the availability set that the virtual machine should
+// be assigned to. Only tags may be updated.
+type AvailabilitySetUpdate struct {
+ *AvailabilitySetProperties `json:"properties,omitempty"`
+ // Sku - Sku of the availability set
+ Sku *Sku `json:"sku,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for AvailabilitySetUpdate.
+func (asu AvailabilitySetUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if asu.AvailabilitySetProperties != nil {
+ objectMap["properties"] = asu.AvailabilitySetProperties
+ }
+ if asu.Sku != nil {
+ objectMap["sku"] = asu.Sku
+ }
+ if asu.Tags != nil {
+ objectMap["tags"] = asu.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for AvailabilitySetUpdate struct.
+func (asu *AvailabilitySetUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var availabilitySetProperties AvailabilitySetProperties
+ err = json.Unmarshal(*v, &availabilitySetProperties)
+ if err != nil {
+ return err
+ }
+ asu.AvailabilitySetProperties = &availabilitySetProperties
+ }
+ case "sku":
+ if v != nil {
+ var sku Sku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ asu.Sku = &sku
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ asu.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// AvailablePatchSummary describes the properties of an virtual machine instance view for available patch
+// summary.
+type AvailablePatchSummary struct {
+ // Status - READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or "CompletedWithWarnings.". Possible values include: 'PatchOperationStatusUnknown', 'PatchOperationStatusInProgress', 'PatchOperationStatusFailed', 'PatchOperationStatusSucceeded', 'PatchOperationStatusCompletedWithWarnings'
+ Status PatchOperationStatus `json:"status,omitempty"`
+ // AssessmentActivityID - READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs.
+ AssessmentActivityID *string `json:"assessmentActivityId,omitempty"`
+ // RebootPending - READ-ONLY; The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete installation but the reboot has not yet occurred.
+ RebootPending *bool `json:"rebootPending,omitempty"`
+ // CriticalAndSecurityPatchCount - READ-ONLY; The number of critical or security patches that have been detected as available and not yet installed.
+ CriticalAndSecurityPatchCount *int32 `json:"criticalAndSecurityPatchCount,omitempty"`
+ // OtherPatchCount - READ-ONLY; The number of all available patches excluding critical and security.
+ OtherPatchCount *int32 `json:"otherPatchCount,omitempty"`
+ // StartTime - READ-ONLY; The UTC timestamp when the operation began.
+ StartTime *date.Time `json:"startTime,omitempty"`
+ // LastModifiedTime - READ-ONLY; The UTC timestamp when the operation began.
+ LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
+ // Error - READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them.
+ Error *APIError `json:"error,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for AvailablePatchSummary.
+func (aps AvailablePatchSummary) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// BillingProfile specifies the billing related details of a Azure Spot VM or VMSS.
Minimum
+// api-version: 2019-03-01.
+type BillingProfile struct {
+ // MaxPrice - Specifies the maximum price you are willing to pay for a Azure Spot VM/VMSS. This price is in US Dollars.
This price will be compared with the current Azure Spot price for the VM size. Also, the prices are compared at the time of create/update of Azure Spot VM/VMSS and the operation will only succeed if the maxPrice is greater than the current Azure Spot price.
The maxPrice will also be used for evicting a Azure Spot VM/VMSS if the current Azure Spot price goes beyond the maxPrice after creation of VM/VMSS.
Possible values are:
- Any decimal value greater than zero. Example: 0.01538
-1 – indicates default price to be up-to on-demand.
You can set the maxPrice to -1 to indicate that the Azure Spot VM/VMSS should not be evicted for price reasons. Also, the default max price is -1 if it is not provided by you.
Minimum api-version: 2019-03-01.
+ MaxPrice *float64 `json:"maxPrice,omitempty"`
+}
+
+// BootDiagnostics boot Diagnostics is a debugging feature which allows you to view Console Output and
+// Screenshot to diagnose VM status.
You can easily view the output of your console log.
+// Azure also enables you to see a screenshot of the VM from the hypervisor.
+type BootDiagnostics struct {
+ // Enabled - Whether boot diagnostics should be enabled on the Virtual Machine.
+ Enabled *bool `json:"enabled,omitempty"`
+ // StorageURI - Uri of the storage account to use for placing the console output and screenshot.
If storageUri is not specified while enabling boot diagnostics, managed storage will be used.
+ StorageURI *string `json:"storageUri,omitempty"`
+}
+
+// BootDiagnosticsInstanceView the instance view of a virtual machine boot diagnostics.
+type BootDiagnosticsInstanceView struct {
+ // ConsoleScreenshotBlobURI - READ-ONLY; The console screenshot blob URI.
NOTE: This will **not** be set if boot diagnostics is currently enabled with managed storage.
+ ConsoleScreenshotBlobURI *string `json:"consoleScreenshotBlobUri,omitempty"`
+ // SerialConsoleLogBlobURI - READ-ONLY; The serial console log blob Uri.
NOTE: This will **not** be set if boot diagnostics is currently enabled with managed storage.
+ SerialConsoleLogBlobURI *string `json:"serialConsoleLogBlobUri,omitempty"`
+ // Status - READ-ONLY; The boot diagnostics status information for the VM.
NOTE: It will be set only if there are errors encountered in enabling boot diagnostics.
+ Status *InstanceViewStatus `json:"status,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for BootDiagnosticsInstanceView.
+func (bdiv BootDiagnosticsInstanceView) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// CapacityReservation specifies information about the capacity reservation.
+type CapacityReservation struct {
+ autorest.Response `json:"-"`
+ *CapacityReservationProperties `json:"properties,omitempty"`
+ // Sku - SKU of the resource for which capacity needs be reserved. The SKU name and capacity is required to be set. Currently VM Skus with the capability called 'CapacityReservationSupported' set to true are supported. Refer to List Microsoft.Compute SKUs in a region (https://docs.microsoft.com/rest/api/compute/resourceskus/list) for supported values.
+ Sku *Sku `json:"sku,omitempty"`
+ // Zones - Availability Zone to use for this capacity reservation. The zone has to be single value and also should be part for the list of zones specified during the capacity reservation group creation. The zone can be assigned only during creation. If not provided, the reservation supports only non-zonal deployments. If provided, enforces VM/VMSS using this capacity reservation to be in same zone.
+ Zones *[]string `json:"zones,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for CapacityReservation.
+func (cr CapacityReservation) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if cr.CapacityReservationProperties != nil {
+ objectMap["properties"] = cr.CapacityReservationProperties
+ }
+ if cr.Sku != nil {
+ objectMap["sku"] = cr.Sku
+ }
+ if cr.Zones != nil {
+ objectMap["zones"] = cr.Zones
+ }
+ if cr.Location != nil {
+ objectMap["location"] = cr.Location
+ }
+ if cr.Tags != nil {
+ objectMap["tags"] = cr.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for CapacityReservation struct.
+func (cr *CapacityReservation) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var capacityReservationProperties CapacityReservationProperties
+ err = json.Unmarshal(*v, &capacityReservationProperties)
+ if err != nil {
+ return err
+ }
+ cr.CapacityReservationProperties = &capacityReservationProperties
+ }
+ case "sku":
+ if v != nil {
+ var sku Sku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ cr.Sku = &sku
+ }
+ case "zones":
+ if v != nil {
+ var zones []string
+ err = json.Unmarshal(*v, &zones)
+ if err != nil {
+ return err
+ }
+ cr.Zones = &zones
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ cr.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ cr.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ cr.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ cr.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ cr.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// CapacityReservationGroup specifies information about the capacity reservation group that the capacity
+// reservations should be assigned to.
Currently, a capacity reservation can only be added to a
+// capacity reservation group at creation time. An existing capacity reservation cannot be added or moved
+// to another capacity reservation group.
+type CapacityReservationGroup struct {
+ autorest.Response `json:"-"`
+ *CapacityReservationGroupProperties `json:"properties,omitempty"`
+ // Zones - Availability Zones to use for this capacity reservation group. The zones can be assigned only during creation. If not provided, the group supports only regional resources in the region. If provided, enforces each capacity reservation in the group to be in one of the zones.
+ Zones *[]string `json:"zones,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for CapacityReservationGroup.
+func (crg CapacityReservationGroup) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if crg.CapacityReservationGroupProperties != nil {
+ objectMap["properties"] = crg.CapacityReservationGroupProperties
+ }
+ if crg.Zones != nil {
+ objectMap["zones"] = crg.Zones
+ }
+ if crg.Location != nil {
+ objectMap["location"] = crg.Location
+ }
+ if crg.Tags != nil {
+ objectMap["tags"] = crg.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for CapacityReservationGroup struct.
+func (crg *CapacityReservationGroup) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var capacityReservationGroupProperties CapacityReservationGroupProperties
+ err = json.Unmarshal(*v, &capacityReservationGroupProperties)
+ if err != nil {
+ return err
+ }
+ crg.CapacityReservationGroupProperties = &capacityReservationGroupProperties
+ }
+ case "zones":
+ if v != nil {
+ var zones []string
+ err = json.Unmarshal(*v, &zones)
+ if err != nil {
+ return err
+ }
+ crg.Zones = &zones
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ crg.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ crg.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ crg.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ crg.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ crg.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// CapacityReservationGroupInstanceView ...
+type CapacityReservationGroupInstanceView struct {
+ // CapacityReservations - READ-ONLY; List of instance view of the capacity reservations under the capacity reservation group.
+ CapacityReservations *[]CapacityReservationInstanceViewWithName `json:"capacityReservations,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for CapacityReservationGroupInstanceView.
+func (crgiv CapacityReservationGroupInstanceView) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// CapacityReservationGroupListResult the List capacity reservation group with resource group response.
+type CapacityReservationGroupListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of capacity reservation groups
+ Value *[]CapacityReservationGroup `json:"value,omitempty"`
+ // NextLink - The URI to fetch the next page of capacity reservation groups. Call ListNext() with this URI to fetch the next page of capacity reservation groups.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// CapacityReservationGroupListResultIterator provides access to a complete listing of
+// CapacityReservationGroup values.
+type CapacityReservationGroupListResultIterator struct {
+ i int
+ page CapacityReservationGroupListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *CapacityReservationGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationGroupListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *CapacityReservationGroupListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter CapacityReservationGroupListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter CapacityReservationGroupListResultIterator) Response() CapacityReservationGroupListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter CapacityReservationGroupListResultIterator) Value() CapacityReservationGroup {
+ if !iter.page.NotDone() {
+ return CapacityReservationGroup{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the CapacityReservationGroupListResultIterator type.
+func NewCapacityReservationGroupListResultIterator(page CapacityReservationGroupListResultPage) CapacityReservationGroupListResultIterator {
+ return CapacityReservationGroupListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (crglr CapacityReservationGroupListResult) IsEmpty() bool {
+ return crglr.Value == nil || len(*crglr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (crglr CapacityReservationGroupListResult) hasNextLink() bool {
+ return crglr.NextLink != nil && len(*crglr.NextLink) != 0
+}
+
+// capacityReservationGroupListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (crglr CapacityReservationGroupListResult) capacityReservationGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !crglr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(crglr.NextLink)))
+}
+
+// CapacityReservationGroupListResultPage contains a page of CapacityReservationGroup values.
+type CapacityReservationGroupListResultPage struct {
+ fn func(context.Context, CapacityReservationGroupListResult) (CapacityReservationGroupListResult, error)
+ crglr CapacityReservationGroupListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *CapacityReservationGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationGroupListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.crglr)
+ if err != nil {
+ return err
+ }
+ page.crglr = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *CapacityReservationGroupListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page CapacityReservationGroupListResultPage) NotDone() bool {
+ return !page.crglr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page CapacityReservationGroupListResultPage) Response() CapacityReservationGroupListResult {
+ return page.crglr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page CapacityReservationGroupListResultPage) Values() []CapacityReservationGroup {
+ if page.crglr.IsEmpty() {
+ return nil
+ }
+ return *page.crglr.Value
+}
+
+// Creates a new instance of the CapacityReservationGroupListResultPage type.
+func NewCapacityReservationGroupListResultPage(cur CapacityReservationGroupListResult, getNextPage func(context.Context, CapacityReservationGroupListResult) (CapacityReservationGroupListResult, error)) CapacityReservationGroupListResultPage {
+ return CapacityReservationGroupListResultPage{
+ fn: getNextPage,
+ crglr: cur,
+ }
+}
+
+// CapacityReservationGroupProperties capacity reservation group Properties.
+type CapacityReservationGroupProperties struct {
+ // CapacityReservations - READ-ONLY; A list of all capacity reservation resource ids that belong to capacity reservation group.
+ CapacityReservations *[]SubResourceReadOnly `json:"capacityReservations,omitempty"`
+ // VirtualMachinesAssociated - READ-ONLY; A list of references to all virtual machines associated to the capacity reservation group.
+ VirtualMachinesAssociated *[]SubResourceReadOnly `json:"virtualMachinesAssociated,omitempty"`
+ // InstanceView - READ-ONLY; The capacity reservation group instance view which has the list of instance views for all the capacity reservations that belong to the capacity reservation group.
+ InstanceView *CapacityReservationGroupInstanceView `json:"instanceView,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for CapacityReservationGroupProperties.
+func (crgp CapacityReservationGroupProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// CapacityReservationGroupUpdate specifies information about the capacity reservation group. Only tags can
+// be updated.
+type CapacityReservationGroupUpdate struct {
+ *CapacityReservationGroupProperties `json:"properties,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for CapacityReservationGroupUpdate.
+func (crgu CapacityReservationGroupUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if crgu.CapacityReservationGroupProperties != nil {
+ objectMap["properties"] = crgu.CapacityReservationGroupProperties
+ }
+ if crgu.Tags != nil {
+ objectMap["tags"] = crgu.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for CapacityReservationGroupUpdate struct.
+func (crgu *CapacityReservationGroupUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var capacityReservationGroupProperties CapacityReservationGroupProperties
+ err = json.Unmarshal(*v, &capacityReservationGroupProperties)
+ if err != nil {
+ return err
+ }
+ crgu.CapacityReservationGroupProperties = &capacityReservationGroupProperties
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ crgu.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// CapacityReservationInstanceView the instance view of a capacity reservation that provides as snapshot of
+// the runtime properties of the capacity reservation that is managed by the platform and can change
+// outside of control plane operations.
+type CapacityReservationInstanceView struct {
+ // UtilizationInfo - Unutilized capacity of the capacity reservation.
+ UtilizationInfo *CapacityReservationUtilization `json:"utilizationInfo,omitempty"`
+ // Statuses - The resource status information.
+ Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
+}
+
+// CapacityReservationInstanceViewWithName the instance view of a capacity reservation that includes the
+// name of the capacity reservation. It is used for the response to the instance view of a capacity
+// reservation group.
+type CapacityReservationInstanceViewWithName struct {
+ // Name - READ-ONLY; The name of the capacity reservation.
+ Name *string `json:"name,omitempty"`
+ // UtilizationInfo - Unutilized capacity of the capacity reservation.
+ UtilizationInfo *CapacityReservationUtilization `json:"utilizationInfo,omitempty"`
+ // Statuses - The resource status information.
+ Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for CapacityReservationInstanceViewWithName.
+func (crivwn CapacityReservationInstanceViewWithName) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if crivwn.UtilizationInfo != nil {
+ objectMap["utilizationInfo"] = crivwn.UtilizationInfo
+ }
+ if crivwn.Statuses != nil {
+ objectMap["statuses"] = crivwn.Statuses
+ }
+ return json.Marshal(objectMap)
+}
+
+// CapacityReservationListResult the list capacity reservation operation response.
+type CapacityReservationListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of capacity reservations
+ Value *[]CapacityReservation `json:"value,omitempty"`
+ // NextLink - The URI to fetch the next page of capacity reservations. Call ListNext() with this URI to fetch the next page of capacity reservations.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// CapacityReservationListResultIterator provides access to a complete listing of CapacityReservation
+// values.
+type CapacityReservationListResultIterator struct {
+ i int
+ page CapacityReservationListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *CapacityReservationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *CapacityReservationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter CapacityReservationListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter CapacityReservationListResultIterator) Response() CapacityReservationListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter CapacityReservationListResultIterator) Value() CapacityReservation {
+ if !iter.page.NotDone() {
+ return CapacityReservation{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the CapacityReservationListResultIterator type.
+func NewCapacityReservationListResultIterator(page CapacityReservationListResultPage) CapacityReservationListResultIterator {
+ return CapacityReservationListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (crlr CapacityReservationListResult) IsEmpty() bool {
+ return crlr.Value == nil || len(*crlr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (crlr CapacityReservationListResult) hasNextLink() bool {
+ return crlr.NextLink != nil && len(*crlr.NextLink) != 0
+}
+
+// capacityReservationListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (crlr CapacityReservationListResult) capacityReservationListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !crlr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(crlr.NextLink)))
+}
+
+// CapacityReservationListResultPage contains a page of CapacityReservation values.
+type CapacityReservationListResultPage struct {
+ fn func(context.Context, CapacityReservationListResult) (CapacityReservationListResult, error)
+ crlr CapacityReservationListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *CapacityReservationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CapacityReservationListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.crlr)
+ if err != nil {
+ return err
+ }
+ page.crlr = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *CapacityReservationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page CapacityReservationListResultPage) NotDone() bool {
+ return !page.crlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page CapacityReservationListResultPage) Response() CapacityReservationListResult {
+ return page.crlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page CapacityReservationListResultPage) Values() []CapacityReservation {
+ if page.crlr.IsEmpty() {
+ return nil
+ }
+ return *page.crlr.Value
+}
+
+// Creates a new instance of the CapacityReservationListResultPage type.
+func NewCapacityReservationListResultPage(cur CapacityReservationListResult, getNextPage func(context.Context, CapacityReservationListResult) (CapacityReservationListResult, error)) CapacityReservationListResultPage {
+ return CapacityReservationListResultPage{
+ fn: getNextPage,
+ crlr: cur,
+ }
+}
+
+// CapacityReservationProfile the parameters of a capacity reservation Profile.
+type CapacityReservationProfile struct {
+ // CapacityReservationGroup - Specifies the capacity reservation group resource id that should be used for allocating the virtual machine or scaleset vm instances provided enough capacity has been reserved. Please refer to https://aka.ms/CapacityReservation for more details.
+ CapacityReservationGroup *SubResource `json:"capacityReservationGroup,omitempty"`
+}
+
+// CapacityReservationProperties properties of the Capacity reservation.
+type CapacityReservationProperties struct {
+ // ReservationID - READ-ONLY; A unique id generated and assigned to the capacity reservation by the platform which does not change throughout the lifetime of the resource.
+ ReservationID *string `json:"reservationId,omitempty"`
+ // VirtualMachinesAssociated - READ-ONLY; A list of all virtual machine resource ids that are associated with the capacity reservation.
+ VirtualMachinesAssociated *[]SubResourceReadOnly `json:"virtualMachinesAssociated,omitempty"`
+ // ProvisioningTime - READ-ONLY; The date time when the capacity reservation was last updated.
+ ProvisioningTime *date.Time `json:"provisioningTime,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // InstanceView - READ-ONLY; The Capacity reservation instance view.
+ InstanceView *CapacityReservationInstanceView `json:"instanceView,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for CapacityReservationProperties.
+func (crp CapacityReservationProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// CapacityReservationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type CapacityReservationsCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(CapacityReservationsClient) (CapacityReservation, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *CapacityReservationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for CapacityReservationsCreateOrUpdateFuture.Result.
+func (future *CapacityReservationsCreateOrUpdateFuture) result(client CapacityReservationsClient) (cr CapacityReservation, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ cr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.CapacityReservationsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cr.Response.Response, err = future.GetResult(sender); err == nil && cr.Response.Response.StatusCode != http.StatusNoContent {
+ cr, err = client.CreateOrUpdateResponder(cr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationsCreateOrUpdateFuture", "Result", cr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// CapacityReservationsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type CapacityReservationsDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(CapacityReservationsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *CapacityReservationsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for CapacityReservationsDeleteFuture.Result.
+func (future *CapacityReservationsDeleteFuture) result(client CapacityReservationsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.CapacityReservationsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// CapacityReservationsUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type CapacityReservationsUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(CapacityReservationsClient) (CapacityReservation, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *CapacityReservationsUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for CapacityReservationsUpdateFuture.Result.
+func (future *CapacityReservationsUpdateFuture) result(client CapacityReservationsClient) (cr CapacityReservation, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationsUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ cr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.CapacityReservationsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cr.Response.Response, err = future.GetResult(sender); err == nil && cr.Response.Response.StatusCode != http.StatusNoContent {
+ cr, err = client.UpdateResponder(cr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CapacityReservationsUpdateFuture", "Result", cr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// CapacityReservationUpdate specifies information about the capacity reservation. Only tags and
+// sku.capacity can be updated.
+type CapacityReservationUpdate struct {
+ *CapacityReservationProperties `json:"properties,omitempty"`
+ // Sku - SKU of the resource for which capacity needs be reserved. The SKU name and capacity is required to be set. Currently VM Skus with the capability called 'CapacityReservationSupported' set to true are supported. Refer to List Microsoft.Compute SKUs in a region (https://docs.microsoft.com/rest/api/compute/resourceskus/list) for supported values.
+ Sku *Sku `json:"sku,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for CapacityReservationUpdate.
+func (cru CapacityReservationUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if cru.CapacityReservationProperties != nil {
+ objectMap["properties"] = cru.CapacityReservationProperties
+ }
+ if cru.Sku != nil {
+ objectMap["sku"] = cru.Sku
+ }
+ if cru.Tags != nil {
+ objectMap["tags"] = cru.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for CapacityReservationUpdate struct.
+func (cru *CapacityReservationUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var capacityReservationProperties CapacityReservationProperties
+ err = json.Unmarshal(*v, &capacityReservationProperties)
+ if err != nil {
+ return err
+ }
+ cru.CapacityReservationProperties = &capacityReservationProperties
+ }
+ case "sku":
+ if v != nil {
+ var sku Sku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ cru.Sku = &sku
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ cru.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// CapacityReservationUtilization represents the capacity reservation utilization in terms of resources
+// allocated.
+type CapacityReservationUtilization struct {
+ // VirtualMachinesAllocated - READ-ONLY; A list of all virtual machines resource ids allocated against the capacity reservation.
+ VirtualMachinesAllocated *[]SubResourceReadOnly `json:"virtualMachinesAllocated,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for CapacityReservationUtilization.
+func (cru CapacityReservationUtilization) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// CloudError an error response from the Compute service.
+type CloudError struct {
+ Error *APIError `json:"error,omitempty"`
+}
+
+// CloudService describes the cloud service.
+type CloudService struct {
+ autorest.Response `json:"-"`
+ // ID - READ-ONLY; Resource Id.
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+ Properties *CloudServiceProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for CloudService.
+func (cs CloudService) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if cs.Location != nil {
+ objectMap["location"] = cs.Location
+ }
+ if cs.Tags != nil {
+ objectMap["tags"] = cs.Tags
+ }
+ if cs.Properties != nil {
+ objectMap["properties"] = cs.Properties
+ }
+ return json.Marshal(objectMap)
+}
+
+// CloudServiceExtensionProfile describes a cloud service extension profile.
+type CloudServiceExtensionProfile struct {
+ // Extensions - List of extensions for the cloud service.
+ Extensions *[]Extension `json:"extensions,omitempty"`
+}
+
+// CloudServiceExtensionProperties extension Properties.
+type CloudServiceExtensionProperties struct {
+ // Publisher - The name of the extension handler publisher.
+ Publisher *string `json:"publisher,omitempty"`
+ // Type - Specifies the type of the extension.
+ Type *string `json:"type,omitempty"`
+ // TypeHandlerVersion - Specifies the version of the extension. Specifies the version of the extension. If this element is not specified or an asterisk (*) is used as the value, the latest version of the extension is used. If the value is specified with a major version number and an asterisk as the minor version number (X.), the latest minor version of the specified major version is selected. If a major version number and a minor version number are specified (X.Y), the specific extension version is selected. If a version is specified, an auto-upgrade is performed on the role instance.
+ TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
+ // AutoUpgradeMinorVersion - Explicitly specify whether platform can automatically upgrade typeHandlerVersion to higher minor versions when they become available.
+ AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"`
+ // Settings - Public settings for the extension. For JSON extensions, this is the JSON settings for the extension. For XML Extension (like RDP), this is the XML setting for the extension.
+ Settings *string `json:"settings,omitempty"`
+ // ProtectedSettings - Protected settings for the extension which are encrypted before sent to the role instance.
+ ProtectedSettings *string `json:"protectedSettings,omitempty"`
+ ProtectedSettingsFromKeyVault *CloudServiceVaultAndSecretReference `json:"protectedSettingsFromKeyVault,omitempty"`
+ // ForceUpdateTag - Tag to force apply the provided public and protected settings.
+ // Changing the tag value allows for re-running the extension without changing any of the public or protected settings.
+ // If forceUpdateTag is not changed, updates to public or protected settings would still be applied by the handler.
+ // If neither forceUpdateTag nor any of public or protected settings change, extension would flow to the role instance with the same sequence-number, and
+ // it is up to handler implementation whether to re-run it or not
+ ForceUpdateTag *string `json:"forceUpdateTag,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // RolesAppliedTo - Optional list of roles to apply this extension. If property is not specified or '*' is specified, extension is applied to all roles in the cloud service.
+ RolesAppliedTo *[]string `json:"rolesAppliedTo,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for CloudServiceExtensionProperties.
+func (csep CloudServiceExtensionProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if csep.Publisher != nil {
+ objectMap["publisher"] = csep.Publisher
+ }
+ if csep.Type != nil {
+ objectMap["type"] = csep.Type
+ }
+ if csep.TypeHandlerVersion != nil {
+ objectMap["typeHandlerVersion"] = csep.TypeHandlerVersion
+ }
+ if csep.AutoUpgradeMinorVersion != nil {
+ objectMap["autoUpgradeMinorVersion"] = csep.AutoUpgradeMinorVersion
+ }
+ if csep.Settings != nil {
+ objectMap["settings"] = csep.Settings
+ }
+ if csep.ProtectedSettings != nil {
+ objectMap["protectedSettings"] = csep.ProtectedSettings
+ }
+ if csep.ProtectedSettingsFromKeyVault != nil {
+ objectMap["protectedSettingsFromKeyVault"] = csep.ProtectedSettingsFromKeyVault
+ }
+ if csep.ForceUpdateTag != nil {
+ objectMap["forceUpdateTag"] = csep.ForceUpdateTag
+ }
+ if csep.RolesAppliedTo != nil {
+ objectMap["rolesAppliedTo"] = csep.RolesAppliedTo
+ }
+ return json.Marshal(objectMap)
+}
+
+// CloudServiceInstanceView instanceView of CloudService as a whole
+type CloudServiceInstanceView struct {
+ autorest.Response `json:"-"`
+ RoleInstance *InstanceViewStatusesSummary `json:"roleInstance,omitempty"`
+ // SdkVersion - READ-ONLY; The version of the SDK that was used to generate the package for the cloud service.
+ SdkVersion *string `json:"sdkVersion,omitempty"`
+ // PrivateIds - READ-ONLY; Specifies a list of unique identifiers generated internally for the cloud service.
NOTE: If you are using Azure Diagnostics extension, this property can be used as 'DeploymentId' for querying details.
+ PrivateIds *[]string `json:"privateIds,omitempty"`
+ // Statuses - READ-ONLY
+ Statuses *[]ResourceInstanceViewStatus `json:"statuses,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for CloudServiceInstanceView.
+func (csiv CloudServiceInstanceView) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if csiv.RoleInstance != nil {
+ objectMap["roleInstance"] = csiv.RoleInstance
+ }
+ return json.Marshal(objectMap)
+}
+
+// CloudServiceListResult ...
+type CloudServiceListResult struct {
+ autorest.Response `json:"-"`
+ Value *[]CloudService `json:"value,omitempty"`
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// CloudServiceListResultIterator provides access to a complete listing of CloudService values.
+type CloudServiceListResultIterator struct {
+ i int
+ page CloudServiceListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *CloudServiceListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *CloudServiceListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter CloudServiceListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter CloudServiceListResultIterator) Response() CloudServiceListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter CloudServiceListResultIterator) Value() CloudService {
+ if !iter.page.NotDone() {
+ return CloudService{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the CloudServiceListResultIterator type.
+func NewCloudServiceListResultIterator(page CloudServiceListResultPage) CloudServiceListResultIterator {
+ return CloudServiceListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (cslr CloudServiceListResult) IsEmpty() bool {
+ return cslr.Value == nil || len(*cslr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (cslr CloudServiceListResult) hasNextLink() bool {
+ return cslr.NextLink != nil && len(*cslr.NextLink) != 0
+}
+
+// cloudServiceListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (cslr CloudServiceListResult) cloudServiceListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !cslr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(cslr.NextLink)))
+}
+
+// CloudServiceListResultPage contains a page of CloudService values.
+type CloudServiceListResultPage struct {
+ fn func(context.Context, CloudServiceListResult) (CloudServiceListResult, error)
+ cslr CloudServiceListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *CloudServiceListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.cslr)
+ if err != nil {
+ return err
+ }
+ page.cslr = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *CloudServiceListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page CloudServiceListResultPage) NotDone() bool {
+ return !page.cslr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page CloudServiceListResultPage) Response() CloudServiceListResult {
+ return page.cslr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page CloudServiceListResultPage) Values() []CloudService {
+ if page.cslr.IsEmpty() {
+ return nil
+ }
+ return *page.cslr.Value
+}
+
+// Creates a new instance of the CloudServiceListResultPage type.
+func NewCloudServiceListResultPage(cur CloudServiceListResult, getNextPage func(context.Context, CloudServiceListResult) (CloudServiceListResult, error)) CloudServiceListResultPage {
+ return CloudServiceListResultPage{
+ fn: getNextPage,
+ cslr: cur,
+ }
+}
+
+// CloudServiceNetworkProfile network Profile for the cloud service.
+type CloudServiceNetworkProfile struct {
+ // LoadBalancerConfigurations - List of Load balancer configurations. Cloud service can have up to two load balancer configurations, corresponding to a Public Load Balancer and an Internal Load Balancer.
+ LoadBalancerConfigurations *[]LoadBalancerConfiguration `json:"loadBalancerConfigurations,omitempty"`
+ // SwappableCloudService - The id reference of the cloud service containing the target IP with which the subject cloud service can perform a swap. This property cannot be updated once it is set. The swappable cloud service referred by this id must be present otherwise an error will be thrown.
+ SwappableCloudService *SubResource `json:"swappableCloudService,omitempty"`
+}
+
+// CloudServiceOsProfile describes the OS profile for the cloud service.
+type CloudServiceOsProfile struct {
+ // Secrets - Specifies set of certificates that should be installed onto the role instances.
+ Secrets *[]CloudServiceVaultSecretGroup `json:"secrets,omitempty"`
+}
+
+// CloudServiceProperties cloud service properties
+type CloudServiceProperties struct {
+ // PackageURL - Specifies a URL that refers to the location of the service package in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account.
+ // This is a write-only property and is not returned in GET calls.
+ PackageURL *string `json:"packageUrl,omitempty"`
+ // Configuration - Specifies the XML service configuration (.cscfg) for the cloud service.
+ Configuration *string `json:"configuration,omitempty"`
+ // ConfigurationURL - Specifies a URL that refers to the location of the service configuration in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account.
+ // This is a write-only property and is not returned in GET calls.
+ ConfigurationURL *string `json:"configurationUrl,omitempty"`
+ // StartCloudService - (Optional) Indicates whether to start the cloud service immediately after it is created. The default value is `true`.
+ // If false, the service model is still deployed, but the code is not run immediately. Instead, the service is PoweredOff until you call Start, at which time the service will be started. A deployed service still incurs charges, even if it is poweredoff.
+ StartCloudService *bool `json:"startCloudService,omitempty"`
+ // AllowModelOverride - (Optional) Indicates whether the role sku properties (roleProfile.roles.sku) specified in the model/template should override the role instance count and vm size specified in the .cscfg and .csdef respectively.
+ // The default value is `false`.
+ AllowModelOverride *bool `json:"allowModelOverride,omitempty"`
+ // UpgradeMode - Possible values include: 'CloudServiceUpgradeModeAuto', 'CloudServiceUpgradeModeManual', 'CloudServiceUpgradeModeSimultaneous'
+ UpgradeMode CloudServiceUpgradeMode `json:"upgradeMode,omitempty"`
+ RoleProfile *CloudServiceRoleProfile `json:"roleProfile,omitempty"`
+ OsProfile *CloudServiceOsProfile `json:"osProfile,omitempty"`
+ NetworkProfile *CloudServiceNetworkProfile `json:"networkProfile,omitempty"`
+ ExtensionProfile *CloudServiceExtensionProfile `json:"extensionProfile,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // UniqueID - READ-ONLY; The unique identifier for the cloud service.
+ UniqueID *string `json:"uniqueId,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for CloudServiceProperties.
+func (csp CloudServiceProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if csp.PackageURL != nil {
+ objectMap["packageUrl"] = csp.PackageURL
+ }
+ if csp.Configuration != nil {
+ objectMap["configuration"] = csp.Configuration
+ }
+ if csp.ConfigurationURL != nil {
+ objectMap["configurationUrl"] = csp.ConfigurationURL
+ }
+ if csp.StartCloudService != nil {
+ objectMap["startCloudService"] = csp.StartCloudService
+ }
+ if csp.AllowModelOverride != nil {
+ objectMap["allowModelOverride"] = csp.AllowModelOverride
+ }
+ if csp.UpgradeMode != "" {
+ objectMap["upgradeMode"] = csp.UpgradeMode
+ }
+ if csp.RoleProfile != nil {
+ objectMap["roleProfile"] = csp.RoleProfile
+ }
+ if csp.OsProfile != nil {
+ objectMap["osProfile"] = csp.OsProfile
+ }
+ if csp.NetworkProfile != nil {
+ objectMap["networkProfile"] = csp.NetworkProfile
+ }
+ if csp.ExtensionProfile != nil {
+ objectMap["extensionProfile"] = csp.ExtensionProfile
+ }
+ return json.Marshal(objectMap)
+}
+
+// CloudServiceRole describes a role of the cloud service.
+type CloudServiceRole struct {
+ autorest.Response `json:"-"`
+ // ID - READ-ONLY; Resource id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - READ-ONLY; Resource location
+ Location *string `json:"location,omitempty"`
+ Sku *CloudServiceRoleSku `json:"sku,omitempty"`
+ Properties *CloudServiceRoleProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for CloudServiceRole.
+func (csr CloudServiceRole) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if csr.Sku != nil {
+ objectMap["sku"] = csr.Sku
+ }
+ if csr.Properties != nil {
+ objectMap["properties"] = csr.Properties
+ }
+ return json.Marshal(objectMap)
+}
+
+// CloudServiceRoleInstancesDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type CloudServiceRoleInstancesDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(CloudServiceRoleInstancesClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *CloudServiceRoleInstancesDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for CloudServiceRoleInstancesDeleteFuture.Result.
+func (future *CloudServiceRoleInstancesDeleteFuture) result(client CloudServiceRoleInstancesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.CloudServiceRoleInstancesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// CloudServiceRoleInstancesRebuildFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type CloudServiceRoleInstancesRebuildFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(CloudServiceRoleInstancesClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *CloudServiceRoleInstancesRebuildFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for CloudServiceRoleInstancesRebuildFuture.Result.
+func (future *CloudServiceRoleInstancesRebuildFuture) result(client CloudServiceRoleInstancesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesRebuildFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.CloudServiceRoleInstancesRebuildFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// CloudServiceRoleInstancesReimageFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type CloudServiceRoleInstancesReimageFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(CloudServiceRoleInstancesClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *CloudServiceRoleInstancesReimageFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for CloudServiceRoleInstancesReimageFuture.Result.
+func (future *CloudServiceRoleInstancesReimageFuture) result(client CloudServiceRoleInstancesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesReimageFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.CloudServiceRoleInstancesReimageFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// CloudServiceRoleInstancesRestartFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type CloudServiceRoleInstancesRestartFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(CloudServiceRoleInstancesClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *CloudServiceRoleInstancesRestartFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for CloudServiceRoleInstancesRestartFuture.Result.
+func (future *CloudServiceRoleInstancesRestartFuture) result(client CloudServiceRoleInstancesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServiceRoleInstancesRestartFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.CloudServiceRoleInstancesRestartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// CloudServiceRoleListResult ...
+type CloudServiceRoleListResult struct {
+ autorest.Response `json:"-"`
+ Value *[]CloudServiceRole `json:"value,omitempty"`
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// CloudServiceRoleListResultIterator provides access to a complete listing of CloudServiceRole values.
+type CloudServiceRoleListResultIterator struct {
+ i int
+ page CloudServiceRoleListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *CloudServiceRoleListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceRoleListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *CloudServiceRoleListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter CloudServiceRoleListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter CloudServiceRoleListResultIterator) Response() CloudServiceRoleListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter CloudServiceRoleListResultIterator) Value() CloudServiceRole {
+ if !iter.page.NotDone() {
+ return CloudServiceRole{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the CloudServiceRoleListResultIterator type.
+func NewCloudServiceRoleListResultIterator(page CloudServiceRoleListResultPage) CloudServiceRoleListResultIterator {
+ return CloudServiceRoleListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (csrlr CloudServiceRoleListResult) IsEmpty() bool {
+ return csrlr.Value == nil || len(*csrlr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (csrlr CloudServiceRoleListResult) hasNextLink() bool {
+ return csrlr.NextLink != nil && len(*csrlr.NextLink) != 0
+}
+
+// cloudServiceRoleListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (csrlr CloudServiceRoleListResult) cloudServiceRoleListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !csrlr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(csrlr.NextLink)))
+}
+
+// CloudServiceRoleListResultPage contains a page of CloudServiceRole values.
+type CloudServiceRoleListResultPage struct {
+ fn func(context.Context, CloudServiceRoleListResult) (CloudServiceRoleListResult, error)
+ csrlr CloudServiceRoleListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *CloudServiceRoleListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CloudServiceRoleListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.csrlr)
+ if err != nil {
+ return err
+ }
+ page.csrlr = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *CloudServiceRoleListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page CloudServiceRoleListResultPage) NotDone() bool {
+ return !page.csrlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page CloudServiceRoleListResultPage) Response() CloudServiceRoleListResult {
+ return page.csrlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page CloudServiceRoleListResultPage) Values() []CloudServiceRole {
+ if page.csrlr.IsEmpty() {
+ return nil
+ }
+ return *page.csrlr.Value
+}
+
+// Creates a new instance of the CloudServiceRoleListResultPage type.
+func NewCloudServiceRoleListResultPage(cur CloudServiceRoleListResult, getNextPage func(context.Context, CloudServiceRoleListResult) (CloudServiceRoleListResult, error)) CloudServiceRoleListResultPage {
+ return CloudServiceRoleListResultPage{
+ fn: getNextPage,
+ csrlr: cur,
+ }
+}
+
+// CloudServiceRoleProfile describes the role profile for the cloud service.
+type CloudServiceRoleProfile struct {
+ // Roles - List of roles for the cloud service.
+ Roles *[]CloudServiceRoleProfileProperties `json:"roles,omitempty"`
+}
+
+// CloudServiceRoleProfileProperties describes the role properties.
+type CloudServiceRoleProfileProperties struct {
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ Sku *CloudServiceRoleSku `json:"sku,omitempty"`
+}
+
+// CloudServiceRoleProperties ...
+type CloudServiceRoleProperties struct {
+ // UniqueID - READ-ONLY; Specifies the ID which uniquely identifies a cloud service role.
+ UniqueID *string `json:"uniqueId,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for CloudServiceRoleProperties.
+func (csrp CloudServiceRoleProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// CloudServiceRoleSku describes the cloud service role sku.
+type CloudServiceRoleSku struct {
+ // Name - The sku name. NOTE: If the new SKU is not supported on the hardware the cloud service is currently on, you need to delete and recreate the cloud service or move back to the old sku.
+ Name *string `json:"name,omitempty"`
+ // Tier - Specifies the tier of the cloud service. Possible Values are
**Standard**
**Basic**
+ Tier *string `json:"tier,omitempty"`
+ // Capacity - Specifies the number of role instances in the cloud service.
+ Capacity *int64 `json:"capacity,omitempty"`
+}
+
+// CloudServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type CloudServicesCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(CloudServicesClient) (CloudService, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *CloudServicesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for CloudServicesCreateOrUpdateFuture.Result.
+func (future *CloudServicesCreateOrUpdateFuture) result(client CloudServicesClient) (cs CloudService, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ cs.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.CloudServicesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cs.Response.Response, err = future.GetResult(sender); err == nil && cs.Response.Response.StatusCode != http.StatusNoContent {
+ cs, err = client.CreateOrUpdateResponder(cs.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesCreateOrUpdateFuture", "Result", cs.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// CloudServicesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type CloudServicesDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(CloudServicesClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *CloudServicesDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for CloudServicesDeleteFuture.Result.
+func (future *CloudServicesDeleteFuture) result(client CloudServicesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.CloudServicesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// CloudServicesDeleteInstancesFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type CloudServicesDeleteInstancesFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(CloudServicesClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *CloudServicesDeleteInstancesFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for CloudServicesDeleteInstancesFuture.Result.
+func (future *CloudServicesDeleteInstancesFuture) result(client CloudServicesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesDeleteInstancesFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.CloudServicesDeleteInstancesFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// CloudServicesPowerOffFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type CloudServicesPowerOffFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(CloudServicesClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *CloudServicesPowerOffFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for CloudServicesPowerOffFuture.Result.
+func (future *CloudServicesPowerOffFuture) result(client CloudServicesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesPowerOffFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.CloudServicesPowerOffFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// CloudServicesRebuildFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type CloudServicesRebuildFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(CloudServicesClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *CloudServicesRebuildFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for CloudServicesRebuildFuture.Result.
+func (future *CloudServicesRebuildFuture) result(client CloudServicesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesRebuildFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.CloudServicesRebuildFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// CloudServicesReimageFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type CloudServicesReimageFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(CloudServicesClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *CloudServicesReimageFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for CloudServicesReimageFuture.Result.
+func (future *CloudServicesReimageFuture) result(client CloudServicesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesReimageFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.CloudServicesReimageFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// CloudServicesRestartFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type CloudServicesRestartFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(CloudServicesClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *CloudServicesRestartFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for CloudServicesRestartFuture.Result.
+func (future *CloudServicesRestartFuture) result(client CloudServicesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesRestartFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.CloudServicesRestartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// CloudServicesStartFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type CloudServicesStartFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(CloudServicesClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *CloudServicesStartFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for CloudServicesStartFuture.Result.
+func (future *CloudServicesStartFuture) result(client CloudServicesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesStartFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.CloudServicesStartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// CloudServicesUpdateDomainWalkUpdateDomainFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
+type CloudServicesUpdateDomainWalkUpdateDomainFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(CloudServicesUpdateDomainClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *CloudServicesUpdateDomainWalkUpdateDomainFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for CloudServicesUpdateDomainWalkUpdateDomainFuture.Result.
+func (future *CloudServicesUpdateDomainWalkUpdateDomainFuture) result(client CloudServicesUpdateDomainClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesUpdateDomainWalkUpdateDomainFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.CloudServicesUpdateDomainWalkUpdateDomainFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// CloudServicesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type CloudServicesUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(CloudServicesClient) (CloudService, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *CloudServicesUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for CloudServicesUpdateFuture.Result.
+func (future *CloudServicesUpdateFuture) result(client CloudServicesClient) (cs CloudService, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ cs.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.CloudServicesUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if cs.Response.Response, err = future.GetResult(sender); err == nil && cs.Response.Response.StatusCode != http.StatusNoContent {
+ cs, err = client.UpdateResponder(cs.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.CloudServicesUpdateFuture", "Result", cs.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// CloudServiceUpdate ...
+type CloudServiceUpdate struct {
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for CloudServiceUpdate.
+func (csu CloudServiceUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if csu.Tags != nil {
+ objectMap["tags"] = csu.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// CloudServiceVaultAndSecretReference ...
+type CloudServiceVaultAndSecretReference struct {
+ SourceVault *SubResource `json:"sourceVault,omitempty"`
+ SecretURL *string `json:"secretUrl,omitempty"`
+}
+
+// CloudServiceVaultCertificate describes a single certificate reference in a Key Vault, and where the
+// certificate should reside on the role instance.
+type CloudServiceVaultCertificate struct {
+ // CertificateURL - This is the URL of a certificate that has been uploaded to Key Vault as a secret.
+ CertificateURL *string `json:"certificateUrl,omitempty"`
+}
+
+// CloudServiceVaultSecretGroup describes a set of certificates which are all in the same Key Vault.
+type CloudServiceVaultSecretGroup struct {
+ // SourceVault - The relative URL of the Key Vault containing all of the certificates in VaultCertificates.
+ SourceVault *SubResource `json:"sourceVault,omitempty"`
+ // VaultCertificates - The list of key vault references in SourceVault which contain certificates.
+ VaultCertificates *[]CloudServiceVaultCertificate `json:"vaultCertificates,omitempty"`
+}
+
+// CommunityGallery specifies information about the Community Gallery that you want to create or update.
+type CommunityGallery struct {
+ autorest.Response `json:"-"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Location - READ-ONLY; Resource location
+ Location *string `json:"location,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ *CommunityGalleryIdentifier `json:"identifier,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for CommunityGallery.
+func (cg CommunityGallery) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if cg.CommunityGalleryIdentifier != nil {
+ objectMap["identifier"] = cg.CommunityGalleryIdentifier
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for CommunityGallery struct.
+func (cg *CommunityGallery) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ cg.Name = &name
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ cg.Location = &location
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ cg.Type = &typeVar
+ }
+ case "identifier":
+ if v != nil {
+ var communityGalleryIdentifier CommunityGalleryIdentifier
+ err = json.Unmarshal(*v, &communityGalleryIdentifier)
+ if err != nil {
+ return err
+ }
+ cg.CommunityGalleryIdentifier = &communityGalleryIdentifier
+ }
+ }
+ }
+
+ return nil
+}
+
+// CommunityGalleryIdentifier the identifier information of community gallery.
+type CommunityGalleryIdentifier struct {
+ // UniqueID - The unique id of this community gallery.
+ UniqueID *string `json:"uniqueId,omitempty"`
+}
+
+// CommunityGalleryImage specifies information about the gallery image definition that you want to create
+// or update.
+type CommunityGalleryImage struct {
+ autorest.Response `json:"-"`
+ *CommunityGalleryImageProperties `json:"properties,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Location - READ-ONLY; Resource location
+ Location *string `json:"location,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ *CommunityGalleryIdentifier `json:"identifier,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for CommunityGalleryImage.
+func (cgiVar CommunityGalleryImage) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if cgiVar.CommunityGalleryImageProperties != nil {
+ objectMap["properties"] = cgiVar.CommunityGalleryImageProperties
+ }
+ if cgiVar.CommunityGalleryIdentifier != nil {
+ objectMap["identifier"] = cgiVar.CommunityGalleryIdentifier
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for CommunityGalleryImage struct.
+func (cgiVar *CommunityGalleryImage) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var communityGalleryImageProperties CommunityGalleryImageProperties
+ err = json.Unmarshal(*v, &communityGalleryImageProperties)
+ if err != nil {
+ return err
+ }
+ cgiVar.CommunityGalleryImageProperties = &communityGalleryImageProperties
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ cgiVar.Name = &name
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ cgiVar.Location = &location
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ cgiVar.Type = &typeVar
+ }
+ case "identifier":
+ if v != nil {
+ var communityGalleryIdentifier CommunityGalleryIdentifier
+ err = json.Unmarshal(*v, &communityGalleryIdentifier)
+ if err != nil {
+ return err
+ }
+ cgiVar.CommunityGalleryIdentifier = &communityGalleryIdentifier
+ }
+ }
+ }
+
+ return nil
+}
+
+// CommunityGalleryImageProperties describes the properties of a gallery image definition.
+type CommunityGalleryImageProperties struct {
+ // OsType - This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image.
Possible values are:
**Windows**
**Linux**. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux'
+ OsType OperatingSystemTypes `json:"osType,omitempty"`
+ // OsState - This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. Possible values include: 'OperatingSystemStateTypesGeneralized', 'OperatingSystemStateTypesSpecialized'
+ OsState OperatingSystemStateTypes `json:"osState,omitempty"`
+ // EndOfLifeDate - The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property is updatable.
+ EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
+ Identifier *GalleryImageIdentifier `json:"identifier,omitempty"`
+ Recommended *RecommendedMachineConfiguration `json:"recommended,omitempty"`
+ Disallowed *Disallowed `json:"disallowed,omitempty"`
+ // HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'HyperVGenerationV1', 'HyperVGenerationV2'
+ HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"`
+ // Features - A list of gallery image features.
+ Features *[]GalleryImageFeature `json:"features,omitempty"`
+ PurchasePlan *ImagePurchasePlan `json:"purchasePlan,omitempty"`
+}
+
+// CommunityGalleryImageVersion specifies information about the gallery image version that you want to
+// create or update.
+type CommunityGalleryImageVersion struct {
+ autorest.Response `json:"-"`
+ *CommunityGalleryImageVersionProperties `json:"properties,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Location - READ-ONLY; Resource location
+ Location *string `json:"location,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ *CommunityGalleryIdentifier `json:"identifier,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for CommunityGalleryImageVersion.
+func (cgiv CommunityGalleryImageVersion) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if cgiv.CommunityGalleryImageVersionProperties != nil {
+ objectMap["properties"] = cgiv.CommunityGalleryImageVersionProperties
+ }
+ if cgiv.CommunityGalleryIdentifier != nil {
+ objectMap["identifier"] = cgiv.CommunityGalleryIdentifier
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for CommunityGalleryImageVersion struct.
+func (cgiv *CommunityGalleryImageVersion) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var communityGalleryImageVersionProperties CommunityGalleryImageVersionProperties
+ err = json.Unmarshal(*v, &communityGalleryImageVersionProperties)
+ if err != nil {
+ return err
+ }
+ cgiv.CommunityGalleryImageVersionProperties = &communityGalleryImageVersionProperties
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ cgiv.Name = &name
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ cgiv.Location = &location
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ cgiv.Type = &typeVar
+ }
+ case "identifier":
+ if v != nil {
+ var communityGalleryIdentifier CommunityGalleryIdentifier
+ err = json.Unmarshal(*v, &communityGalleryIdentifier)
+ if err != nil {
+ return err
+ }
+ cgiv.CommunityGalleryIdentifier = &communityGalleryIdentifier
+ }
+ }
+ }
+
+ return nil
+}
+
+// CommunityGalleryImageVersionProperties describes the properties of a gallery image version.
+type CommunityGalleryImageVersionProperties struct {
+ // PublishedDate - The published date of the gallery image version Definition. This property can be used for decommissioning purposes. This property is updatable.
+ PublishedDate *date.Time `json:"publishedDate,omitempty"`
+ // EndOfLifeDate - The end of life date of the gallery image version Definition. This property can be used for decommissioning purposes. This property is updatable.
+ EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
+}
+
+// CreationData data used when creating a disk.
+type CreationData struct {
+ // CreateOption - This enumerates the possible sources of a disk's creation. Possible values include: 'DiskCreateOptionEmpty', 'DiskCreateOptionAttach', 'DiskCreateOptionFromImage', 'DiskCreateOptionImport', 'DiskCreateOptionCopy', 'DiskCreateOptionRestore', 'DiskCreateOptionUpload', 'DiskCreateOptionCopyStart'
+ CreateOption DiskCreateOption `json:"createOption,omitempty"`
+ // StorageAccountID - Required if createOption is Import. The Azure Resource Manager identifier of the storage account containing the blob to import as a disk.
+ StorageAccountID *string `json:"storageAccountId,omitempty"`
+ // ImageReference - Disk source information.
+ ImageReference *ImageDiskReference `json:"imageReference,omitempty"`
+ // GalleryImageReference - Required if creating from a Gallery Image. The id of the ImageDiskReference will be the ARM id of the shared galley image version from which to create a disk.
+ GalleryImageReference *ImageDiskReference `json:"galleryImageReference,omitempty"`
+ // SourceURI - If createOption is Import, this is the URI of a blob to be imported into a managed disk.
+ SourceURI *string `json:"sourceUri,omitempty"`
+ // SourceResourceID - If createOption is Copy, this is the ARM id of the source snapshot or disk.
+ SourceResourceID *string `json:"sourceResourceId,omitempty"`
+ // SourceUniqueID - READ-ONLY; If this field is set, this is the unique id identifying the source of this resource.
+ SourceUniqueID *string `json:"sourceUniqueId,omitempty"`
+ // UploadSizeBytes - If createOption is Upload, this is the size of the contents of the upload including the VHD footer. This value should be between 20972032 (20 MiB + 512 bytes for the VHD footer) and 35183298347520 bytes (32 TiB + 512 bytes for the VHD footer).
+ UploadSizeBytes *int64 `json:"uploadSizeBytes,omitempty"`
+ // LogicalSectorSize - Logical sector size in bytes for Ultra disks. Supported values are 512 ad 4096. 4096 is the default.
+ LogicalSectorSize *int32 `json:"logicalSectorSize,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for CreationData.
+func (cd CreationData) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if cd.CreateOption != "" {
+ objectMap["createOption"] = cd.CreateOption
+ }
+ if cd.StorageAccountID != nil {
+ objectMap["storageAccountId"] = cd.StorageAccountID
+ }
+ if cd.ImageReference != nil {
+ objectMap["imageReference"] = cd.ImageReference
+ }
+ if cd.GalleryImageReference != nil {
+ objectMap["galleryImageReference"] = cd.GalleryImageReference
+ }
+ if cd.SourceURI != nil {
+ objectMap["sourceUri"] = cd.SourceURI
+ }
+ if cd.SourceResourceID != nil {
+ objectMap["sourceResourceId"] = cd.SourceResourceID
+ }
+ if cd.UploadSizeBytes != nil {
+ objectMap["uploadSizeBytes"] = cd.UploadSizeBytes
+ }
+ if cd.LogicalSectorSize != nil {
+ objectMap["logicalSectorSize"] = cd.LogicalSectorSize
+ }
+ return json.Marshal(objectMap)
+}
+
+// DataDisk describes a data disk.
+type DataDisk struct {
+ // Lun - Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
+ Lun *int32 `json:"lun,omitempty"`
+ // Name - The disk name.
+ Name *string `json:"name,omitempty"`
+ // Vhd - The virtual hard disk.
+ Vhd *VirtualHardDisk `json:"vhd,omitempty"`
+ // Image - The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.
+ Image *VirtualHardDisk `json:"image,omitempty"`
+ // Caching - Specifies the caching requirements.
Possible values are:
**None**
**ReadOnly**
**ReadWrite**
Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite'
+ Caching CachingTypes `json:"caching,omitempty"`
+ // WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
+ WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
+ // CreateOption - Specifies how the virtual machine should be created.
Possible values are:
**Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.
**FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach'
+ CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
+ // DiskSizeGB - Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.
This value cannot be larger than 1023 GB
+ DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
+ // ManagedDisk - The managed disk parameters.
+ ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"`
+ // ToBeDetached - Specifies whether the data disk is in process of detachment from the VirtualMachine/VirtualMachineScaleset
+ ToBeDetached *bool `json:"toBeDetached,omitempty"`
+ // DiskIOPSReadWrite - READ-ONLY; Specifies the Read-Write IOPS for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set.
+ DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"`
+ // DiskMBpsReadWrite - READ-ONLY; Specifies the bandwidth in MB per second for the managed disk when StorageAccountType is UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. Can be updated only via updates to the VirtualMachine Scale Set.
+ DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"`
+ // DetachOption - Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values: **ForceDetach**.
detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior.
This feature is still in preview mode and is not supported for VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'. Possible values include: 'DiskDetachOptionTypesForceDetach'
+ DetachOption DiskDetachOptionTypes `json:"detachOption,omitempty"`
+ // DeleteOption - Specifies whether data disk should be deleted or detached upon VM deletion.
Possible values:
**Delete** If this value is used, the data disk is deleted when VM is deleted.
**Detach** If this value is used, the data disk is retained after VM is deleted.
The default value is set to **detach**. Possible values include: 'DiskDeleteOptionTypesDelete', 'DiskDeleteOptionTypesDetach'
+ DeleteOption DiskDeleteOptionTypes `json:"deleteOption,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for DataDisk.
+func (dd DataDisk) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if dd.Lun != nil {
+ objectMap["lun"] = dd.Lun
+ }
+ if dd.Name != nil {
+ objectMap["name"] = dd.Name
+ }
+ if dd.Vhd != nil {
+ objectMap["vhd"] = dd.Vhd
+ }
+ if dd.Image != nil {
+ objectMap["image"] = dd.Image
+ }
+ if dd.Caching != "" {
+ objectMap["caching"] = dd.Caching
+ }
+ if dd.WriteAcceleratorEnabled != nil {
+ objectMap["writeAcceleratorEnabled"] = dd.WriteAcceleratorEnabled
+ }
+ if dd.CreateOption != "" {
+ objectMap["createOption"] = dd.CreateOption
+ }
+ if dd.DiskSizeGB != nil {
+ objectMap["diskSizeGB"] = dd.DiskSizeGB
+ }
+ if dd.ManagedDisk != nil {
+ objectMap["managedDisk"] = dd.ManagedDisk
+ }
+ if dd.ToBeDetached != nil {
+ objectMap["toBeDetached"] = dd.ToBeDetached
+ }
+ if dd.DetachOption != "" {
+ objectMap["detachOption"] = dd.DetachOption
+ }
+ if dd.DeleteOption != "" {
+ objectMap["deleteOption"] = dd.DeleteOption
+ }
+ return json.Marshal(objectMap)
+}
+
+// DataDiskImage contains the data disk images information.
+type DataDiskImage struct {
+ // Lun - READ-ONLY; Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
+ Lun *int32 `json:"lun,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for DataDiskImage.
+func (ddi DataDiskImage) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// DataDiskImageEncryption contains encryption settings for a data disk image.
+type DataDiskImageEncryption struct {
+ // Lun - This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine.
+ Lun *int32 `json:"lun,omitempty"`
+ // DiskEncryptionSetID - A relative URI containing the resource ID of the disk encryption set.
+ DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
+}
+
+// DedicatedHost specifies information about the Dedicated host.
+type DedicatedHost struct {
+ autorest.Response `json:"-"`
+ *DedicatedHostProperties `json:"properties,omitempty"`
+ // Sku - SKU of the dedicated host for Hardware Generation and VM family. Only name is required to be set. List Microsoft.Compute SKUs for a list of possible values.
+ Sku *Sku `json:"sku,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for DedicatedHost.
+func (dh DedicatedHost) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if dh.DedicatedHostProperties != nil {
+ objectMap["properties"] = dh.DedicatedHostProperties
+ }
+ if dh.Sku != nil {
+ objectMap["sku"] = dh.Sku
+ }
+ if dh.Location != nil {
+ objectMap["location"] = dh.Location
+ }
+ if dh.Tags != nil {
+ objectMap["tags"] = dh.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for DedicatedHost struct.
+func (dh *DedicatedHost) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var dedicatedHostProperties DedicatedHostProperties
+ err = json.Unmarshal(*v, &dedicatedHostProperties)
+ if err != nil {
+ return err
+ }
+ dh.DedicatedHostProperties = &dedicatedHostProperties
+ }
+ case "sku":
+ if v != nil {
+ var sku Sku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ dh.Sku = &sku
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ dh.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ dh.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ dh.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ dh.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ dh.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// DedicatedHostAllocatableVM represents the dedicated host unutilized capacity in terms of a specific VM
+// size.
+type DedicatedHostAllocatableVM struct {
+ // VMSize - VM size in terms of which the unutilized capacity is represented.
+ VMSize *string `json:"vmSize,omitempty"`
+ // Count - Maximum number of VMs of size vmSize that can fit in the dedicated host's remaining capacity.
+ Count *float64 `json:"count,omitempty"`
+}
+
+// DedicatedHostAvailableCapacity dedicated host unutilized capacity.
+type DedicatedHostAvailableCapacity struct {
+ // AllocatableVMs - The unutilized capacity of the dedicated host represented in terms of each VM size that is allowed to be deployed to the dedicated host.
+ AllocatableVMs *[]DedicatedHostAllocatableVM `json:"allocatableVMs,omitempty"`
+}
+
+// DedicatedHostGroup specifies information about the dedicated host group that the dedicated hosts should
+// be assigned to.
Currently, a dedicated host can only be added to a dedicated host group at
+// creation time. An existing dedicated host cannot be added to another dedicated host group.
+type DedicatedHostGroup struct {
+ autorest.Response `json:"-"`
+ *DedicatedHostGroupProperties `json:"properties,omitempty"`
+ // Zones - Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone.
+ Zones *[]string `json:"zones,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for DedicatedHostGroup.
+func (dhg DedicatedHostGroup) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if dhg.DedicatedHostGroupProperties != nil {
+ objectMap["properties"] = dhg.DedicatedHostGroupProperties
+ }
+ if dhg.Zones != nil {
+ objectMap["zones"] = dhg.Zones
+ }
+ if dhg.Location != nil {
+ objectMap["location"] = dhg.Location
+ }
+ if dhg.Tags != nil {
+ objectMap["tags"] = dhg.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for DedicatedHostGroup struct.
+func (dhg *DedicatedHostGroup) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var dedicatedHostGroupProperties DedicatedHostGroupProperties
+ err = json.Unmarshal(*v, &dedicatedHostGroupProperties)
+ if err != nil {
+ return err
+ }
+ dhg.DedicatedHostGroupProperties = &dedicatedHostGroupProperties
+ }
+ case "zones":
+ if v != nil {
+ var zones []string
+ err = json.Unmarshal(*v, &zones)
+ if err != nil {
+ return err
+ }
+ dhg.Zones = &zones
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ dhg.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ dhg.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ dhg.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ dhg.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ dhg.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// DedicatedHostGroupInstanceView ...
+type DedicatedHostGroupInstanceView struct {
+ // Hosts - List of instance view of the dedicated hosts under the dedicated host group.
+ Hosts *[]DedicatedHostInstanceViewWithName `json:"hosts,omitempty"`
+}
+
+// DedicatedHostGroupListResult the List Dedicated Host Group with resource group response.
+type DedicatedHostGroupListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of dedicated host groups
+ Value *[]DedicatedHostGroup `json:"value,omitempty"`
+ // NextLink - The URI to fetch the next page of Dedicated Host Groups. Call ListNext() with this URI to fetch the next page of Dedicated Host Groups.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// DedicatedHostGroupListResultIterator provides access to a complete listing of DedicatedHostGroup values.
+type DedicatedHostGroupListResultIterator struct {
+ i int
+ page DedicatedHostGroupListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *DedicatedHostGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *DedicatedHostGroupListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter DedicatedHostGroupListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter DedicatedHostGroupListResultIterator) Response() DedicatedHostGroupListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter DedicatedHostGroupListResultIterator) Value() DedicatedHostGroup {
+ if !iter.page.NotDone() {
+ return DedicatedHostGroup{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the DedicatedHostGroupListResultIterator type.
+func NewDedicatedHostGroupListResultIterator(page DedicatedHostGroupListResultPage) DedicatedHostGroupListResultIterator {
+ return DedicatedHostGroupListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (dhglr DedicatedHostGroupListResult) IsEmpty() bool {
+ return dhglr.Value == nil || len(*dhglr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (dhglr DedicatedHostGroupListResult) hasNextLink() bool {
+ return dhglr.NextLink != nil && len(*dhglr.NextLink) != 0
+}
+
+// dedicatedHostGroupListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (dhglr DedicatedHostGroupListResult) dedicatedHostGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !dhglr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(dhglr.NextLink)))
+}
+
+// DedicatedHostGroupListResultPage contains a page of DedicatedHostGroup values.
+type DedicatedHostGroupListResultPage struct {
+ fn func(context.Context, DedicatedHostGroupListResult) (DedicatedHostGroupListResult, error)
+ dhglr DedicatedHostGroupListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *DedicatedHostGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostGroupListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.dhglr)
+ if err != nil {
+ return err
+ }
+ page.dhglr = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *DedicatedHostGroupListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page DedicatedHostGroupListResultPage) NotDone() bool {
+ return !page.dhglr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page DedicatedHostGroupListResultPage) Response() DedicatedHostGroupListResult {
+ return page.dhglr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page DedicatedHostGroupListResultPage) Values() []DedicatedHostGroup {
+ if page.dhglr.IsEmpty() {
+ return nil
+ }
+ return *page.dhglr.Value
+}
+
+// Creates a new instance of the DedicatedHostGroupListResultPage type.
+func NewDedicatedHostGroupListResultPage(cur DedicatedHostGroupListResult, getNextPage func(context.Context, DedicatedHostGroupListResult) (DedicatedHostGroupListResult, error)) DedicatedHostGroupListResultPage {
+ return DedicatedHostGroupListResultPage{
+ fn: getNextPage,
+ dhglr: cur,
+ }
+}
+
+// DedicatedHostGroupProperties dedicated Host Group Properties.
+type DedicatedHostGroupProperties struct {
+ // PlatformFaultDomainCount - Number of fault domains that the host group can span.
+ PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"`
+ // Hosts - READ-ONLY; A list of references to all dedicated hosts in the dedicated host group.
+ Hosts *[]SubResourceReadOnly `json:"hosts,omitempty"`
+ // InstanceView - READ-ONLY; The dedicated host group instance view, which has the list of instance view of the dedicated hosts under the dedicated host group.
+ InstanceView *DedicatedHostGroupInstanceView `json:"instanceView,omitempty"`
+ // SupportAutomaticPlacement - Specifies whether virtual machines or virtual machine scale sets can be placed automatically on the dedicated host group. Automatic placement means resources are allocated on dedicated hosts, that are chosen by Azure, under the dedicated host group. The value is defaulted to 'false' when not provided.
Minimum api-version: 2020-06-01.
+ SupportAutomaticPlacement *bool `json:"supportAutomaticPlacement,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for DedicatedHostGroupProperties.
+func (dhgp DedicatedHostGroupProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if dhgp.PlatformFaultDomainCount != nil {
+ objectMap["platformFaultDomainCount"] = dhgp.PlatformFaultDomainCount
+ }
+ if dhgp.SupportAutomaticPlacement != nil {
+ objectMap["supportAutomaticPlacement"] = dhgp.SupportAutomaticPlacement
+ }
+ return json.Marshal(objectMap)
+}
+
+// DedicatedHostGroupUpdate specifies information about the dedicated host group that the dedicated host
+// should be assigned to. Only tags may be updated.
+type DedicatedHostGroupUpdate struct {
+ *DedicatedHostGroupProperties `json:"properties,omitempty"`
+ // Zones - Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone.
+ Zones *[]string `json:"zones,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for DedicatedHostGroupUpdate.
+func (dhgu DedicatedHostGroupUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if dhgu.DedicatedHostGroupProperties != nil {
+ objectMap["properties"] = dhgu.DedicatedHostGroupProperties
+ }
+ if dhgu.Zones != nil {
+ objectMap["zones"] = dhgu.Zones
+ }
+ if dhgu.Tags != nil {
+ objectMap["tags"] = dhgu.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for DedicatedHostGroupUpdate struct.
+func (dhgu *DedicatedHostGroupUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var dedicatedHostGroupProperties DedicatedHostGroupProperties
+ err = json.Unmarshal(*v, &dedicatedHostGroupProperties)
+ if err != nil {
+ return err
+ }
+ dhgu.DedicatedHostGroupProperties = &dedicatedHostGroupProperties
+ }
+ case "zones":
+ if v != nil {
+ var zones []string
+ err = json.Unmarshal(*v, &zones)
+ if err != nil {
+ return err
+ }
+ dhgu.Zones = &zones
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ dhgu.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// DedicatedHostInstanceView the instance view of a dedicated host.
+type DedicatedHostInstanceView struct {
+ // AssetID - READ-ONLY; Specifies the unique id of the dedicated physical machine on which the dedicated host resides.
+ AssetID *string `json:"assetId,omitempty"`
+ // AvailableCapacity - Unutilized capacity of the dedicated host.
+ AvailableCapacity *DedicatedHostAvailableCapacity `json:"availableCapacity,omitempty"`
+ // Statuses - The resource status information.
+ Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for DedicatedHostInstanceView.
+func (dhiv DedicatedHostInstanceView) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if dhiv.AvailableCapacity != nil {
+ objectMap["availableCapacity"] = dhiv.AvailableCapacity
+ }
+ if dhiv.Statuses != nil {
+ objectMap["statuses"] = dhiv.Statuses
+ }
+ return json.Marshal(objectMap)
+}
+
+// DedicatedHostInstanceViewWithName the instance view of a dedicated host that includes the name of the
+// dedicated host. It is used for the response to the instance view of a dedicated host group.
+type DedicatedHostInstanceViewWithName struct {
+ // Name - READ-ONLY; The name of the dedicated host.
+ Name *string `json:"name,omitempty"`
+ // AssetID - READ-ONLY; Specifies the unique id of the dedicated physical machine on which the dedicated host resides.
+ AssetID *string `json:"assetId,omitempty"`
+ // AvailableCapacity - Unutilized capacity of the dedicated host.
+ AvailableCapacity *DedicatedHostAvailableCapacity `json:"availableCapacity,omitempty"`
+ // Statuses - The resource status information.
+ Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for DedicatedHostInstanceViewWithName.
+func (dhivwn DedicatedHostInstanceViewWithName) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if dhivwn.AvailableCapacity != nil {
+ objectMap["availableCapacity"] = dhivwn.AvailableCapacity
+ }
+ if dhivwn.Statuses != nil {
+ objectMap["statuses"] = dhivwn.Statuses
+ }
+ return json.Marshal(objectMap)
+}
+
+// DedicatedHostListResult the list dedicated host operation response.
+type DedicatedHostListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of dedicated hosts
+ Value *[]DedicatedHost `json:"value,omitempty"`
+ // NextLink - The URI to fetch the next page of dedicated hosts. Call ListNext() with this URI to fetch the next page of dedicated hosts.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// DedicatedHostListResultIterator provides access to a complete listing of DedicatedHost values.
+type DedicatedHostListResultIterator struct {
+ i int
+ page DedicatedHostListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *DedicatedHostListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *DedicatedHostListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter DedicatedHostListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter DedicatedHostListResultIterator) Response() DedicatedHostListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter DedicatedHostListResultIterator) Value() DedicatedHost {
+ if !iter.page.NotDone() {
+ return DedicatedHost{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the DedicatedHostListResultIterator type.
+func NewDedicatedHostListResultIterator(page DedicatedHostListResultPage) DedicatedHostListResultIterator {
+ return DedicatedHostListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (dhlr DedicatedHostListResult) IsEmpty() bool {
+ return dhlr.Value == nil || len(*dhlr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (dhlr DedicatedHostListResult) hasNextLink() bool {
+ return dhlr.NextLink != nil && len(*dhlr.NextLink) != 0
+}
+
+// dedicatedHostListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (dhlr DedicatedHostListResult) dedicatedHostListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !dhlr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(dhlr.NextLink)))
+}
+
+// DedicatedHostListResultPage contains a page of DedicatedHost values.
+type DedicatedHostListResultPage struct {
+ fn func(context.Context, DedicatedHostListResult) (DedicatedHostListResult, error)
+ dhlr DedicatedHostListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *DedicatedHostListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DedicatedHostListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.dhlr)
+ if err != nil {
+ return err
+ }
+ page.dhlr = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *DedicatedHostListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page DedicatedHostListResultPage) NotDone() bool {
+ return !page.dhlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page DedicatedHostListResultPage) Response() DedicatedHostListResult {
+ return page.dhlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page DedicatedHostListResultPage) Values() []DedicatedHost {
+ if page.dhlr.IsEmpty() {
+ return nil
+ }
+ return *page.dhlr.Value
+}
+
+// Creates a new instance of the DedicatedHostListResultPage type.
+func NewDedicatedHostListResultPage(cur DedicatedHostListResult, getNextPage func(context.Context, DedicatedHostListResult) (DedicatedHostListResult, error)) DedicatedHostListResultPage {
+ return DedicatedHostListResultPage{
+ fn: getNextPage,
+ dhlr: cur,
+ }
+}
+
+// DedicatedHostProperties properties of the dedicated host.
+type DedicatedHostProperties struct {
+ // PlatformFaultDomain - Fault domain of the dedicated host within a dedicated host group.
+ PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"`
+ // AutoReplaceOnFailure - Specifies whether the dedicated host should be replaced automatically in case of a failure. The value is defaulted to 'true' when not provided.
+ AutoReplaceOnFailure *bool `json:"autoReplaceOnFailure,omitempty"`
+ // HostID - READ-ONLY; A unique id generated and assigned to the dedicated host by the platform.
Does not change throughout the lifetime of the host.
+ HostID *string `json:"hostId,omitempty"`
+ // VirtualMachines - READ-ONLY; A list of references to all virtual machines in the Dedicated Host.
+ VirtualMachines *[]SubResourceReadOnly `json:"virtualMachines,omitempty"`
+ // LicenseType - Specifies the software license type that will be applied to the VMs deployed on the dedicated host.
Possible values are:
**None**
**Windows_Server_Hybrid**
**Windows_Server_Perpetual**
Default: **None**. Possible values include: 'DedicatedHostLicenseTypesNone', 'DedicatedHostLicenseTypesWindowsServerHybrid', 'DedicatedHostLicenseTypesWindowsServerPerpetual'
+ LicenseType DedicatedHostLicenseTypes `json:"licenseType,omitempty"`
+ // ProvisioningTime - READ-ONLY; The date when the host was first provisioned.
+ ProvisioningTime *date.Time `json:"provisioningTime,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // InstanceView - READ-ONLY; The dedicated host instance view.
+ InstanceView *DedicatedHostInstanceView `json:"instanceView,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for DedicatedHostProperties.
+func (dhp DedicatedHostProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if dhp.PlatformFaultDomain != nil {
+ objectMap["platformFaultDomain"] = dhp.PlatformFaultDomain
+ }
+ if dhp.AutoReplaceOnFailure != nil {
+ objectMap["autoReplaceOnFailure"] = dhp.AutoReplaceOnFailure
+ }
+ if dhp.LicenseType != "" {
+ objectMap["licenseType"] = dhp.LicenseType
+ }
+ return json.Marshal(objectMap)
+}
+
+// DedicatedHostsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type DedicatedHostsCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(DedicatedHostsClient) (DedicatedHost, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DedicatedHostsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DedicatedHostsCreateOrUpdateFuture.Result.
+func (future *DedicatedHostsCreateOrUpdateFuture) result(client DedicatedHostsClient) (dh DedicatedHost, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ dh.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.DedicatedHostsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if dh.Response.Response, err = future.GetResult(sender); err == nil && dh.Response.Response.StatusCode != http.StatusNoContent {
+ dh, err = client.CreateOrUpdateResponder(dh.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsCreateOrUpdateFuture", "Result", dh.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// DedicatedHostsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type DedicatedHostsDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(DedicatedHostsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DedicatedHostsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DedicatedHostsDeleteFuture.Result.
+func (future *DedicatedHostsDeleteFuture) result(client DedicatedHostsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.DedicatedHostsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// DedicatedHostsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type DedicatedHostsUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(DedicatedHostsClient) (DedicatedHost, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DedicatedHostsUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DedicatedHostsUpdateFuture.Result.
+func (future *DedicatedHostsUpdateFuture) result(client DedicatedHostsClient) (dh DedicatedHost, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ dh.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.DedicatedHostsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if dh.Response.Response, err = future.GetResult(sender); err == nil && dh.Response.Response.StatusCode != http.StatusNoContent {
+ dh, err = client.UpdateResponder(dh.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DedicatedHostsUpdateFuture", "Result", dh.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// DedicatedHostUpdate specifies information about the dedicated host. Only tags, autoReplaceOnFailure and
+// licenseType may be updated.
+type DedicatedHostUpdate struct {
+ *DedicatedHostProperties `json:"properties,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for DedicatedHostUpdate.
+func (dhu DedicatedHostUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if dhu.DedicatedHostProperties != nil {
+ objectMap["properties"] = dhu.DedicatedHostProperties
+ }
+ if dhu.Tags != nil {
+ objectMap["tags"] = dhu.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for DedicatedHostUpdate struct.
+func (dhu *DedicatedHostUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var dedicatedHostProperties DedicatedHostProperties
+ err = json.Unmarshal(*v, &dedicatedHostProperties)
+ if err != nil {
+ return err
+ }
+ dhu.DedicatedHostProperties = &dedicatedHostProperties
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ dhu.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// DiagnosticsProfile specifies the boot diagnostic settings state.
Minimum api-version:
+// 2015-06-15.
+type DiagnosticsProfile struct {
+ // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
You can easily view the output of your console log.
Azure also enables you to see a screenshot of the VM from the hypervisor.
+ BootDiagnostics *BootDiagnostics `json:"bootDiagnostics,omitempty"`
+}
+
+// DiffDiskSettings describes the parameters of ephemeral disk settings that can be specified for operating
+// system disk.
NOTE: The ephemeral disk settings can only be specified for managed disk.
+type DiffDiskSettings struct {
+ // Option - Specifies the ephemeral disk settings for operating system disk. Possible values include: 'DiffDiskOptionsLocal'
+ Option DiffDiskOptions `json:"option,omitempty"`
+ // Placement - Specifies the ephemeral disk placement for operating system disk.
Possible values are:
**CacheDisk**
**ResourceDisk**
Default: **CacheDisk** if one is configured for the VM size otherwise **ResourceDisk** is used.
Refer to VM size documentation for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/sizes and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/sizes to check which VM sizes exposes a cache disk. Possible values include: 'DiffDiskPlacementCacheDisk', 'DiffDiskPlacementResourceDisk'
+ Placement DiffDiskPlacement `json:"placement,omitempty"`
+}
+
+// Disallowed describes the disallowed disk types.
+type Disallowed struct {
+ // DiskTypes - A list of disk types.
+ DiskTypes *[]string `json:"diskTypes,omitempty"`
+}
+
+// DisallowedConfiguration specifies the disallowed configuration for a virtual machine image.
+type DisallowedConfiguration struct {
+ // VMDiskType - VM disk types which are disallowed. Possible values include: 'VMDiskTypesNone', 'VMDiskTypesUnmanaged'
+ VMDiskType VMDiskTypes `json:"vmDiskType,omitempty"`
+}
+
+// Disk disk resource.
+type Disk struct {
+ autorest.Response `json:"-"`
+ // ManagedBy - READ-ONLY; A relative URI containing the ID of the VM that has the disk attached.
+ ManagedBy *string `json:"managedBy,omitempty"`
+ // ManagedByExtended - READ-ONLY; List of relative URIs containing the IDs of the VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs.
+ ManagedByExtended *[]string `json:"managedByExtended,omitempty"`
+ Sku *DiskSku `json:"sku,omitempty"`
+ // Zones - The Logical zone list for Disk.
+ Zones *[]string `json:"zones,omitempty"`
+ // ExtendedLocation - The extended location where the disk will be created. Extended location cannot be changed.
+ ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
+ *DiskProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for Disk.
+func (d Disk) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if d.Sku != nil {
+ objectMap["sku"] = d.Sku
+ }
+ if d.Zones != nil {
+ objectMap["zones"] = d.Zones
+ }
+ if d.ExtendedLocation != nil {
+ objectMap["extendedLocation"] = d.ExtendedLocation
+ }
+ if d.DiskProperties != nil {
+ objectMap["properties"] = d.DiskProperties
+ }
+ if d.Location != nil {
+ objectMap["location"] = d.Location
+ }
+ if d.Tags != nil {
+ objectMap["tags"] = d.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Disk struct.
+func (d *Disk) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "managedBy":
+ if v != nil {
+ var managedBy string
+ err = json.Unmarshal(*v, &managedBy)
+ if err != nil {
+ return err
+ }
+ d.ManagedBy = &managedBy
+ }
+ case "managedByExtended":
+ if v != nil {
+ var managedByExtended []string
+ err = json.Unmarshal(*v, &managedByExtended)
+ if err != nil {
+ return err
+ }
+ d.ManagedByExtended = &managedByExtended
+ }
+ case "sku":
+ if v != nil {
+ var sku DiskSku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ d.Sku = &sku
+ }
+ case "zones":
+ if v != nil {
+ var zones []string
+ err = json.Unmarshal(*v, &zones)
+ if err != nil {
+ return err
+ }
+ d.Zones = &zones
+ }
+ case "extendedLocation":
+ if v != nil {
+ var extendedLocation ExtendedLocation
+ err = json.Unmarshal(*v, &extendedLocation)
+ if err != nil {
+ return err
+ }
+ d.ExtendedLocation = &extendedLocation
+ }
+ case "properties":
+ if v != nil {
+ var diskProperties DiskProperties
+ err = json.Unmarshal(*v, &diskProperties)
+ if err != nil {
+ return err
+ }
+ d.DiskProperties = &diskProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ d.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ d.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ d.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ d.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ d.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// DiskAccess disk access resource.
+type DiskAccess struct {
+ autorest.Response `json:"-"`
+ *DiskAccessProperties `json:"properties,omitempty"`
+ // ExtendedLocation - The extended location where the disk access will be created. Extended location cannot be changed.
+ ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for DiskAccess.
+func (da DiskAccess) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if da.DiskAccessProperties != nil {
+ objectMap["properties"] = da.DiskAccessProperties
+ }
+ if da.ExtendedLocation != nil {
+ objectMap["extendedLocation"] = da.ExtendedLocation
+ }
+ if da.Location != nil {
+ objectMap["location"] = da.Location
+ }
+ if da.Tags != nil {
+ objectMap["tags"] = da.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for DiskAccess struct.
+func (da *DiskAccess) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var diskAccessProperties DiskAccessProperties
+ err = json.Unmarshal(*v, &diskAccessProperties)
+ if err != nil {
+ return err
+ }
+ da.DiskAccessProperties = &diskAccessProperties
+ }
+ case "extendedLocation":
+ if v != nil {
+ var extendedLocation ExtendedLocation
+ err = json.Unmarshal(*v, &extendedLocation)
+ if err != nil {
+ return err
+ }
+ da.ExtendedLocation = &extendedLocation
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ da.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ da.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ da.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ da.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ da.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// DiskAccessesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type DiskAccessesCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(DiskAccessesClient) (DiskAccess, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DiskAccessesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DiskAccessesCreateOrUpdateFuture.Result.
+func (future *DiskAccessesCreateOrUpdateFuture) result(client DiskAccessesClient) (da DiskAccess, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ da.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.DiskAccessesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if da.Response.Response, err = future.GetResult(sender); err == nil && da.Response.Response.StatusCode != http.StatusNoContent {
+ da, err = client.CreateOrUpdateResponder(da.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesCreateOrUpdateFuture", "Result", da.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// DiskAccessesDeleteAPrivateEndpointConnectionFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
+type DiskAccessesDeleteAPrivateEndpointConnectionFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(DiskAccessesClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DiskAccessesDeleteAPrivateEndpointConnectionFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DiskAccessesDeleteAPrivateEndpointConnectionFuture.Result.
+func (future *DiskAccessesDeleteAPrivateEndpointConnectionFuture) result(client DiskAccessesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesDeleteAPrivateEndpointConnectionFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.DiskAccessesDeleteAPrivateEndpointConnectionFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// DiskAccessesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type DiskAccessesDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(DiskAccessesClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DiskAccessesDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DiskAccessesDeleteFuture.Result.
+func (future *DiskAccessesDeleteFuture) result(client DiskAccessesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.DiskAccessesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// DiskAccessesUpdateAPrivateEndpointConnectionFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
+type DiskAccessesUpdateAPrivateEndpointConnectionFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(DiskAccessesClient) (PrivateEndpointConnection, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DiskAccessesUpdateAPrivateEndpointConnectionFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DiskAccessesUpdateAPrivateEndpointConnectionFuture.Result.
+func (future *DiskAccessesUpdateAPrivateEndpointConnectionFuture) result(client DiskAccessesClient) (pec PrivateEndpointConnection, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesUpdateAPrivateEndpointConnectionFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ pec.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.DiskAccessesUpdateAPrivateEndpointConnectionFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if pec.Response.Response, err = future.GetResult(sender); err == nil && pec.Response.Response.StatusCode != http.StatusNoContent {
+ pec, err = client.UpdateAPrivateEndpointConnectionResponder(pec.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesUpdateAPrivateEndpointConnectionFuture", "Result", pec.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// DiskAccessesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type DiskAccessesUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(DiskAccessesClient) (DiskAccess, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DiskAccessesUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DiskAccessesUpdateFuture.Result.
+func (future *DiskAccessesUpdateFuture) result(client DiskAccessesClient) (da DiskAccess, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ da.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.DiskAccessesUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if da.Response.Response, err = future.GetResult(sender); err == nil && da.Response.Response.StatusCode != http.StatusNoContent {
+ da, err = client.UpdateResponder(da.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskAccessesUpdateFuture", "Result", da.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// DiskAccessList the List disk access operation response.
+type DiskAccessList struct {
+ autorest.Response `json:"-"`
+ // Value - A list of disk access resources.
+ Value *[]DiskAccess `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of disk access resources. Call ListNext() with this to fetch the next page of disk access resources.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// DiskAccessListIterator provides access to a complete listing of DiskAccess values.
+type DiskAccessListIterator struct {
+ i int
+ page DiskAccessListPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *DiskAccessListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *DiskAccessListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter DiskAccessListIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter DiskAccessListIterator) Response() DiskAccessList {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter DiskAccessListIterator) Value() DiskAccess {
+ if !iter.page.NotDone() {
+ return DiskAccess{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the DiskAccessListIterator type.
+func NewDiskAccessListIterator(page DiskAccessListPage) DiskAccessListIterator {
+ return DiskAccessListIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (dal DiskAccessList) IsEmpty() bool {
+ return dal.Value == nil || len(*dal.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (dal DiskAccessList) hasNextLink() bool {
+ return dal.NextLink != nil && len(*dal.NextLink) != 0
+}
+
+// diskAccessListPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (dal DiskAccessList) diskAccessListPreparer(ctx context.Context) (*http.Request, error) {
+ if !dal.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(dal.NextLink)))
+}
+
+// DiskAccessListPage contains a page of DiskAccess values.
+type DiskAccessListPage struct {
+ fn func(context.Context, DiskAccessList) (DiskAccessList, error)
+ dal DiskAccessList
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *DiskAccessListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskAccessListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.dal)
+ if err != nil {
+ return err
+ }
+ page.dal = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *DiskAccessListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page DiskAccessListPage) NotDone() bool {
+ return !page.dal.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page DiskAccessListPage) Response() DiskAccessList {
+ return page.dal
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page DiskAccessListPage) Values() []DiskAccess {
+ if page.dal.IsEmpty() {
+ return nil
+ }
+ return *page.dal.Value
+}
+
+// Creates a new instance of the DiskAccessListPage type.
+func NewDiskAccessListPage(cur DiskAccessList, getNextPage func(context.Context, DiskAccessList) (DiskAccessList, error)) DiskAccessListPage {
+ return DiskAccessListPage{
+ fn: getNextPage,
+ dal: cur,
+ }
+}
+
+// DiskAccessProperties ...
+type DiskAccessProperties struct {
+ // PrivateEndpointConnections - READ-ONLY; A readonly collection of private endpoint connections created on the disk. Currently only one endpoint connection is supported.
+ PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
+ // ProvisioningState - READ-ONLY; The disk access resource provisioning state.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // TimeCreated - READ-ONLY; The time when the disk access was created.
+ TimeCreated *date.Time `json:"timeCreated,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for DiskAccessProperties.
+func (dap DiskAccessProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// DiskAccessUpdate used for updating a disk access resource.
+type DiskAccessUpdate struct {
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for DiskAccessUpdate.
+func (dau DiskAccessUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if dau.Tags != nil {
+ objectMap["tags"] = dau.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// DiskEncryptionSet disk encryption set resource.
+type DiskEncryptionSet struct {
+ autorest.Response `json:"-"`
+ Identity *EncryptionSetIdentity `json:"identity,omitempty"`
+ *EncryptionSetProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for DiskEncryptionSet.
+func (desVar DiskEncryptionSet) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if desVar.Identity != nil {
+ objectMap["identity"] = desVar.Identity
+ }
+ if desVar.EncryptionSetProperties != nil {
+ objectMap["properties"] = desVar.EncryptionSetProperties
+ }
+ if desVar.Location != nil {
+ objectMap["location"] = desVar.Location
+ }
+ if desVar.Tags != nil {
+ objectMap["tags"] = desVar.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for DiskEncryptionSet struct.
+func (desVar *DiskEncryptionSet) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "identity":
+ if v != nil {
+ var identity EncryptionSetIdentity
+ err = json.Unmarshal(*v, &identity)
+ if err != nil {
+ return err
+ }
+ desVar.Identity = &identity
+ }
+ case "properties":
+ if v != nil {
+ var encryptionSetProperties EncryptionSetProperties
+ err = json.Unmarshal(*v, &encryptionSetProperties)
+ if err != nil {
+ return err
+ }
+ desVar.EncryptionSetProperties = &encryptionSetProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ desVar.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ desVar.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ desVar.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ desVar.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ desVar.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// DiskEncryptionSetList the List disk encryption set operation response.
+type DiskEncryptionSetList struct {
+ autorest.Response `json:"-"`
+ // Value - A list of disk encryption sets.
+ Value *[]DiskEncryptionSet `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of disk encryption sets. Call ListNext() with this to fetch the next page of disk encryption sets.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// DiskEncryptionSetListIterator provides access to a complete listing of DiskEncryptionSet values.
+type DiskEncryptionSetListIterator struct {
+ i int
+ page DiskEncryptionSetListPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *DiskEncryptionSetListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *DiskEncryptionSetListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter DiskEncryptionSetListIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter DiskEncryptionSetListIterator) Response() DiskEncryptionSetList {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter DiskEncryptionSetListIterator) Value() DiskEncryptionSet {
+ if !iter.page.NotDone() {
+ return DiskEncryptionSet{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the DiskEncryptionSetListIterator type.
+func NewDiskEncryptionSetListIterator(page DiskEncryptionSetListPage) DiskEncryptionSetListIterator {
+ return DiskEncryptionSetListIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (desl DiskEncryptionSetList) IsEmpty() bool {
+ return desl.Value == nil || len(*desl.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (desl DiskEncryptionSetList) hasNextLink() bool {
+ return desl.NextLink != nil && len(*desl.NextLink) != 0
+}
+
+// diskEncryptionSetListPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (desl DiskEncryptionSetList) diskEncryptionSetListPreparer(ctx context.Context) (*http.Request, error) {
+ if !desl.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(desl.NextLink)))
+}
+
+// DiskEncryptionSetListPage contains a page of DiskEncryptionSet values.
+type DiskEncryptionSetListPage struct {
+ fn func(context.Context, DiskEncryptionSetList) (DiskEncryptionSetList, error)
+ desl DiskEncryptionSetList
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *DiskEncryptionSetListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskEncryptionSetListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.desl)
+ if err != nil {
+ return err
+ }
+ page.desl = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *DiskEncryptionSetListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page DiskEncryptionSetListPage) NotDone() bool {
+ return !page.desl.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page DiskEncryptionSetListPage) Response() DiskEncryptionSetList {
+ return page.desl
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page DiskEncryptionSetListPage) Values() []DiskEncryptionSet {
+ if page.desl.IsEmpty() {
+ return nil
+ }
+ return *page.desl.Value
+}
+
+// Creates a new instance of the DiskEncryptionSetListPage type.
+func NewDiskEncryptionSetListPage(cur DiskEncryptionSetList, getNextPage func(context.Context, DiskEncryptionSetList) (DiskEncryptionSetList, error)) DiskEncryptionSetListPage {
+ return DiskEncryptionSetListPage{
+ fn: getNextPage,
+ desl: cur,
+ }
+}
+
+// DiskEncryptionSetParameters describes the parameter of customer managed disk encryption set resource id
+// that can be specified for disk.
NOTE: The disk encryption set resource id can only be specified
+// for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details.
+type DiskEncryptionSetParameters struct {
+ // ID - Resource Id
+ ID *string `json:"id,omitempty"`
+}
+
+// DiskEncryptionSetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type DiskEncryptionSetsCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(DiskEncryptionSetsClient) (DiskEncryptionSet, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DiskEncryptionSetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DiskEncryptionSetsCreateOrUpdateFuture.Result.
+func (future *DiskEncryptionSetsCreateOrUpdateFuture) result(client DiskEncryptionSetsClient) (desVar DiskEncryptionSet, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ desVar.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.DiskEncryptionSetsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if desVar.Response.Response, err = future.GetResult(sender); err == nil && desVar.Response.Response.StatusCode != http.StatusNoContent {
+ desVar, err = client.CreateOrUpdateResponder(desVar.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsCreateOrUpdateFuture", "Result", desVar.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// DiskEncryptionSetsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type DiskEncryptionSetsDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(DiskEncryptionSetsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DiskEncryptionSetsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DiskEncryptionSetsDeleteFuture.Result.
+func (future *DiskEncryptionSetsDeleteFuture) result(client DiskEncryptionSetsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.DiskEncryptionSetsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// DiskEncryptionSetsUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type DiskEncryptionSetsUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(DiskEncryptionSetsClient) (DiskEncryptionSet, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DiskEncryptionSetsUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DiskEncryptionSetsUpdateFuture.Result.
+func (future *DiskEncryptionSetsUpdateFuture) result(client DiskEncryptionSetsClient) (desVar DiskEncryptionSet, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ desVar.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.DiskEncryptionSetsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if desVar.Response.Response, err = future.GetResult(sender); err == nil && desVar.Response.Response.StatusCode != http.StatusNoContent {
+ desVar, err = client.UpdateResponder(desVar.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskEncryptionSetsUpdateFuture", "Result", desVar.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// DiskEncryptionSettings describes a Encryption Settings for a Disk
+type DiskEncryptionSettings struct {
+ // DiskEncryptionKey - Specifies the location of the disk encryption key, which is a Key Vault Secret.
+ DiskEncryptionKey *KeyVaultSecretReference `json:"diskEncryptionKey,omitempty"`
+ // KeyEncryptionKey - Specifies the location of the key encryption key in Key Vault.
+ KeyEncryptionKey *KeyVaultKeyReference `json:"keyEncryptionKey,omitempty"`
+ // Enabled - Specifies whether disk encryption should be enabled on the virtual machine.
+ Enabled *bool `json:"enabled,omitempty"`
+}
+
+// DiskEncryptionSetUpdate disk encryption set update resource.
+type DiskEncryptionSetUpdate struct {
+ *DiskEncryptionSetUpdateProperties `json:"properties,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+ Identity *EncryptionSetIdentity `json:"identity,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for DiskEncryptionSetUpdate.
+func (desu DiskEncryptionSetUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if desu.DiskEncryptionSetUpdateProperties != nil {
+ objectMap["properties"] = desu.DiskEncryptionSetUpdateProperties
+ }
+ if desu.Tags != nil {
+ objectMap["tags"] = desu.Tags
+ }
+ if desu.Identity != nil {
+ objectMap["identity"] = desu.Identity
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for DiskEncryptionSetUpdate struct.
+func (desu *DiskEncryptionSetUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var diskEncryptionSetUpdateProperties DiskEncryptionSetUpdateProperties
+ err = json.Unmarshal(*v, &diskEncryptionSetUpdateProperties)
+ if err != nil {
+ return err
+ }
+ desu.DiskEncryptionSetUpdateProperties = &diskEncryptionSetUpdateProperties
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ desu.Tags = tags
+ }
+ case "identity":
+ if v != nil {
+ var identity EncryptionSetIdentity
+ err = json.Unmarshal(*v, &identity)
+ if err != nil {
+ return err
+ }
+ desu.Identity = &identity
+ }
+ }
+ }
+
+ return nil
+}
+
+// DiskEncryptionSetUpdateProperties disk encryption set resource update properties.
+type DiskEncryptionSetUpdateProperties struct {
+ // EncryptionType - Possible values include: 'DiskEncryptionSetTypeEncryptionAtRestWithCustomerKey', 'DiskEncryptionSetTypeEncryptionAtRestWithPlatformAndCustomerKeys'
+ EncryptionType DiskEncryptionSetType `json:"encryptionType,omitempty"`
+ ActiveKey *KeyForDiskEncryptionSet `json:"activeKey,omitempty"`
+ // RotationToLatestKeyVersionEnabled - Set this flag to true to enable auto-updating of this disk encryption set to the latest key version.
+ RotationToLatestKeyVersionEnabled *bool `json:"rotationToLatestKeyVersionEnabled,omitempty"`
+}
+
+// DiskImageEncryption this is the disk image encryption base class.
+type DiskImageEncryption struct {
+ // DiskEncryptionSetID - A relative URI containing the resource ID of the disk encryption set.
+ DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
+}
+
+// DiskInstanceView the instance view of the disk.
+type DiskInstanceView struct {
+ // Name - The disk name.
+ Name *string `json:"name,omitempty"`
+ // EncryptionSettings - Specifies the encryption settings for the OS Disk.
Minimum api-version: 2015-06-15
+ EncryptionSettings *[]DiskEncryptionSettings `json:"encryptionSettings,omitempty"`
+ // Statuses - The resource status information.
+ Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
+}
+
+// DiskList the List Disks operation response.
+type DiskList struct {
+ autorest.Response `json:"-"`
+ // Value - A list of disks.
+ Value *[]Disk `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of disks. Call ListNext() with this to fetch the next page of disks.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// DiskListIterator provides access to a complete listing of Disk values.
+type DiskListIterator struct {
+ i int
+ page DiskListPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *DiskListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *DiskListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter DiskListIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter DiskListIterator) Response() DiskList {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter DiskListIterator) Value() Disk {
+ if !iter.page.NotDone() {
+ return Disk{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the DiskListIterator type.
+func NewDiskListIterator(page DiskListPage) DiskListIterator {
+ return DiskListIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (dl DiskList) IsEmpty() bool {
+ return dl.Value == nil || len(*dl.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (dl DiskList) hasNextLink() bool {
+ return dl.NextLink != nil && len(*dl.NextLink) != 0
+}
+
+// diskListPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (dl DiskList) diskListPreparer(ctx context.Context) (*http.Request, error) {
+ if !dl.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(dl.NextLink)))
+}
+
+// DiskListPage contains a page of Disk values.
+type DiskListPage struct {
+ fn func(context.Context, DiskList) (DiskList, error)
+ dl DiskList
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *DiskListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.dl)
+ if err != nil {
+ return err
+ }
+ page.dl = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *DiskListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page DiskListPage) NotDone() bool {
+ return !page.dl.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page DiskListPage) Response() DiskList {
+ return page.dl
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page DiskListPage) Values() []Disk {
+ if page.dl.IsEmpty() {
+ return nil
+ }
+ return *page.dl.Value
+}
+
+// Creates a new instance of the DiskListPage type.
+func NewDiskListPage(cur DiskList, getNextPage func(context.Context, DiskList) (DiskList, error)) DiskListPage {
+ return DiskListPage{
+ fn: getNextPage,
+ dl: cur,
+ }
+}
+
+// DiskProperties disk resource properties.
+type DiskProperties struct {
+ // TimeCreated - READ-ONLY; The time when the disk was created.
+ TimeCreated *date.Time `json:"timeCreated,omitempty"`
+ // OsType - The Operating System type. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux'
+ OsType OperatingSystemTypes `json:"osType,omitempty"`
+ // HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'HyperVGenerationV1', 'HyperVGenerationV2'
+ HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"`
+ // PurchasePlan - Purchase plan information for the the image from which the OS disk was created. E.g. - {name: 2019-Datacenter, publisher: MicrosoftWindowsServer, product: WindowsServer}
+ PurchasePlan *PurchasePlan `json:"purchasePlan,omitempty"`
+ // SupportedCapabilities - List of supported capabilities for the image from which the OS disk was created.
+ SupportedCapabilities *SupportedCapabilities `json:"supportedCapabilities,omitempty"`
+ // CreationData - Disk source information. CreationData information cannot be changed after the disk has been created.
+ CreationData *CreationData `json:"creationData,omitempty"`
+ // DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
+ DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
+ // DiskSizeBytes - READ-ONLY; The size of the disk in bytes. This field is read only.
+ DiskSizeBytes *int64 `json:"diskSizeBytes,omitempty"`
+ // UniqueID - READ-ONLY; Unique Guid identifying the resource.
+ UniqueID *string `json:"uniqueId,omitempty"`
+ // EncryptionSettingsCollection - Encryption settings collection used for Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
+ EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`
+ // ProvisioningState - READ-ONLY; The disk provisioning state.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // DiskIOPSReadWrite - The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes.
+ DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"`
+ // DiskMBpsReadWrite - The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.
+ DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"`
+ // DiskIOPSReadOnly - The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes.
+ DiskIOPSReadOnly *int64 `json:"diskIOPSReadOnly,omitempty"`
+ // DiskMBpsReadOnly - The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.
+ DiskMBpsReadOnly *int64 `json:"diskMBpsReadOnly,omitempty"`
+ // DiskState - The state of the disk. Possible values include: 'DiskStateUnattached', 'DiskStateAttached', 'DiskStateReserved', 'DiskStateFrozen', 'DiskStateActiveSAS', 'DiskStateActiveSASFrozen', 'DiskStateReadyToUpload', 'DiskStateActiveUpload'
+ DiskState DiskState `json:"diskState,omitempty"`
+ // Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
+ Encryption *Encryption `json:"encryption,omitempty"`
+ // MaxShares - The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time.
+ MaxShares *int32 `json:"maxShares,omitempty"`
+ // ShareInfo - READ-ONLY; Details of the list of all VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs.
+ ShareInfo *[]ShareInfoElement `json:"shareInfo,omitempty"`
+ // NetworkAccessPolicy - Possible values include: 'NetworkAccessPolicyAllowAll', 'NetworkAccessPolicyAllowPrivate', 'NetworkAccessPolicyDenyAll'
+ NetworkAccessPolicy NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"`
+ // DiskAccessID - ARM id of the DiskAccess resource for using private endpoints on disks.
+ DiskAccessID *string `json:"diskAccessId,omitempty"`
+ // Tier - Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra disks.
+ Tier *string `json:"tier,omitempty"`
+ // BurstingEnabled - Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks.
+ BurstingEnabled *bool `json:"burstingEnabled,omitempty"`
+ // PropertyUpdatesInProgress - READ-ONLY; Properties of the disk for which update is pending.
+ PropertyUpdatesInProgress *PropertyUpdatesInProgress `json:"propertyUpdatesInProgress,omitempty"`
+ // SupportsHibernation - Indicates the OS on a disk supports hibernation.
+ SupportsHibernation *bool `json:"supportsHibernation,omitempty"`
+ // SecurityProfile - Contains the security related information for the resource.
+ SecurityProfile *DiskSecurityProfile `json:"securityProfile,omitempty"`
+ // CompletionPercent - Percentage complete for the background copy when a resource is created via the CopyStart operation.
+ CompletionPercent *float64 `json:"completionPercent,omitempty"`
+ // PublicNetworkAccess - Possible values include: 'PublicNetworkAccessEnabled', 'PublicNetworkAccessDisabled'
+ PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for DiskProperties.
+func (dp DiskProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if dp.OsType != "" {
+ objectMap["osType"] = dp.OsType
+ }
+ if dp.HyperVGeneration != "" {
+ objectMap["hyperVGeneration"] = dp.HyperVGeneration
+ }
+ if dp.PurchasePlan != nil {
+ objectMap["purchasePlan"] = dp.PurchasePlan
+ }
+ if dp.SupportedCapabilities != nil {
+ objectMap["supportedCapabilities"] = dp.SupportedCapabilities
+ }
+ if dp.CreationData != nil {
+ objectMap["creationData"] = dp.CreationData
+ }
+ if dp.DiskSizeGB != nil {
+ objectMap["diskSizeGB"] = dp.DiskSizeGB
+ }
+ if dp.EncryptionSettingsCollection != nil {
+ objectMap["encryptionSettingsCollection"] = dp.EncryptionSettingsCollection
+ }
+ if dp.DiskIOPSReadWrite != nil {
+ objectMap["diskIOPSReadWrite"] = dp.DiskIOPSReadWrite
+ }
+ if dp.DiskMBpsReadWrite != nil {
+ objectMap["diskMBpsReadWrite"] = dp.DiskMBpsReadWrite
+ }
+ if dp.DiskIOPSReadOnly != nil {
+ objectMap["diskIOPSReadOnly"] = dp.DiskIOPSReadOnly
+ }
+ if dp.DiskMBpsReadOnly != nil {
+ objectMap["diskMBpsReadOnly"] = dp.DiskMBpsReadOnly
+ }
+ if dp.DiskState != "" {
+ objectMap["diskState"] = dp.DiskState
+ }
+ if dp.Encryption != nil {
+ objectMap["encryption"] = dp.Encryption
+ }
+ if dp.MaxShares != nil {
+ objectMap["maxShares"] = dp.MaxShares
+ }
+ if dp.NetworkAccessPolicy != "" {
+ objectMap["networkAccessPolicy"] = dp.NetworkAccessPolicy
+ }
+ if dp.DiskAccessID != nil {
+ objectMap["diskAccessId"] = dp.DiskAccessID
+ }
+ if dp.Tier != nil {
+ objectMap["tier"] = dp.Tier
+ }
+ if dp.BurstingEnabled != nil {
+ objectMap["burstingEnabled"] = dp.BurstingEnabled
+ }
+ if dp.SupportsHibernation != nil {
+ objectMap["supportsHibernation"] = dp.SupportsHibernation
+ }
+ if dp.SecurityProfile != nil {
+ objectMap["securityProfile"] = dp.SecurityProfile
+ }
+ if dp.CompletionPercent != nil {
+ objectMap["completionPercent"] = dp.CompletionPercent
+ }
+ if dp.PublicNetworkAccess != "" {
+ objectMap["publicNetworkAccess"] = dp.PublicNetworkAccess
+ }
+ return json.Marshal(objectMap)
+}
+
+// DiskRestorePoint properties of disk restore point
+type DiskRestorePoint struct {
+ autorest.Response `json:"-"`
+ *DiskRestorePointProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for DiskRestorePoint.
+func (drp DiskRestorePoint) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if drp.DiskRestorePointProperties != nil {
+ objectMap["properties"] = drp.DiskRestorePointProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for DiskRestorePoint struct.
+func (drp *DiskRestorePoint) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var diskRestorePointProperties DiskRestorePointProperties
+ err = json.Unmarshal(*v, &diskRestorePointProperties)
+ if err != nil {
+ return err
+ }
+ drp.DiskRestorePointProperties = &diskRestorePointProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ drp.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ drp.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ drp.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// DiskRestorePointGrantAccessFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type DiskRestorePointGrantAccessFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(DiskRestorePointClient) (AccessURI, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DiskRestorePointGrantAccessFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DiskRestorePointGrantAccessFuture.Result.
+func (future *DiskRestorePointGrantAccessFuture) result(client DiskRestorePointClient) (au AccessURI, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskRestorePointGrantAccessFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ au.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.DiskRestorePointGrantAccessFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if au.Response.Response, err = future.GetResult(sender); err == nil && au.Response.Response.StatusCode != http.StatusNoContent {
+ au, err = client.GrantAccessResponder(au.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskRestorePointGrantAccessFuture", "Result", au.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// DiskRestorePointList the List Disk Restore Points operation response.
+type DiskRestorePointList struct {
+ autorest.Response `json:"-"`
+ // Value - A list of disk restore points.
+ Value *[]DiskRestorePoint `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of disk restore points. Call ListNext() with this to fetch the next page of disk restore points.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// DiskRestorePointListIterator provides access to a complete listing of DiskRestorePoint values.
+type DiskRestorePointListIterator struct {
+ i int
+ page DiskRestorePointListPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *DiskRestorePointListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskRestorePointListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *DiskRestorePointListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter DiskRestorePointListIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter DiskRestorePointListIterator) Response() DiskRestorePointList {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter DiskRestorePointListIterator) Value() DiskRestorePoint {
+ if !iter.page.NotDone() {
+ return DiskRestorePoint{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the DiskRestorePointListIterator type.
+func NewDiskRestorePointListIterator(page DiskRestorePointListPage) DiskRestorePointListIterator {
+ return DiskRestorePointListIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (drpl DiskRestorePointList) IsEmpty() bool {
+ return drpl.Value == nil || len(*drpl.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (drpl DiskRestorePointList) hasNextLink() bool {
+ return drpl.NextLink != nil && len(*drpl.NextLink) != 0
+}
+
+// diskRestorePointListPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (drpl DiskRestorePointList) diskRestorePointListPreparer(ctx context.Context) (*http.Request, error) {
+ if !drpl.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(drpl.NextLink)))
+}
+
+// DiskRestorePointListPage contains a page of DiskRestorePoint values.
+type DiskRestorePointListPage struct {
+ fn func(context.Context, DiskRestorePointList) (DiskRestorePointList, error)
+ drpl DiskRestorePointList
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *DiskRestorePointListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskRestorePointListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.drpl)
+ if err != nil {
+ return err
+ }
+ page.drpl = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *DiskRestorePointListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page DiskRestorePointListPage) NotDone() bool {
+ return !page.drpl.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page DiskRestorePointListPage) Response() DiskRestorePointList {
+ return page.drpl
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page DiskRestorePointListPage) Values() []DiskRestorePoint {
+ if page.drpl.IsEmpty() {
+ return nil
+ }
+ return *page.drpl.Value
+}
+
+// Creates a new instance of the DiskRestorePointListPage type.
+func NewDiskRestorePointListPage(cur DiskRestorePointList, getNextPage func(context.Context, DiskRestorePointList) (DiskRestorePointList, error)) DiskRestorePointListPage {
+ return DiskRestorePointListPage{
+ fn: getNextPage,
+ drpl: cur,
+ }
+}
+
+// DiskRestorePointProperties properties of an incremental disk restore point
+type DiskRestorePointProperties struct {
+ // TimeCreated - READ-ONLY; The timestamp of restorePoint creation
+ TimeCreated *date.Time `json:"timeCreated,omitempty"`
+ // SourceResourceID - READ-ONLY; arm id of source disk
+ SourceResourceID *string `json:"sourceResourceId,omitempty"`
+ // OsType - READ-ONLY; The Operating System type. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux'
+ OsType OperatingSystemTypes `json:"osType,omitempty"`
+ // HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'HyperVGenerationV1', 'HyperVGenerationV2'
+ HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"`
+ // PurchasePlan - Purchase plan information for the the image from which the OS disk was created.
+ PurchasePlan *PurchasePlan `json:"purchasePlan,omitempty"`
+ // SupportedCapabilities - List of supported capabilities (like accelerated networking) for the image from which the OS disk was created.
+ SupportedCapabilities *SupportedCapabilities `json:"supportedCapabilities,omitempty"`
+ // FamilyID - READ-ONLY; id of the backing snapshot's MIS family
+ FamilyID *string `json:"familyId,omitempty"`
+ // SourceUniqueID - READ-ONLY; unique incarnation id of the source disk
+ SourceUniqueID *string `json:"sourceUniqueId,omitempty"`
+ // Encryption - READ-ONLY; Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
+ Encryption *Encryption `json:"encryption,omitempty"`
+ // SupportsHibernation - Indicates the OS on a disk supports hibernation.
+ SupportsHibernation *bool `json:"supportsHibernation,omitempty"`
+ // NetworkAccessPolicy - Possible values include: 'NetworkAccessPolicyAllowAll', 'NetworkAccessPolicyAllowPrivate', 'NetworkAccessPolicyDenyAll'
+ NetworkAccessPolicy NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"`
+ // PublicNetworkAccess - Possible values include: 'PublicNetworkAccessEnabled', 'PublicNetworkAccessDisabled'
+ PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`
+ // DiskAccessID - ARM id of the DiskAccess resource for using private endpoints on disks.
+ DiskAccessID *string `json:"diskAccessId,omitempty"`
+ // CompletionPercent - Percentage complete for the background copy when a resource is created via the CopyStart operation.
+ CompletionPercent *float64 `json:"completionPercent,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for DiskRestorePointProperties.
+func (drpp DiskRestorePointProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if drpp.HyperVGeneration != "" {
+ objectMap["hyperVGeneration"] = drpp.HyperVGeneration
+ }
+ if drpp.PurchasePlan != nil {
+ objectMap["purchasePlan"] = drpp.PurchasePlan
+ }
+ if drpp.SupportedCapabilities != nil {
+ objectMap["supportedCapabilities"] = drpp.SupportedCapabilities
+ }
+ if drpp.SupportsHibernation != nil {
+ objectMap["supportsHibernation"] = drpp.SupportsHibernation
+ }
+ if drpp.NetworkAccessPolicy != "" {
+ objectMap["networkAccessPolicy"] = drpp.NetworkAccessPolicy
+ }
+ if drpp.PublicNetworkAccess != "" {
+ objectMap["publicNetworkAccess"] = drpp.PublicNetworkAccess
+ }
+ if drpp.DiskAccessID != nil {
+ objectMap["diskAccessId"] = drpp.DiskAccessID
+ }
+ if drpp.CompletionPercent != nil {
+ objectMap["completionPercent"] = drpp.CompletionPercent
+ }
+ return json.Marshal(objectMap)
+}
+
+// DiskRestorePointRevokeAccessFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type DiskRestorePointRevokeAccessFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(DiskRestorePointClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DiskRestorePointRevokeAccessFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DiskRestorePointRevokeAccessFuture.Result.
+func (future *DiskRestorePointRevokeAccessFuture) result(client DiskRestorePointClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DiskRestorePointRevokeAccessFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.DiskRestorePointRevokeAccessFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// DisksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type DisksCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(DisksClient) (Disk, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DisksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DisksCreateOrUpdateFuture.Result.
+func (future *DisksCreateOrUpdateFuture) result(client DisksClient) (d Disk, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ d.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.DisksCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
+ d, err = client.CreateOrUpdateResponder(d.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksCreateOrUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// DisksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type DisksDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(DisksClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DisksDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DisksDeleteFuture.Result.
+func (future *DisksDeleteFuture) result(client DisksClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.DisksDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// DiskSecurityProfile contains the security related information for the resource.
+type DiskSecurityProfile struct {
+ // SecurityType - Possible values include: 'DiskSecurityTypesTrustedLaunch'
+ SecurityType DiskSecurityTypes `json:"securityType,omitempty"`
+}
+
+// DisksGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type DisksGrantAccessFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(DisksClient) (AccessURI, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DisksGrantAccessFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DisksGrantAccessFuture.Result.
+func (future *DisksGrantAccessFuture) result(client DisksClient) (au AccessURI, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ au.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.DisksGrantAccessFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if au.Response.Response, err = future.GetResult(sender); err == nil && au.Response.Response.StatusCode != http.StatusNoContent {
+ au, err = client.GrantAccessResponder(au.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksGrantAccessFuture", "Result", au.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// DiskSku the disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS,
+// Premium_ZRS, or StandardSSD_ZRS.
+type DiskSku struct {
+ // Name - The sku name. Possible values include: 'DiskStorageAccountTypesStandardLRS', 'DiskStorageAccountTypesPremiumLRS', 'DiskStorageAccountTypesStandardSSDLRS', 'DiskStorageAccountTypesUltraSSDLRS', 'DiskStorageAccountTypesPremiumZRS', 'DiskStorageAccountTypesStandardSSDZRS'
+ Name DiskStorageAccountTypes `json:"name,omitempty"`
+ // Tier - READ-ONLY; The sku tier.
+ Tier *string `json:"tier,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for DiskSku.
+func (ds DiskSku) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ds.Name != "" {
+ objectMap["name"] = ds.Name
+ }
+ return json.Marshal(objectMap)
+}
+
+// DisksRevokeAccessFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type DisksRevokeAccessFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(DisksClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DisksRevokeAccessFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DisksRevokeAccessFuture.Result.
+func (future *DisksRevokeAccessFuture) result(client DisksClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksRevokeAccessFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.DisksRevokeAccessFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// DisksUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type DisksUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(DisksClient) (Disk, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *DisksUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for DisksUpdateFuture.Result.
+func (future *DisksUpdateFuture) result(client DisksClient) (d Disk, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ d.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.DisksUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if d.Response.Response, err = future.GetResult(sender); err == nil && d.Response.Response.StatusCode != http.StatusNoContent {
+ d, err = client.UpdateResponder(d.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.DisksUpdateFuture", "Result", d.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// DiskUpdate disk update resource.
+type DiskUpdate struct {
+ *DiskUpdateProperties `json:"properties,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+ Sku *DiskSku `json:"sku,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for DiskUpdate.
+func (du DiskUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if du.DiskUpdateProperties != nil {
+ objectMap["properties"] = du.DiskUpdateProperties
+ }
+ if du.Tags != nil {
+ objectMap["tags"] = du.Tags
+ }
+ if du.Sku != nil {
+ objectMap["sku"] = du.Sku
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for DiskUpdate struct.
+func (du *DiskUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var diskUpdateProperties DiskUpdateProperties
+ err = json.Unmarshal(*v, &diskUpdateProperties)
+ if err != nil {
+ return err
+ }
+ du.DiskUpdateProperties = &diskUpdateProperties
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ du.Tags = tags
+ }
+ case "sku":
+ if v != nil {
+ var sku DiskSku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ du.Sku = &sku
+ }
+ }
+ }
+
+ return nil
+}
+
+// DiskUpdateProperties disk resource update properties.
+type DiskUpdateProperties struct {
+ // OsType - the Operating System type. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux'
+ OsType OperatingSystemTypes `json:"osType,omitempty"`
+ // DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
+ DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
+ // EncryptionSettingsCollection - Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
+ EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`
+ // DiskIOPSReadWrite - The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes.
+ DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"`
+ // DiskMBpsReadWrite - The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.
+ DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"`
+ // DiskIOPSReadOnly - The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes.
+ DiskIOPSReadOnly *int64 `json:"diskIOPSReadOnly,omitempty"`
+ // DiskMBpsReadOnly - The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.
+ DiskMBpsReadOnly *int64 `json:"diskMBpsReadOnly,omitempty"`
+ // MaxShares - The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time.
+ MaxShares *int32 `json:"maxShares,omitempty"`
+ // Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
+ Encryption *Encryption `json:"encryption,omitempty"`
+ // NetworkAccessPolicy - Possible values include: 'NetworkAccessPolicyAllowAll', 'NetworkAccessPolicyAllowPrivate', 'NetworkAccessPolicyDenyAll'
+ NetworkAccessPolicy NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"`
+ // DiskAccessID - ARM id of the DiskAccess resource for using private endpoints on disks.
+ DiskAccessID *string `json:"diskAccessId,omitempty"`
+ // Tier - Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra disks.
+ Tier *string `json:"tier,omitempty"`
+ // BurstingEnabled - Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks.
+ BurstingEnabled *bool `json:"burstingEnabled,omitempty"`
+ // PurchasePlan - Purchase plan information to be added on the OS disk
+ PurchasePlan *PurchasePlan `json:"purchasePlan,omitempty"`
+ // SupportedCapabilities - List of supported capabilities (like accelerated networking) to be added on the OS disk.
+ SupportedCapabilities *SupportedCapabilities `json:"supportedCapabilities,omitempty"`
+ // PropertyUpdatesInProgress - READ-ONLY; Properties of the disk for which update is pending.
+ PropertyUpdatesInProgress *PropertyUpdatesInProgress `json:"propertyUpdatesInProgress,omitempty"`
+ // SupportsHibernation - Indicates the OS on a disk supports hibernation.
+ SupportsHibernation *bool `json:"supportsHibernation,omitempty"`
+ // PublicNetworkAccess - Possible values include: 'PublicNetworkAccessEnabled', 'PublicNetworkAccessDisabled'
+ PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for DiskUpdateProperties.
+func (dup DiskUpdateProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if dup.OsType != "" {
+ objectMap["osType"] = dup.OsType
+ }
+ if dup.DiskSizeGB != nil {
+ objectMap["diskSizeGB"] = dup.DiskSizeGB
+ }
+ if dup.EncryptionSettingsCollection != nil {
+ objectMap["encryptionSettingsCollection"] = dup.EncryptionSettingsCollection
+ }
+ if dup.DiskIOPSReadWrite != nil {
+ objectMap["diskIOPSReadWrite"] = dup.DiskIOPSReadWrite
+ }
+ if dup.DiskMBpsReadWrite != nil {
+ objectMap["diskMBpsReadWrite"] = dup.DiskMBpsReadWrite
+ }
+ if dup.DiskIOPSReadOnly != nil {
+ objectMap["diskIOPSReadOnly"] = dup.DiskIOPSReadOnly
+ }
+ if dup.DiskMBpsReadOnly != nil {
+ objectMap["diskMBpsReadOnly"] = dup.DiskMBpsReadOnly
+ }
+ if dup.MaxShares != nil {
+ objectMap["maxShares"] = dup.MaxShares
+ }
+ if dup.Encryption != nil {
+ objectMap["encryption"] = dup.Encryption
+ }
+ if dup.NetworkAccessPolicy != "" {
+ objectMap["networkAccessPolicy"] = dup.NetworkAccessPolicy
+ }
+ if dup.DiskAccessID != nil {
+ objectMap["diskAccessId"] = dup.DiskAccessID
+ }
+ if dup.Tier != nil {
+ objectMap["tier"] = dup.Tier
+ }
+ if dup.BurstingEnabled != nil {
+ objectMap["burstingEnabled"] = dup.BurstingEnabled
+ }
+ if dup.PurchasePlan != nil {
+ objectMap["purchasePlan"] = dup.PurchasePlan
+ }
+ if dup.SupportedCapabilities != nil {
+ objectMap["supportedCapabilities"] = dup.SupportedCapabilities
+ }
+ if dup.SupportsHibernation != nil {
+ objectMap["supportsHibernation"] = dup.SupportsHibernation
+ }
+ if dup.PublicNetworkAccess != "" {
+ objectMap["publicNetworkAccess"] = dup.PublicNetworkAccess
+ }
+ return json.Marshal(objectMap)
+}
+
+// Encryption encryption at rest settings for disk or snapshot
+type Encryption struct {
+ // DiskEncryptionSetID - ResourceId of the disk encryption set to use for enabling encryption at rest.
+ DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
+ // Type - Possible values include: 'EncryptionTypeEncryptionAtRestWithPlatformKey', 'EncryptionTypeEncryptionAtRestWithCustomerKey', 'EncryptionTypeEncryptionAtRestWithPlatformAndCustomerKeys'
+ Type EncryptionType `json:"type,omitempty"`
+}
+
+// EncryptionImages optional. Allows users to provide customer managed keys for encrypting the OS and data
+// disks in the gallery artifact.
+type EncryptionImages struct {
+ OsDiskImage *OSDiskImageEncryption `json:"osDiskImage,omitempty"`
+ // DataDiskImages - A list of encryption specifications for data disk images.
+ DataDiskImages *[]DataDiskImageEncryption `json:"dataDiskImages,omitempty"`
+}
+
+// EncryptionSetIdentity the managed identity for the disk encryption set. It should be given permission on
+// the key vault before it can be used to encrypt disks.
+type EncryptionSetIdentity struct {
+ // Type - The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is supported for new creations. Disk Encryption Sets can be updated with Identity type None during migration of subscription to a new Azure Active Directory tenant; it will cause the encrypted resources to lose access to the keys. Possible values include: 'DiskEncryptionSetIdentityTypeSystemAssigned', 'DiskEncryptionSetIdentityTypeNone'
+ Type DiskEncryptionSetIdentityType `json:"type,omitempty"`
+ // PrincipalID - READ-ONLY; The object id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-identity-principal-id header in the PUT request if the resource has a systemAssigned(implicit) identity
+ PrincipalID *string `json:"principalId,omitempty"`
+ // TenantID - READ-ONLY; The tenant id of the Managed Identity Resource. This will be sent to the RP from ARM via the x-ms-client-tenant-id header in the PUT request if the resource has a systemAssigned(implicit) identity
+ TenantID *string `json:"tenantId,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for EncryptionSetIdentity.
+func (esi EncryptionSetIdentity) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if esi.Type != "" {
+ objectMap["type"] = esi.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// EncryptionSetProperties ...
+type EncryptionSetProperties struct {
+ // EncryptionType - Possible values include: 'DiskEncryptionSetTypeEncryptionAtRestWithCustomerKey', 'DiskEncryptionSetTypeEncryptionAtRestWithPlatformAndCustomerKeys'
+ EncryptionType DiskEncryptionSetType `json:"encryptionType,omitempty"`
+ // ActiveKey - The key vault key which is currently used by this disk encryption set.
+ ActiveKey *KeyForDiskEncryptionSet `json:"activeKey,omitempty"`
+ // PreviousKeys - READ-ONLY; A readonly collection of key vault keys previously used by this disk encryption set while a key rotation is in progress. It will be empty if there is no ongoing key rotation.
+ PreviousKeys *[]KeyForDiskEncryptionSet `json:"previousKeys,omitempty"`
+ // ProvisioningState - READ-ONLY; The disk encryption set provisioning state.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // RotationToLatestKeyVersionEnabled - Set this flag to true to enable auto-updating of this disk encryption set to the latest key version.
+ RotationToLatestKeyVersionEnabled *bool `json:"rotationToLatestKeyVersionEnabled,omitempty"`
+ // LastKeyRotationTimestamp - READ-ONLY; The time when the active key of this disk encryption set was updated.
+ LastKeyRotationTimestamp *date.Time `json:"lastKeyRotationTimestamp,omitempty"`
+ // AutoKeyRotationError - READ-ONLY; The error that was encountered during auto-key rotation. If an error is present, then auto-key rotation will not be attempted until the error on this disk encryption set is fixed.
+ AutoKeyRotationError *APIError `json:"autoKeyRotationError,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for EncryptionSetProperties.
+func (esp EncryptionSetProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if esp.EncryptionType != "" {
+ objectMap["encryptionType"] = esp.EncryptionType
+ }
+ if esp.ActiveKey != nil {
+ objectMap["activeKey"] = esp.ActiveKey
+ }
+ if esp.RotationToLatestKeyVersionEnabled != nil {
+ objectMap["rotationToLatestKeyVersionEnabled"] = esp.RotationToLatestKeyVersionEnabled
+ }
+ return json.Marshal(objectMap)
+}
+
+// EncryptionSettingsCollection encryption settings for disk or snapshot
+type EncryptionSettingsCollection struct {
+ // Enabled - Set this flag to true and provide DiskEncryptionKey and optional KeyEncryptionKey to enable encryption. Set this flag to false and remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If EncryptionSettings is null in the request object, the existing settings remain unchanged.
+ Enabled *bool `json:"enabled,omitempty"`
+ // EncryptionSettings - A collection of encryption settings, one for each disk volume.
+ EncryptionSettings *[]EncryptionSettingsElement `json:"encryptionSettings,omitempty"`
+ // EncryptionSettingsVersion - Describes what type of encryption is used for the disks. Once this field is set, it cannot be overwritten. '1.0' corresponds to Azure Disk Encryption with AAD app.'1.1' corresponds to Azure Disk Encryption.
+ EncryptionSettingsVersion *string `json:"encryptionSettingsVersion,omitempty"`
+}
+
+// EncryptionSettingsElement encryption settings for one disk volume.
+type EncryptionSettingsElement struct {
+ // DiskEncryptionKey - Key Vault Secret Url and vault id of the disk encryption key
+ DiskEncryptionKey *KeyVaultAndSecretReference `json:"diskEncryptionKey,omitempty"`
+ // KeyEncryptionKey - Key Vault Key Url and vault id of the key encryption key. KeyEncryptionKey is optional and when provided is used to unwrap the disk encryption key.
+ KeyEncryptionKey *KeyVaultAndKeyReference `json:"keyEncryptionKey,omitempty"`
+}
+
+// ExtendedLocation the complex type of the extended location.
+type ExtendedLocation struct {
+ // Name - The name of the extended location.
+ Name *string `json:"name,omitempty"`
+ // Type - The type of the extended location. Possible values include: 'ExtendedLocationTypesEdgeZone'
+ Type ExtendedLocationTypes `json:"type,omitempty"`
+}
+
+// Extension describes a cloud service Extension.
+type Extension struct {
+ // Name - The name of the extension.
+ Name *string `json:"name,omitempty"`
+ Properties *CloudServiceExtensionProperties `json:"properties,omitempty"`
+}
+
+// GalleriesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type GalleriesCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(GalleriesClient) (Gallery, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GalleriesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GalleriesCreateOrUpdateFuture.Result.
+func (future *GalleriesCreateOrUpdateFuture) result(client GalleriesClient) (g Gallery, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ g.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.GalleriesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if g.Response.Response, err = future.GetResult(sender); err == nil && g.Response.Response.StatusCode != http.StatusNoContent {
+ g, err = client.CreateOrUpdateResponder(g.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesCreateOrUpdateFuture", "Result", g.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// GalleriesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type GalleriesDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(GalleriesClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GalleriesDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GalleriesDeleteFuture.Result.
+func (future *GalleriesDeleteFuture) result(client GalleriesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.GalleriesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// GalleriesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type GalleriesUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(GalleriesClient) (Gallery, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GalleriesUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GalleriesUpdateFuture.Result.
+func (future *GalleriesUpdateFuture) result(client GalleriesClient) (g Gallery, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ g.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.GalleriesUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if g.Response.Response, err = future.GetResult(sender); err == nil && g.Response.Response.StatusCode != http.StatusNoContent {
+ g, err = client.UpdateResponder(g.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleriesUpdateFuture", "Result", g.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// Gallery specifies information about the Shared Image Gallery that you want to create or update.
+type Gallery struct {
+ autorest.Response `json:"-"`
+ *GalleryProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for Gallery.
+func (g Gallery) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if g.GalleryProperties != nil {
+ objectMap["properties"] = g.GalleryProperties
+ }
+ if g.Location != nil {
+ objectMap["location"] = g.Location
+ }
+ if g.Tags != nil {
+ objectMap["tags"] = g.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Gallery struct.
+func (g *Gallery) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var galleryProperties GalleryProperties
+ err = json.Unmarshal(*v, &galleryProperties)
+ if err != nil {
+ return err
+ }
+ g.GalleryProperties = &galleryProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ g.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ g.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ g.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ g.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ g.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// GalleryApplication specifies information about the gallery Application Definition that you want to
+// create or update.
+type GalleryApplication struct {
+ autorest.Response `json:"-"`
+ *GalleryApplicationProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for GalleryApplication.
+func (ga GalleryApplication) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ga.GalleryApplicationProperties != nil {
+ objectMap["properties"] = ga.GalleryApplicationProperties
+ }
+ if ga.Location != nil {
+ objectMap["location"] = ga.Location
+ }
+ if ga.Tags != nil {
+ objectMap["tags"] = ga.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for GalleryApplication struct.
+func (ga *GalleryApplication) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var galleryApplicationProperties GalleryApplicationProperties
+ err = json.Unmarshal(*v, &galleryApplicationProperties)
+ if err != nil {
+ return err
+ }
+ ga.GalleryApplicationProperties = &galleryApplicationProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ ga.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ga.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ ga.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ ga.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ ga.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// GalleryApplicationList the List Gallery Applications operation response.
+type GalleryApplicationList struct {
+ autorest.Response `json:"-"`
+ // Value - A list of Gallery Applications.
+ Value *[]GalleryApplication `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of Application Definitions in the Application Gallery. Call ListNext() with this to fetch the next page of gallery Application Definitions.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// GalleryApplicationListIterator provides access to a complete listing of GalleryApplication values.
+type GalleryApplicationListIterator struct {
+ i int
+ page GalleryApplicationListPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *GalleryApplicationListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *GalleryApplicationListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter GalleryApplicationListIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter GalleryApplicationListIterator) Response() GalleryApplicationList {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter GalleryApplicationListIterator) Value() GalleryApplication {
+ if !iter.page.NotDone() {
+ return GalleryApplication{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the GalleryApplicationListIterator type.
+func NewGalleryApplicationListIterator(page GalleryApplicationListPage) GalleryApplicationListIterator {
+ return GalleryApplicationListIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (gal GalleryApplicationList) IsEmpty() bool {
+ return gal.Value == nil || len(*gal.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (gal GalleryApplicationList) hasNextLink() bool {
+ return gal.NextLink != nil && len(*gal.NextLink) != 0
+}
+
+// galleryApplicationListPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (gal GalleryApplicationList) galleryApplicationListPreparer(ctx context.Context) (*http.Request, error) {
+ if !gal.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(gal.NextLink)))
+}
+
+// GalleryApplicationListPage contains a page of GalleryApplication values.
+type GalleryApplicationListPage struct {
+ fn func(context.Context, GalleryApplicationList) (GalleryApplicationList, error)
+ gal GalleryApplicationList
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *GalleryApplicationListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.gal)
+ if err != nil {
+ return err
+ }
+ page.gal = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *GalleryApplicationListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page GalleryApplicationListPage) NotDone() bool {
+ return !page.gal.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page GalleryApplicationListPage) Response() GalleryApplicationList {
+ return page.gal
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page GalleryApplicationListPage) Values() []GalleryApplication {
+ if page.gal.IsEmpty() {
+ return nil
+ }
+ return *page.gal.Value
+}
+
+// Creates a new instance of the GalleryApplicationListPage type.
+func NewGalleryApplicationListPage(cur GalleryApplicationList, getNextPage func(context.Context, GalleryApplicationList) (GalleryApplicationList, error)) GalleryApplicationListPage {
+ return GalleryApplicationListPage{
+ fn: getNextPage,
+ gal: cur,
+ }
+}
+
+// GalleryApplicationProperties describes the properties of a gallery Application Definition.
+type GalleryApplicationProperties struct {
+ // Description - The description of this gallery Application Definition resource. This property is updatable.
+ Description *string `json:"description,omitempty"`
+ // Eula - The Eula agreement for the gallery Application Definition.
+ Eula *string `json:"eula,omitempty"`
+ // PrivacyStatementURI - The privacy statement uri.
+ PrivacyStatementURI *string `json:"privacyStatementUri,omitempty"`
+ // ReleaseNoteURI - The release note uri.
+ ReleaseNoteURI *string `json:"releaseNoteUri,omitempty"`
+ // EndOfLifeDate - The end of life date of the gallery Application Definition. This property can be used for decommissioning purposes. This property is updatable.
+ EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
+ // SupportedOSType - This property allows you to specify the supported type of the OS that application is built for.
Possible values are:
**Windows**
**Linux**. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux'
+ SupportedOSType OperatingSystemTypes `json:"supportedOSType,omitempty"`
+}
+
+// GalleryApplicationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type GalleryApplicationsCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(GalleryApplicationsClient) (GalleryApplication, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GalleryApplicationsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GalleryApplicationsCreateOrUpdateFuture.Result.
+func (future *GalleryApplicationsCreateOrUpdateFuture) result(client GalleryApplicationsClient) (ga GalleryApplication, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ga.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ga.Response.Response, err = future.GetResult(sender); err == nil && ga.Response.Response.StatusCode != http.StatusNoContent {
+ ga, err = client.CreateOrUpdateResponder(ga.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsCreateOrUpdateFuture", "Result", ga.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// GalleryApplicationsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type GalleryApplicationsDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(GalleryApplicationsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GalleryApplicationsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GalleryApplicationsDeleteFuture.Result.
+func (future *GalleryApplicationsDeleteFuture) result(client GalleryApplicationsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// GalleryApplicationsUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type GalleryApplicationsUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(GalleryApplicationsClient) (GalleryApplication, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GalleryApplicationsUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GalleryApplicationsUpdateFuture.Result.
+func (future *GalleryApplicationsUpdateFuture) result(client GalleryApplicationsClient) (ga GalleryApplication, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ga.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ga.Response.Response, err = future.GetResult(sender); err == nil && ga.Response.Response.StatusCode != http.StatusNoContent {
+ ga, err = client.UpdateResponder(ga.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationsUpdateFuture", "Result", ga.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// GalleryApplicationUpdate specifies information about the gallery Application Definition that you want to
+// update.
+type GalleryApplicationUpdate struct {
+ *GalleryApplicationProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for GalleryApplicationUpdate.
+func (gau GalleryApplicationUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if gau.GalleryApplicationProperties != nil {
+ objectMap["properties"] = gau.GalleryApplicationProperties
+ }
+ if gau.Tags != nil {
+ objectMap["tags"] = gau.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for GalleryApplicationUpdate struct.
+func (gau *GalleryApplicationUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var galleryApplicationProperties GalleryApplicationProperties
+ err = json.Unmarshal(*v, &galleryApplicationProperties)
+ if err != nil {
+ return err
+ }
+ gau.GalleryApplicationProperties = &galleryApplicationProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ gau.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ gau.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ gau.Type = &typeVar
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ gau.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// GalleryApplicationVersion specifies information about the gallery Application Version that you want to
+// create or update.
+type GalleryApplicationVersion struct {
+ autorest.Response `json:"-"`
+ *GalleryApplicationVersionProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for GalleryApplicationVersion.
+func (gav GalleryApplicationVersion) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if gav.GalleryApplicationVersionProperties != nil {
+ objectMap["properties"] = gav.GalleryApplicationVersionProperties
+ }
+ if gav.Location != nil {
+ objectMap["location"] = gav.Location
+ }
+ if gav.Tags != nil {
+ objectMap["tags"] = gav.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for GalleryApplicationVersion struct.
+func (gav *GalleryApplicationVersion) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var galleryApplicationVersionProperties GalleryApplicationVersionProperties
+ err = json.Unmarshal(*v, &galleryApplicationVersionProperties)
+ if err != nil {
+ return err
+ }
+ gav.GalleryApplicationVersionProperties = &galleryApplicationVersionProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ gav.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ gav.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ gav.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ gav.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ gav.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// GalleryApplicationVersionList the List Gallery Application version operation response.
+type GalleryApplicationVersionList struct {
+ autorest.Response `json:"-"`
+ // Value - A list of gallery Application Versions.
+ Value *[]GalleryApplicationVersion `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of gallery Application Versions. Call ListNext() with this to fetch the next page of gallery Application Versions.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// GalleryApplicationVersionListIterator provides access to a complete listing of GalleryApplicationVersion
+// values.
+type GalleryApplicationVersionListIterator struct {
+ i int
+ page GalleryApplicationVersionListPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *GalleryApplicationVersionListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *GalleryApplicationVersionListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter GalleryApplicationVersionListIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter GalleryApplicationVersionListIterator) Response() GalleryApplicationVersionList {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter GalleryApplicationVersionListIterator) Value() GalleryApplicationVersion {
+ if !iter.page.NotDone() {
+ return GalleryApplicationVersion{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the GalleryApplicationVersionListIterator type.
+func NewGalleryApplicationVersionListIterator(page GalleryApplicationVersionListPage) GalleryApplicationVersionListIterator {
+ return GalleryApplicationVersionListIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (gavl GalleryApplicationVersionList) IsEmpty() bool {
+ return gavl.Value == nil || len(*gavl.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (gavl GalleryApplicationVersionList) hasNextLink() bool {
+ return gavl.NextLink != nil && len(*gavl.NextLink) != 0
+}
+
+// galleryApplicationVersionListPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (gavl GalleryApplicationVersionList) galleryApplicationVersionListPreparer(ctx context.Context) (*http.Request, error) {
+ if !gavl.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(gavl.NextLink)))
+}
+
+// GalleryApplicationVersionListPage contains a page of GalleryApplicationVersion values.
+type GalleryApplicationVersionListPage struct {
+ fn func(context.Context, GalleryApplicationVersionList) (GalleryApplicationVersionList, error)
+ gavl GalleryApplicationVersionList
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *GalleryApplicationVersionListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryApplicationVersionListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.gavl)
+ if err != nil {
+ return err
+ }
+ page.gavl = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *GalleryApplicationVersionListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page GalleryApplicationVersionListPage) NotDone() bool {
+ return !page.gavl.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page GalleryApplicationVersionListPage) Response() GalleryApplicationVersionList {
+ return page.gavl
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page GalleryApplicationVersionListPage) Values() []GalleryApplicationVersion {
+ if page.gavl.IsEmpty() {
+ return nil
+ }
+ return *page.gavl.Value
+}
+
+// Creates a new instance of the GalleryApplicationVersionListPage type.
+func NewGalleryApplicationVersionListPage(cur GalleryApplicationVersionList, getNextPage func(context.Context, GalleryApplicationVersionList) (GalleryApplicationVersionList, error)) GalleryApplicationVersionListPage {
+ return GalleryApplicationVersionListPage{
+ fn: getNextPage,
+ gavl: cur,
+ }
+}
+
+// GalleryApplicationVersionProperties describes the properties of a gallery image version.
+type GalleryApplicationVersionProperties struct {
+ PublishingProfile *GalleryApplicationVersionPublishingProfile `json:"publishingProfile,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningState1Creating', 'ProvisioningState1Updating', 'ProvisioningState1Failed', 'ProvisioningState1Succeeded', 'ProvisioningState1Deleting', 'ProvisioningState1Migrating'
+ ProvisioningState ProvisioningState1 `json:"provisioningState,omitempty"`
+ // ReplicationStatus - READ-ONLY
+ ReplicationStatus *ReplicationStatus `json:"replicationStatus,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for GalleryApplicationVersionProperties.
+func (gavp GalleryApplicationVersionProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if gavp.PublishingProfile != nil {
+ objectMap["publishingProfile"] = gavp.PublishingProfile
+ }
+ return json.Marshal(objectMap)
+}
+
+// GalleryApplicationVersionPublishingProfile the publishing profile of a gallery image version.
+type GalleryApplicationVersionPublishingProfile struct {
+ Source *UserArtifactSource `json:"source,omitempty"`
+ ManageActions *UserArtifactManage `json:"manageActions,omitempty"`
+ // EnableHealthCheck - Optional. Whether or not this application reports health.
+ EnableHealthCheck *bool `json:"enableHealthCheck,omitempty"`
+ // TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable.
+ TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"`
+ // ReplicaCount - The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable.
+ ReplicaCount *int32 `json:"replicaCount,omitempty"`
+ // ExcludeFromLatest - If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
+ ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"`
+ // PublishedDate - READ-ONLY; The timestamp for when the gallery image version is published.
+ PublishedDate *date.Time `json:"publishedDate,omitempty"`
+ // EndOfLifeDate - The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property is updatable.
+ EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
+ // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS'
+ StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
+ // ReplicationMode - Optional parameter which specifies the mode to be used for replication. This property is not updatable. Possible values include: 'ReplicationModeFull', 'ReplicationModeShallow'
+ ReplicationMode ReplicationMode `json:"replicationMode,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for GalleryApplicationVersionPublishingProfile.
+func (gavpp GalleryApplicationVersionPublishingProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if gavpp.Source != nil {
+ objectMap["source"] = gavpp.Source
+ }
+ if gavpp.ManageActions != nil {
+ objectMap["manageActions"] = gavpp.ManageActions
+ }
+ if gavpp.EnableHealthCheck != nil {
+ objectMap["enableHealthCheck"] = gavpp.EnableHealthCheck
+ }
+ if gavpp.TargetRegions != nil {
+ objectMap["targetRegions"] = gavpp.TargetRegions
+ }
+ if gavpp.ReplicaCount != nil {
+ objectMap["replicaCount"] = gavpp.ReplicaCount
+ }
+ if gavpp.ExcludeFromLatest != nil {
+ objectMap["excludeFromLatest"] = gavpp.ExcludeFromLatest
+ }
+ if gavpp.EndOfLifeDate != nil {
+ objectMap["endOfLifeDate"] = gavpp.EndOfLifeDate
+ }
+ if gavpp.StorageAccountType != "" {
+ objectMap["storageAccountType"] = gavpp.StorageAccountType
+ }
+ if gavpp.ReplicationMode != "" {
+ objectMap["replicationMode"] = gavpp.ReplicationMode
+ }
+ return json.Marshal(objectMap)
+}
+
+// GalleryApplicationVersionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
+type GalleryApplicationVersionsCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(GalleryApplicationVersionsClient) (GalleryApplicationVersion, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GalleryApplicationVersionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GalleryApplicationVersionsCreateOrUpdateFuture.Result.
+func (future *GalleryApplicationVersionsCreateOrUpdateFuture) result(client GalleryApplicationVersionsClient) (gav GalleryApplicationVersion, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ gav.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationVersionsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if gav.Response.Response, err = future.GetResult(sender); err == nil && gav.Response.Response.StatusCode != http.StatusNoContent {
+ gav, err = client.CreateOrUpdateResponder(gav.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsCreateOrUpdateFuture", "Result", gav.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// GalleryApplicationVersionsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type GalleryApplicationVersionsDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(GalleryApplicationVersionsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GalleryApplicationVersionsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GalleryApplicationVersionsDeleteFuture.Result.
+func (future *GalleryApplicationVersionsDeleteFuture) result(client GalleryApplicationVersionsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationVersionsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// GalleryApplicationVersionsUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type GalleryApplicationVersionsUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(GalleryApplicationVersionsClient) (GalleryApplicationVersion, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GalleryApplicationVersionsUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GalleryApplicationVersionsUpdateFuture.Result.
+func (future *GalleryApplicationVersionsUpdateFuture) result(client GalleryApplicationVersionsClient) (gav GalleryApplicationVersion, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ gav.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryApplicationVersionsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if gav.Response.Response, err = future.GetResult(sender); err == nil && gav.Response.Response.StatusCode != http.StatusNoContent {
+ gav, err = client.UpdateResponder(gav.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryApplicationVersionsUpdateFuture", "Result", gav.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// GalleryApplicationVersionUpdate specifies information about the gallery Application Version that you
+// want to update.
+type GalleryApplicationVersionUpdate struct {
+ *GalleryApplicationVersionProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for GalleryApplicationVersionUpdate.
+func (gavu GalleryApplicationVersionUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if gavu.GalleryApplicationVersionProperties != nil {
+ objectMap["properties"] = gavu.GalleryApplicationVersionProperties
+ }
+ if gavu.Tags != nil {
+ objectMap["tags"] = gavu.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for GalleryApplicationVersionUpdate struct.
+func (gavu *GalleryApplicationVersionUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var galleryApplicationVersionProperties GalleryApplicationVersionProperties
+ err = json.Unmarshal(*v, &galleryApplicationVersionProperties)
+ if err != nil {
+ return err
+ }
+ gavu.GalleryApplicationVersionProperties = &galleryApplicationVersionProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ gavu.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ gavu.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ gavu.Type = &typeVar
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ gavu.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// GalleryArtifactPublishingProfileBase describes the basic gallery artifact publishing profile.
+type GalleryArtifactPublishingProfileBase struct {
+ // TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable.
+ TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"`
+ // ReplicaCount - The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable.
+ ReplicaCount *int32 `json:"replicaCount,omitempty"`
+ // ExcludeFromLatest - If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
+ ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"`
+ // PublishedDate - READ-ONLY; The timestamp for when the gallery image version is published.
+ PublishedDate *date.Time `json:"publishedDate,omitempty"`
+ // EndOfLifeDate - The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property is updatable.
+ EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
+ // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS'
+ StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
+ // ReplicationMode - Optional parameter which specifies the mode to be used for replication. This property is not updatable. Possible values include: 'ReplicationModeFull', 'ReplicationModeShallow'
+ ReplicationMode ReplicationMode `json:"replicationMode,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for GalleryArtifactPublishingProfileBase.
+func (gappb GalleryArtifactPublishingProfileBase) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if gappb.TargetRegions != nil {
+ objectMap["targetRegions"] = gappb.TargetRegions
+ }
+ if gappb.ReplicaCount != nil {
+ objectMap["replicaCount"] = gappb.ReplicaCount
+ }
+ if gappb.ExcludeFromLatest != nil {
+ objectMap["excludeFromLatest"] = gappb.ExcludeFromLatest
+ }
+ if gappb.EndOfLifeDate != nil {
+ objectMap["endOfLifeDate"] = gappb.EndOfLifeDate
+ }
+ if gappb.StorageAccountType != "" {
+ objectMap["storageAccountType"] = gappb.StorageAccountType
+ }
+ if gappb.ReplicationMode != "" {
+ objectMap["replicationMode"] = gappb.ReplicationMode
+ }
+ return json.Marshal(objectMap)
+}
+
+// GalleryArtifactSource the source image from which the Image Version is going to be created.
+type GalleryArtifactSource struct {
+ ManagedImage *ManagedArtifact `json:"managedImage,omitempty"`
+}
+
+// GalleryArtifactVersionSource the gallery artifact version source.
+type GalleryArtifactVersionSource struct {
+ // ID - The id of the gallery artifact version source. Can specify a disk uri, snapshot uri, user image or storage account resource.
+ ID *string `json:"id,omitempty"`
+ // URI - The uri of the gallery artifact version source. Currently used to specify vhd/blob source.
+ URI *string `json:"uri,omitempty"`
+}
+
+// GalleryDataDiskImage this is the data disk image.
+type GalleryDataDiskImage struct {
+ // Lun - This property specifies the logical unit number of the data disk. This value is used to identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the Virtual Machine.
+ Lun *int32 `json:"lun,omitempty"`
+ // SizeInGB - READ-ONLY; This property indicates the size of the VHD to be created.
+ SizeInGB *int32 `json:"sizeInGB,omitempty"`
+ // HostCaching - The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'HostCachingNone', 'HostCachingReadOnly', 'HostCachingReadWrite'
+ HostCaching HostCaching `json:"hostCaching,omitempty"`
+ Source *GalleryArtifactVersionSource `json:"source,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for GalleryDataDiskImage.
+func (gddi GalleryDataDiskImage) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if gddi.Lun != nil {
+ objectMap["lun"] = gddi.Lun
+ }
+ if gddi.HostCaching != "" {
+ objectMap["hostCaching"] = gddi.HostCaching
+ }
+ if gddi.Source != nil {
+ objectMap["source"] = gddi.Source
+ }
+ return json.Marshal(objectMap)
+}
+
+// GalleryDiskImage this is the disk image base class.
+type GalleryDiskImage struct {
+ // SizeInGB - READ-ONLY; This property indicates the size of the VHD to be created.
+ SizeInGB *int32 `json:"sizeInGB,omitempty"`
+ // HostCaching - The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'HostCachingNone', 'HostCachingReadOnly', 'HostCachingReadWrite'
+ HostCaching HostCaching `json:"hostCaching,omitempty"`
+ Source *GalleryArtifactVersionSource `json:"source,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for GalleryDiskImage.
+func (gdi GalleryDiskImage) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if gdi.HostCaching != "" {
+ objectMap["hostCaching"] = gdi.HostCaching
+ }
+ if gdi.Source != nil {
+ objectMap["source"] = gdi.Source
+ }
+ return json.Marshal(objectMap)
+}
+
+// GalleryIdentifier describes the gallery unique name.
+type GalleryIdentifier struct {
+ // UniqueName - READ-ONLY; The unique name of the Shared Image Gallery. This name is generated automatically by Azure.
+ UniqueName *string `json:"uniqueName,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for GalleryIdentifier.
+func (gi GalleryIdentifier) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// GalleryImage specifies information about the gallery image definition that you want to create or update.
+type GalleryImage struct {
+ autorest.Response `json:"-"`
+ *GalleryImageProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for GalleryImage.
+func (gi GalleryImage) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if gi.GalleryImageProperties != nil {
+ objectMap["properties"] = gi.GalleryImageProperties
+ }
+ if gi.Location != nil {
+ objectMap["location"] = gi.Location
+ }
+ if gi.Tags != nil {
+ objectMap["tags"] = gi.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for GalleryImage struct.
+func (gi *GalleryImage) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var galleryImageProperties GalleryImageProperties
+ err = json.Unmarshal(*v, &galleryImageProperties)
+ if err != nil {
+ return err
+ }
+ gi.GalleryImageProperties = &galleryImageProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ gi.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ gi.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ gi.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ gi.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ gi.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// GalleryImageFeature a feature for gallery image.
+type GalleryImageFeature struct {
+ // Name - The name of the gallery image feature.
+ Name *string `json:"name,omitempty"`
+ // Value - The value of the gallery image feature.
+ Value *string `json:"value,omitempty"`
+}
+
+// GalleryImageIdentifier this is the gallery image definition identifier.
+type GalleryImageIdentifier struct {
+ // Publisher - The name of the gallery image definition publisher.
+ Publisher *string `json:"publisher,omitempty"`
+ // Offer - The name of the gallery image definition offer.
+ Offer *string `json:"offer,omitempty"`
+ // Sku - The name of the gallery image definition SKU.
+ Sku *string `json:"sku,omitempty"`
+}
+
+// GalleryImageList the List Gallery Images operation response.
+type GalleryImageList struct {
+ autorest.Response `json:"-"`
+ // Value - A list of Shared Image Gallery images.
+ Value *[]GalleryImage `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of Image Definitions in the Shared Image Gallery. Call ListNext() with this to fetch the next page of gallery image definitions.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// GalleryImageListIterator provides access to a complete listing of GalleryImage values.
+type GalleryImageListIterator struct {
+ i int
+ page GalleryImageListPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *GalleryImageListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *GalleryImageListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter GalleryImageListIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter GalleryImageListIterator) Response() GalleryImageList {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter GalleryImageListIterator) Value() GalleryImage {
+ if !iter.page.NotDone() {
+ return GalleryImage{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the GalleryImageListIterator type.
+func NewGalleryImageListIterator(page GalleryImageListPage) GalleryImageListIterator {
+ return GalleryImageListIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (gil GalleryImageList) IsEmpty() bool {
+ return gil.Value == nil || len(*gil.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (gil GalleryImageList) hasNextLink() bool {
+ return gil.NextLink != nil && len(*gil.NextLink) != 0
+}
+
+// galleryImageListPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (gil GalleryImageList) galleryImageListPreparer(ctx context.Context) (*http.Request, error) {
+ if !gil.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(gil.NextLink)))
+}
+
+// GalleryImageListPage contains a page of GalleryImage values.
+type GalleryImageListPage struct {
+ fn func(context.Context, GalleryImageList) (GalleryImageList, error)
+ gil GalleryImageList
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *GalleryImageListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.gil)
+ if err != nil {
+ return err
+ }
+ page.gil = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *GalleryImageListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page GalleryImageListPage) NotDone() bool {
+ return !page.gil.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page GalleryImageListPage) Response() GalleryImageList {
+ return page.gil
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page GalleryImageListPage) Values() []GalleryImage {
+ if page.gil.IsEmpty() {
+ return nil
+ }
+ return *page.gil.Value
+}
+
+// Creates a new instance of the GalleryImageListPage type.
+func NewGalleryImageListPage(cur GalleryImageList, getNextPage func(context.Context, GalleryImageList) (GalleryImageList, error)) GalleryImageListPage {
+ return GalleryImageListPage{
+ fn: getNextPage,
+ gil: cur,
+ }
+}
+
+// GalleryImageProperties describes the properties of a gallery image definition.
+type GalleryImageProperties struct {
+ // Description - The description of this gallery image definition resource. This property is updatable.
+ Description *string `json:"description,omitempty"`
+ // Eula - The Eula agreement for the gallery image definition.
+ Eula *string `json:"eula,omitempty"`
+ // PrivacyStatementURI - The privacy statement uri.
+ PrivacyStatementURI *string `json:"privacyStatementUri,omitempty"`
+ // ReleaseNoteURI - The release note uri.
+ ReleaseNoteURI *string `json:"releaseNoteUri,omitempty"`
+ // OsType - This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image.
Possible values are:
**Windows**
**Linux**. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux'
+ OsType OperatingSystemTypes `json:"osType,omitempty"`
+ // OsState - This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. Possible values include: 'OperatingSystemStateTypesGeneralized', 'OperatingSystemStateTypesSpecialized'
+ OsState OperatingSystemStateTypes `json:"osState,omitempty"`
+ // HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'HyperVGenerationV1', 'HyperVGenerationV2'
+ HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"`
+ // EndOfLifeDate - The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property is updatable.
+ EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
+ Identifier *GalleryImageIdentifier `json:"identifier,omitempty"`
+ Recommended *RecommendedMachineConfiguration `json:"recommended,omitempty"`
+ Disallowed *Disallowed `json:"disallowed,omitempty"`
+ PurchasePlan *ImagePurchasePlan `json:"purchasePlan,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningState2Creating', 'ProvisioningState2Updating', 'ProvisioningState2Failed', 'ProvisioningState2Succeeded', 'ProvisioningState2Deleting', 'ProvisioningState2Migrating'
+ ProvisioningState ProvisioningState2 `json:"provisioningState,omitempty"`
+ // Features - A list of gallery image features.
+ Features *[]GalleryImageFeature `json:"features,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for GalleryImageProperties.
+func (gip GalleryImageProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if gip.Description != nil {
+ objectMap["description"] = gip.Description
+ }
+ if gip.Eula != nil {
+ objectMap["eula"] = gip.Eula
+ }
+ if gip.PrivacyStatementURI != nil {
+ objectMap["privacyStatementUri"] = gip.PrivacyStatementURI
+ }
+ if gip.ReleaseNoteURI != nil {
+ objectMap["releaseNoteUri"] = gip.ReleaseNoteURI
+ }
+ if gip.OsType != "" {
+ objectMap["osType"] = gip.OsType
+ }
+ if gip.OsState != "" {
+ objectMap["osState"] = gip.OsState
+ }
+ if gip.HyperVGeneration != "" {
+ objectMap["hyperVGeneration"] = gip.HyperVGeneration
+ }
+ if gip.EndOfLifeDate != nil {
+ objectMap["endOfLifeDate"] = gip.EndOfLifeDate
+ }
+ if gip.Identifier != nil {
+ objectMap["identifier"] = gip.Identifier
+ }
+ if gip.Recommended != nil {
+ objectMap["recommended"] = gip.Recommended
+ }
+ if gip.Disallowed != nil {
+ objectMap["disallowed"] = gip.Disallowed
+ }
+ if gip.PurchasePlan != nil {
+ objectMap["purchasePlan"] = gip.PurchasePlan
+ }
+ if gip.Features != nil {
+ objectMap["features"] = gip.Features
+ }
+ return json.Marshal(objectMap)
+}
+
+// GalleryImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type GalleryImagesCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(GalleryImagesClient) (GalleryImage, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GalleryImagesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GalleryImagesCreateOrUpdateFuture.Result.
+func (future *GalleryImagesCreateOrUpdateFuture) result(client GalleryImagesClient) (gi GalleryImage, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ gi.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if gi.Response.Response, err = future.GetResult(sender); err == nil && gi.Response.Response.StatusCode != http.StatusNoContent {
+ gi, err = client.CreateOrUpdateResponder(gi.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesCreateOrUpdateFuture", "Result", gi.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// GalleryImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type GalleryImagesDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(GalleryImagesClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GalleryImagesDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GalleryImagesDeleteFuture.Result.
+func (future *GalleryImagesDeleteFuture) result(client GalleryImagesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// GalleryImagesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type GalleryImagesUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(GalleryImagesClient) (GalleryImage, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GalleryImagesUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GalleryImagesUpdateFuture.Result.
+func (future *GalleryImagesUpdateFuture) result(client GalleryImagesClient) (gi GalleryImage, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ gi.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryImagesUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if gi.Response.Response, err = future.GetResult(sender); err == nil && gi.Response.Response.StatusCode != http.StatusNoContent {
+ gi, err = client.UpdateResponder(gi.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImagesUpdateFuture", "Result", gi.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// GalleryImageUpdate specifies information about the gallery image definition that you want to update.
+type GalleryImageUpdate struct {
+ *GalleryImageProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for GalleryImageUpdate.
+func (giu GalleryImageUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if giu.GalleryImageProperties != nil {
+ objectMap["properties"] = giu.GalleryImageProperties
+ }
+ if giu.Tags != nil {
+ objectMap["tags"] = giu.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for GalleryImageUpdate struct.
+func (giu *GalleryImageUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var galleryImageProperties GalleryImageProperties
+ err = json.Unmarshal(*v, &galleryImageProperties)
+ if err != nil {
+ return err
+ }
+ giu.GalleryImageProperties = &galleryImageProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ giu.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ giu.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ giu.Type = &typeVar
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ giu.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// GalleryImageVersion specifies information about the gallery image version that you want to create or
+// update.
+type GalleryImageVersion struct {
+ autorest.Response `json:"-"`
+ *GalleryImageVersionProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for GalleryImageVersion.
+func (giv GalleryImageVersion) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if giv.GalleryImageVersionProperties != nil {
+ objectMap["properties"] = giv.GalleryImageVersionProperties
+ }
+ if giv.Location != nil {
+ objectMap["location"] = giv.Location
+ }
+ if giv.Tags != nil {
+ objectMap["tags"] = giv.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for GalleryImageVersion struct.
+func (giv *GalleryImageVersion) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var galleryImageVersionProperties GalleryImageVersionProperties
+ err = json.Unmarshal(*v, &galleryImageVersionProperties)
+ if err != nil {
+ return err
+ }
+ giv.GalleryImageVersionProperties = &galleryImageVersionProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ giv.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ giv.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ giv.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ giv.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ giv.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// GalleryImageVersionList the List Gallery Image version operation response.
+type GalleryImageVersionList struct {
+ autorest.Response `json:"-"`
+ // Value - A list of gallery image versions.
+ Value *[]GalleryImageVersion `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of gallery image versions. Call ListNext() with this to fetch the next page of gallery image versions.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// GalleryImageVersionListIterator provides access to a complete listing of GalleryImageVersion values.
+type GalleryImageVersionListIterator struct {
+ i int
+ page GalleryImageVersionListPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *GalleryImageVersionListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *GalleryImageVersionListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter GalleryImageVersionListIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter GalleryImageVersionListIterator) Response() GalleryImageVersionList {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter GalleryImageVersionListIterator) Value() GalleryImageVersion {
+ if !iter.page.NotDone() {
+ return GalleryImageVersion{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the GalleryImageVersionListIterator type.
+func NewGalleryImageVersionListIterator(page GalleryImageVersionListPage) GalleryImageVersionListIterator {
+ return GalleryImageVersionListIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (givl GalleryImageVersionList) IsEmpty() bool {
+ return givl.Value == nil || len(*givl.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (givl GalleryImageVersionList) hasNextLink() bool {
+ return givl.NextLink != nil && len(*givl.NextLink) != 0
+}
+
+// galleryImageVersionListPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (givl GalleryImageVersionList) galleryImageVersionListPreparer(ctx context.Context) (*http.Request, error) {
+ if !givl.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(givl.NextLink)))
+}
+
+// GalleryImageVersionListPage contains a page of GalleryImageVersion values.
+type GalleryImageVersionListPage struct {
+ fn func(context.Context, GalleryImageVersionList) (GalleryImageVersionList, error)
+ givl GalleryImageVersionList
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *GalleryImageVersionListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.givl)
+ if err != nil {
+ return err
+ }
+ page.givl = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *GalleryImageVersionListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page GalleryImageVersionListPage) NotDone() bool {
+ return !page.givl.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page GalleryImageVersionListPage) Response() GalleryImageVersionList {
+ return page.givl
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page GalleryImageVersionListPage) Values() []GalleryImageVersion {
+ if page.givl.IsEmpty() {
+ return nil
+ }
+ return *page.givl.Value
+}
+
+// Creates a new instance of the GalleryImageVersionListPage type.
+func NewGalleryImageVersionListPage(cur GalleryImageVersionList, getNextPage func(context.Context, GalleryImageVersionList) (GalleryImageVersionList, error)) GalleryImageVersionListPage {
+ return GalleryImageVersionListPage{
+ fn: getNextPage,
+ givl: cur,
+ }
+}
+
+// GalleryImageVersionProperties describes the properties of a gallery image version.
+type GalleryImageVersionProperties struct {
+ PublishingProfile *GalleryImageVersionPublishingProfile `json:"publishingProfile,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningState3Creating', 'ProvisioningState3Updating', 'ProvisioningState3Failed', 'ProvisioningState3Succeeded', 'ProvisioningState3Deleting', 'ProvisioningState3Migrating'
+ ProvisioningState ProvisioningState3 `json:"provisioningState,omitempty"`
+ StorageProfile *GalleryImageVersionStorageProfile `json:"storageProfile,omitempty"`
+ // ReplicationStatus - READ-ONLY
+ ReplicationStatus *ReplicationStatus `json:"replicationStatus,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for GalleryImageVersionProperties.
+func (givp GalleryImageVersionProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if givp.PublishingProfile != nil {
+ objectMap["publishingProfile"] = givp.PublishingProfile
+ }
+ if givp.StorageProfile != nil {
+ objectMap["storageProfile"] = givp.StorageProfile
+ }
+ return json.Marshal(objectMap)
+}
+
+// GalleryImageVersionPublishingProfile the publishing profile of a gallery image Version.
+type GalleryImageVersionPublishingProfile struct {
+ // TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable.
+ TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"`
+ // ReplicaCount - The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable.
+ ReplicaCount *int32 `json:"replicaCount,omitempty"`
+ // ExcludeFromLatest - If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
+ ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"`
+ // PublishedDate - READ-ONLY; The timestamp for when the gallery image version is published.
+ PublishedDate *date.Time `json:"publishedDate,omitempty"`
+ // EndOfLifeDate - The end of life date of the gallery image version. This property can be used for decommissioning purposes. This property is updatable.
+ EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
+ // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS'
+ StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
+ // ReplicationMode - Optional parameter which specifies the mode to be used for replication. This property is not updatable. Possible values include: 'ReplicationModeFull', 'ReplicationModeShallow'
+ ReplicationMode ReplicationMode `json:"replicationMode,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for GalleryImageVersionPublishingProfile.
+func (givpp GalleryImageVersionPublishingProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if givpp.TargetRegions != nil {
+ objectMap["targetRegions"] = givpp.TargetRegions
+ }
+ if givpp.ReplicaCount != nil {
+ objectMap["replicaCount"] = givpp.ReplicaCount
+ }
+ if givpp.ExcludeFromLatest != nil {
+ objectMap["excludeFromLatest"] = givpp.ExcludeFromLatest
+ }
+ if givpp.EndOfLifeDate != nil {
+ objectMap["endOfLifeDate"] = givpp.EndOfLifeDate
+ }
+ if givpp.StorageAccountType != "" {
+ objectMap["storageAccountType"] = givpp.StorageAccountType
+ }
+ if givpp.ReplicationMode != "" {
+ objectMap["replicationMode"] = givpp.ReplicationMode
+ }
+ return json.Marshal(objectMap)
+}
+
+// GalleryImageVersionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type GalleryImageVersionsCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(GalleryImageVersionsClient) (GalleryImageVersion, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GalleryImageVersionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GalleryImageVersionsCreateOrUpdateFuture.Result.
+func (future *GalleryImageVersionsCreateOrUpdateFuture) result(client GalleryImageVersionsClient) (giv GalleryImageVersion, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ giv.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if giv.Response.Response, err = future.GetResult(sender); err == nil && giv.Response.Response.StatusCode != http.StatusNoContent {
+ giv, err = client.CreateOrUpdateResponder(giv.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsCreateOrUpdateFuture", "Result", giv.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// GalleryImageVersionsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type GalleryImageVersionsDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(GalleryImageVersionsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GalleryImageVersionsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GalleryImageVersionsDeleteFuture.Result.
+func (future *GalleryImageVersionsDeleteFuture) result(client GalleryImageVersionsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// GalleryImageVersionStorageProfile this is the storage profile of a Gallery Image Version.
+type GalleryImageVersionStorageProfile struct {
+ Source *GalleryArtifactVersionSource `json:"source,omitempty"`
+ OsDiskImage *GalleryOSDiskImage `json:"osDiskImage,omitempty"`
+ // DataDiskImages - A list of data disk images.
+ DataDiskImages *[]GalleryDataDiskImage `json:"dataDiskImages,omitempty"`
+}
+
+// GalleryImageVersionsUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type GalleryImageVersionsUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(GalleryImageVersionsClient) (GalleryImageVersion, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GalleryImageVersionsUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GalleryImageVersionsUpdateFuture.Result.
+func (future *GalleryImageVersionsUpdateFuture) result(client GalleryImageVersionsClient) (giv GalleryImageVersion, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ giv.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.GalleryImageVersionsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if giv.Response.Response, err = future.GetResult(sender); err == nil && giv.Response.Response.StatusCode != http.StatusNoContent {
+ giv, err = client.UpdateResponder(giv.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsUpdateFuture", "Result", giv.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// GalleryImageVersionUpdate specifies information about the gallery image version that you want to update.
+type GalleryImageVersionUpdate struct {
+ *GalleryImageVersionProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for GalleryImageVersionUpdate.
+func (givu GalleryImageVersionUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if givu.GalleryImageVersionProperties != nil {
+ objectMap["properties"] = givu.GalleryImageVersionProperties
+ }
+ if givu.Tags != nil {
+ objectMap["tags"] = givu.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for GalleryImageVersionUpdate struct.
+func (givu *GalleryImageVersionUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var galleryImageVersionProperties GalleryImageVersionProperties
+ err = json.Unmarshal(*v, &galleryImageVersionProperties)
+ if err != nil {
+ return err
+ }
+ givu.GalleryImageVersionProperties = &galleryImageVersionProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ givu.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ givu.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ givu.Type = &typeVar
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ givu.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// GalleryList the List Galleries operation response.
+type GalleryList struct {
+ autorest.Response `json:"-"`
+ // Value - A list of galleries.
+ Value *[]Gallery `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of galleries. Call ListNext() with this to fetch the next page of galleries.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// GalleryListIterator provides access to a complete listing of Gallery values.
+type GalleryListIterator struct {
+ i int
+ page GalleryListPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *GalleryListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *GalleryListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter GalleryListIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter GalleryListIterator) Response() GalleryList {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter GalleryListIterator) Value() Gallery {
+ if !iter.page.NotDone() {
+ return Gallery{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the GalleryListIterator type.
+func NewGalleryListIterator(page GalleryListPage) GalleryListIterator {
+ return GalleryListIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (gl GalleryList) IsEmpty() bool {
+ return gl.Value == nil || len(*gl.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (gl GalleryList) hasNextLink() bool {
+ return gl.NextLink != nil && len(*gl.NextLink) != 0
+}
+
+// galleryListPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (gl GalleryList) galleryListPreparer(ctx context.Context) (*http.Request, error) {
+ if !gl.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(gl.NextLink)))
+}
+
+// GalleryListPage contains a page of Gallery values.
+type GalleryListPage struct {
+ fn func(context.Context, GalleryList) (GalleryList, error)
+ gl GalleryList
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *GalleryListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.gl)
+ if err != nil {
+ return err
+ }
+ page.gl = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *GalleryListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page GalleryListPage) NotDone() bool {
+ return !page.gl.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page GalleryListPage) Response() GalleryList {
+ return page.gl
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page GalleryListPage) Values() []Gallery {
+ if page.gl.IsEmpty() {
+ return nil
+ }
+ return *page.gl.Value
+}
+
+// Creates a new instance of the GalleryListPage type.
+func NewGalleryListPage(cur GalleryList, getNextPage func(context.Context, GalleryList) (GalleryList, error)) GalleryListPage {
+ return GalleryListPage{
+ fn: getNextPage,
+ gl: cur,
+ }
+}
+
+// GalleryOSDiskImage this is the OS disk image.
+type GalleryOSDiskImage struct {
+ // SizeInGB - READ-ONLY; This property indicates the size of the VHD to be created.
+ SizeInGB *int32 `json:"sizeInGB,omitempty"`
+ // HostCaching - The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'. Possible values include: 'HostCachingNone', 'HostCachingReadOnly', 'HostCachingReadWrite'
+ HostCaching HostCaching `json:"hostCaching,omitempty"`
+ Source *GalleryArtifactVersionSource `json:"source,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for GalleryOSDiskImage.
+func (godi GalleryOSDiskImage) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if godi.HostCaching != "" {
+ objectMap["hostCaching"] = godi.HostCaching
+ }
+ if godi.Source != nil {
+ objectMap["source"] = godi.Source
+ }
+ return json.Marshal(objectMap)
+}
+
+// GalleryProperties describes the properties of a Shared Image Gallery.
+type GalleryProperties struct {
+ // Description - The description of this Shared Image Gallery resource. This property is updatable.
+ Description *string `json:"description,omitempty"`
+ Identifier *GalleryIdentifier `json:"identifier,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response. Possible values include: 'ProvisioningStateCreating', 'ProvisioningStateUpdating', 'ProvisioningStateFailed', 'ProvisioningStateSucceeded', 'ProvisioningStateDeleting', 'ProvisioningStateMigrating'
+ ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
+ SharingProfile *SharingProfile `json:"sharingProfile,omitempty"`
+ SoftDeletePolicy *SoftDeletePolicy `json:"softDeletePolicy,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for GalleryProperties.
+func (gp GalleryProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if gp.Description != nil {
+ objectMap["description"] = gp.Description
+ }
+ if gp.Identifier != nil {
+ objectMap["identifier"] = gp.Identifier
+ }
+ if gp.SharingProfile != nil {
+ objectMap["sharingProfile"] = gp.SharingProfile
+ }
+ if gp.SoftDeletePolicy != nil {
+ objectMap["softDeletePolicy"] = gp.SoftDeletePolicy
+ }
+ return json.Marshal(objectMap)
+}
+
+// GallerySharingProfileUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type GallerySharingProfileUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(GallerySharingProfileClient) (SharingUpdate, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *GallerySharingProfileUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for GallerySharingProfileUpdateFuture.Result.
+func (future *GallerySharingProfileUpdateFuture) result(client GallerySharingProfileClient) (su SharingUpdate, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GallerySharingProfileUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ su.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.GallerySharingProfileUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if su.Response.Response, err = future.GetResult(sender); err == nil && su.Response.Response.StatusCode != http.StatusNoContent {
+ su, err = client.UpdateResponder(su.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.GallerySharingProfileUpdateFuture", "Result", su.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// GalleryUpdate specifies information about the Shared Image Gallery that you want to update.
+type GalleryUpdate struct {
+ *GalleryProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for GalleryUpdate.
+func (gu GalleryUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if gu.GalleryProperties != nil {
+ objectMap["properties"] = gu.GalleryProperties
+ }
+ if gu.Tags != nil {
+ objectMap["tags"] = gu.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for GalleryUpdate struct.
+func (gu *GalleryUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var galleryProperties GalleryProperties
+ err = json.Unmarshal(*v, &galleryProperties)
+ if err != nil {
+ return err
+ }
+ gu.GalleryProperties = &galleryProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ gu.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ gu.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ gu.Type = &typeVar
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ gu.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// GrantAccessData data used for requesting a SAS.
+type GrantAccessData struct {
+ // Access - Possible values include: 'AccessLevelNone', 'AccessLevelRead', 'AccessLevelWrite'
+ Access AccessLevel `json:"access,omitempty"`
+ // DurationInSeconds - Time duration in seconds until the SAS access expires.
+ DurationInSeconds *int32 `json:"durationInSeconds,omitempty"`
+}
+
+// HardwareProfile specifies the hardware settings for the virtual machine.
+type HardwareProfile struct {
+ // VMSize - Specifies the size of the virtual machine.
The enum data type is currently deprecated and will be removed by December 23rd 2023.
Recommended way to get the list of available sizes is using these APIs:
[List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes)
[List all available virtual machine sizes in a region]( https://docs.microsoft.com/rest/api/compute/resourceskus/list)
[List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/azure/virtual-machines/sizes).
The available VM sizes depend on region and availability set. Possible values include: 'VirtualMachineSizeTypesBasicA0', 'VirtualMachineSizeTypesBasicA1', 'VirtualMachineSizeTypesBasicA2', 'VirtualMachineSizeTypesBasicA3', 'VirtualMachineSizeTypesBasicA4', 'VirtualMachineSizeTypesStandardA0', 'VirtualMachineSizeTypesStandardA1', 'VirtualMachineSizeTypesStandardA2', 'VirtualMachineSizeTypesStandardA3', 'VirtualMachineSizeTypesStandardA4', 'VirtualMachineSizeTypesStandardA5', 'VirtualMachineSizeTypesStandardA6', 'VirtualMachineSizeTypesStandardA7', 'VirtualMachineSizeTypesStandardA8', 'VirtualMachineSizeTypesStandardA9', 'VirtualMachineSizeTypesStandardA10', 'VirtualMachineSizeTypesStandardA11', 'VirtualMachineSizeTypesStandardA1V2', 'VirtualMachineSizeTypesStandardA2V2', 'VirtualMachineSizeTypesStandardA4V2', 'VirtualMachineSizeTypesStandardA8V2', 'VirtualMachineSizeTypesStandardA2mV2', 'VirtualMachineSizeTypesStandardA4mV2', 'VirtualMachineSizeTypesStandardA8mV2', 'VirtualMachineSizeTypesStandardB1s', 'VirtualMachineSizeTypesStandardB1ms', 'VirtualMachineSizeTypesStandardB2s', 'VirtualMachineSizeTypesStandardB2ms', 'VirtualMachineSizeTypesStandardB4ms', 'VirtualMachineSizeTypesStandardB8ms', 'VirtualMachineSizeTypesStandardD1', 'VirtualMachineSizeTypesStandardD2', 'VirtualMachineSizeTypesStandardD3', 'VirtualMachineSizeTypesStandardD4', 'VirtualMachineSizeTypesStandardD11', 'VirtualMachineSizeTypesStandardD12', 'VirtualMachineSizeTypesStandardD13', 'VirtualMachineSizeTypesStandardD14', 'VirtualMachineSizeTypesStandardD1V2', 'VirtualMachineSizeTypesStandardD2V2', 'VirtualMachineSizeTypesStandardD3V2', 'VirtualMachineSizeTypesStandardD4V2', 'VirtualMachineSizeTypesStandardD5V2', 'VirtualMachineSizeTypesStandardD2V3', 'VirtualMachineSizeTypesStandardD4V3', 'VirtualMachineSizeTypesStandardD8V3', 'VirtualMachineSizeTypesStandardD16V3', 'VirtualMachineSizeTypesStandardD32V3', 'VirtualMachineSizeTypesStandardD64V3', 'VirtualMachineSizeTypesStandardD2sV3', 'VirtualMachineSizeTypesStandardD4sV3', 'VirtualMachineSizeTypesStandardD8sV3', 'VirtualMachineSizeTypesStandardD16sV3', 'VirtualMachineSizeTypesStandardD32sV3', 'VirtualMachineSizeTypesStandardD64sV3', 'VirtualMachineSizeTypesStandardD11V2', 'VirtualMachineSizeTypesStandardD12V2', 'VirtualMachineSizeTypesStandardD13V2', 'VirtualMachineSizeTypesStandardD14V2', 'VirtualMachineSizeTypesStandardD15V2', 'VirtualMachineSizeTypesStandardDS1', 'VirtualMachineSizeTypesStandardDS2', 'VirtualMachineSizeTypesStandardDS3', 'VirtualMachineSizeTypesStandardDS4', 'VirtualMachineSizeTypesStandardDS11', 'VirtualMachineSizeTypesStandardDS12', 'VirtualMachineSizeTypesStandardDS13', 'VirtualMachineSizeTypesStandardDS14', 'VirtualMachineSizeTypesStandardDS1V2', 'VirtualMachineSizeTypesStandardDS2V2', 'VirtualMachineSizeTypesStandardDS3V2', 'VirtualMachineSizeTypesStandardDS4V2', 'VirtualMachineSizeTypesStandardDS5V2', 'VirtualMachineSizeTypesStandardDS11V2', 'VirtualMachineSizeTypesStandardDS12V2', 'VirtualMachineSizeTypesStandardDS13V2', 'VirtualMachineSizeTypesStandardDS14V2', 'VirtualMachineSizeTypesStandardDS15V2', 'VirtualMachineSizeTypesStandardDS134V2', 'VirtualMachineSizeTypesStandardDS132V2', 'VirtualMachineSizeTypesStandardDS148V2', 'VirtualMachineSizeTypesStandardDS144V2', 'VirtualMachineSizeTypesStandardE2V3', 'VirtualMachineSizeTypesStandardE4V3', 'VirtualMachineSizeTypesStandardE8V3', 'VirtualMachineSizeTypesStandardE16V3', 'VirtualMachineSizeTypesStandardE32V3', 'VirtualMachineSizeTypesStandardE64V3', 'VirtualMachineSizeTypesStandardE2sV3', 'VirtualMachineSizeTypesStandardE4sV3', 'VirtualMachineSizeTypesStandardE8sV3', 'VirtualMachineSizeTypesStandardE16sV3', 'VirtualMachineSizeTypesStandardE32sV3', 'VirtualMachineSizeTypesStandardE64sV3', 'VirtualMachineSizeTypesStandardE3216V3', 'VirtualMachineSizeTypesStandardE328sV3', 'VirtualMachineSizeTypesStandardE6432sV3', 'VirtualMachineSizeTypesStandardE6416sV3', 'VirtualMachineSizeTypesStandardF1', 'VirtualMachineSizeTypesStandardF2', 'VirtualMachineSizeTypesStandardF4', 'VirtualMachineSizeTypesStandardF8', 'VirtualMachineSizeTypesStandardF16', 'VirtualMachineSizeTypesStandardF1s', 'VirtualMachineSizeTypesStandardF2s', 'VirtualMachineSizeTypesStandardF4s', 'VirtualMachineSizeTypesStandardF8s', 'VirtualMachineSizeTypesStandardF16s', 'VirtualMachineSizeTypesStandardF2sV2', 'VirtualMachineSizeTypesStandardF4sV2', 'VirtualMachineSizeTypesStandardF8sV2', 'VirtualMachineSizeTypesStandardF16sV2', 'VirtualMachineSizeTypesStandardF32sV2', 'VirtualMachineSizeTypesStandardF64sV2', 'VirtualMachineSizeTypesStandardF72sV2', 'VirtualMachineSizeTypesStandardG1', 'VirtualMachineSizeTypesStandardG2', 'VirtualMachineSizeTypesStandardG3', 'VirtualMachineSizeTypesStandardG4', 'VirtualMachineSizeTypesStandardG5', 'VirtualMachineSizeTypesStandardGS1', 'VirtualMachineSizeTypesStandardGS2', 'VirtualMachineSizeTypesStandardGS3', 'VirtualMachineSizeTypesStandardGS4', 'VirtualMachineSizeTypesStandardGS5', 'VirtualMachineSizeTypesStandardGS48', 'VirtualMachineSizeTypesStandardGS44', 'VirtualMachineSizeTypesStandardGS516', 'VirtualMachineSizeTypesStandardGS58', 'VirtualMachineSizeTypesStandardH8', 'VirtualMachineSizeTypesStandardH16', 'VirtualMachineSizeTypesStandardH8m', 'VirtualMachineSizeTypesStandardH16m', 'VirtualMachineSizeTypesStandardH16r', 'VirtualMachineSizeTypesStandardH16mr', 'VirtualMachineSizeTypesStandardL4s', 'VirtualMachineSizeTypesStandardL8s', 'VirtualMachineSizeTypesStandardL16s', 'VirtualMachineSizeTypesStandardL32s', 'VirtualMachineSizeTypesStandardM64s', 'VirtualMachineSizeTypesStandardM64ms', 'VirtualMachineSizeTypesStandardM128s', 'VirtualMachineSizeTypesStandardM128ms', 'VirtualMachineSizeTypesStandardM6432ms', 'VirtualMachineSizeTypesStandardM6416ms', 'VirtualMachineSizeTypesStandardM12864ms', 'VirtualMachineSizeTypesStandardM12832ms', 'VirtualMachineSizeTypesStandardNC6', 'VirtualMachineSizeTypesStandardNC12', 'VirtualMachineSizeTypesStandardNC24', 'VirtualMachineSizeTypesStandardNC24r', 'VirtualMachineSizeTypesStandardNC6sV2', 'VirtualMachineSizeTypesStandardNC12sV2', 'VirtualMachineSizeTypesStandardNC24sV2', 'VirtualMachineSizeTypesStandardNC24rsV2', 'VirtualMachineSizeTypesStandardNC6sV3', 'VirtualMachineSizeTypesStandardNC12sV3', 'VirtualMachineSizeTypesStandardNC24sV3', 'VirtualMachineSizeTypesStandardNC24rsV3', 'VirtualMachineSizeTypesStandardND6s', 'VirtualMachineSizeTypesStandardND12s', 'VirtualMachineSizeTypesStandardND24s', 'VirtualMachineSizeTypesStandardND24rs', 'VirtualMachineSizeTypesStandardNV6', 'VirtualMachineSizeTypesStandardNV12', 'VirtualMachineSizeTypesStandardNV24'
+ VMSize VirtualMachineSizeTypes `json:"vmSize,omitempty"`
+ // VMSizeProperties - Specifies the properties for customizing the size of the virtual machine. Minimum api-version: 2021-07-01.
This feature is still in preview mode and is not supported for VirtualMachineScaleSet.
Please follow the instructions in [VM Customization](https://aka.ms/vmcustomization) for more details.
+ VMSizeProperties *VMSizeProperties `json:"vmSizeProperties,omitempty"`
+}
+
+// Image the source user image virtual hard disk. The virtual hard disk will be copied before being
+// attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not
+// exist.
+type Image struct {
+ autorest.Response `json:"-"`
+ *ImageProperties `json:"properties,omitempty"`
+ // ExtendedLocation - The extended location of the Image.
+ ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for Image.
+func (i Image) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if i.ImageProperties != nil {
+ objectMap["properties"] = i.ImageProperties
+ }
+ if i.ExtendedLocation != nil {
+ objectMap["extendedLocation"] = i.ExtendedLocation
+ }
+ if i.Location != nil {
+ objectMap["location"] = i.Location
+ }
+ if i.Tags != nil {
+ objectMap["tags"] = i.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Image struct.
+func (i *Image) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var imageProperties ImageProperties
+ err = json.Unmarshal(*v, &imageProperties)
+ if err != nil {
+ return err
+ }
+ i.ImageProperties = &imageProperties
+ }
+ case "extendedLocation":
+ if v != nil {
+ var extendedLocation ExtendedLocation
+ err = json.Unmarshal(*v, &extendedLocation)
+ if err != nil {
+ return err
+ }
+ i.ExtendedLocation = &extendedLocation
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ i.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ i.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ i.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ i.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ i.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// ImageDataDisk describes a data disk.
+type ImageDataDisk struct {
+ // Lun - Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
+ Lun *int32 `json:"lun,omitempty"`
+ // Snapshot - The snapshot.
+ Snapshot *SubResource `json:"snapshot,omitempty"`
+ // ManagedDisk - The managedDisk.
+ ManagedDisk *SubResource `json:"managedDisk,omitempty"`
+ // BlobURI - The Virtual Hard Disk.
+ BlobURI *string `json:"blobUri,omitempty"`
+ // Caching - Specifies the caching requirements.
Possible values are:
**None**
**ReadOnly**
**ReadWrite**
Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite'
+ Caching CachingTypes `json:"caching,omitempty"`
+ // DiskSizeGB - Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image.
This value cannot be larger than 1023 GB
+ DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
+ // StorageAccountType - Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS', 'StorageAccountTypesPremiumZRS', 'StorageAccountTypesStandardSSDZRS'
+ StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
+ // DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed image disk.
+ DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
+}
+
+// ImageDisk describes a image disk.
+type ImageDisk struct {
+ // Snapshot - The snapshot.
+ Snapshot *SubResource `json:"snapshot,omitempty"`
+ // ManagedDisk - The managedDisk.
+ ManagedDisk *SubResource `json:"managedDisk,omitempty"`
+ // BlobURI - The Virtual Hard Disk.
+ BlobURI *string `json:"blobUri,omitempty"`
+ // Caching - Specifies the caching requirements.
Possible values are:
**None**
**ReadOnly**
**ReadWrite**
Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite'
+ Caching CachingTypes `json:"caching,omitempty"`
+ // DiskSizeGB - Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image.
This value cannot be larger than 1023 GB
+ DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
+ // StorageAccountType - Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS', 'StorageAccountTypesPremiumZRS', 'StorageAccountTypesStandardSSDZRS'
+ StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
+ // DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed image disk.
+ DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
+}
+
+// ImageDiskReference the source image used for creating the disk.
+type ImageDiskReference struct {
+ // ID - A relative uri containing either a Platform Image Repository or user image reference.
+ ID *string `json:"id,omitempty"`
+ // Lun - If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field is null.
+ Lun *int32 `json:"lun,omitempty"`
+}
+
+// ImageListResult the List Image operation response.
+type ImageListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of Images.
+ Value *[]Image `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of Images. Call ListNext() with this to fetch the next page of Images.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ImageListResultIterator provides access to a complete listing of Image values.
+type ImageListResultIterator struct {
+ i int
+ page ImageListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ImageListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ImageListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ImageListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ImageListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ImageListResultIterator) Response() ImageListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ImageListResultIterator) Value() Image {
+ if !iter.page.NotDone() {
+ return Image{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the ImageListResultIterator type.
+func NewImageListResultIterator(page ImageListResultPage) ImageListResultIterator {
+ return ImageListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (ilr ImageListResult) IsEmpty() bool {
+ return ilr.Value == nil || len(*ilr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (ilr ImageListResult) hasNextLink() bool {
+ return ilr.NextLink != nil && len(*ilr.NextLink) != 0
+}
+
+// imageListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (ilr ImageListResult) imageListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !ilr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(ilr.NextLink)))
+}
+
+// ImageListResultPage contains a page of Image values.
+type ImageListResultPage struct {
+ fn func(context.Context, ImageListResult) (ImageListResult, error)
+ ilr ImageListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ImageListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ImageListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.ilr)
+ if err != nil {
+ return err
+ }
+ page.ilr = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ImageListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ImageListResultPage) NotDone() bool {
+ return !page.ilr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ImageListResultPage) Response() ImageListResult {
+ return page.ilr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ImageListResultPage) Values() []Image {
+ if page.ilr.IsEmpty() {
+ return nil
+ }
+ return *page.ilr.Value
+}
+
+// Creates a new instance of the ImageListResultPage type.
+func NewImageListResultPage(cur ImageListResult, getNextPage func(context.Context, ImageListResult) (ImageListResult, error)) ImageListResultPage {
+ return ImageListResultPage{
+ fn: getNextPage,
+ ilr: cur,
+ }
+}
+
+// ImageOSDisk describes an Operating System disk.
+type ImageOSDisk struct {
+ // OsType - This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image.
Possible values are:
**Windows**
**Linux**. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux'
+ OsType OperatingSystemTypes `json:"osType,omitempty"`
+ // OsState - The OS State. Possible values include: 'OperatingSystemStateTypesGeneralized', 'OperatingSystemStateTypesSpecialized'
+ OsState OperatingSystemStateTypes `json:"osState,omitempty"`
+ // Snapshot - The snapshot.
+ Snapshot *SubResource `json:"snapshot,omitempty"`
+ // ManagedDisk - The managedDisk.
+ ManagedDisk *SubResource `json:"managedDisk,omitempty"`
+ // BlobURI - The Virtual Hard Disk.
+ BlobURI *string `json:"blobUri,omitempty"`
+ // Caching - Specifies the caching requirements.
Possible values are:
**None**
**ReadOnly**
**ReadWrite**
Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite'
+ Caching CachingTypes `json:"caching,omitempty"`
+ // DiskSizeGB - Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image.
This value cannot be larger than 1023 GB
+ DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
+ // StorageAccountType - Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS', 'StorageAccountTypesPremiumZRS', 'StorageAccountTypesStandardSSDZRS'
+ StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
+ // DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed image disk.
+ DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
+}
+
+// ImageProperties describes the properties of an Image.
+type ImageProperties struct {
+ // SourceVirtualMachine - The source virtual machine from which Image is created.
+ SourceVirtualMachine *SubResource `json:"sourceVirtualMachine,omitempty"`
+ // StorageProfile - Specifies the storage settings for the virtual machine disks.
+ StorageProfile *ImageStorageProfile `json:"storageProfile,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // HyperVGeneration - Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, if the source is managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource. Possible values include: 'HyperVGenerationTypesV1', 'HyperVGenerationTypesV2'
+ HyperVGeneration HyperVGenerationTypes `json:"hyperVGeneration,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ImageProperties.
+func (IP ImageProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if IP.SourceVirtualMachine != nil {
+ objectMap["sourceVirtualMachine"] = IP.SourceVirtualMachine
+ }
+ if IP.StorageProfile != nil {
+ objectMap["storageProfile"] = IP.StorageProfile
+ }
+ if IP.HyperVGeneration != "" {
+ objectMap["hyperVGeneration"] = IP.HyperVGeneration
+ }
+ return json.Marshal(objectMap)
+}
+
+// ImagePurchasePlan describes the gallery image definition purchase plan. This is used by marketplace
+// images.
+type ImagePurchasePlan struct {
+ // Name - The plan ID.
+ Name *string `json:"name,omitempty"`
+ // Publisher - The publisher ID.
+ Publisher *string `json:"publisher,omitempty"`
+ // Product - The product ID.
+ Product *string `json:"product,omitempty"`
+}
+
+// ImageReference specifies information about the image to use. You can specify information about platform
+// images, marketplace images, or virtual machine images. This element is required when you want to use a
+// platform image, marketplace image, or virtual machine image, but is not used in other creation
+// operations. NOTE: Image reference publisher and offer can only be set when you create the scale set.
+type ImageReference struct {
+ // Publisher - The image publisher.
+ Publisher *string `json:"publisher,omitempty"`
+ // Offer - Specifies the offer of the platform image or marketplace image used to create the virtual machine.
+ Offer *string `json:"offer,omitempty"`
+ // Sku - The image SKU.
+ Sku *string `json:"sku,omitempty"`
+ // Version - Specifies the version of the platform image or marketplace image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available.
+ Version *string `json:"version,omitempty"`
+ // ExactVersion - READ-ONLY; Specifies in decimal numbers, the version of platform image or marketplace image used to create the virtual machine. This readonly field differs from 'version', only if the value specified in 'version' field is 'latest'.
+ ExactVersion *string `json:"exactVersion,omitempty"`
+ // SharedGalleryImageID - Specified the shared gallery image unique id for vm deployment. This can be fetched from shared gallery image GET call.
+ SharedGalleryImageID *string `json:"sharedGalleryImageId,omitempty"`
+ // ID - Resource Id
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ImageReference.
+func (ir ImageReference) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ir.Publisher != nil {
+ objectMap["publisher"] = ir.Publisher
+ }
+ if ir.Offer != nil {
+ objectMap["offer"] = ir.Offer
+ }
+ if ir.Sku != nil {
+ objectMap["sku"] = ir.Sku
+ }
+ if ir.Version != nil {
+ objectMap["version"] = ir.Version
+ }
+ if ir.SharedGalleryImageID != nil {
+ objectMap["sharedGalleryImageId"] = ir.SharedGalleryImageID
+ }
+ if ir.ID != nil {
+ objectMap["id"] = ir.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// ImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type ImagesCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ImagesClient) (Image, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ImagesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ImagesCreateOrUpdateFuture.Result.
+func (future *ImagesCreateOrUpdateFuture) result(client ImagesClient) (i Image, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ i.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.ImagesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.CreateOrUpdateResponder(i.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesCreateOrUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type ImagesDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ImagesClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ImagesDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ImagesDeleteFuture.Result.
+func (future *ImagesDeleteFuture) result(client ImagesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.ImagesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// ImageStorageProfile describes a storage profile.
+type ImageStorageProfile struct {
+ // OsDisk - Specifies information about the operating system disk used by the virtual machine.
For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).
+ OsDisk *ImageOSDisk `json:"osDisk,omitempty"`
+ // DataDisks - Specifies the parameters that are used to add a data disk to a virtual machine.
For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).
+ DataDisks *[]ImageDataDisk `json:"dataDisks,omitempty"`
+ // ZoneResilient - Specifies whether an image is zone resilient or not. Default is false. Zone resilient images can be created only in regions that provide Zone Redundant Storage (ZRS).
+ ZoneResilient *bool `json:"zoneResilient,omitempty"`
+}
+
+// ImagesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+type ImagesUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ImagesClient) (Image, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ImagesUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ImagesUpdateFuture.Result.
+func (future *ImagesUpdateFuture) result(client ImagesClient) (i Image, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ i.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.ImagesUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if i.Response.Response, err = future.GetResult(sender); err == nil && i.Response.Response.StatusCode != http.StatusNoContent {
+ i, err = client.UpdateResponder(i.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ImagesUpdateFuture", "Result", i.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ImageUpdate the source user image virtual hard disk. Only tags may be updated.
+type ImageUpdate struct {
+ *ImageProperties `json:"properties,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for ImageUpdate.
+func (iu ImageUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if iu.ImageProperties != nil {
+ objectMap["properties"] = iu.ImageProperties
+ }
+ if iu.Tags != nil {
+ objectMap["tags"] = iu.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ImageUpdate struct.
+func (iu *ImageUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var imageProperties ImageProperties
+ err = json.Unmarshal(*v, &imageProperties)
+ if err != nil {
+ return err
+ }
+ iu.ImageProperties = &imageProperties
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ iu.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// InnerError inner error details.
+type InnerError struct {
+ // Exceptiontype - The exception type.
+ Exceptiontype *string `json:"exceptiontype,omitempty"`
+ // Errordetail - The internal error message or exception dump.
+ Errordetail *string `json:"errordetail,omitempty"`
+}
+
+// InstanceSku ...
+type InstanceSku struct {
+ // Name - READ-ONLY; The sku name.
+ Name *string `json:"name,omitempty"`
+ // Tier - READ-ONLY; The tier of the cloud service role instance.
+ Tier *string `json:"tier,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for InstanceSku.
+func (is InstanceSku) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// InstanceViewStatus instance view status.
+type InstanceViewStatus struct {
+ // Code - The status code.
+ Code *string `json:"code,omitempty"`
+ // Level - The level code. Possible values include: 'StatusLevelTypesInfo', 'StatusLevelTypesWarning', 'StatusLevelTypesError'
+ Level StatusLevelTypes `json:"level,omitempty"`
+ // DisplayStatus - The short localizable label for the status.
+ DisplayStatus *string `json:"displayStatus,omitempty"`
+ // Message - The detailed status message, including for alerts and error messages.
+ Message *string `json:"message,omitempty"`
+ // Time - The time of the status.
+ Time *date.Time `json:"time,omitempty"`
+}
+
+// InstanceViewStatusesSummary instance view statuses.
+type InstanceViewStatusesSummary struct {
+ // StatusesSummary - READ-ONLY
+ StatusesSummary *[]StatusCodeCount `json:"statusesSummary,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for InstanceViewStatusesSummary.
+func (ivss InstanceViewStatusesSummary) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// KeyForDiskEncryptionSet key Vault Key Url to be used for server side encryption of Managed Disks and
+// Snapshots
+type KeyForDiskEncryptionSet struct {
+ // SourceVault - Resource id of the KeyVault containing the key or secret. This property is optional and cannot be used if the KeyVault subscription is not the same as the Disk Encryption Set subscription.
+ SourceVault *SourceVault `json:"sourceVault,omitempty"`
+ // KeyURL - Fully versioned Key Url pointing to a key in KeyVault. Version segment of the Url is required regardless of rotationToLatestKeyVersionEnabled value.
+ KeyURL *string `json:"keyUrl,omitempty"`
+}
+
+// KeyVaultAndKeyReference key Vault Key Url and vault id of KeK, KeK is optional and when provided is used
+// to unwrap the encryptionKey
+type KeyVaultAndKeyReference struct {
+ // SourceVault - Resource id of the KeyVault containing the key or secret
+ SourceVault *SourceVault `json:"sourceVault,omitempty"`
+ // KeyURL - Url pointing to a key or secret in KeyVault
+ KeyURL *string `json:"keyUrl,omitempty"`
+}
+
+// KeyVaultAndSecretReference key Vault Secret Url and vault id of the encryption key
+type KeyVaultAndSecretReference struct {
+ // SourceVault - Resource id of the KeyVault containing the key or secret
+ SourceVault *SourceVault `json:"sourceVault,omitempty"`
+ // SecretURL - Url pointing to a key or secret in KeyVault
+ SecretURL *string `json:"secretUrl,omitempty"`
+}
+
+// KeyVaultKeyReference describes a reference to Key Vault Key
+type KeyVaultKeyReference struct {
+ // KeyURL - The URL referencing a key encryption key in Key Vault.
+ KeyURL *string `json:"keyUrl,omitempty"`
+ // SourceVault - The relative URL of the Key Vault containing the key.
+ SourceVault *SubResource `json:"sourceVault,omitempty"`
+}
+
+// KeyVaultSecretReference describes a reference to Key Vault Secret
+type KeyVaultSecretReference struct {
+ // SecretURL - The URL referencing a secret in a Key Vault.
+ SecretURL *string `json:"secretUrl,omitempty"`
+ // SourceVault - The relative URL of the Key Vault containing the secret.
+ SourceVault *SubResource `json:"sourceVault,omitempty"`
+}
+
+// LastPatchInstallationSummary describes the properties of the last installed patch summary.
+type LastPatchInstallationSummary struct {
+ // Status - READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or "CompletedWithWarnings.". Possible values include: 'PatchOperationStatusUnknown', 'PatchOperationStatusInProgress', 'PatchOperationStatusFailed', 'PatchOperationStatusSucceeded', 'PatchOperationStatusCompletedWithWarnings'
+ Status PatchOperationStatus `json:"status,omitempty"`
+ // InstallationActivityID - READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs.
+ InstallationActivityID *string `json:"installationActivityId,omitempty"`
+ // MaintenanceWindowExceeded - READ-ONLY; Describes whether the operation ran out of time before it completed all its intended actions
+ MaintenanceWindowExceeded *bool `json:"maintenanceWindowExceeded,omitempty"`
+ // NotSelectedPatchCount - READ-ONLY; The number of all available patches but not going to be installed because it didn't match a classification or inclusion list entry.
+ NotSelectedPatchCount *int32 `json:"notSelectedPatchCount,omitempty"`
+ // ExcludedPatchCount - READ-ONLY; The number of all available patches but excluded explicitly by a customer-specified exclusion list match.
+ ExcludedPatchCount *int32 `json:"excludedPatchCount,omitempty"`
+ // PendingPatchCount - READ-ONLY; The number of all available patches expected to be installed over the course of the patch installation operation.
+ PendingPatchCount *int32 `json:"pendingPatchCount,omitempty"`
+ // InstalledPatchCount - READ-ONLY; The count of patches that successfully installed.
+ InstalledPatchCount *int32 `json:"installedPatchCount,omitempty"`
+ // FailedPatchCount - READ-ONLY; The count of patches that failed installation.
+ FailedPatchCount *int32 `json:"failedPatchCount,omitempty"`
+ // StartTime - READ-ONLY; The UTC timestamp when the operation began.
+ StartTime *date.Time `json:"startTime,omitempty"`
+ // LastModifiedTime - READ-ONLY; The UTC timestamp when the operation began.
+ LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
+ // Error - READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them.
+ Error *APIError `json:"error,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for LastPatchInstallationSummary.
+func (lpis LastPatchInstallationSummary) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// LinuxConfiguration specifies the Linux operating system settings on the virtual machine.
For a
+// list of supported Linux distributions, see [Linux on Azure-Endorsed
+// Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros).
+type LinuxConfiguration struct {
+ // DisablePasswordAuthentication - Specifies whether password authentication should be disabled.
+ DisablePasswordAuthentication *bool `json:"disablePasswordAuthentication,omitempty"`
+ // SSH - Specifies the ssh key configuration for a Linux OS.
+ SSH *SSHConfiguration `json:"ssh,omitempty"`
+ // ProvisionVMAgent - Indicates whether virtual machine agent should be provisioned on the virtual machine.
When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later.
+ ProvisionVMAgent *bool `json:"provisionVMAgent,omitempty"`
+ // PatchSettings - [Preview Feature] Specifies settings related to VM Guest Patching on Linux.
+ PatchSettings *LinuxPatchSettings `json:"patchSettings,omitempty"`
+}
+
+// LinuxParameters input for InstallPatches on a Linux VM, as directly received by the API
+type LinuxParameters struct {
+ // ClassificationsToInclude - The update classifications to select when installing patches for Linux.
+ ClassificationsToInclude *[]VMGuestPatchClassificationLinux `json:"classificationsToInclude,omitempty"`
+ // PackageNameMasksToInclude - packages to include in the patch operation. Format: packageName_packageVersion
+ PackageNameMasksToInclude *[]string `json:"packageNameMasksToInclude,omitempty"`
+ // PackageNameMasksToExclude - packages to exclude in the patch operation. Format: packageName_packageVersion
+ PackageNameMasksToExclude *[]string `json:"packageNameMasksToExclude,omitempty"`
+ // MaintenanceRunID - This is used as a maintenance run identifier for Auto VM Guest Patching in Linux.
+ MaintenanceRunID *string `json:"maintenanceRunId,omitempty"`
+}
+
+// LinuxPatchSettings specifies settings related to VM Guest Patching on Linux.
+type LinuxPatchSettings struct {
+ // PatchMode - Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as Flexible.
Possible values are:
**ImageDefault** - The virtual machine's default patching configuration is used.
**AutomaticByPlatform** - The virtual machine will be automatically updated by the platform. The property provisionVMAgent must be true. Possible values include: 'LinuxVMGuestPatchModeImageDefault', 'LinuxVMGuestPatchModeAutomaticByPlatform'
+ PatchMode LinuxVMGuestPatchMode `json:"patchMode,omitempty"`
+ // AssessmentMode - Specifies the mode of VM Guest Patch Assessment for the IaaS virtual machine.
Possible values are:
**ImageDefault** - You control the timing of patch assessments on a virtual machine.
**AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true. Possible values include: 'LinuxPatchAssessmentModeImageDefault', 'LinuxPatchAssessmentModeAutomaticByPlatform'
+ AssessmentMode LinuxPatchAssessmentMode `json:"assessmentMode,omitempty"`
+}
+
+// ListUsagesResult the List Usages operation response.
+type ListUsagesResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of compute resource usages.
+ Value *[]Usage `json:"value,omitempty"`
+ // NextLink - The URI to fetch the next page of compute resource usage information. Call ListNext() with this to fetch the next page of compute resource usage information.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ListUsagesResultIterator provides access to a complete listing of Usage values.
+type ListUsagesResultIterator struct {
+ i int
+ page ListUsagesResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ListUsagesResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListUsagesResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ListUsagesResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ListUsagesResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ListUsagesResultIterator) Response() ListUsagesResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ListUsagesResultIterator) Value() Usage {
+ if !iter.page.NotDone() {
+ return Usage{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the ListUsagesResultIterator type.
+func NewListUsagesResultIterator(page ListUsagesResultPage) ListUsagesResultIterator {
+ return ListUsagesResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (lur ListUsagesResult) IsEmpty() bool {
+ return lur.Value == nil || len(*lur.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (lur ListUsagesResult) hasNextLink() bool {
+ return lur.NextLink != nil && len(*lur.NextLink) != 0
+}
+
+// listUsagesResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (lur ListUsagesResult) listUsagesResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !lur.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(lur.NextLink)))
+}
+
+// ListUsagesResultPage contains a page of Usage values.
+type ListUsagesResultPage struct {
+ fn func(context.Context, ListUsagesResult) (ListUsagesResult, error)
+ lur ListUsagesResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ListUsagesResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListUsagesResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.lur)
+ if err != nil {
+ return err
+ }
+ page.lur = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ListUsagesResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ListUsagesResultPage) NotDone() bool {
+ return !page.lur.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ListUsagesResultPage) Response() ListUsagesResult {
+ return page.lur
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ListUsagesResultPage) Values() []Usage {
+ if page.lur.IsEmpty() {
+ return nil
+ }
+ return *page.lur.Value
+}
+
+// Creates a new instance of the ListUsagesResultPage type.
+func NewListUsagesResultPage(cur ListUsagesResult, getNextPage func(context.Context, ListUsagesResult) (ListUsagesResult, error)) ListUsagesResultPage {
+ return ListUsagesResultPage{
+ fn: getNextPage,
+ lur: cur,
+ }
+}
+
+// ListVirtualMachineExtensionImage ...
+type ListVirtualMachineExtensionImage struct {
+ autorest.Response `json:"-"`
+ Value *[]VirtualMachineExtensionImage `json:"value,omitempty"`
+}
+
+// ListVirtualMachineImageResource ...
+type ListVirtualMachineImageResource struct {
+ autorest.Response `json:"-"`
+ Value *[]VirtualMachineImageResource `json:"value,omitempty"`
+}
+
+// LoadBalancerConfiguration describes the load balancer configuration.
+type LoadBalancerConfiguration struct {
+ // ID - Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the Load balancer
+ Name *string `json:"name,omitempty"`
+ // Properties - Properties of the load balancer configuration.
+ Properties *LoadBalancerConfigurationProperties `json:"properties,omitempty"`
+}
+
+// LoadBalancerConfigurationProperties ...
+type LoadBalancerConfigurationProperties struct {
+ // FrontendIPConfigurations - Specifies the frontend IP to be used for the load balancer. Only IPv4 frontend IP address is supported. Each load balancer configuration must have exactly one frontend IP configuration.
+ FrontendIPConfigurations *[]LoadBalancerFrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"`
+}
+
+// LoadBalancerFrontendIPConfiguration ...
+type LoadBalancerFrontendIPConfiguration struct {
+ // Name - The name of the resource that is unique within the set of frontend IP configurations used by the load balancer. This name can be used to access the resource.
+ Name *string `json:"name,omitempty"`
+ // Properties - Properties of load balancer frontend ip configuration.
+ Properties *LoadBalancerFrontendIPConfigurationProperties `json:"properties,omitempty"`
+}
+
+// LoadBalancerFrontendIPConfigurationProperties describes a cloud service IP Configuration
+type LoadBalancerFrontendIPConfigurationProperties struct {
+ // PublicIPAddress - The reference to the public ip address resource.
+ PublicIPAddress *SubResource `json:"publicIPAddress,omitempty"`
+ // Subnet - The reference to the virtual network subnet resource.
+ Subnet *SubResource `json:"subnet,omitempty"`
+ // PrivateIPAddress - The virtual network private IP address of the IP configuration.
+ PrivateIPAddress *string `json:"privateIPAddress,omitempty"`
+}
+
+// LogAnalyticsExportRequestRateByIntervalFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
+type LogAnalyticsExportRequestRateByIntervalFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(LogAnalyticsClient) (LogAnalyticsOperationResult, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *LogAnalyticsExportRequestRateByIntervalFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for LogAnalyticsExportRequestRateByIntervalFuture.Result.
+func (future *LogAnalyticsExportRequestRateByIntervalFuture) result(client LogAnalyticsClient) (laor LogAnalyticsOperationResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportRequestRateByIntervalFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ laor.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.LogAnalyticsExportRequestRateByIntervalFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if laor.Response.Response, err = future.GetResult(sender); err == nil && laor.Response.Response.StatusCode != http.StatusNoContent {
+ laor, err = client.ExportRequestRateByIntervalResponder(laor.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportRequestRateByIntervalFuture", "Result", laor.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// LogAnalyticsExportThrottledRequestsFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type LogAnalyticsExportThrottledRequestsFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(LogAnalyticsClient) (LogAnalyticsOperationResult, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *LogAnalyticsExportThrottledRequestsFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for LogAnalyticsExportThrottledRequestsFuture.Result.
+func (future *LogAnalyticsExportThrottledRequestsFuture) result(client LogAnalyticsClient) (laor LogAnalyticsOperationResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportThrottledRequestsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ laor.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.LogAnalyticsExportThrottledRequestsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if laor.Response.Response, err = future.GetResult(sender); err == nil && laor.Response.Response.StatusCode != http.StatusNoContent {
+ laor, err = client.ExportThrottledRequestsResponder(laor.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.LogAnalyticsExportThrottledRequestsFuture", "Result", laor.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// LogAnalyticsInputBase api input base class for LogAnalytics Api.
+type LogAnalyticsInputBase struct {
+ // BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.
+ BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"`
+ // FromTime - From time of the query
+ FromTime *date.Time `json:"fromTime,omitempty"`
+ // ToTime - To time of the query
+ ToTime *date.Time `json:"toTime,omitempty"`
+ // GroupByThrottlePolicy - Group query result by Throttle Policy applied.
+ GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"`
+ // GroupByOperationName - Group query result by Operation Name.
+ GroupByOperationName *bool `json:"groupByOperationName,omitempty"`
+ // GroupByResourceName - Group query result by Resource Name.
+ GroupByResourceName *bool `json:"groupByResourceName,omitempty"`
+ // GroupByClientApplicationID - Group query result by Client Application ID.
+ GroupByClientApplicationID *bool `json:"groupByClientApplicationId,omitempty"`
+ // GroupByUserAgent - Group query result by User Agent.
+ GroupByUserAgent *bool `json:"groupByUserAgent,omitempty"`
+}
+
+// LogAnalyticsOperationResult logAnalytics operation status response
+type LogAnalyticsOperationResult struct {
+ autorest.Response `json:"-"`
+ // Properties - READ-ONLY; LogAnalyticsOutput
+ Properties *LogAnalyticsOutput `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for LogAnalyticsOperationResult.
+func (laor LogAnalyticsOperationResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// LogAnalyticsOutput logAnalytics output properties
+type LogAnalyticsOutput struct {
+ // Output - READ-ONLY; Output file Uri path to blob container.
+ Output *string `json:"output,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for LogAnalyticsOutput.
+func (lao LogAnalyticsOutput) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// MaintenanceRedeployStatus maintenance Operation Status.
+type MaintenanceRedeployStatus struct {
+ // IsCustomerInitiatedMaintenanceAllowed - True, if customer is allowed to perform Maintenance.
+ IsCustomerInitiatedMaintenanceAllowed *bool `json:"isCustomerInitiatedMaintenanceAllowed,omitempty"`
+ // PreMaintenanceWindowStartTime - Start Time for the Pre Maintenance Window.
+ PreMaintenanceWindowStartTime *date.Time `json:"preMaintenanceWindowStartTime,omitempty"`
+ // PreMaintenanceWindowEndTime - End Time for the Pre Maintenance Window.
+ PreMaintenanceWindowEndTime *date.Time `json:"preMaintenanceWindowEndTime,omitempty"`
+ // MaintenanceWindowStartTime - Start Time for the Maintenance Window.
+ MaintenanceWindowStartTime *date.Time `json:"maintenanceWindowStartTime,omitempty"`
+ // MaintenanceWindowEndTime - End Time for the Maintenance Window.
+ MaintenanceWindowEndTime *date.Time `json:"maintenanceWindowEndTime,omitempty"`
+ // LastOperationResultCode - The Last Maintenance Operation Result Code. Possible values include: 'MaintenanceOperationResultCodeTypesNone', 'MaintenanceOperationResultCodeTypesRetryLater', 'MaintenanceOperationResultCodeTypesMaintenanceAborted', 'MaintenanceOperationResultCodeTypesMaintenanceCompleted'
+ LastOperationResultCode MaintenanceOperationResultCodeTypes `json:"lastOperationResultCode,omitempty"`
+ // LastOperationMessage - Message returned for the last Maintenance Operation.
+ LastOperationMessage *string `json:"lastOperationMessage,omitempty"`
+}
+
+// ManagedArtifact the managed artifact.
+type ManagedArtifact struct {
+ // ID - The managed artifact id.
+ ID *string `json:"id,omitempty"`
+}
+
+// ManagedDiskParameters the parameters of a managed disk.
+type ManagedDiskParameters struct {
+ // StorageAccountType - Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS', 'StorageAccountTypesPremiumZRS', 'StorageAccountTypesStandardSSDZRS'
+ StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
+ // DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed disk.
+ DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
+ // ID - Resource Id
+ ID *string `json:"id,omitempty"`
+}
+
+// NetworkInterfaceReference describes a network interface reference.
+type NetworkInterfaceReference struct {
+ *NetworkInterfaceReferenceProperties `json:"properties,omitempty"`
+ // ID - Resource Id
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for NetworkInterfaceReference.
+func (nir NetworkInterfaceReference) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if nir.NetworkInterfaceReferenceProperties != nil {
+ objectMap["properties"] = nir.NetworkInterfaceReferenceProperties
+ }
+ if nir.ID != nil {
+ objectMap["id"] = nir.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for NetworkInterfaceReference struct.
+func (nir *NetworkInterfaceReference) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var networkInterfaceReferenceProperties NetworkInterfaceReferenceProperties
+ err = json.Unmarshal(*v, &networkInterfaceReferenceProperties)
+ if err != nil {
+ return err
+ }
+ nir.NetworkInterfaceReferenceProperties = &networkInterfaceReferenceProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ nir.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// NetworkInterfaceReferenceProperties describes a network interface reference properties.
+type NetworkInterfaceReferenceProperties struct {
+ // Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface.
+ Primary *bool `json:"primary,omitempty"`
+ // DeleteOption - Specify what happens to the network interface when the VM is deleted. Possible values include: 'DeleteOptionsDelete', 'DeleteOptionsDetach'
+ DeleteOption DeleteOptions `json:"deleteOption,omitempty"`
+}
+
+// NetworkProfile specifies the network interfaces or the networking configuration of the virtual machine.
+type NetworkProfile struct {
+ // NetworkInterfaces - Specifies the list of resource Ids for the network interfaces associated with the virtual machine.
+ NetworkInterfaces *[]NetworkInterfaceReference `json:"networkInterfaces,omitempty"`
+ // NetworkAPIVersion - specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations. Possible values include: 'NetworkAPIVersionTwoZeroTwoZeroHyphenMinusOneOneHyphenMinusZeroOne'
+ NetworkAPIVersion NetworkAPIVersion `json:"networkApiVersion,omitempty"`
+ // NetworkInterfaceConfigurations - Specifies the networking configurations that will be used to create the virtual machine networking resources.
+ NetworkInterfaceConfigurations *[]VirtualMachineNetworkInterfaceConfiguration `json:"networkInterfaceConfigurations,omitempty"`
+}
+
+// OperationListResult the List Compute Operation operation response.
+type OperationListResult struct {
+ autorest.Response `json:"-"`
+ // Value - READ-ONLY; The list of compute operations
+ Value *[]OperationValue `json:"value,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for OperationListResult.
+func (olr OperationListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// OperationValue describes the properties of a Compute Operation value.
+type OperationValue struct {
+ // Origin - READ-ONLY; The origin of the compute operation.
+ Origin *string `json:"origin,omitempty"`
+ // Name - READ-ONLY; The name of the compute operation.
+ Name *string `json:"name,omitempty"`
+ *OperationValueDisplay `json:"display,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for OperationValue.
+func (ov OperationValue) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ov.OperationValueDisplay != nil {
+ objectMap["display"] = ov.OperationValueDisplay
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for OperationValue struct.
+func (ov *OperationValue) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "origin":
+ if v != nil {
+ var origin string
+ err = json.Unmarshal(*v, &origin)
+ if err != nil {
+ return err
+ }
+ ov.Origin = &origin
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ov.Name = &name
+ }
+ case "display":
+ if v != nil {
+ var operationValueDisplay OperationValueDisplay
+ err = json.Unmarshal(*v, &operationValueDisplay)
+ if err != nil {
+ return err
+ }
+ ov.OperationValueDisplay = &operationValueDisplay
+ }
+ }
+ }
+
+ return nil
+}
+
+// OperationValueDisplay describes the properties of a Compute Operation Value Display.
+type OperationValueDisplay struct {
+ // Operation - READ-ONLY; The display name of the compute operation.
+ Operation *string `json:"operation,omitempty"`
+ // Resource - READ-ONLY; The display name of the resource the operation applies to.
+ Resource *string `json:"resource,omitempty"`
+ // Description - READ-ONLY; The description of the operation.
+ Description *string `json:"description,omitempty"`
+ // Provider - READ-ONLY; The resource provider for the operation.
+ Provider *string `json:"provider,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for OperationValueDisplay.
+func (ovd OperationValueDisplay) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// OrchestrationServiceStateInput the input for OrchestrationServiceState
+type OrchestrationServiceStateInput struct {
+ // ServiceName - The name of the service. Possible values include: 'OrchestrationServiceNamesAutomaticRepairs'
+ ServiceName OrchestrationServiceNames `json:"serviceName,omitempty"`
+ // Action - The action to be performed. Possible values include: 'OrchestrationServiceStateActionResume', 'OrchestrationServiceStateActionSuspend'
+ Action OrchestrationServiceStateAction `json:"action,omitempty"`
+}
+
+// OrchestrationServiceSummary summary for an orchestration service of a virtual machine scale set.
+type OrchestrationServiceSummary struct {
+ // ServiceName - READ-ONLY; The name of the service. Possible values include: 'OrchestrationServiceNamesAutomaticRepairs', 'OrchestrationServiceNamesDummyOrchestrationServiceName'
+ ServiceName OrchestrationServiceNames `json:"serviceName,omitempty"`
+ // ServiceState - READ-ONLY; The current state of the service. Possible values include: 'OrchestrationServiceStateNotRunning', 'OrchestrationServiceStateRunning', 'OrchestrationServiceStateSuspended'
+ ServiceState OrchestrationServiceState `json:"serviceState,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for OrchestrationServiceSummary.
+func (oss OrchestrationServiceSummary) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// OSDisk specifies information about the operating system disk used by the virtual machine.
For
+// more information about disks, see [About disks and VHDs for Azure virtual
+// machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).
+type OSDisk struct {
+ // OsType - This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD.
Possible values are:
**Windows**
**Linux**. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux'
+ OsType OperatingSystemTypes `json:"osType,omitempty"`
+ // EncryptionSettings - Specifies the encryption settings for the OS Disk.
Minimum api-version: 2015-06-15
+ EncryptionSettings *DiskEncryptionSettings `json:"encryptionSettings,omitempty"`
+ // Name - The disk name.
+ Name *string `json:"name,omitempty"`
+ // Vhd - The virtual hard disk.
+ Vhd *VirtualHardDisk `json:"vhd,omitempty"`
+ // Image - The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.
+ Image *VirtualHardDisk `json:"image,omitempty"`
+ // Caching - Specifies the caching requirements.
Possible values are:
**None**
**ReadOnly**
**ReadWrite**
Default: **None** for Standard storage. **ReadOnly** for Premium storage. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite'
+ Caching CachingTypes `json:"caching,omitempty"`
+ // WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
+ WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
+ // DiffDiskSettings - Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine.
+ DiffDiskSettings *DiffDiskSettings `json:"diffDiskSettings,omitempty"`
+ // CreateOption - Specifies how the virtual machine should be created.
Possible values are:
**Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.
**FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach'
+ CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
+ // DiskSizeGB - Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.
This value cannot be larger than 1023 GB
+ DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
+ // ManagedDisk - The managed disk parameters.
+ ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"`
+ // DeleteOption - Specifies whether OS Disk should be deleted or detached upon VM deletion.
Possible values:
**Delete** If this value is used, the OS disk is deleted when VM is deleted.
**Detach** If this value is used, the os disk is retained after VM is deleted.
The default value is set to **detach**. For an ephemeral OS Disk, the default value is set to **Delete**. User cannot change the delete option for ephemeral OS Disk. Possible values include: 'DiskDeleteOptionTypesDelete', 'DiskDeleteOptionTypesDetach'
+ DeleteOption DiskDeleteOptionTypes `json:"deleteOption,omitempty"`
+}
+
+// OSDiskImage contains the os disk image information.
+type OSDiskImage struct {
+ // OperatingSystem - The operating system of the osDiskImage. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux'
+ OperatingSystem OperatingSystemTypes `json:"operatingSystem,omitempty"`
+}
+
+// OSDiskImageEncryption contains encryption settings for an OS disk image.
+type OSDiskImageEncryption struct {
+ // DiskEncryptionSetID - A relative URI containing the resource ID of the disk encryption set.
+ DiskEncryptionSetID *string `json:"diskEncryptionSetId,omitempty"`
+}
+
+// OSFamily describes a cloud service OS family.
+type OSFamily struct {
+ autorest.Response `json:"-"`
+ // ID - READ-ONLY; Resource Id.
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - READ-ONLY; Resource location.
+ Location *string `json:"location,omitempty"`
+ Properties *OSFamilyProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for OSFamily.
+func (of OSFamily) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if of.Properties != nil {
+ objectMap["properties"] = of.Properties
+ }
+ return json.Marshal(objectMap)
+}
+
+// OSFamilyListResult ...
+type OSFamilyListResult struct {
+ autorest.Response `json:"-"`
+ Value *[]OSFamily `json:"value,omitempty"`
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// OSFamilyListResultIterator provides access to a complete listing of OSFamily values.
+type OSFamilyListResultIterator struct {
+ i int
+ page OSFamilyListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *OSFamilyListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OSFamilyListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *OSFamilyListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter OSFamilyListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter OSFamilyListResultIterator) Response() OSFamilyListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter OSFamilyListResultIterator) Value() OSFamily {
+ if !iter.page.NotDone() {
+ return OSFamily{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the OSFamilyListResultIterator type.
+func NewOSFamilyListResultIterator(page OSFamilyListResultPage) OSFamilyListResultIterator {
+ return OSFamilyListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (oflr OSFamilyListResult) IsEmpty() bool {
+ return oflr.Value == nil || len(*oflr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (oflr OSFamilyListResult) hasNextLink() bool {
+ return oflr.NextLink != nil && len(*oflr.NextLink) != 0
+}
+
+// oSFamilyListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (oflr OSFamilyListResult) oSFamilyListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !oflr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(oflr.NextLink)))
+}
+
+// OSFamilyListResultPage contains a page of OSFamily values.
+type OSFamilyListResultPage struct {
+ fn func(context.Context, OSFamilyListResult) (OSFamilyListResult, error)
+ oflr OSFamilyListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *OSFamilyListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OSFamilyListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.oflr)
+ if err != nil {
+ return err
+ }
+ page.oflr = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *OSFamilyListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page OSFamilyListResultPage) NotDone() bool {
+ return !page.oflr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page OSFamilyListResultPage) Response() OSFamilyListResult {
+ return page.oflr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page OSFamilyListResultPage) Values() []OSFamily {
+ if page.oflr.IsEmpty() {
+ return nil
+ }
+ return *page.oflr.Value
+}
+
+// Creates a new instance of the OSFamilyListResultPage type.
+func NewOSFamilyListResultPage(cur OSFamilyListResult, getNextPage func(context.Context, OSFamilyListResult) (OSFamilyListResult, error)) OSFamilyListResultPage {
+ return OSFamilyListResultPage{
+ fn: getNextPage,
+ oflr: cur,
+ }
+}
+
+// OSFamilyProperties OS family properties.
+type OSFamilyProperties struct {
+ // Name - READ-ONLY; The OS family name.
+ Name *string `json:"name,omitempty"`
+ // Label - READ-ONLY; The OS family label.
+ Label *string `json:"label,omitempty"`
+ // Versions - READ-ONLY; List of OS versions belonging to this family.
+ Versions *[]OSVersionPropertiesBase `json:"versions,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for OSFamilyProperties.
+func (ofp OSFamilyProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// OSProfile specifies the operating system settings for the virtual machine. Some of the settings cannot
+// be changed once VM is provisioned.
+type OSProfile struct {
+ // ComputerName - Specifies the host OS name of the virtual machine.
This name cannot be updated after the VM is created.
**Max-length (Windows):** 15 characters
**Max-length (Linux):** 64 characters.
For naming conventions and restrictions see [Azure infrastructure services implementation guidelines](https://docs.microsoft.com/azure/azure-resource-manager/management/resource-name-rules).
+ ComputerName *string `json:"computerName,omitempty"`
+ // AdminUsername - Specifies the name of the administrator account.
This property cannot be updated after the VM is created.
**Windows-only restriction:** Cannot end in "."
**Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".
**Minimum-length (Linux):** 1 character
**Max-length (Linux):** 64 characters
**Max-length (Windows):** 20 characters.
+ AdminUsername *string `json:"adminUsername,omitempty"`
+ // AdminPassword - Specifies the password of the administrator account.
**Minimum-length (Windows):** 8 characters
**Minimum-length (Linux):** 6 characters
**Max-length (Windows):** 123 characters
**Max-length (Linux):** 72 characters
**Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
Has lower characters
Has upper characters
Has a digit
Has a special character (Regex match [\W_])
**Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"
For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)
For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection)
+ AdminPassword *string `json:"adminPassword,omitempty"`
+ // CustomData - Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes.
**Note: Do not pass any secrets or passwords in customData property**
This property cannot be updated after the VM is created.
customData is passed to the VM to be saved as a file, for more information see [Custom Data on Azure VMs](https://azure.microsoft.com/blog/custom-data-and-cloud-init-on-windows-azure/)
For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init)
+ CustomData *string `json:"customData,omitempty"`
+ // WindowsConfiguration - Specifies Windows operating system settings on the virtual machine.
+ WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"`
+ // LinuxConfiguration - Specifies the Linux operating system settings on the virtual machine.
For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros).
+ LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"`
+ // Secrets - Specifies set of certificates that should be installed onto the virtual machine. To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).
+ Secrets *[]VaultSecretGroup `json:"secrets,omitempty"`
+ // AllowExtensionOperations - Specifies whether extension operations should be allowed on the virtual machine.
This may only be set to False when no extensions are present on the virtual machine.
+ AllowExtensionOperations *bool `json:"allowExtensionOperations,omitempty"`
+ // RequireGuestProvisionSignal - Specifies whether the guest provision signal is required to infer provision success of the virtual machine. **Note: This property is for private testing only, and all customers must not set the property to false.**
+ RequireGuestProvisionSignal *bool `json:"requireGuestProvisionSignal,omitempty"`
+}
+
+// OSVersion describes a cloud service OS version.
+type OSVersion struct {
+ autorest.Response `json:"-"`
+ // ID - READ-ONLY; Resource Id.
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - READ-ONLY; Resource location.
+ Location *string `json:"location,omitempty"`
+ Properties *OSVersionProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for OSVersion.
+func (ov OSVersion) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ov.Properties != nil {
+ objectMap["properties"] = ov.Properties
+ }
+ return json.Marshal(objectMap)
+}
+
+// OSVersionListResult ...
+type OSVersionListResult struct {
+ autorest.Response `json:"-"`
+ Value *[]OSVersion `json:"value,omitempty"`
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// OSVersionListResultIterator provides access to a complete listing of OSVersion values.
+type OSVersionListResultIterator struct {
+ i int
+ page OSVersionListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *OSVersionListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OSVersionListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *OSVersionListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter OSVersionListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter OSVersionListResultIterator) Response() OSVersionListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter OSVersionListResultIterator) Value() OSVersion {
+ if !iter.page.NotDone() {
+ return OSVersion{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the OSVersionListResultIterator type.
+func NewOSVersionListResultIterator(page OSVersionListResultPage) OSVersionListResultIterator {
+ return OSVersionListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (ovlr OSVersionListResult) IsEmpty() bool {
+ return ovlr.Value == nil || len(*ovlr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (ovlr OSVersionListResult) hasNextLink() bool {
+ return ovlr.NextLink != nil && len(*ovlr.NextLink) != 0
+}
+
+// oSVersionListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (ovlr OSVersionListResult) oSVersionListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !ovlr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(ovlr.NextLink)))
+}
+
+// OSVersionListResultPage contains a page of OSVersion values.
+type OSVersionListResultPage struct {
+ fn func(context.Context, OSVersionListResult) (OSVersionListResult, error)
+ ovlr OSVersionListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *OSVersionListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OSVersionListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.ovlr)
+ if err != nil {
+ return err
+ }
+ page.ovlr = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *OSVersionListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page OSVersionListResultPage) NotDone() bool {
+ return !page.ovlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page OSVersionListResultPage) Response() OSVersionListResult {
+ return page.ovlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page OSVersionListResultPage) Values() []OSVersion {
+ if page.ovlr.IsEmpty() {
+ return nil
+ }
+ return *page.ovlr.Value
+}
+
+// Creates a new instance of the OSVersionListResultPage type.
+func NewOSVersionListResultPage(cur OSVersionListResult, getNextPage func(context.Context, OSVersionListResult) (OSVersionListResult, error)) OSVersionListResultPage {
+ return OSVersionListResultPage{
+ fn: getNextPage,
+ ovlr: cur,
+ }
+}
+
+// OSVersionProperties OS version properties.
+type OSVersionProperties struct {
+ // Family - READ-ONLY; The family of this OS version.
+ Family *string `json:"family,omitempty"`
+ // FamilyLabel - READ-ONLY; The family label of this OS version.
+ FamilyLabel *string `json:"familyLabel,omitempty"`
+ // Version - READ-ONLY; The OS version.
+ Version *string `json:"version,omitempty"`
+ // Label - READ-ONLY; The OS version label.
+ Label *string `json:"label,omitempty"`
+ // IsDefault - READ-ONLY; Specifies whether this is the default OS version for its family.
+ IsDefault *bool `json:"isDefault,omitempty"`
+ // IsActive - READ-ONLY; Specifies whether this OS version is active.
+ IsActive *bool `json:"isActive,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for OSVersionProperties.
+func (ovp OSVersionProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// OSVersionPropertiesBase configuration view of an OS version.
+type OSVersionPropertiesBase struct {
+ // Version - READ-ONLY; The OS version.
+ Version *string `json:"version,omitempty"`
+ // Label - READ-ONLY; The OS version label.
+ Label *string `json:"label,omitempty"`
+ // IsDefault - READ-ONLY; Specifies whether this is the default OS version for its family.
+ IsDefault *bool `json:"isDefault,omitempty"`
+ // IsActive - READ-ONLY; Specifies whether this OS version is active.
+ IsActive *bool `json:"isActive,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for OSVersionPropertiesBase.
+func (ovpb OSVersionPropertiesBase) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// PatchInstallationDetail information about a specific patch that was encountered during an installation
+// action.
+type PatchInstallationDetail struct {
+ // PatchID - READ-ONLY; A unique identifier for the patch.
+ PatchID *string `json:"patchId,omitempty"`
+ // Name - READ-ONLY; The friendly name of the patch.
+ Name *string `json:"name,omitempty"`
+ // Version - READ-ONLY; The version string of the package. It may conform to Semantic Versioning. Only applies to Linux.
+ Version *string `json:"version,omitempty"`
+ // KbID - READ-ONLY; The KBID of the patch. Only applies to Windows patches.
+ KbID *string `json:"kbId,omitempty"`
+ // Classifications - READ-ONLY; The classification(s) of the patch as provided by the patch publisher.
+ Classifications *[]string `json:"classifications,omitempty"`
+ // InstallationState - READ-ONLY; The state of the patch after the installation operation completed. Possible values include: 'PatchInstallationStateUnknown', 'PatchInstallationStateInstalled', 'PatchInstallationStateFailed', 'PatchInstallationStateExcluded', 'PatchInstallationStateNotSelected', 'PatchInstallationStatePending'
+ InstallationState PatchInstallationState `json:"installationState,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for PatchInstallationDetail.
+func (pid PatchInstallationDetail) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// PatchSettings specifies settings related to VM Guest Patching on Windows.
+type PatchSettings struct {
+ // PatchMode - Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as Flexible.
Possible values are:
**Manual** - You control the application of patches to a virtual machine. You do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates must be false
**AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true.
**AutomaticByPlatform** - the virtual machine will automatically updated by the platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true. Possible values include: 'WindowsVMGuestPatchModeManual', 'WindowsVMGuestPatchModeAutomaticByOS', 'WindowsVMGuestPatchModeAutomaticByPlatform'
+ PatchMode WindowsVMGuestPatchMode `json:"patchMode,omitempty"`
+ // EnableHotpatching - Enables customers to patch their Azure VMs without requiring a reboot. For enableHotpatching, the 'provisionVMAgent' must be set to true and 'patchMode' must be set to 'AutomaticByPlatform'.
+ EnableHotpatching *bool `json:"enableHotpatching,omitempty"`
+ // AssessmentMode - Specifies the mode of VM Guest patch assessment for the IaaS virtual machine.
Possible values are:
**ImageDefault** - You control the timing of patch assessments on a virtual machine.
**AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true. Possible values include: 'WindowsPatchAssessmentModeImageDefault', 'WindowsPatchAssessmentModeAutomaticByPlatform'
+ AssessmentMode WindowsPatchAssessmentMode `json:"assessmentMode,omitempty"`
+}
+
+// PirCommunityGalleryResource base information about the community gallery resource in pir.
+type PirCommunityGalleryResource struct {
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Location - READ-ONLY; Resource location
+ Location *string `json:"location,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ *CommunityGalleryIdentifier `json:"identifier,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for PirCommunityGalleryResource.
+func (pcgr PirCommunityGalleryResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if pcgr.CommunityGalleryIdentifier != nil {
+ objectMap["identifier"] = pcgr.CommunityGalleryIdentifier
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for PirCommunityGalleryResource struct.
+func (pcgr *PirCommunityGalleryResource) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ pcgr.Name = &name
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ pcgr.Location = &location
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ pcgr.Type = &typeVar
+ }
+ case "identifier":
+ if v != nil {
+ var communityGalleryIdentifier CommunityGalleryIdentifier
+ err = json.Unmarshal(*v, &communityGalleryIdentifier)
+ if err != nil {
+ return err
+ }
+ pcgr.CommunityGalleryIdentifier = &communityGalleryIdentifier
+ }
+ }
+ }
+
+ return nil
+}
+
+// PirResource the Resource model definition.
+type PirResource struct {
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Location - READ-ONLY; Resource location
+ Location *string `json:"location,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for PirResource.
+func (pr PirResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// PirSharedGalleryResource base information about the shared gallery resource in pir.
+type PirSharedGalleryResource struct {
+ *SharedGalleryIdentifier `json:"identifier,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Location - READ-ONLY; Resource location
+ Location *string `json:"location,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for PirSharedGalleryResource.
+func (psgr PirSharedGalleryResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if psgr.SharedGalleryIdentifier != nil {
+ objectMap["identifier"] = psgr.SharedGalleryIdentifier
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for PirSharedGalleryResource struct.
+func (psgr *PirSharedGalleryResource) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "identifier":
+ if v != nil {
+ var sharedGalleryIdentifier SharedGalleryIdentifier
+ err = json.Unmarshal(*v, &sharedGalleryIdentifier)
+ if err != nil {
+ return err
+ }
+ psgr.SharedGalleryIdentifier = &sharedGalleryIdentifier
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ psgr.Name = &name
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ psgr.Location = &location
+ }
+ }
+ }
+
+ return nil
+}
+
+// Plan specifies information about the marketplace image used to create the virtual machine. This element
+// is only used for marketplace images. Before you can use a marketplace image from an API, you must enable
+// the image for programmatic use. In the Azure portal, find the marketplace image that you want to use
+// and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and
+// then click **Save**.
+type Plan struct {
+ // Name - The plan ID.
+ Name *string `json:"name,omitempty"`
+ // Publisher - The publisher ID.
+ Publisher *string `json:"publisher,omitempty"`
+ // Product - Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.
+ Product *string `json:"product,omitempty"`
+ // PromotionCode - The promotion code.
+ PromotionCode *string `json:"promotionCode,omitempty"`
+}
+
+// PrivateEndpoint the Private Endpoint resource.
+type PrivateEndpoint struct {
+ // ID - READ-ONLY; The ARM identifier for Private Endpoint
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for PrivateEndpoint.
+func (peVar PrivateEndpoint) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// PrivateEndpointConnection the Private Endpoint Connection resource.
+type PrivateEndpointConnection struct {
+ autorest.Response `json:"-"`
+ // PrivateEndpointConnectionProperties - Resource properties.
+ *PrivateEndpointConnectionProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; private endpoint connection Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; private endpoint connection name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; private endpoint connection type
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for PrivateEndpointConnection.
+func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if pec.PrivateEndpointConnectionProperties != nil {
+ objectMap["properties"] = pec.PrivateEndpointConnectionProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct.
+func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var privateEndpointConnectionProperties PrivateEndpointConnectionProperties
+ err = json.Unmarshal(*v, &privateEndpointConnectionProperties)
+ if err != nil {
+ return err
+ }
+ pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ pec.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ pec.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ pec.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// PrivateEndpointConnectionListResult a list of private link resources
+type PrivateEndpointConnectionListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Array of private endpoint connections
+ Value *[]PrivateEndpointConnection `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of snapshots. Call ListNext() with this to fetch the next page of snapshots.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// PrivateEndpointConnectionListResultIterator provides access to a complete listing of
+// PrivateEndpointConnection values.
+type PrivateEndpointConnectionListResultIterator struct {
+ i int
+ page PrivateEndpointConnectionListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *PrivateEndpointConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *PrivateEndpointConnectionListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter PrivateEndpointConnectionListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter PrivateEndpointConnectionListResultIterator) Response() PrivateEndpointConnectionListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter PrivateEndpointConnectionListResultIterator) Value() PrivateEndpointConnection {
+ if !iter.page.NotDone() {
+ return PrivateEndpointConnection{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the PrivateEndpointConnectionListResultIterator type.
+func NewPrivateEndpointConnectionListResultIterator(page PrivateEndpointConnectionListResultPage) PrivateEndpointConnectionListResultIterator {
+ return PrivateEndpointConnectionListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (peclr PrivateEndpointConnectionListResult) IsEmpty() bool {
+ return peclr.Value == nil || len(*peclr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (peclr PrivateEndpointConnectionListResult) hasNextLink() bool {
+ return peclr.NextLink != nil && len(*peclr.NextLink) != 0
+}
+
+// privateEndpointConnectionListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (peclr PrivateEndpointConnectionListResult) privateEndpointConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !peclr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(peclr.NextLink)))
+}
+
+// PrivateEndpointConnectionListResultPage contains a page of PrivateEndpointConnection values.
+type PrivateEndpointConnectionListResultPage struct {
+ fn func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)
+ peclr PrivateEndpointConnectionListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *PrivateEndpointConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.peclr)
+ if err != nil {
+ return err
+ }
+ page.peclr = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *PrivateEndpointConnectionListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page PrivateEndpointConnectionListResultPage) NotDone() bool {
+ return !page.peclr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page PrivateEndpointConnectionListResultPage) Response() PrivateEndpointConnectionListResult {
+ return page.peclr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page PrivateEndpointConnectionListResultPage) Values() []PrivateEndpointConnection {
+ if page.peclr.IsEmpty() {
+ return nil
+ }
+ return *page.peclr.Value
+}
+
+// Creates a new instance of the PrivateEndpointConnectionListResultPage type.
+func NewPrivateEndpointConnectionListResultPage(cur PrivateEndpointConnectionListResult, getNextPage func(context.Context, PrivateEndpointConnectionListResult) (PrivateEndpointConnectionListResult, error)) PrivateEndpointConnectionListResultPage {
+ return PrivateEndpointConnectionListResultPage{
+ fn: getNextPage,
+ peclr: cur,
+ }
+}
+
+// PrivateEndpointConnectionProperties properties of the PrivateEndpointConnectProperties.
+type PrivateEndpointConnectionProperties struct {
+ // PrivateEndpoint - READ-ONLY; The resource of private end point.
+ PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
+ // PrivateLinkServiceConnectionState - A collection of information about the state of the connection between DiskAccess and Virtual Network.
+ PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
+ // ProvisioningState - The provisioning state of the private endpoint connection resource. Possible values include: 'PrivateEndpointConnectionProvisioningStateSucceeded', 'PrivateEndpointConnectionProvisioningStateCreating', 'PrivateEndpointConnectionProvisioningStateDeleting', 'PrivateEndpointConnectionProvisioningStateFailed'
+ ProvisioningState PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for PrivateEndpointConnectionProperties.
+func (pecp PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if pecp.PrivateLinkServiceConnectionState != nil {
+ objectMap["privateLinkServiceConnectionState"] = pecp.PrivateLinkServiceConnectionState
+ }
+ if pecp.ProvisioningState != "" {
+ objectMap["provisioningState"] = pecp.ProvisioningState
+ }
+ return json.Marshal(objectMap)
+}
+
+// PrivateLinkResource a private link resource
+type PrivateLinkResource struct {
+ // PrivateLinkResourceProperties - Resource properties.
+ *PrivateLinkResourceProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; private link resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; private link resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; private link resource type
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for PrivateLinkResource.
+func (plr PrivateLinkResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if plr.PrivateLinkResourceProperties != nil {
+ objectMap["properties"] = plr.PrivateLinkResourceProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for PrivateLinkResource struct.
+func (plr *PrivateLinkResource) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var privateLinkResourceProperties PrivateLinkResourceProperties
+ err = json.Unmarshal(*v, &privateLinkResourceProperties)
+ if err != nil {
+ return err
+ }
+ plr.PrivateLinkResourceProperties = &privateLinkResourceProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ plr.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ plr.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ plr.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// PrivateLinkResourceListResult a list of private link resources
+type PrivateLinkResourceListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Array of private link resources
+ Value *[]PrivateLinkResource `json:"value,omitempty"`
+}
+
+// PrivateLinkResourceProperties properties of a private link resource.
+type PrivateLinkResourceProperties struct {
+ // GroupID - READ-ONLY; The private link resource group id.
+ GroupID *string `json:"groupId,omitempty"`
+ // RequiredMembers - READ-ONLY; The private link resource required member names.
+ RequiredMembers *[]string `json:"requiredMembers,omitempty"`
+ // RequiredZoneNames - The private link resource DNS zone name.
+ RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for PrivateLinkResourceProperties.
+func (plrp PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if plrp.RequiredZoneNames != nil {
+ objectMap["requiredZoneNames"] = plrp.RequiredZoneNames
+ }
+ return json.Marshal(objectMap)
+}
+
+// PrivateLinkServiceConnectionState a collection of information about the state of the connection between
+// service consumer and provider.
+type PrivateLinkServiceConnectionState struct {
+ // Status - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Possible values include: 'PrivateEndpointServiceConnectionStatusPending', 'PrivateEndpointServiceConnectionStatusApproved', 'PrivateEndpointServiceConnectionStatusRejected'
+ Status PrivateEndpointServiceConnectionStatus `json:"status,omitempty"`
+ // Description - The reason for approval/rejection of the connection.
+ Description *string `json:"description,omitempty"`
+ // ActionsRequired - A message indicating if changes on the service provider require any updates on the consumer.
+ ActionsRequired *string `json:"actionsRequired,omitempty"`
+}
+
+// PropertyUpdatesInProgress properties of the disk for which update is pending.
+type PropertyUpdatesInProgress struct {
+ // TargetTier - The target performance tier of the disk if a tier change operation is in progress.
+ TargetTier *string `json:"targetTier,omitempty"`
+}
+
+// ProximityPlacementGroup specifies information about the proximity placement group.
+type ProximityPlacementGroup struct {
+ autorest.Response `json:"-"`
+ // ProximityPlacementGroupProperties - Describes the properties of a Proximity Placement Group.
+ *ProximityPlacementGroupProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for ProximityPlacementGroup.
+func (ppg ProximityPlacementGroup) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ppg.ProximityPlacementGroupProperties != nil {
+ objectMap["properties"] = ppg.ProximityPlacementGroupProperties
+ }
+ if ppg.Location != nil {
+ objectMap["location"] = ppg.Location
+ }
+ if ppg.Tags != nil {
+ objectMap["tags"] = ppg.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ProximityPlacementGroup struct.
+func (ppg *ProximityPlacementGroup) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var proximityPlacementGroupProperties ProximityPlacementGroupProperties
+ err = json.Unmarshal(*v, &proximityPlacementGroupProperties)
+ if err != nil {
+ return err
+ }
+ ppg.ProximityPlacementGroupProperties = &proximityPlacementGroupProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ ppg.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ppg.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ ppg.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ ppg.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ ppg.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// ProximityPlacementGroupListResult the List Proximity Placement Group operation response.
+type ProximityPlacementGroupListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of proximity placement groups
+ Value *[]ProximityPlacementGroup `json:"value,omitempty"`
+ // NextLink - The URI to fetch the next page of proximity placement groups.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ProximityPlacementGroupListResultIterator provides access to a complete listing of
+// ProximityPlacementGroup values.
+type ProximityPlacementGroupListResultIterator struct {
+ i int
+ page ProximityPlacementGroupListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ProximityPlacementGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ProximityPlacementGroupListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ProximityPlacementGroupListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ProximityPlacementGroupListResultIterator) Response() ProximityPlacementGroupListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ProximityPlacementGroupListResultIterator) Value() ProximityPlacementGroup {
+ if !iter.page.NotDone() {
+ return ProximityPlacementGroup{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the ProximityPlacementGroupListResultIterator type.
+func NewProximityPlacementGroupListResultIterator(page ProximityPlacementGroupListResultPage) ProximityPlacementGroupListResultIterator {
+ return ProximityPlacementGroupListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (ppglr ProximityPlacementGroupListResult) IsEmpty() bool {
+ return ppglr.Value == nil || len(*ppglr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (ppglr ProximityPlacementGroupListResult) hasNextLink() bool {
+ return ppglr.NextLink != nil && len(*ppglr.NextLink) != 0
+}
+
+// proximityPlacementGroupListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (ppglr ProximityPlacementGroupListResult) proximityPlacementGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !ppglr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(ppglr.NextLink)))
+}
+
+// ProximityPlacementGroupListResultPage contains a page of ProximityPlacementGroup values.
+type ProximityPlacementGroupListResultPage struct {
+ fn func(context.Context, ProximityPlacementGroupListResult) (ProximityPlacementGroupListResult, error)
+ ppglr ProximityPlacementGroupListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ProximityPlacementGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.ppglr)
+ if err != nil {
+ return err
+ }
+ page.ppglr = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ProximityPlacementGroupListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ProximityPlacementGroupListResultPage) NotDone() bool {
+ return !page.ppglr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ProximityPlacementGroupListResultPage) Response() ProximityPlacementGroupListResult {
+ return page.ppglr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ProximityPlacementGroupListResultPage) Values() []ProximityPlacementGroup {
+ if page.ppglr.IsEmpty() {
+ return nil
+ }
+ return *page.ppglr.Value
+}
+
+// Creates a new instance of the ProximityPlacementGroupListResultPage type.
+func NewProximityPlacementGroupListResultPage(cur ProximityPlacementGroupListResult, getNextPage func(context.Context, ProximityPlacementGroupListResult) (ProximityPlacementGroupListResult, error)) ProximityPlacementGroupListResultPage {
+ return ProximityPlacementGroupListResultPage{
+ fn: getNextPage,
+ ppglr: cur,
+ }
+}
+
+// ProximityPlacementGroupProperties describes the properties of a Proximity Placement Group.
+type ProximityPlacementGroupProperties struct {
+ // ProximityPlacementGroupType - Specifies the type of the proximity placement group.
Possible values are:
**Standard** : Co-locate resources within an Azure region or Availability Zone.
**Ultra** : For future use. Possible values include: 'ProximityPlacementGroupTypeStandard', 'ProximityPlacementGroupTypeUltra'
+ ProximityPlacementGroupType ProximityPlacementGroupType `json:"proximityPlacementGroupType,omitempty"`
+ // VirtualMachines - READ-ONLY; A list of references to all virtual machines in the proximity placement group.
+ VirtualMachines *[]SubResourceWithColocationStatus `json:"virtualMachines,omitempty"`
+ // VirtualMachineScaleSets - READ-ONLY; A list of references to all virtual machine scale sets in the proximity placement group.
+ VirtualMachineScaleSets *[]SubResourceWithColocationStatus `json:"virtualMachineScaleSets,omitempty"`
+ // AvailabilitySets - READ-ONLY; A list of references to all availability sets in the proximity placement group.
+ AvailabilitySets *[]SubResourceWithColocationStatus `json:"availabilitySets,omitempty"`
+ // ColocationStatus - Describes colocation status of the Proximity Placement Group.
+ ColocationStatus *InstanceViewStatus `json:"colocationStatus,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ProximityPlacementGroupProperties.
+func (ppgp ProximityPlacementGroupProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ppgp.ProximityPlacementGroupType != "" {
+ objectMap["proximityPlacementGroupType"] = ppgp.ProximityPlacementGroupType
+ }
+ if ppgp.ColocationStatus != nil {
+ objectMap["colocationStatus"] = ppgp.ColocationStatus
+ }
+ return json.Marshal(objectMap)
+}
+
+// ProximityPlacementGroupUpdate specifies information about the proximity placement group.
+type ProximityPlacementGroupUpdate struct {
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for ProximityPlacementGroupUpdate.
+func (ppgu ProximityPlacementGroupUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ppgu.Tags != nil {
+ objectMap["tags"] = ppgu.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// ProxyOnlyResource the ProxyOnly Resource model definition.
+type ProxyOnlyResource struct {
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ProxyOnlyResource.
+func (por ProxyOnlyResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// ProxyResource the resource model definition for an Azure Resource Manager proxy resource. It will not
+// have tags and a location
+type ProxyResource struct {
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ProxyResource.
+func (pr ProxyResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// PublicIPAddressSku describes the public IP Sku
+type PublicIPAddressSku struct {
+ // Name - Specify public IP sku name. Possible values include: 'PublicIPAddressSkuNameBasic', 'PublicIPAddressSkuNameStandard'
+ Name PublicIPAddressSkuName `json:"name,omitempty"`
+ // Tier - Specify public IP sku tier. Possible values include: 'PublicIPAddressSkuTierRegional', 'PublicIPAddressSkuTierGlobal'
+ Tier PublicIPAddressSkuTier `json:"tier,omitempty"`
+}
+
+// PurchasePlan used for establishing the purchase context of any 3rd Party artifact through MarketPlace.
+type PurchasePlan struct {
+ // Publisher - The publisher ID.
+ Publisher *string `json:"publisher,omitempty"`
+ // Name - The plan ID.
+ Name *string `json:"name,omitempty"`
+ // Product - Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element.
+ Product *string `json:"product,omitempty"`
+ // PromotionCode - The Offer Promotion Code.
+ PromotionCode *string `json:"promotionCode,omitempty"`
+}
+
+// ReadCloser ...
+type ReadCloser struct {
+ autorest.Response `json:"-"`
+ Value *io.ReadCloser `json:"value,omitempty"`
+}
+
+// RecommendedMachineConfiguration the properties describe the recommended machine configuration for this
+// Image Definition. These properties are updatable.
+type RecommendedMachineConfiguration struct {
+ VCPUs *ResourceRange `json:"vCPUs,omitempty"`
+ Memory *ResourceRange `json:"memory,omitempty"`
+}
+
+// RecoveryWalkResponse response after calling a manual recovery walk
+type RecoveryWalkResponse struct {
+ autorest.Response `json:"-"`
+ // WalkPerformed - READ-ONLY; Whether the recovery walk was performed
+ WalkPerformed *bool `json:"walkPerformed,omitempty"`
+ // NextPlatformUpdateDomain - READ-ONLY; The next update domain that needs to be walked. Null means walk spanning all update domains has been completed
+ NextPlatformUpdateDomain *int32 `json:"nextPlatformUpdateDomain,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for RecoveryWalkResponse.
+func (rwr RecoveryWalkResponse) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// RegionalReplicationStatus this is the regional replication status.
+type RegionalReplicationStatus struct {
+ // Region - READ-ONLY; The region to which the gallery image version is being replicated to.
+ Region *string `json:"region,omitempty"`
+ // State - READ-ONLY; This is the regional replication state. Possible values include: 'ReplicationStateUnknown', 'ReplicationStateReplicating', 'ReplicationStateCompleted', 'ReplicationStateFailed'
+ State ReplicationState `json:"state,omitempty"`
+ // Details - READ-ONLY; The details of the replication status.
+ Details *string `json:"details,omitempty"`
+ // Progress - READ-ONLY; It indicates progress of the replication job.
+ Progress *int32 `json:"progress,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for RegionalReplicationStatus.
+func (rrs RegionalReplicationStatus) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// ReplicationStatus this is the replication status of the gallery image version.
+type ReplicationStatus struct {
+ // AggregatedState - READ-ONLY; This is the aggregated replication status based on all the regional replication status flags. Possible values include: 'AggregatedReplicationStateUnknown', 'AggregatedReplicationStateInProgress', 'AggregatedReplicationStateCompleted', 'AggregatedReplicationStateFailed'
+ AggregatedState AggregatedReplicationState `json:"aggregatedState,omitempty"`
+ // Summary - READ-ONLY; This is a summary of replication status for each region.
+ Summary *[]RegionalReplicationStatus `json:"summary,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ReplicationStatus.
+func (rs ReplicationStatus) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// RequestRateByIntervalInput api request input for LogAnalytics getRequestRateByInterval Api.
+type RequestRateByIntervalInput struct {
+ // IntervalLength - Interval value in minutes used to create LogAnalytics call rate logs. Possible values include: 'IntervalInMinsThreeMins', 'IntervalInMinsFiveMins', 'IntervalInMinsThirtyMins', 'IntervalInMinsSixtyMins'
+ IntervalLength IntervalInMins `json:"intervalLength,omitempty"`
+ // BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.
+ BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"`
+ // FromTime - From time of the query
+ FromTime *date.Time `json:"fromTime,omitempty"`
+ // ToTime - To time of the query
+ ToTime *date.Time `json:"toTime,omitempty"`
+ // GroupByThrottlePolicy - Group query result by Throttle Policy applied.
+ GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"`
+ // GroupByOperationName - Group query result by Operation Name.
+ GroupByOperationName *bool `json:"groupByOperationName,omitempty"`
+ // GroupByResourceName - Group query result by Resource Name.
+ GroupByResourceName *bool `json:"groupByResourceName,omitempty"`
+ // GroupByClientApplicationID - Group query result by Client Application ID.
+ GroupByClientApplicationID *bool `json:"groupByClientApplicationId,omitempty"`
+ // GroupByUserAgent - Group query result by User Agent.
+ GroupByUserAgent *bool `json:"groupByUserAgent,omitempty"`
+}
+
+// Resource the Resource model definition.
+type Resource struct {
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for Resource.
+func (r Resource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if r.Location != nil {
+ objectMap["location"] = r.Location
+ }
+ if r.Tags != nil {
+ objectMap["tags"] = r.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// ResourceInstanceViewStatus instance view status.
+type ResourceInstanceViewStatus struct {
+ // Code - READ-ONLY; The status code.
+ Code *string `json:"code,omitempty"`
+ // DisplayStatus - READ-ONLY; The short localizable label for the status.
+ DisplayStatus *string `json:"displayStatus,omitempty"`
+ // Message - READ-ONLY; The detailed status message, including for alerts and error messages.
+ Message *string `json:"message,omitempty"`
+ // Time - READ-ONLY; The time of the status.
+ Time *date.Time `json:"time,omitempty"`
+ // Level - The level code. Possible values include: 'StatusLevelTypesInfo', 'StatusLevelTypesWarning', 'StatusLevelTypesError'
+ Level StatusLevelTypes `json:"level,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ResourceInstanceViewStatus.
+func (rivs ResourceInstanceViewStatus) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if rivs.Level != "" {
+ objectMap["level"] = rivs.Level
+ }
+ return json.Marshal(objectMap)
+}
+
+// ResourceRange describes the resource range.
+type ResourceRange struct {
+ // Min - The minimum number of the resource.
+ Min *int32 `json:"min,omitempty"`
+ // Max - The maximum number of the resource.
+ Max *int32 `json:"max,omitempty"`
+}
+
+// ResourceSku describes an available Compute SKU.
+type ResourceSku struct {
+ // ResourceType - READ-ONLY; The type of resource the SKU applies to.
+ ResourceType *string `json:"resourceType,omitempty"`
+ // Name - READ-ONLY; The name of SKU.
+ Name *string `json:"name,omitempty"`
+ // Tier - READ-ONLY; Specifies the tier of virtual machines in a scale set.
Possible Values:
**Standard**
**Basic**
+ Tier *string `json:"tier,omitempty"`
+ // Size - READ-ONLY; The Size of the SKU.
+ Size *string `json:"size,omitempty"`
+ // Family - READ-ONLY; The Family of this particular SKU.
+ Family *string `json:"family,omitempty"`
+ // Kind - READ-ONLY; The Kind of resources that are supported in this SKU.
+ Kind *string `json:"kind,omitempty"`
+ // Capacity - READ-ONLY; Specifies the number of virtual machines in the scale set.
+ Capacity *ResourceSkuCapacity `json:"capacity,omitempty"`
+ // Locations - READ-ONLY; The set of locations that the SKU is available.
+ Locations *[]string `json:"locations,omitempty"`
+ // LocationInfo - READ-ONLY; A list of locations and availability zones in those locations where the SKU is available.
+ LocationInfo *[]ResourceSkuLocationInfo `json:"locationInfo,omitempty"`
+ // APIVersions - READ-ONLY; The api versions that support this SKU.
+ APIVersions *[]string `json:"apiVersions,omitempty"`
+ // Costs - READ-ONLY; Metadata for retrieving price info.
+ Costs *[]ResourceSkuCosts `json:"costs,omitempty"`
+ // Capabilities - READ-ONLY; A name value pair to describe the capability.
+ Capabilities *[]ResourceSkuCapabilities `json:"capabilities,omitempty"`
+ // Restrictions - READ-ONLY; The restrictions because of which SKU cannot be used. This is empty if there are no restrictions.
+ Restrictions *[]ResourceSkuRestrictions `json:"restrictions,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ResourceSku.
+func (rs ResourceSku) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// ResourceSkuCapabilities describes The SKU capabilities object.
+type ResourceSkuCapabilities struct {
+ // Name - READ-ONLY; An invariant to describe the feature.
+ Name *string `json:"name,omitempty"`
+ // Value - READ-ONLY; An invariant if the feature is measured by quantity.
+ Value *string `json:"value,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ResourceSkuCapabilities.
+func (rsc ResourceSkuCapabilities) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// ResourceSkuCapacity describes scaling information of a SKU.
+type ResourceSkuCapacity struct {
+ // Minimum - READ-ONLY; The minimum capacity.
+ Minimum *int64 `json:"minimum,omitempty"`
+ // Maximum - READ-ONLY; The maximum capacity that can be set.
+ Maximum *int64 `json:"maximum,omitempty"`
+ // Default - READ-ONLY; The default capacity.
+ Default *int64 `json:"default,omitempty"`
+ // ScaleType - READ-ONLY; The scale type applicable to the sku. Possible values include: 'ResourceSkuCapacityScaleTypeAutomatic', 'ResourceSkuCapacityScaleTypeManual', 'ResourceSkuCapacityScaleTypeNone'
+ ScaleType ResourceSkuCapacityScaleType `json:"scaleType,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ResourceSkuCapacity.
+func (rsc ResourceSkuCapacity) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// ResourceSkuCosts describes metadata for retrieving price info.
+type ResourceSkuCosts struct {
+ // MeterID - READ-ONLY; Used for querying price from commerce.
+ MeterID *string `json:"meterID,omitempty"`
+ // Quantity - READ-ONLY; The multiplier is needed to extend the base metered cost.
+ Quantity *int64 `json:"quantity,omitempty"`
+ // ExtendedUnit - READ-ONLY; An invariant to show the extended unit.
+ ExtendedUnit *string `json:"extendedUnit,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ResourceSkuCosts.
+func (rsc ResourceSkuCosts) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// ResourceSkuLocationInfo describes an available Compute SKU Location Information.
+type ResourceSkuLocationInfo struct {
+ // Location - READ-ONLY; Location of the SKU
+ Location *string `json:"location,omitempty"`
+ // Zones - READ-ONLY; List of availability zones where the SKU is supported.
+ Zones *[]string `json:"zones,omitempty"`
+ // ZoneDetails - READ-ONLY; Details of capabilities available to a SKU in specific zones.
+ ZoneDetails *[]ResourceSkuZoneDetails `json:"zoneDetails,omitempty"`
+ // ExtendedLocations - READ-ONLY; The names of extended locations.
+ ExtendedLocations *[]string `json:"extendedLocations,omitempty"`
+ // Type - READ-ONLY; The type of the extended location. Possible values include: 'ExtendedLocationTypeEdgeZone'
+ Type ExtendedLocationType `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ResourceSkuLocationInfo.
+func (rsli ResourceSkuLocationInfo) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// ResourceSkuRestrictionInfo describes an available Compute SKU Restriction Information.
+type ResourceSkuRestrictionInfo struct {
+ // Locations - READ-ONLY; Locations where the SKU is restricted
+ Locations *[]string `json:"locations,omitempty"`
+ // Zones - READ-ONLY; List of availability zones where the SKU is restricted.
+ Zones *[]string `json:"zones,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ResourceSkuRestrictionInfo.
+func (rsri ResourceSkuRestrictionInfo) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// ResourceSkuRestrictions describes scaling information of a SKU.
+type ResourceSkuRestrictions struct {
+ // Type - READ-ONLY; The type of restrictions. Possible values include: 'ResourceSkuRestrictionsTypeLocation', 'ResourceSkuRestrictionsTypeZone'
+ Type ResourceSkuRestrictionsType `json:"type,omitempty"`
+ // Values - READ-ONLY; The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted.
+ Values *[]string `json:"values,omitempty"`
+ // RestrictionInfo - READ-ONLY; The information about the restriction where the SKU cannot be used.
+ RestrictionInfo *ResourceSkuRestrictionInfo `json:"restrictionInfo,omitempty"`
+ // ReasonCode - READ-ONLY; The reason for restriction. Possible values include: 'ResourceSkuRestrictionsReasonCodeQuotaID', 'ResourceSkuRestrictionsReasonCodeNotAvailableForSubscription'
+ ReasonCode ResourceSkuRestrictionsReasonCode `json:"reasonCode,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ResourceSkuRestrictions.
+func (rsr ResourceSkuRestrictions) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// ResourceSkusResult the List Resource Skus operation response.
+type ResourceSkusResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of skus available for the subscription.
+ Value *[]ResourceSku `json:"value,omitempty"`
+ // NextLink - The URI to fetch the next page of Resource Skus. Call ListNext() with this URI to fetch the next page of Resource Skus
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ResourceSkusResultIterator provides access to a complete listing of ResourceSku values.
+type ResourceSkusResultIterator struct {
+ i int
+ page ResourceSkusResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ResourceSkusResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ResourceSkusResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ResourceSkusResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ResourceSkusResultIterator) Response() ResourceSkusResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ResourceSkusResultIterator) Value() ResourceSku {
+ if !iter.page.NotDone() {
+ return ResourceSku{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the ResourceSkusResultIterator type.
+func NewResourceSkusResultIterator(page ResourceSkusResultPage) ResourceSkusResultIterator {
+ return ResourceSkusResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (rsr ResourceSkusResult) IsEmpty() bool {
+ return rsr.Value == nil || len(*rsr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (rsr ResourceSkusResult) hasNextLink() bool {
+ return rsr.NextLink != nil && len(*rsr.NextLink) != 0
+}
+
+// resourceSkusResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (rsr ResourceSkusResult) resourceSkusResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !rsr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(rsr.NextLink)))
+}
+
+// ResourceSkusResultPage contains a page of ResourceSku values.
+type ResourceSkusResultPage struct {
+ fn func(context.Context, ResourceSkusResult) (ResourceSkusResult, error)
+ rsr ResourceSkusResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ResourceSkusResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.rsr)
+ if err != nil {
+ return err
+ }
+ page.rsr = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ResourceSkusResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ResourceSkusResultPage) NotDone() bool {
+ return !page.rsr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ResourceSkusResultPage) Response() ResourceSkusResult {
+ return page.rsr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ResourceSkusResultPage) Values() []ResourceSku {
+ if page.rsr.IsEmpty() {
+ return nil
+ }
+ return *page.rsr.Value
+}
+
+// Creates a new instance of the ResourceSkusResultPage type.
+func NewResourceSkusResultPage(cur ResourceSkusResult, getNextPage func(context.Context, ResourceSkusResult) (ResourceSkusResult, error)) ResourceSkusResultPage {
+ return ResourceSkusResultPage{
+ fn: getNextPage,
+ rsr: cur,
+ }
+}
+
+// ResourceSkuZoneDetails describes The zonal capabilities of a SKU.
+type ResourceSkuZoneDetails struct {
+ // Name - READ-ONLY; The set of zones that the SKU is available in with the specified capabilities.
+ Name *[]string `json:"name,omitempty"`
+ // Capabilities - READ-ONLY; A list of capabilities that are available for the SKU in the specified list of zones.
+ Capabilities *[]ResourceSkuCapabilities `json:"capabilities,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ResourceSkuZoneDetails.
+func (rszd ResourceSkuZoneDetails) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// ResourceURIList the List resources which are encrypted with the disk encryption set.
+type ResourceURIList struct {
+ autorest.Response `json:"-"`
+ // Value - A list of IDs or Owner IDs of resources which are encrypted with the disk encryption set.
+ Value *[]string `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of encrypted resources. Call ListNext() with this to fetch the next page of encrypted resources.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ResourceURIListIterator provides access to a complete listing of string values.
+type ResourceURIListIterator struct {
+ i int
+ page ResourceURIListPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ResourceURIListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResourceURIListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ResourceURIListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ResourceURIListIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ResourceURIListIterator) Response() ResourceURIList {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ResourceURIListIterator) Value() string {
+ if !iter.page.NotDone() {
+ return ""
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the ResourceURIListIterator type.
+func NewResourceURIListIterator(page ResourceURIListPage) ResourceURIListIterator {
+ return ResourceURIListIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (rul ResourceURIList) IsEmpty() bool {
+ return rul.Value == nil || len(*rul.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (rul ResourceURIList) hasNextLink() bool {
+ return rul.NextLink != nil && len(*rul.NextLink) != 0
+}
+
+// resourceURIListPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (rul ResourceURIList) resourceURIListPreparer(ctx context.Context) (*http.Request, error) {
+ if !rul.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(rul.NextLink)))
+}
+
+// ResourceURIListPage contains a page of string values.
+type ResourceURIListPage struct {
+ fn func(context.Context, ResourceURIList) (ResourceURIList, error)
+ rul ResourceURIList
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ResourceURIListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResourceURIListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.rul)
+ if err != nil {
+ return err
+ }
+ page.rul = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ResourceURIListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ResourceURIListPage) NotDone() bool {
+ return !page.rul.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ResourceURIListPage) Response() ResourceURIList {
+ return page.rul
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ResourceURIListPage) Values() []string {
+ if page.rul.IsEmpty() {
+ return nil
+ }
+ return *page.rul.Value
+}
+
+// Creates a new instance of the ResourceURIListPage type.
+func NewResourceURIListPage(cur ResourceURIList, getNextPage func(context.Context, ResourceURIList) (ResourceURIList, error)) ResourceURIListPage {
+ return ResourceURIListPage{
+ fn: getNextPage,
+ rul: cur,
+ }
+}
+
+// RestorePoint restore Point details.
+type RestorePoint struct {
+ autorest.Response `json:"-"`
+ *RestorePointProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for RestorePoint.
+func (rp RestorePoint) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if rp.RestorePointProperties != nil {
+ objectMap["properties"] = rp.RestorePointProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for RestorePoint struct.
+func (rp *RestorePoint) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var restorePointProperties RestorePointProperties
+ err = json.Unmarshal(*v, &restorePointProperties)
+ if err != nil {
+ return err
+ }
+ rp.RestorePointProperties = &restorePointProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ rp.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ rp.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ rp.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// RestorePointCollection create or update Restore Point collection parameters.
+type RestorePointCollection struct {
+ autorest.Response `json:"-"`
+ *RestorePointCollectionProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for RestorePointCollection.
+func (RPCVar RestorePointCollection) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if RPCVar.RestorePointCollectionProperties != nil {
+ objectMap["properties"] = RPCVar.RestorePointCollectionProperties
+ }
+ if RPCVar.Location != nil {
+ objectMap["location"] = RPCVar.Location
+ }
+ if RPCVar.Tags != nil {
+ objectMap["tags"] = RPCVar.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for RestorePointCollection struct.
+func (RPCVar *RestorePointCollection) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var restorePointCollectionProperties RestorePointCollectionProperties
+ err = json.Unmarshal(*v, &restorePointCollectionProperties)
+ if err != nil {
+ return err
+ }
+ RPCVar.RestorePointCollectionProperties = &restorePointCollectionProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ RPCVar.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ RPCVar.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ RPCVar.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ RPCVar.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ RPCVar.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// RestorePointCollectionListResult the List restore point collection operation response.
+type RestorePointCollectionListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Gets the list of restore point collections.
+ Value *[]RestorePointCollection `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of RestorePointCollections. Call ListNext() with this to fetch the next page of RestorePointCollections
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// RestorePointCollectionListResultIterator provides access to a complete listing of RestorePointCollection
+// values.
+type RestorePointCollectionListResultIterator struct {
+ i int
+ page RestorePointCollectionListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *RestorePointCollectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointCollectionListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *RestorePointCollectionListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter RestorePointCollectionListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter RestorePointCollectionListResultIterator) Response() RestorePointCollectionListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter RestorePointCollectionListResultIterator) Value() RestorePointCollection {
+ if !iter.page.NotDone() {
+ return RestorePointCollection{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the RestorePointCollectionListResultIterator type.
+func NewRestorePointCollectionListResultIterator(page RestorePointCollectionListResultPage) RestorePointCollectionListResultIterator {
+ return RestorePointCollectionListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (rpclr RestorePointCollectionListResult) IsEmpty() bool {
+ return rpclr.Value == nil || len(*rpclr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (rpclr RestorePointCollectionListResult) hasNextLink() bool {
+ return rpclr.NextLink != nil && len(*rpclr.NextLink) != 0
+}
+
+// restorePointCollectionListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (rpclr RestorePointCollectionListResult) restorePointCollectionListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !rpclr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(rpclr.NextLink)))
+}
+
+// RestorePointCollectionListResultPage contains a page of RestorePointCollection values.
+type RestorePointCollectionListResultPage struct {
+ fn func(context.Context, RestorePointCollectionListResult) (RestorePointCollectionListResult, error)
+ rpclr RestorePointCollectionListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *RestorePointCollectionListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointCollectionListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.rpclr)
+ if err != nil {
+ return err
+ }
+ page.rpclr = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *RestorePointCollectionListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page RestorePointCollectionListResultPage) NotDone() bool {
+ return !page.rpclr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page RestorePointCollectionListResultPage) Response() RestorePointCollectionListResult {
+ return page.rpclr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page RestorePointCollectionListResultPage) Values() []RestorePointCollection {
+ if page.rpclr.IsEmpty() {
+ return nil
+ }
+ return *page.rpclr.Value
+}
+
+// Creates a new instance of the RestorePointCollectionListResultPage type.
+func NewRestorePointCollectionListResultPage(cur RestorePointCollectionListResult, getNextPage func(context.Context, RestorePointCollectionListResult) (RestorePointCollectionListResult, error)) RestorePointCollectionListResultPage {
+ return RestorePointCollectionListResultPage{
+ fn: getNextPage,
+ rpclr: cur,
+ }
+}
+
+// RestorePointCollectionProperties the restore point collection properties.
+type RestorePointCollectionProperties struct {
+ Source *RestorePointCollectionSourceProperties `json:"source,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state of the restore point collection.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // RestorePointCollectionID - READ-ONLY; The unique id of the restore point collection.
+ RestorePointCollectionID *string `json:"restorePointCollectionId,omitempty"`
+ // RestorePoints - READ-ONLY; A list containing all restore points created under this restore point collection.
+ RestorePoints *[]RestorePoint `json:"restorePoints,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for RestorePointCollectionProperties.
+func (rpcp RestorePointCollectionProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if rpcp.Source != nil {
+ objectMap["source"] = rpcp.Source
+ }
+ return json.Marshal(objectMap)
+}
+
+// RestorePointCollectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type RestorePointCollectionsDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(RestorePointCollectionsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *RestorePointCollectionsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for RestorePointCollectionsDeleteFuture.Result.
+func (future *RestorePointCollectionsDeleteFuture) result(client RestorePointCollectionsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.RestorePointCollectionsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// RestorePointCollectionSourceProperties the properties of the source resource that this restore point
+// collection is created from.
+type RestorePointCollectionSourceProperties struct {
+ // Location - READ-ONLY; Location of the source resource used to create this restore point collection.
+ Location *string `json:"location,omitempty"`
+ // ID - Resource Id of the source resource used to create this restore point collection
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for RestorePointCollectionSourceProperties.
+func (rpcsp RestorePointCollectionSourceProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if rpcsp.ID != nil {
+ objectMap["id"] = rpcsp.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// RestorePointCollectionUpdate update Restore Point collection parameters.
+type RestorePointCollectionUpdate struct {
+ *RestorePointCollectionProperties `json:"properties,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for RestorePointCollectionUpdate.
+func (rpcu RestorePointCollectionUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if rpcu.RestorePointCollectionProperties != nil {
+ objectMap["properties"] = rpcu.RestorePointCollectionProperties
+ }
+ if rpcu.Tags != nil {
+ objectMap["tags"] = rpcu.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for RestorePointCollectionUpdate struct.
+func (rpcu *RestorePointCollectionUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var restorePointCollectionProperties RestorePointCollectionProperties
+ err = json.Unmarshal(*v, &restorePointCollectionProperties)
+ if err != nil {
+ return err
+ }
+ rpcu.RestorePointCollectionProperties = &restorePointCollectionProperties
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ rpcu.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// RestorePointProperties the restore point properties.
+type RestorePointProperties struct {
+ // ExcludeDisks - List of disk resource ids that the customer wishes to exclude from the restore point. If no disks are specified, all disks will be included.
+ ExcludeDisks *[]APIEntityReference `json:"excludeDisks,omitempty"`
+ // SourceMetadata - READ-ONLY; Gets the details of the VM captured at the time of the restore point creation.
+ SourceMetadata *RestorePointSourceMetadata `json:"sourceMetadata,omitempty"`
+ // ProvisioningState - READ-ONLY; Gets the provisioning state of the restore point.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // ConsistencyMode - READ-ONLY; Gets the consistency mode for the restore point. Please refer to https://aka.ms/RestorePoints for more details. Possible values include: 'ConsistencyModeTypesCrashConsistent', 'ConsistencyModeTypesFileSystemConsistent', 'ConsistencyModeTypesApplicationConsistent'
+ ConsistencyMode ConsistencyModeTypes `json:"consistencyMode,omitempty"`
+ // ProvisioningDetails - READ-ONLY; Gets the provisioning details set by the server during Create restore point operation.
+ ProvisioningDetails *RestorePointProvisioningDetails `json:"provisioningDetails,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for RestorePointProperties.
+func (rpp RestorePointProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if rpp.ExcludeDisks != nil {
+ objectMap["excludeDisks"] = rpp.ExcludeDisks
+ }
+ return json.Marshal(objectMap)
+}
+
+// RestorePointProvisioningDetails restore Point Provisioning details.
+type RestorePointProvisioningDetails struct {
+ // CreationTime - Gets the creation time of the restore point.
+ CreationTime *date.Time `json:"creationTime,omitempty"`
+ // TotalUsedSizeInBytes - Gets the total size of the data in all the disks which are part of the restore point.
+ TotalUsedSizeInBytes *int64 `json:"totalUsedSizeInBytes,omitempty"`
+ // StatusCode - Gets the status of the Create restore point operation.
+ StatusCode *int32 `json:"statusCode,omitempty"`
+ // StatusMessage - Gets the status message of the Create restore point operation.
+ StatusMessage *string `json:"statusMessage,omitempty"`
+}
+
+// RestorePointsCreateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type RestorePointsCreateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(RestorePointsClient) (RestorePoint, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *RestorePointsCreateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for RestorePointsCreateFuture.Result.
+func (future *RestorePointsCreateFuture) result(client RestorePointsClient) (rp RestorePoint, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.RestorePointsCreateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ rp.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.RestorePointsCreateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rp.Response.Response, err = future.GetResult(sender); err == nil && rp.Response.Response.StatusCode != http.StatusNoContent {
+ rp, err = client.CreateResponder(rp.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.RestorePointsCreateFuture", "Result", rp.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// RestorePointsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type RestorePointsDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(RestorePointsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *RestorePointsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for RestorePointsDeleteFuture.Result.
+func (future *RestorePointsDeleteFuture) result(client RestorePointsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.RestorePointsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.RestorePointsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// RestorePointSourceMetadata describes the properties of the Virtual Machine for which the restore point
+// was created. The properties provided are a subset and the snapshot of the overall Virtual Machine
+// properties captured at the time of the restore point creation.
+type RestorePointSourceMetadata struct {
+ // HardwareProfile - Gets the hardware profile.
+ HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"`
+ // StorageProfile - Gets the storage profile.
+ StorageProfile *RestorePointSourceVMStorageProfile `json:"storageProfile,omitempty"`
+ // OsProfile - Gets the OS profile.
+ OsProfile *OSProfile `json:"osProfile,omitempty"`
+ // DiagnosticsProfile - Gets the diagnostics profile.
+ DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
+ // LicenseType - Gets the license type, which is for bring your own license scenario.
+ LicenseType *string `json:"licenseType,omitempty"`
+ // VMID - Gets the virtual machine unique id.
+ VMID *string `json:"vmId,omitempty"`
+ // SecurityProfile - Gets the security profile.
+ SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"`
+ // Location - Location of the VM from which the restore point was created.
+ Location *string `json:"location,omitempty"`
+}
+
+// RestorePointSourceVMDataDisk describes a data disk.
+type RestorePointSourceVMDataDisk struct {
+ // Lun - Gets the logical unit number.
+ Lun *int32 `json:"lun,omitempty"`
+ // Name - Gets the disk name.
+ Name *string `json:"name,omitempty"`
+ // Caching - Gets the caching type. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite'
+ Caching CachingTypes `json:"caching,omitempty"`
+ // DiskSizeGB - Gets the initial disk size in GB for blank data disks, and the new desired size for existing OS and Data disks.
+ DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
+ // ManagedDisk - Gets the managed disk details
+ ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"`
+ // DiskRestorePoint - Gets the disk restore point Id.
+ DiskRestorePoint *APIEntityReference `json:"diskRestorePoint,omitempty"`
+}
+
+// RestorePointSourceVMOSDisk describes an Operating System disk.
+type RestorePointSourceVMOSDisk struct {
+ // OsType - Gets the Operating System type. Possible values include: 'OperatingSystemTypeWindows', 'OperatingSystemTypeLinux'
+ OsType OperatingSystemType `json:"osType,omitempty"`
+ // EncryptionSettings - Gets the disk encryption settings.
+ EncryptionSettings *DiskEncryptionSettings `json:"encryptionSettings,omitempty"`
+ // Name - Gets the disk name.
+ Name *string `json:"name,omitempty"`
+ // Caching - Gets the caching type. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite'
+ Caching CachingTypes `json:"caching,omitempty"`
+ // DiskSizeGB - Gets the disk size in GB.
+ DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
+ // ManagedDisk - Gets the managed disk details
+ ManagedDisk *ManagedDiskParameters `json:"managedDisk,omitempty"`
+ // DiskRestorePoint - Gets the disk restore point Id.
+ DiskRestorePoint *APIEntityReference `json:"diskRestorePoint,omitempty"`
+}
+
+// RestorePointSourceVMStorageProfile describes the storage profile.
+type RestorePointSourceVMStorageProfile struct {
+ // OsDisk - Gets the OS disk of the VM captured at the time of the restore point creation.
+ OsDisk *RestorePointSourceVMOSDisk `json:"osDisk,omitempty"`
+ // DataDisks - Gets the data disks of the VM captured at the time of the restore point creation.
+ DataDisks *[]RestorePointSourceVMDataDisk `json:"dataDisks,omitempty"`
+}
+
+// RetrieveBootDiagnosticsDataResult the SAS URIs of the console screenshot and serial log blobs.
+type RetrieveBootDiagnosticsDataResult struct {
+ autorest.Response `json:"-"`
+ // ConsoleScreenshotBlobURI - READ-ONLY; The console screenshot blob URI
+ ConsoleScreenshotBlobURI *string `json:"consoleScreenshotBlobUri,omitempty"`
+ // SerialConsoleLogBlobURI - READ-ONLY; The serial console log blob URI.
+ SerialConsoleLogBlobURI *string `json:"serialConsoleLogBlobUri,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for RetrieveBootDiagnosticsDataResult.
+func (rbddr RetrieveBootDiagnosticsDataResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// RoleInstance ...
+type RoleInstance struct {
+ autorest.Response `json:"-"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource Name.
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource Type.
+ Type *string `json:"type,omitempty"`
+ // Location - READ-ONLY; Resource Location.
+ Location *string `json:"location,omitempty"`
+ // Tags - READ-ONLY; Resource tags.
+ Tags map[string]*string `json:"tags"`
+ Sku *InstanceSku `json:"sku,omitempty"`
+ Properties *RoleInstanceProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for RoleInstance.
+func (ri RoleInstance) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ri.Sku != nil {
+ objectMap["sku"] = ri.Sku
+ }
+ if ri.Properties != nil {
+ objectMap["properties"] = ri.Properties
+ }
+ return json.Marshal(objectMap)
+}
+
+// RoleInstanceInstanceView the instance view of the role instance.
+type RoleInstanceInstanceView struct {
+ autorest.Response `json:"-"`
+ // PlatformUpdateDomain - READ-ONLY; The Update Domain.
+ PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty"`
+ // PlatformFaultDomain - READ-ONLY; The Fault Domain.
+ PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"`
+ // PrivateID - READ-ONLY; Specifies a unique identifier generated internally for the cloud service associated with this role instance.
NOTE: If you are using Azure Diagnostics extension, this property can be used as 'DeploymentId' for querying details.
+ PrivateID *string `json:"privateId,omitempty"`
+ // Statuses - READ-ONLY
+ Statuses *[]ResourceInstanceViewStatus `json:"statuses,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for RoleInstanceInstanceView.
+func (riiv RoleInstanceInstanceView) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// RoleInstanceListResult ...
+type RoleInstanceListResult struct {
+ autorest.Response `json:"-"`
+ Value *[]RoleInstance `json:"value,omitempty"`
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// RoleInstanceListResultIterator provides access to a complete listing of RoleInstance values.
+type RoleInstanceListResultIterator struct {
+ i int
+ page RoleInstanceListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *RoleInstanceListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RoleInstanceListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *RoleInstanceListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter RoleInstanceListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter RoleInstanceListResultIterator) Response() RoleInstanceListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter RoleInstanceListResultIterator) Value() RoleInstance {
+ if !iter.page.NotDone() {
+ return RoleInstance{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the RoleInstanceListResultIterator type.
+func NewRoleInstanceListResultIterator(page RoleInstanceListResultPage) RoleInstanceListResultIterator {
+ return RoleInstanceListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (rilr RoleInstanceListResult) IsEmpty() bool {
+ return rilr.Value == nil || len(*rilr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (rilr RoleInstanceListResult) hasNextLink() bool {
+ return rilr.NextLink != nil && len(*rilr.NextLink) != 0
+}
+
+// roleInstanceListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (rilr RoleInstanceListResult) roleInstanceListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !rilr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(rilr.NextLink)))
+}
+
+// RoleInstanceListResultPage contains a page of RoleInstance values.
+type RoleInstanceListResultPage struct {
+ fn func(context.Context, RoleInstanceListResult) (RoleInstanceListResult, error)
+ rilr RoleInstanceListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *RoleInstanceListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RoleInstanceListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.rilr)
+ if err != nil {
+ return err
+ }
+ page.rilr = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *RoleInstanceListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page RoleInstanceListResultPage) NotDone() bool {
+ return !page.rilr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page RoleInstanceListResultPage) Response() RoleInstanceListResult {
+ return page.rilr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page RoleInstanceListResultPage) Values() []RoleInstance {
+ if page.rilr.IsEmpty() {
+ return nil
+ }
+ return *page.rilr.Value
+}
+
+// Creates a new instance of the RoleInstanceListResultPage type.
+func NewRoleInstanceListResultPage(cur RoleInstanceListResult, getNextPage func(context.Context, RoleInstanceListResult) (RoleInstanceListResult, error)) RoleInstanceListResultPage {
+ return RoleInstanceListResultPage{
+ fn: getNextPage,
+ rilr: cur,
+ }
+}
+
+// RoleInstanceNetworkProfile describes the network profile for the role instance.
+type RoleInstanceNetworkProfile struct {
+ // NetworkInterfaces - READ-ONLY; Specifies the list of resource Ids for the network interfaces associated with the role instance.
+ NetworkInterfaces *[]SubResource `json:"networkInterfaces,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for RoleInstanceNetworkProfile.
+func (rinp RoleInstanceNetworkProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// RoleInstanceProperties ...
+type RoleInstanceProperties struct {
+ NetworkProfile *RoleInstanceNetworkProfile `json:"networkProfile,omitempty"`
+ InstanceView *RoleInstanceInstanceView `json:"instanceView,omitempty"`
+}
+
+// RoleInstances specifies a list of role instances from the cloud service.
+type RoleInstances struct {
+ // RoleInstances - List of cloud service role instance names. Value of '*' will signify all role instances of the cloud service.
+ RoleInstances *[]string `json:"roleInstances,omitempty"`
+}
+
+// RollbackStatusInfo information about rollback on failed VM instances after a OS Upgrade operation.
+type RollbackStatusInfo struct {
+ // SuccessfullyRolledbackInstanceCount - READ-ONLY; The number of instances which have been successfully rolled back.
+ SuccessfullyRolledbackInstanceCount *int32 `json:"successfullyRolledbackInstanceCount,omitempty"`
+ // FailedRolledbackInstanceCount - READ-ONLY; The number of instances which failed to rollback.
+ FailedRolledbackInstanceCount *int32 `json:"failedRolledbackInstanceCount,omitempty"`
+ // RollbackError - READ-ONLY; Error details if OS rollback failed.
+ RollbackError *APIError `json:"rollbackError,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for RollbackStatusInfo.
+func (rsi RollbackStatusInfo) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// RollingUpgradePolicy the configuration parameters used while performing a rolling upgrade.
+type RollingUpgradePolicy struct {
+ // MaxBatchInstancePercent - The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. The default value for this parameter is 20%.
+ MaxBatchInstancePercent *int32 `json:"maxBatchInstancePercent,omitempty"`
+ // MaxUnhealthyInstancePercent - The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. The default value for this parameter is 20%.
+ MaxUnhealthyInstancePercent *int32 `json:"maxUnhealthyInstancePercent,omitempty"`
+ // MaxUnhealthyUpgradedInstancePercent - The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. The default value for this parameter is 20%.
+ MaxUnhealthyUpgradedInstancePercent *int32 `json:"maxUnhealthyUpgradedInstancePercent,omitempty"`
+ // PauseTimeBetweenBatches - The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format. The default value is 0 seconds (PT0S).
+ PauseTimeBetweenBatches *string `json:"pauseTimeBetweenBatches,omitempty"`
+ // EnableCrossZoneUpgrade - Allow VMSS to ignore AZ boundaries when constructing upgrade batches. Take into consideration the Update Domain and maxBatchInstancePercent to determine the batch size.
+ EnableCrossZoneUpgrade *bool `json:"enableCrossZoneUpgrade,omitempty"`
+ // PrioritizeUnhealthyInstances - Upgrade all unhealthy instances in a scale set before any healthy instances.
+ PrioritizeUnhealthyInstances *bool `json:"prioritizeUnhealthyInstances,omitempty"`
+}
+
+// RollingUpgradeProgressInfo information about the number of virtual machine instances in each upgrade
+// state.
+type RollingUpgradeProgressInfo struct {
+ // SuccessfulInstanceCount - READ-ONLY; The number of instances that have been successfully upgraded.
+ SuccessfulInstanceCount *int32 `json:"successfulInstanceCount,omitempty"`
+ // FailedInstanceCount - READ-ONLY; The number of instances that have failed to be upgraded successfully.
+ FailedInstanceCount *int32 `json:"failedInstanceCount,omitempty"`
+ // InProgressInstanceCount - READ-ONLY; The number of instances that are currently being upgraded.
+ InProgressInstanceCount *int32 `json:"inProgressInstanceCount,omitempty"`
+ // PendingInstanceCount - READ-ONLY; The number of instances that have not yet begun to be upgraded.
+ PendingInstanceCount *int32 `json:"pendingInstanceCount,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for RollingUpgradeProgressInfo.
+func (rupi RollingUpgradeProgressInfo) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// RollingUpgradeRunningStatus information about the current running state of the overall upgrade.
+type RollingUpgradeRunningStatus struct {
+ // Code - READ-ONLY; Code indicating the current status of the upgrade. Possible values include: 'RollingUpgradeStatusCodeRollingForward', 'RollingUpgradeStatusCodeCancelled', 'RollingUpgradeStatusCodeCompleted', 'RollingUpgradeStatusCodeFaulted'
+ Code RollingUpgradeStatusCode `json:"code,omitempty"`
+ // StartTime - READ-ONLY; Start time of the upgrade.
+ StartTime *date.Time `json:"startTime,omitempty"`
+ // LastAction - READ-ONLY; The last action performed on the rolling upgrade. Possible values include: 'RollingUpgradeActionTypeStart', 'RollingUpgradeActionTypeCancel'
+ LastAction RollingUpgradeActionType `json:"lastAction,omitempty"`
+ // LastActionTime - READ-ONLY; Last action time of the upgrade.
+ LastActionTime *date.Time `json:"lastActionTime,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for RollingUpgradeRunningStatus.
+func (rurs RollingUpgradeRunningStatus) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// RollingUpgradeStatusInfo the status of the latest virtual machine scale set rolling upgrade.
+type RollingUpgradeStatusInfo struct {
+ autorest.Response `json:"-"`
+ *RollingUpgradeStatusInfoProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for RollingUpgradeStatusInfo.
+func (rusi RollingUpgradeStatusInfo) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if rusi.RollingUpgradeStatusInfoProperties != nil {
+ objectMap["properties"] = rusi.RollingUpgradeStatusInfoProperties
+ }
+ if rusi.Location != nil {
+ objectMap["location"] = rusi.Location
+ }
+ if rusi.Tags != nil {
+ objectMap["tags"] = rusi.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for RollingUpgradeStatusInfo struct.
+func (rusi *RollingUpgradeStatusInfo) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var rollingUpgradeStatusInfoProperties RollingUpgradeStatusInfoProperties
+ err = json.Unmarshal(*v, &rollingUpgradeStatusInfoProperties)
+ if err != nil {
+ return err
+ }
+ rusi.RollingUpgradeStatusInfoProperties = &rollingUpgradeStatusInfoProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ rusi.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ rusi.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ rusi.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ rusi.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ rusi.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// RollingUpgradeStatusInfoProperties the status of the latest virtual machine scale set rolling upgrade.
+type RollingUpgradeStatusInfoProperties struct {
+ // Policy - READ-ONLY; The rolling upgrade policies applied for this upgrade.
+ Policy *RollingUpgradePolicy `json:"policy,omitempty"`
+ // RunningStatus - READ-ONLY; Information about the current running state of the overall upgrade.
+ RunningStatus *RollingUpgradeRunningStatus `json:"runningStatus,omitempty"`
+ // Progress - READ-ONLY; Information about the number of virtual machine instances in each upgrade state.
+ Progress *RollingUpgradeProgressInfo `json:"progress,omitempty"`
+ // Error - READ-ONLY; Error details for this upgrade, if there are any.
+ Error *APIError `json:"error,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for RollingUpgradeStatusInfoProperties.
+func (rusip RollingUpgradeStatusInfoProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// RunCommandDocument describes the properties of a Run Command.
+type RunCommandDocument struct {
+ autorest.Response `json:"-"`
+ // Script - The script to be executed.
+ Script *[]string `json:"script,omitempty"`
+ // Parameters - The parameters used by the script.
+ Parameters *[]RunCommandParameterDefinition `json:"parameters,omitempty"`
+ // Schema - The VM run command schema.
+ Schema *string `json:"$schema,omitempty"`
+ // ID - The VM run command id.
+ ID *string `json:"id,omitempty"`
+ // OsType - The Operating System type. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux'
+ OsType OperatingSystemTypes `json:"osType,omitempty"`
+ // Label - The VM run command label.
+ Label *string `json:"label,omitempty"`
+ // Description - The VM run command description.
+ Description *string `json:"description,omitempty"`
+}
+
+// RunCommandDocumentBase describes the properties of a Run Command metadata.
+type RunCommandDocumentBase struct {
+ // Schema - The VM run command schema.
+ Schema *string `json:"$schema,omitempty"`
+ // ID - The VM run command id.
+ ID *string `json:"id,omitempty"`
+ // OsType - The Operating System type. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux'
+ OsType OperatingSystemTypes `json:"osType,omitempty"`
+ // Label - The VM run command label.
+ Label *string `json:"label,omitempty"`
+ // Description - The VM run command description.
+ Description *string `json:"description,omitempty"`
+}
+
+// RunCommandInput capture Virtual Machine parameters.
+type RunCommandInput struct {
+ // CommandID - The run command id.
+ CommandID *string `json:"commandId,omitempty"`
+ // Script - Optional. The script to be executed. When this value is given, the given script will override the default script of the command.
+ Script *[]string `json:"script,omitempty"`
+ // Parameters - The run command parameters.
+ Parameters *[]RunCommandInputParameter `json:"parameters,omitempty"`
+}
+
+// RunCommandInputParameter describes the properties of a run command parameter.
+type RunCommandInputParameter struct {
+ // Name - The run command parameter name.
+ Name *string `json:"name,omitempty"`
+ // Value - The run command parameter value.
+ Value *string `json:"value,omitempty"`
+}
+
+// RunCommandListResult the List Virtual Machine operation response.
+type RunCommandListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of virtual machine run commands.
+ Value *[]RunCommandDocumentBase `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of run commands. Call ListNext() with this to fetch the next page of run commands.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// RunCommandListResultIterator provides access to a complete listing of RunCommandDocumentBase values.
+type RunCommandListResultIterator struct {
+ i int
+ page RunCommandListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *RunCommandListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RunCommandListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *RunCommandListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter RunCommandListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter RunCommandListResultIterator) Response() RunCommandListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter RunCommandListResultIterator) Value() RunCommandDocumentBase {
+ if !iter.page.NotDone() {
+ return RunCommandDocumentBase{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the RunCommandListResultIterator type.
+func NewRunCommandListResultIterator(page RunCommandListResultPage) RunCommandListResultIterator {
+ return RunCommandListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (rclr RunCommandListResult) IsEmpty() bool {
+ return rclr.Value == nil || len(*rclr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (rclr RunCommandListResult) hasNextLink() bool {
+ return rclr.NextLink != nil && len(*rclr.NextLink) != 0
+}
+
+// runCommandListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (rclr RunCommandListResult) runCommandListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !rclr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(rclr.NextLink)))
+}
+
+// RunCommandListResultPage contains a page of RunCommandDocumentBase values.
+type RunCommandListResultPage struct {
+ fn func(context.Context, RunCommandListResult) (RunCommandListResult, error)
+ rclr RunCommandListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *RunCommandListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RunCommandListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.rclr)
+ if err != nil {
+ return err
+ }
+ page.rclr = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *RunCommandListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page RunCommandListResultPage) NotDone() bool {
+ return !page.rclr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page RunCommandListResultPage) Response() RunCommandListResult {
+ return page.rclr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page RunCommandListResultPage) Values() []RunCommandDocumentBase {
+ if page.rclr.IsEmpty() {
+ return nil
+ }
+ return *page.rclr.Value
+}
+
+// Creates a new instance of the RunCommandListResultPage type.
+func NewRunCommandListResultPage(cur RunCommandListResult, getNextPage func(context.Context, RunCommandListResult) (RunCommandListResult, error)) RunCommandListResultPage {
+ return RunCommandListResultPage{
+ fn: getNextPage,
+ rclr: cur,
+ }
+}
+
+// RunCommandParameterDefinition describes the properties of a run command parameter.
+type RunCommandParameterDefinition struct {
+ // Name - The run command parameter name.
+ Name *string `json:"name,omitempty"`
+ // Type - The run command parameter type.
+ Type *string `json:"type,omitempty"`
+ // DefaultValue - The run command parameter default value.
+ DefaultValue *string `json:"defaultValue,omitempty"`
+ // Required - The run command parameter required.
+ Required *bool `json:"required,omitempty"`
+}
+
+// RunCommandResult ...
+type RunCommandResult struct {
+ autorest.Response `json:"-"`
+ // Value - Run command operation response.
+ Value *[]InstanceViewStatus `json:"value,omitempty"`
+}
+
+// ScaleInPolicy describes a scale-in policy for a virtual machine scale set.
+type ScaleInPolicy struct {
+ // Rules - The rules to be followed when scaling-in a virtual machine scale set.
Possible values are:
**Default** When a virtual machine scale set is scaled in, the scale set will first be balanced across zones if it is a zonal scale set. Then, it will be balanced across Fault Domains as far as possible. Within each Fault Domain, the virtual machines chosen for removal will be the newest ones that are not protected from scale-in.
**OldestVM** When a virtual machine scale set is being scaled-in, the oldest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the oldest virtual machines that are not protected will be chosen for removal.
**NewestVM** When a virtual machine scale set is being scaled-in, the newest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the newest virtual machines that are not protected will be chosen for removal.
+ Rules *[]VirtualMachineScaleSetScaleInRules `json:"rules,omitempty"`
+ // ForceDeletion - This property allows you to specify if virtual machines chosen for removal have to be force deleted when a virtual machine scale set is being scaled-in.(Feature in Preview)
+ ForceDeletion *bool `json:"forceDeletion,omitempty"`
+}
+
+// ScheduledEventsProfile ...
+type ScheduledEventsProfile struct {
+ // TerminateNotificationProfile - Specifies Terminate Scheduled Event related configurations.
+ TerminateNotificationProfile *TerminateNotificationProfile `json:"terminateNotificationProfile,omitempty"`
+}
+
+// SecurityProfile specifies the Security profile settings for the virtual machine or virtual machine scale
+// set.
+type SecurityProfile struct {
+ // UefiSettings - Specifies the security settings like secure boot and vTPM used while creating the virtual machine.
Minimum api-version: 2020-12-01
+ UefiSettings *UefiSettings `json:"uefiSettings,omitempty"`
+ // EncryptionAtHost - This property can be used by user in the request to enable or disable the Host Encryption for the virtual machine or virtual machine scale set. This will enable the encryption for all the disks including Resource/Temp disk at host itself.
Default: The Encryption at host will be disabled unless this property is set to true for the resource.
+ EncryptionAtHost *bool `json:"encryptionAtHost,omitempty"`
+ // SecurityType - Specifies the SecurityType of the virtual machine. It is set as TrustedLaunch to enable UefiSettings.
Default: UefiSettings will not be enabled unless this property is set as TrustedLaunch. Possible values include: 'SecurityTypesTrustedLaunch'
+ SecurityType SecurityTypes `json:"securityType,omitempty"`
+}
+
+// SharedGallery specifies information about the Shared Gallery that you want to create or update.
+type SharedGallery struct {
+ autorest.Response `json:"-"`
+ *SharedGalleryIdentifier `json:"identifier,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Location - READ-ONLY; Resource location
+ Location *string `json:"location,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for SharedGallery.
+func (sg SharedGallery) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if sg.SharedGalleryIdentifier != nil {
+ objectMap["identifier"] = sg.SharedGalleryIdentifier
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for SharedGallery struct.
+func (sg *SharedGallery) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "identifier":
+ if v != nil {
+ var sharedGalleryIdentifier SharedGalleryIdentifier
+ err = json.Unmarshal(*v, &sharedGalleryIdentifier)
+ if err != nil {
+ return err
+ }
+ sg.SharedGalleryIdentifier = &sharedGalleryIdentifier
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ sg.Name = &name
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ sg.Location = &location
+ }
+ }
+ }
+
+ return nil
+}
+
+// SharedGalleryIdentifier the identifier information of shared gallery.
+type SharedGalleryIdentifier struct {
+ // UniqueID - The unique id of this shared gallery.
+ UniqueID *string `json:"uniqueId,omitempty"`
+}
+
+// SharedGalleryImage specifies information about the gallery image definition that you want to create or
+// update.
+type SharedGalleryImage struct {
+ autorest.Response `json:"-"`
+ *SharedGalleryImageProperties `json:"properties,omitempty"`
+ *SharedGalleryIdentifier `json:"identifier,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Location - READ-ONLY; Resource location
+ Location *string `json:"location,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for SharedGalleryImage.
+func (sgi SharedGalleryImage) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if sgi.SharedGalleryImageProperties != nil {
+ objectMap["properties"] = sgi.SharedGalleryImageProperties
+ }
+ if sgi.SharedGalleryIdentifier != nil {
+ objectMap["identifier"] = sgi.SharedGalleryIdentifier
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for SharedGalleryImage struct.
+func (sgi *SharedGalleryImage) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var sharedGalleryImageProperties SharedGalleryImageProperties
+ err = json.Unmarshal(*v, &sharedGalleryImageProperties)
+ if err != nil {
+ return err
+ }
+ sgi.SharedGalleryImageProperties = &sharedGalleryImageProperties
+ }
+ case "identifier":
+ if v != nil {
+ var sharedGalleryIdentifier SharedGalleryIdentifier
+ err = json.Unmarshal(*v, &sharedGalleryIdentifier)
+ if err != nil {
+ return err
+ }
+ sgi.SharedGalleryIdentifier = &sharedGalleryIdentifier
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ sgi.Name = &name
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ sgi.Location = &location
+ }
+ }
+ }
+
+ return nil
+}
+
+// SharedGalleryImageList the List Shared Gallery Images operation response.
+type SharedGalleryImageList struct {
+ autorest.Response `json:"-"`
+ // Value - A list of shared gallery images.
+ Value *[]SharedGalleryImage `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of shared gallery images. Call ListNext() with this to fetch the next page of shared gallery images.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// SharedGalleryImageListIterator provides access to a complete listing of SharedGalleryImage values.
+type SharedGalleryImageListIterator struct {
+ i int
+ page SharedGalleryImageListPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *SharedGalleryImageListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SharedGalleryImageListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *SharedGalleryImageListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter SharedGalleryImageListIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter SharedGalleryImageListIterator) Response() SharedGalleryImageList {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter SharedGalleryImageListIterator) Value() SharedGalleryImage {
+ if !iter.page.NotDone() {
+ return SharedGalleryImage{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the SharedGalleryImageListIterator type.
+func NewSharedGalleryImageListIterator(page SharedGalleryImageListPage) SharedGalleryImageListIterator {
+ return SharedGalleryImageListIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (sgil SharedGalleryImageList) IsEmpty() bool {
+ return sgil.Value == nil || len(*sgil.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (sgil SharedGalleryImageList) hasNextLink() bool {
+ return sgil.NextLink != nil && len(*sgil.NextLink) != 0
+}
+
+// sharedGalleryImageListPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (sgil SharedGalleryImageList) sharedGalleryImageListPreparer(ctx context.Context) (*http.Request, error) {
+ if !sgil.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(sgil.NextLink)))
+}
+
+// SharedGalleryImageListPage contains a page of SharedGalleryImage values.
+type SharedGalleryImageListPage struct {
+ fn func(context.Context, SharedGalleryImageList) (SharedGalleryImageList, error)
+ sgil SharedGalleryImageList
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *SharedGalleryImageListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SharedGalleryImageListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.sgil)
+ if err != nil {
+ return err
+ }
+ page.sgil = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *SharedGalleryImageListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page SharedGalleryImageListPage) NotDone() bool {
+ return !page.sgil.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page SharedGalleryImageListPage) Response() SharedGalleryImageList {
+ return page.sgil
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page SharedGalleryImageListPage) Values() []SharedGalleryImage {
+ if page.sgil.IsEmpty() {
+ return nil
+ }
+ return *page.sgil.Value
+}
+
+// Creates a new instance of the SharedGalleryImageListPage type.
+func NewSharedGalleryImageListPage(cur SharedGalleryImageList, getNextPage func(context.Context, SharedGalleryImageList) (SharedGalleryImageList, error)) SharedGalleryImageListPage {
+ return SharedGalleryImageListPage{
+ fn: getNextPage,
+ sgil: cur,
+ }
+}
+
+// SharedGalleryImageProperties describes the properties of a gallery image definition.
+type SharedGalleryImageProperties struct {
+ // OsType - This property allows you to specify the type of the OS that is included in the disk when creating a VM from a managed image.
Possible values are:
**Windows**
**Linux**. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux'
+ OsType OperatingSystemTypes `json:"osType,omitempty"`
+ // OsState - This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'. Possible values include: 'OperatingSystemStateTypesGeneralized', 'OperatingSystemStateTypesSpecialized'
+ OsState OperatingSystemStateTypes `json:"osState,omitempty"`
+ // EndOfLifeDate - The end of life date of the gallery image definition. This property can be used for decommissioning purposes. This property is updatable.
+ EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
+ Identifier *GalleryImageIdentifier `json:"identifier,omitempty"`
+ Recommended *RecommendedMachineConfiguration `json:"recommended,omitempty"`
+ Disallowed *Disallowed `json:"disallowed,omitempty"`
+ // HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'HyperVGenerationV1', 'HyperVGenerationV2'
+ HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"`
+ // Features - A list of gallery image features.
+ Features *[]GalleryImageFeature `json:"features,omitempty"`
+ PurchasePlan *ImagePurchasePlan `json:"purchasePlan,omitempty"`
+}
+
+// SharedGalleryImageVersion specifies information about the gallery image version that you want to create
+// or update.
+type SharedGalleryImageVersion struct {
+ autorest.Response `json:"-"`
+ *SharedGalleryImageVersionProperties `json:"properties,omitempty"`
+ *SharedGalleryIdentifier `json:"identifier,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Location - READ-ONLY; Resource location
+ Location *string `json:"location,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for SharedGalleryImageVersion.
+func (sgiv SharedGalleryImageVersion) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if sgiv.SharedGalleryImageVersionProperties != nil {
+ objectMap["properties"] = sgiv.SharedGalleryImageVersionProperties
+ }
+ if sgiv.SharedGalleryIdentifier != nil {
+ objectMap["identifier"] = sgiv.SharedGalleryIdentifier
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for SharedGalleryImageVersion struct.
+func (sgiv *SharedGalleryImageVersion) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var sharedGalleryImageVersionProperties SharedGalleryImageVersionProperties
+ err = json.Unmarshal(*v, &sharedGalleryImageVersionProperties)
+ if err != nil {
+ return err
+ }
+ sgiv.SharedGalleryImageVersionProperties = &sharedGalleryImageVersionProperties
+ }
+ case "identifier":
+ if v != nil {
+ var sharedGalleryIdentifier SharedGalleryIdentifier
+ err = json.Unmarshal(*v, &sharedGalleryIdentifier)
+ if err != nil {
+ return err
+ }
+ sgiv.SharedGalleryIdentifier = &sharedGalleryIdentifier
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ sgiv.Name = &name
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ sgiv.Location = &location
+ }
+ }
+ }
+
+ return nil
+}
+
+// SharedGalleryImageVersionList the List Shared Gallery Image versions operation response.
+type SharedGalleryImageVersionList struct {
+ autorest.Response `json:"-"`
+ // Value - A list of shared gallery images versions.
+ Value *[]SharedGalleryImageVersion `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of shared gallery image versions. Call ListNext() with this to fetch the next page of shared gallery image versions.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// SharedGalleryImageVersionListIterator provides access to a complete listing of SharedGalleryImageVersion
+// values.
+type SharedGalleryImageVersionListIterator struct {
+ i int
+ page SharedGalleryImageVersionListPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *SharedGalleryImageVersionListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SharedGalleryImageVersionListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *SharedGalleryImageVersionListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter SharedGalleryImageVersionListIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter SharedGalleryImageVersionListIterator) Response() SharedGalleryImageVersionList {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter SharedGalleryImageVersionListIterator) Value() SharedGalleryImageVersion {
+ if !iter.page.NotDone() {
+ return SharedGalleryImageVersion{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the SharedGalleryImageVersionListIterator type.
+func NewSharedGalleryImageVersionListIterator(page SharedGalleryImageVersionListPage) SharedGalleryImageVersionListIterator {
+ return SharedGalleryImageVersionListIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (sgivl SharedGalleryImageVersionList) IsEmpty() bool {
+ return sgivl.Value == nil || len(*sgivl.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (sgivl SharedGalleryImageVersionList) hasNextLink() bool {
+ return sgivl.NextLink != nil && len(*sgivl.NextLink) != 0
+}
+
+// sharedGalleryImageVersionListPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (sgivl SharedGalleryImageVersionList) sharedGalleryImageVersionListPreparer(ctx context.Context) (*http.Request, error) {
+ if !sgivl.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(sgivl.NextLink)))
+}
+
+// SharedGalleryImageVersionListPage contains a page of SharedGalleryImageVersion values.
+type SharedGalleryImageVersionListPage struct {
+ fn func(context.Context, SharedGalleryImageVersionList) (SharedGalleryImageVersionList, error)
+ sgivl SharedGalleryImageVersionList
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *SharedGalleryImageVersionListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SharedGalleryImageVersionListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.sgivl)
+ if err != nil {
+ return err
+ }
+ page.sgivl = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *SharedGalleryImageVersionListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page SharedGalleryImageVersionListPage) NotDone() bool {
+ return !page.sgivl.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page SharedGalleryImageVersionListPage) Response() SharedGalleryImageVersionList {
+ return page.sgivl
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page SharedGalleryImageVersionListPage) Values() []SharedGalleryImageVersion {
+ if page.sgivl.IsEmpty() {
+ return nil
+ }
+ return *page.sgivl.Value
+}
+
+// Creates a new instance of the SharedGalleryImageVersionListPage type.
+func NewSharedGalleryImageVersionListPage(cur SharedGalleryImageVersionList, getNextPage func(context.Context, SharedGalleryImageVersionList) (SharedGalleryImageVersionList, error)) SharedGalleryImageVersionListPage {
+ return SharedGalleryImageVersionListPage{
+ fn: getNextPage,
+ sgivl: cur,
+ }
+}
+
+// SharedGalleryImageVersionProperties describes the properties of a gallery image version.
+type SharedGalleryImageVersionProperties struct {
+ // PublishedDate - The published date of the gallery image version Definition. This property can be used for decommissioning purposes. This property is updatable.
+ PublishedDate *date.Time `json:"publishedDate,omitempty"`
+ // EndOfLifeDate - The end of life date of the gallery image version Definition. This property can be used for decommissioning purposes. This property is updatable.
+ EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
+}
+
+// SharedGalleryList the List Shared Galleries operation response.
+type SharedGalleryList struct {
+ autorest.Response `json:"-"`
+ // Value - A list of shared galleries.
+ Value *[]SharedGallery `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of shared galleries. Call ListNext() with this to fetch the next page of shared galleries.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// SharedGalleryListIterator provides access to a complete listing of SharedGallery values.
+type SharedGalleryListIterator struct {
+ i int
+ page SharedGalleryListPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *SharedGalleryListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SharedGalleryListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *SharedGalleryListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter SharedGalleryListIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter SharedGalleryListIterator) Response() SharedGalleryList {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter SharedGalleryListIterator) Value() SharedGallery {
+ if !iter.page.NotDone() {
+ return SharedGallery{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the SharedGalleryListIterator type.
+func NewSharedGalleryListIterator(page SharedGalleryListPage) SharedGalleryListIterator {
+ return SharedGalleryListIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (sgl SharedGalleryList) IsEmpty() bool {
+ return sgl.Value == nil || len(*sgl.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (sgl SharedGalleryList) hasNextLink() bool {
+ return sgl.NextLink != nil && len(*sgl.NextLink) != 0
+}
+
+// sharedGalleryListPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (sgl SharedGalleryList) sharedGalleryListPreparer(ctx context.Context) (*http.Request, error) {
+ if !sgl.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(sgl.NextLink)))
+}
+
+// SharedGalleryListPage contains a page of SharedGallery values.
+type SharedGalleryListPage struct {
+ fn func(context.Context, SharedGalleryList) (SharedGalleryList, error)
+ sgl SharedGalleryList
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *SharedGalleryListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SharedGalleryListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.sgl)
+ if err != nil {
+ return err
+ }
+ page.sgl = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *SharedGalleryListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page SharedGalleryListPage) NotDone() bool {
+ return !page.sgl.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page SharedGalleryListPage) Response() SharedGalleryList {
+ return page.sgl
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page SharedGalleryListPage) Values() []SharedGallery {
+ if page.sgl.IsEmpty() {
+ return nil
+ }
+ return *page.sgl.Value
+}
+
+// Creates a new instance of the SharedGalleryListPage type.
+func NewSharedGalleryListPage(cur SharedGalleryList, getNextPage func(context.Context, SharedGalleryList) (SharedGalleryList, error)) SharedGalleryListPage {
+ return SharedGalleryListPage{
+ fn: getNextPage,
+ sgl: cur,
+ }
+}
+
+// ShareInfoElement ...
+type ShareInfoElement struct {
+ // VMURI - READ-ONLY; A relative URI containing the ID of the VM that has the disk attached.
+ VMURI *string `json:"vmUri,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ShareInfoElement.
+func (sie ShareInfoElement) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// SharingProfile profile for gallery sharing to subscription or tenant
+type SharingProfile struct {
+ // Permissions - This property allows you to specify the permission of sharing gallery.
Possible values are:
**Private**
**Groups**. Possible values include: 'GallerySharingPermissionTypesPrivate', 'GallerySharingPermissionTypesGroups'
+ Permissions GallerySharingPermissionTypes `json:"permissions,omitempty"`
+ // Groups - READ-ONLY; A list of sharing profile groups.
+ Groups *[]SharingProfileGroup `json:"groups,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for SharingProfile.
+func (sp SharingProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if sp.Permissions != "" {
+ objectMap["permissions"] = sp.Permissions
+ }
+ return json.Marshal(objectMap)
+}
+
+// SharingProfileGroup group of the gallery sharing profile
+type SharingProfileGroup struct {
+ // Type - This property allows you to specify the type of sharing group.
Possible values are:
**Subscriptions**
**AADTenants**. Possible values include: 'SharingProfileGroupTypesSubscriptions', 'SharingProfileGroupTypesAADTenants'
+ Type SharingProfileGroupTypes `json:"type,omitempty"`
+ // Ids - A list of subscription/tenant ids the gallery is aimed to be shared to.
+ Ids *[]string `json:"ids,omitempty"`
+}
+
+// SharingUpdate specifies information about the gallery sharing profile update.
+type SharingUpdate struct {
+ autorest.Response `json:"-"`
+ // OperationType - This property allows you to specify the operation type of gallery sharing update.
Possible values are:
**Add**
**Remove**
**Reset**. Possible values include: 'SharingUpdateOperationTypesAdd', 'SharingUpdateOperationTypesRemove', 'SharingUpdateOperationTypesReset'
+ OperationType SharingUpdateOperationTypes `json:"operationType,omitempty"`
+ // Groups - A list of sharing profile groups.
+ Groups *[]SharingProfileGroup `json:"groups,omitempty"`
+}
+
+// Sku describes a virtual machine scale set sku. NOTE: If the new VM SKU is not supported on the hardware
+// the scale set is currently on, you need to deallocate the VMs in the scale set before you modify the SKU
+// name.
+type Sku struct {
+ // Name - The sku name.
+ Name *string `json:"name,omitempty"`
+ // Tier - Specifies the tier of virtual machines in a scale set.
Possible Values:
**Standard**
**Basic**
+ Tier *string `json:"tier,omitempty"`
+ // Capacity - Specifies the number of virtual machines in the scale set.
+ Capacity *int64 `json:"capacity,omitempty"`
+}
+
+// Snapshot snapshot resource.
+type Snapshot struct {
+ autorest.Response `json:"-"`
+ // ManagedBy - READ-ONLY; Unused. Always Null.
+ ManagedBy *string `json:"managedBy,omitempty"`
+ Sku *SnapshotSku `json:"sku,omitempty"`
+ // ExtendedLocation - The extended location where the snapshot will be created. Extended location cannot be changed.
+ ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
+ *SnapshotProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for Snapshot.
+func (s Snapshot) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if s.Sku != nil {
+ objectMap["sku"] = s.Sku
+ }
+ if s.ExtendedLocation != nil {
+ objectMap["extendedLocation"] = s.ExtendedLocation
+ }
+ if s.SnapshotProperties != nil {
+ objectMap["properties"] = s.SnapshotProperties
+ }
+ if s.Location != nil {
+ objectMap["location"] = s.Location
+ }
+ if s.Tags != nil {
+ objectMap["tags"] = s.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Snapshot struct.
+func (s *Snapshot) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "managedBy":
+ if v != nil {
+ var managedBy string
+ err = json.Unmarshal(*v, &managedBy)
+ if err != nil {
+ return err
+ }
+ s.ManagedBy = &managedBy
+ }
+ case "sku":
+ if v != nil {
+ var sku SnapshotSku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ s.Sku = &sku
+ }
+ case "extendedLocation":
+ if v != nil {
+ var extendedLocation ExtendedLocation
+ err = json.Unmarshal(*v, &extendedLocation)
+ if err != nil {
+ return err
+ }
+ s.ExtendedLocation = &extendedLocation
+ }
+ case "properties":
+ if v != nil {
+ var snapshotProperties SnapshotProperties
+ err = json.Unmarshal(*v, &snapshotProperties)
+ if err != nil {
+ return err
+ }
+ s.SnapshotProperties = &snapshotProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ s.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ s.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ s.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ s.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ s.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// SnapshotList the List Snapshots operation response.
+type SnapshotList struct {
+ autorest.Response `json:"-"`
+ // Value - A list of snapshots.
+ Value *[]Snapshot `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of snapshots. Call ListNext() with this to fetch the next page of snapshots.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// SnapshotListIterator provides access to a complete listing of Snapshot values.
+type SnapshotListIterator struct {
+ i int
+ page SnapshotListPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *SnapshotListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *SnapshotListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter SnapshotListIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter SnapshotListIterator) Response() SnapshotList {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter SnapshotListIterator) Value() Snapshot {
+ if !iter.page.NotDone() {
+ return Snapshot{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the SnapshotListIterator type.
+func NewSnapshotListIterator(page SnapshotListPage) SnapshotListIterator {
+ return SnapshotListIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (sl SnapshotList) IsEmpty() bool {
+ return sl.Value == nil || len(*sl.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (sl SnapshotList) hasNextLink() bool {
+ return sl.NextLink != nil && len(*sl.NextLink) != 0
+}
+
+// snapshotListPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (sl SnapshotList) snapshotListPreparer(ctx context.Context) (*http.Request, error) {
+ if !sl.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(sl.NextLink)))
+}
+
+// SnapshotListPage contains a page of Snapshot values.
+type SnapshotListPage struct {
+ fn func(context.Context, SnapshotList) (SnapshotList, error)
+ sl SnapshotList
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *SnapshotListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.sl)
+ if err != nil {
+ return err
+ }
+ page.sl = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *SnapshotListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page SnapshotListPage) NotDone() bool {
+ return !page.sl.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page SnapshotListPage) Response() SnapshotList {
+ return page.sl
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page SnapshotListPage) Values() []Snapshot {
+ if page.sl.IsEmpty() {
+ return nil
+ }
+ return *page.sl.Value
+}
+
+// Creates a new instance of the SnapshotListPage type.
+func NewSnapshotListPage(cur SnapshotList, getNextPage func(context.Context, SnapshotList) (SnapshotList, error)) SnapshotListPage {
+ return SnapshotListPage{
+ fn: getNextPage,
+ sl: cur,
+ }
+}
+
+// SnapshotProperties snapshot resource properties.
+type SnapshotProperties struct {
+ // TimeCreated - READ-ONLY; The time when the snapshot was created.
+ TimeCreated *date.Time `json:"timeCreated,omitempty"`
+ // OsType - The Operating System type. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux'
+ OsType OperatingSystemTypes `json:"osType,omitempty"`
+ // HyperVGeneration - The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'HyperVGenerationV1', 'HyperVGenerationV2'
+ HyperVGeneration HyperVGeneration `json:"hyperVGeneration,omitempty"`
+ // PurchasePlan - Purchase plan information for the image from which the source disk for the snapshot was originally created.
+ PurchasePlan *PurchasePlan `json:"purchasePlan,omitempty"`
+ // SupportedCapabilities - List of supported capabilities (like Accelerated Networking) for the image from which the source disk from the snapshot was originally created.
+ SupportedCapabilities *SupportedCapabilities `json:"supportedCapabilities,omitempty"`
+ // CreationData - Disk source information. CreationData information cannot be changed after the disk has been created.
+ CreationData *CreationData `json:"creationData,omitempty"`
+ // DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
+ DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
+ // DiskSizeBytes - READ-ONLY; The size of the disk in bytes. This field is read only.
+ DiskSizeBytes *int64 `json:"diskSizeBytes,omitempty"`
+ // DiskState - The state of the snapshot. Possible values include: 'DiskStateUnattached', 'DiskStateAttached', 'DiskStateReserved', 'DiskStateFrozen', 'DiskStateActiveSAS', 'DiskStateActiveSASFrozen', 'DiskStateReadyToUpload', 'DiskStateActiveUpload'
+ DiskState DiskState `json:"diskState,omitempty"`
+ // UniqueID - READ-ONLY; Unique Guid identifying the resource.
+ UniqueID *string `json:"uniqueId,omitempty"`
+ // EncryptionSettingsCollection - Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
+ EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`
+ // ProvisioningState - READ-ONLY; The disk provisioning state.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // Incremental - Whether a snapshot is incremental. Incremental snapshots on the same disk occupy less space than full snapshots and can be diffed.
+ Incremental *bool `json:"incremental,omitempty"`
+ // Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
+ Encryption *Encryption `json:"encryption,omitempty"`
+ // NetworkAccessPolicy - Possible values include: 'NetworkAccessPolicyAllowAll', 'NetworkAccessPolicyAllowPrivate', 'NetworkAccessPolicyDenyAll'
+ NetworkAccessPolicy NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"`
+ // DiskAccessID - ARM id of the DiskAccess resource for using private endpoints on disks.
+ DiskAccessID *string `json:"diskAccessId,omitempty"`
+ // SupportsHibernation - Indicates the OS on a snapshot supports hibernation.
+ SupportsHibernation *bool `json:"supportsHibernation,omitempty"`
+ // PublicNetworkAccess - Possible values include: 'PublicNetworkAccessEnabled', 'PublicNetworkAccessDisabled'
+ PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`
+ // CompletionPercent - Percentage complete for the background copy when a resource is created via the CopyStart operation.
+ CompletionPercent *float64 `json:"completionPercent,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for SnapshotProperties.
+func (sp SnapshotProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if sp.OsType != "" {
+ objectMap["osType"] = sp.OsType
+ }
+ if sp.HyperVGeneration != "" {
+ objectMap["hyperVGeneration"] = sp.HyperVGeneration
+ }
+ if sp.PurchasePlan != nil {
+ objectMap["purchasePlan"] = sp.PurchasePlan
+ }
+ if sp.SupportedCapabilities != nil {
+ objectMap["supportedCapabilities"] = sp.SupportedCapabilities
+ }
+ if sp.CreationData != nil {
+ objectMap["creationData"] = sp.CreationData
+ }
+ if sp.DiskSizeGB != nil {
+ objectMap["diskSizeGB"] = sp.DiskSizeGB
+ }
+ if sp.DiskState != "" {
+ objectMap["diskState"] = sp.DiskState
+ }
+ if sp.EncryptionSettingsCollection != nil {
+ objectMap["encryptionSettingsCollection"] = sp.EncryptionSettingsCollection
+ }
+ if sp.Incremental != nil {
+ objectMap["incremental"] = sp.Incremental
+ }
+ if sp.Encryption != nil {
+ objectMap["encryption"] = sp.Encryption
+ }
+ if sp.NetworkAccessPolicy != "" {
+ objectMap["networkAccessPolicy"] = sp.NetworkAccessPolicy
+ }
+ if sp.DiskAccessID != nil {
+ objectMap["diskAccessId"] = sp.DiskAccessID
+ }
+ if sp.SupportsHibernation != nil {
+ objectMap["supportsHibernation"] = sp.SupportsHibernation
+ }
+ if sp.PublicNetworkAccess != "" {
+ objectMap["publicNetworkAccess"] = sp.PublicNetworkAccess
+ }
+ if sp.CompletionPercent != nil {
+ objectMap["completionPercent"] = sp.CompletionPercent
+ }
+ return json.Marshal(objectMap)
+}
+
+// SnapshotsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type SnapshotsCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(SnapshotsClient) (Snapshot, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *SnapshotsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for SnapshotsCreateOrUpdateFuture.Result.
+func (future *SnapshotsCreateOrUpdateFuture) result(client SnapshotsClient) (s Snapshot, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ s.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.CreateOrUpdateResponder(s.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsCreateOrUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// SnapshotsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type SnapshotsDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(SnapshotsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *SnapshotsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for SnapshotsDeleteFuture.Result.
+func (future *SnapshotsDeleteFuture) result(client SnapshotsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// SnapshotsGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type SnapshotsGrantAccessFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(SnapshotsClient) (AccessURI, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *SnapshotsGrantAccessFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for SnapshotsGrantAccessFuture.Result.
+func (future *SnapshotsGrantAccessFuture) result(client SnapshotsClient) (au AccessURI, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ au.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsGrantAccessFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if au.Response.Response, err = future.GetResult(sender); err == nil && au.Response.Response.StatusCode != http.StatusNoContent {
+ au, err = client.GrantAccessResponder(au.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsGrantAccessFuture", "Result", au.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// SnapshotSku the snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an
+// optional parameter for incremental snapshot and the default behavior is the SKU will be set to the same
+// sku as the previous snapshot
+type SnapshotSku struct {
+ // Name - The sku name. Possible values include: 'SnapshotStorageAccountTypesStandardLRS', 'SnapshotStorageAccountTypesPremiumLRS', 'SnapshotStorageAccountTypesStandardZRS'
+ Name SnapshotStorageAccountTypes `json:"name,omitempty"`
+ // Tier - READ-ONLY; The sku tier.
+ Tier *string `json:"tier,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for SnapshotSku.
+func (ss SnapshotSku) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ss.Name != "" {
+ objectMap["name"] = ss.Name
+ }
+ return json.Marshal(objectMap)
+}
+
+// SnapshotsRevokeAccessFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type SnapshotsRevokeAccessFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(SnapshotsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *SnapshotsRevokeAccessFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for SnapshotsRevokeAccessFuture.Result.
+func (future *SnapshotsRevokeAccessFuture) result(client SnapshotsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsRevokeAccessFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsRevokeAccessFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// SnapshotsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type SnapshotsUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(SnapshotsClient) (Snapshot, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *SnapshotsUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for SnapshotsUpdateFuture.Result.
+func (future *SnapshotsUpdateFuture) result(client SnapshotsClient) (s Snapshot, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ s.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.SnapshotsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if s.Response.Response, err = future.GetResult(sender); err == nil && s.Response.Response.StatusCode != http.StatusNoContent {
+ s, err = client.UpdateResponder(s.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsUpdateFuture", "Result", s.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// SnapshotUpdate snapshot update resource.
+type SnapshotUpdate struct {
+ *SnapshotUpdateProperties `json:"properties,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+ Sku *SnapshotSku `json:"sku,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for SnapshotUpdate.
+func (su SnapshotUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if su.SnapshotUpdateProperties != nil {
+ objectMap["properties"] = su.SnapshotUpdateProperties
+ }
+ if su.Tags != nil {
+ objectMap["tags"] = su.Tags
+ }
+ if su.Sku != nil {
+ objectMap["sku"] = su.Sku
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for SnapshotUpdate struct.
+func (su *SnapshotUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var snapshotUpdateProperties SnapshotUpdateProperties
+ err = json.Unmarshal(*v, &snapshotUpdateProperties)
+ if err != nil {
+ return err
+ }
+ su.SnapshotUpdateProperties = &snapshotUpdateProperties
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ su.Tags = tags
+ }
+ case "sku":
+ if v != nil {
+ var sku SnapshotSku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ su.Sku = &sku
+ }
+ }
+ }
+
+ return nil
+}
+
+// SnapshotUpdateProperties snapshot resource update properties.
+type SnapshotUpdateProperties struct {
+ // OsType - the Operating System type. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux'
+ OsType OperatingSystemTypes `json:"osType,omitempty"`
+ // DiskSizeGB - If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
+ DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
+ // EncryptionSettingsCollection - Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
+ EncryptionSettingsCollection *EncryptionSettingsCollection `json:"encryptionSettingsCollection,omitempty"`
+ // Encryption - Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
+ Encryption *Encryption `json:"encryption,omitempty"`
+ // NetworkAccessPolicy - Possible values include: 'NetworkAccessPolicyAllowAll', 'NetworkAccessPolicyAllowPrivate', 'NetworkAccessPolicyDenyAll'
+ NetworkAccessPolicy NetworkAccessPolicy `json:"networkAccessPolicy,omitempty"`
+ // DiskAccessID - ARM id of the DiskAccess resource for using private endpoints on disks.
+ DiskAccessID *string `json:"diskAccessId,omitempty"`
+ // SupportsHibernation - Indicates the OS on a snapshot supports hibernation.
+ SupportsHibernation *bool `json:"supportsHibernation,omitempty"`
+ // PublicNetworkAccess - Possible values include: 'PublicNetworkAccessEnabled', 'PublicNetworkAccessDisabled'
+ PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`
+}
+
+// SoftDeletePolicy contains information about the soft deletion policy of the gallery.
+type SoftDeletePolicy struct {
+ // IsSoftDeleteEnabled - Enables soft-deletion for resources in this gallery, allowing them to be recovered within retention time.
+ IsSoftDeleteEnabled *bool `json:"isSoftDeleteEnabled,omitempty"`
+}
+
+// SourceVault the vault id is an Azure Resource Manager Resource id in the form
+// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}
+type SourceVault struct {
+ // ID - Resource Id
+ ID *string `json:"id,omitempty"`
+}
+
+// SpotRestorePolicy specifies the Spot-Try-Restore properties for the virtual machine scale set.
+// With this property customer can enable or disable automatic restore of the evicted Spot VMSS VM
+// instances opportunistically based on capacity availability and pricing constraint.
+type SpotRestorePolicy struct {
+ // Enabled - Enables the Spot-Try-Restore feature where evicted VMSS SPOT instances will be tried to be restored opportunistically based on capacity availability and pricing constraints
+ Enabled *bool `json:"enabled,omitempty"`
+ // RestoreTimeout - Timeout value expressed as an ISO 8601 time duration after which the platform will not try to restore the VMSS SPOT instances
+ RestoreTimeout *string `json:"restoreTimeout,omitempty"`
+}
+
+// SSHConfiguration SSH configuration for Linux based VMs running on Azure
+type SSHConfiguration struct {
+ // PublicKeys - The list of SSH public keys used to authenticate with linux based VMs.
+ PublicKeys *[]SSHPublicKey `json:"publicKeys,omitempty"`
+}
+
+// SSHPublicKey contains information about SSH certificate public key and the path on the Linux VM where
+// the public key is placed.
+type SSHPublicKey struct {
+ // Path - Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys
+ Path *string `json:"path,omitempty"`
+ // KeyData - SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format.
For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure]https://docs.microsoft.com/azure/virtual-machines/linux/create-ssh-keys-detailed).
+ KeyData *string `json:"keyData,omitempty"`
+}
+
+// SSHPublicKeyGenerateKeyPairResult response from generation of an SSH key pair.
+type SSHPublicKeyGenerateKeyPairResult struct {
+ autorest.Response `json:"-"`
+ // PrivateKey - Private key portion of the key pair used to authenticate to a virtual machine through ssh. The private key is returned in RFC3447 format and should be treated as a secret.
+ PrivateKey *string `json:"privateKey,omitempty"`
+ // PublicKey - Public key portion of the key pair used to authenticate to a virtual machine through ssh. The public key is in ssh-rsa format.
+ PublicKey *string `json:"publicKey,omitempty"`
+ // ID - The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{SshPublicKeyName}
+ ID *string `json:"id,omitempty"`
+}
+
+// SSHPublicKeyResource specifies information about the SSH public key.
+type SSHPublicKeyResource struct {
+ autorest.Response `json:"-"`
+ // SSHPublicKeyResourceProperties - Properties of the SSH public key.
+ *SSHPublicKeyResourceProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for SSHPublicKeyResource.
+func (spkr SSHPublicKeyResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if spkr.SSHPublicKeyResourceProperties != nil {
+ objectMap["properties"] = spkr.SSHPublicKeyResourceProperties
+ }
+ if spkr.Location != nil {
+ objectMap["location"] = spkr.Location
+ }
+ if spkr.Tags != nil {
+ objectMap["tags"] = spkr.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for SSHPublicKeyResource struct.
+func (spkr *SSHPublicKeyResource) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var SSHPublicKeyResourceProperties SSHPublicKeyResourceProperties
+ err = json.Unmarshal(*v, &SSHPublicKeyResourceProperties)
+ if err != nil {
+ return err
+ }
+ spkr.SSHPublicKeyResourceProperties = &SSHPublicKeyResourceProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ spkr.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ spkr.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ spkr.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ spkr.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ spkr.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// SSHPublicKeyResourceProperties properties of the SSH public key.
+type SSHPublicKeyResourceProperties struct {
+ // PublicKey - SSH public key used to authenticate to a virtual machine through ssh. If this property is not initially provided when the resource is created, the publicKey property will be populated when generateKeyPair is called. If the public key is provided upon resource creation, the provided public key needs to be at least 2048-bit and in ssh-rsa format.
+ PublicKey *string `json:"publicKey,omitempty"`
+}
+
+// SSHPublicKeysGroupListResult the list SSH public keys operation response.
+type SSHPublicKeysGroupListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of SSH public keys
+ Value *[]SSHPublicKeyResource `json:"value,omitempty"`
+ // NextLink - The URI to fetch the next page of SSH public keys. Call ListNext() with this URI to fetch the next page of SSH public keys.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// SSHPublicKeysGroupListResultIterator provides access to a complete listing of SSHPublicKeyResource
+// values.
+type SSHPublicKeysGroupListResultIterator struct {
+ i int
+ page SSHPublicKeysGroupListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *SSHPublicKeysGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysGroupListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *SSHPublicKeysGroupListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter SSHPublicKeysGroupListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter SSHPublicKeysGroupListResultIterator) Response() SSHPublicKeysGroupListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter SSHPublicKeysGroupListResultIterator) Value() SSHPublicKeyResource {
+ if !iter.page.NotDone() {
+ return SSHPublicKeyResource{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the SSHPublicKeysGroupListResultIterator type.
+func NewSSHPublicKeysGroupListResultIterator(page SSHPublicKeysGroupListResultPage) SSHPublicKeysGroupListResultIterator {
+ return SSHPublicKeysGroupListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (spkglr SSHPublicKeysGroupListResult) IsEmpty() bool {
+ return spkglr.Value == nil || len(*spkglr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (spkglr SSHPublicKeysGroupListResult) hasNextLink() bool {
+ return spkglr.NextLink != nil && len(*spkglr.NextLink) != 0
+}
+
+// sSHPublicKeysGroupListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (spkglr SSHPublicKeysGroupListResult) sSHPublicKeysGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !spkglr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(spkglr.NextLink)))
+}
+
+// SSHPublicKeysGroupListResultPage contains a page of SSHPublicKeyResource values.
+type SSHPublicKeysGroupListResultPage struct {
+ fn func(context.Context, SSHPublicKeysGroupListResult) (SSHPublicKeysGroupListResult, error)
+ spkglr SSHPublicKeysGroupListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *SSHPublicKeysGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysGroupListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.spkglr)
+ if err != nil {
+ return err
+ }
+ page.spkglr = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *SSHPublicKeysGroupListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page SSHPublicKeysGroupListResultPage) NotDone() bool {
+ return !page.spkglr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page SSHPublicKeysGroupListResultPage) Response() SSHPublicKeysGroupListResult {
+ return page.spkglr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page SSHPublicKeysGroupListResultPage) Values() []SSHPublicKeyResource {
+ if page.spkglr.IsEmpty() {
+ return nil
+ }
+ return *page.spkglr.Value
+}
+
+// Creates a new instance of the SSHPublicKeysGroupListResultPage type.
+func NewSSHPublicKeysGroupListResultPage(cur SSHPublicKeysGroupListResult, getNextPage func(context.Context, SSHPublicKeysGroupListResult) (SSHPublicKeysGroupListResult, error)) SSHPublicKeysGroupListResultPage {
+ return SSHPublicKeysGroupListResultPage{
+ fn: getNextPage,
+ spkglr: cur,
+ }
+}
+
+// SSHPublicKeyUpdateResource specifies information about the SSH public key.
+type SSHPublicKeyUpdateResource struct {
+ // SSHPublicKeyResourceProperties - Properties of the SSH public key.
+ *SSHPublicKeyResourceProperties `json:"properties,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for SSHPublicKeyUpdateResource.
+func (spkur SSHPublicKeyUpdateResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if spkur.SSHPublicKeyResourceProperties != nil {
+ objectMap["properties"] = spkur.SSHPublicKeyResourceProperties
+ }
+ if spkur.Tags != nil {
+ objectMap["tags"] = spkur.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for SSHPublicKeyUpdateResource struct.
+func (spkur *SSHPublicKeyUpdateResource) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var SSHPublicKeyResourceProperties SSHPublicKeyResourceProperties
+ err = json.Unmarshal(*v, &SSHPublicKeyResourceProperties)
+ if err != nil {
+ return err
+ }
+ spkur.SSHPublicKeyResourceProperties = &SSHPublicKeyResourceProperties
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ spkur.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// StatusCodeCount ...
+type StatusCodeCount struct {
+ // Code - READ-ONLY; The instance view status code
+ Code *string `json:"code,omitempty"`
+ // Count - READ-ONLY; Number of instances having this status code
+ Count *int32 `json:"count,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for StatusCodeCount.
+func (scc StatusCodeCount) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// StorageProfile specifies the storage settings for the virtual machine disks.
+type StorageProfile struct {
+ // ImageReference - Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations.
+ ImageReference *ImageReference `json:"imageReference,omitempty"`
+ // OsDisk - Specifies information about the operating system disk used by the virtual machine.
For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).
+ OsDisk *OSDisk `json:"osDisk,omitempty"`
+ // DataDisks - Specifies the parameters that are used to add a data disk to a virtual machine.
For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).
+ DataDisks *[]DataDisk `json:"dataDisks,omitempty"`
+}
+
+// SubResource ...
+type SubResource struct {
+ // ID - Resource Id
+ ID *string `json:"id,omitempty"`
+}
+
+// SubResourceReadOnly ...
+type SubResourceReadOnly struct {
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for SubResourceReadOnly.
+func (srro SubResourceReadOnly) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// SubResourceWithColocationStatus ...
+type SubResourceWithColocationStatus struct {
+ // ColocationStatus - Describes colocation status of a resource in the Proximity Placement Group.
+ ColocationStatus *InstanceViewStatus `json:"colocationStatus,omitempty"`
+ // ID - Resource Id
+ ID *string `json:"id,omitempty"`
+}
+
+// SupportedCapabilities list of supported capabilities (like accelerated networking) persisted on the disk
+// resource for VM use.
+type SupportedCapabilities struct {
+ // AcceleratedNetwork - True if the image from which the OS disk is created supports accelerated networking.
+ AcceleratedNetwork *bool `json:"acceleratedNetwork,omitempty"`
+}
+
+// TargetRegion describes the target region information.
+type TargetRegion struct {
+ // Name - The name of the region.
+ Name *string `json:"name,omitempty"`
+ // RegionalReplicaCount - The number of replicas of the Image Version to be created per region. This property is updatable.
+ RegionalReplicaCount *int32 `json:"regionalReplicaCount,omitempty"`
+ // StorageAccountType - Specifies the storage account type to be used to store the image. This property is not updatable. Possible values include: 'StorageAccountTypeStandardLRS', 'StorageAccountTypeStandardZRS', 'StorageAccountTypePremiumLRS'
+ StorageAccountType StorageAccountType `json:"storageAccountType,omitempty"`
+ Encryption *EncryptionImages `json:"encryption,omitempty"`
+}
+
+// TerminateNotificationProfile ...
+type TerminateNotificationProfile struct {
+ // NotBeforeTimeout - Configurable length of time a Virtual Machine being deleted will have to potentially approve the Terminate Scheduled Event before the event is auto approved (timed out). The configuration must be specified in ISO 8601 format, the default value is 5 minutes (PT5M)
+ NotBeforeTimeout *string `json:"notBeforeTimeout,omitempty"`
+ // Enable - Specifies whether the Terminate Scheduled event is enabled or disabled.
+ Enable *bool `json:"enable,omitempty"`
+}
+
+// ThrottledRequestsInput api request input for LogAnalytics getThrottledRequests Api.
+type ThrottledRequestsInput struct {
+ // BlobContainerSasURI - SAS Uri of the logging blob container to which LogAnalytics Api writes output logs to.
+ BlobContainerSasURI *string `json:"blobContainerSasUri,omitempty"`
+ // FromTime - From time of the query
+ FromTime *date.Time `json:"fromTime,omitempty"`
+ // ToTime - To time of the query
+ ToTime *date.Time `json:"toTime,omitempty"`
+ // GroupByThrottlePolicy - Group query result by Throttle Policy applied.
+ GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"`
+ // GroupByOperationName - Group query result by Operation Name.
+ GroupByOperationName *bool `json:"groupByOperationName,omitempty"`
+ // GroupByResourceName - Group query result by Resource Name.
+ GroupByResourceName *bool `json:"groupByResourceName,omitempty"`
+ // GroupByClientApplicationID - Group query result by Client Application ID.
+ GroupByClientApplicationID *bool `json:"groupByClientApplicationId,omitempty"`
+ // GroupByUserAgent - Group query result by User Agent.
+ GroupByUserAgent *bool `json:"groupByUserAgent,omitempty"`
+}
+
+// UefiSettings specifies the security settings like secure boot and vTPM used while creating the virtual
+// machine.
Minimum api-version: 2020-12-01
+type UefiSettings struct {
+ // SecureBootEnabled - Specifies whether secure boot should be enabled on the virtual machine.
Minimum api-version: 2020-12-01
+ SecureBootEnabled *bool `json:"secureBootEnabled,omitempty"`
+ // VTpmEnabled - Specifies whether vTPM should be enabled on the virtual machine.
Minimum api-version: 2020-12-01
+ VTpmEnabled *bool `json:"vTpmEnabled,omitempty"`
+}
+
+// UpdateDomain defines an update domain for the cloud service.
+type UpdateDomain struct {
+ autorest.Response `json:"-"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource Name
+ Name *string `json:"name,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for UpdateDomain.
+func (ud UpdateDomain) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// UpdateDomainListResult ...
+type UpdateDomainListResult struct {
+ autorest.Response `json:"-"`
+ Value *[]UpdateDomain `json:"value,omitempty"`
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// UpdateDomainListResultIterator provides access to a complete listing of UpdateDomain values.
+type UpdateDomainListResultIterator struct {
+ i int
+ page UpdateDomainListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *UpdateDomainListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UpdateDomainListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *UpdateDomainListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter UpdateDomainListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter UpdateDomainListResultIterator) Response() UpdateDomainListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter UpdateDomainListResultIterator) Value() UpdateDomain {
+ if !iter.page.NotDone() {
+ return UpdateDomain{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the UpdateDomainListResultIterator type.
+func NewUpdateDomainListResultIterator(page UpdateDomainListResultPage) UpdateDomainListResultIterator {
+ return UpdateDomainListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (udlr UpdateDomainListResult) IsEmpty() bool {
+ return udlr.Value == nil || len(*udlr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (udlr UpdateDomainListResult) hasNextLink() bool {
+ return udlr.NextLink != nil && len(*udlr.NextLink) != 0
+}
+
+// updateDomainListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (udlr UpdateDomainListResult) updateDomainListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !udlr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(udlr.NextLink)))
+}
+
+// UpdateDomainListResultPage contains a page of UpdateDomain values.
+type UpdateDomainListResultPage struct {
+ fn func(context.Context, UpdateDomainListResult) (UpdateDomainListResult, error)
+ udlr UpdateDomainListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *UpdateDomainListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UpdateDomainListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.udlr)
+ if err != nil {
+ return err
+ }
+ page.udlr = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *UpdateDomainListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page UpdateDomainListResultPage) NotDone() bool {
+ return !page.udlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page UpdateDomainListResultPage) Response() UpdateDomainListResult {
+ return page.udlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page UpdateDomainListResultPage) Values() []UpdateDomain {
+ if page.udlr.IsEmpty() {
+ return nil
+ }
+ return *page.udlr.Value
+}
+
+// Creates a new instance of the UpdateDomainListResultPage type.
+func NewUpdateDomainListResultPage(cur UpdateDomainListResult, getNextPage func(context.Context, UpdateDomainListResult) (UpdateDomainListResult, error)) UpdateDomainListResultPage {
+ return UpdateDomainListResultPage{
+ fn: getNextPage,
+ udlr: cur,
+ }
+}
+
+// UpdateResource the Update Resource model definition.
+type UpdateResource struct {
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for UpdateResource.
+func (ur UpdateResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ur.Tags != nil {
+ objectMap["tags"] = ur.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UpdateResourceDefinition the Update Resource model definition.
+type UpdateResourceDefinition struct {
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for UpdateResourceDefinition.
+func (urd UpdateResourceDefinition) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if urd.Tags != nil {
+ objectMap["tags"] = urd.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UpgradeOperationHistoricalStatusInfo virtual Machine Scale Set OS Upgrade History operation response.
+type UpgradeOperationHistoricalStatusInfo struct {
+ // Properties - READ-ONLY; Information about the properties of the upgrade operation.
+ Properties *UpgradeOperationHistoricalStatusInfoProperties `json:"properties,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - READ-ONLY; Resource location
+ Location *string `json:"location,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for UpgradeOperationHistoricalStatusInfo.
+func (uohsi UpgradeOperationHistoricalStatusInfo) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// UpgradeOperationHistoricalStatusInfoProperties describes each OS upgrade on the Virtual Machine Scale
+// Set.
+type UpgradeOperationHistoricalStatusInfoProperties struct {
+ // RunningStatus - READ-ONLY; Information about the overall status of the upgrade operation.
+ RunningStatus *UpgradeOperationHistoryStatus `json:"runningStatus,omitempty"`
+ // Progress - READ-ONLY; Counts of the VMs in each state.
+ Progress *RollingUpgradeProgressInfo `json:"progress,omitempty"`
+ // Error - READ-ONLY; Error Details for this upgrade if there are any.
+ Error *APIError `json:"error,omitempty"`
+ // StartedBy - READ-ONLY; Invoker of the Upgrade Operation. Possible values include: 'UpgradeOperationInvokerUnknown', 'UpgradeOperationInvokerUser', 'UpgradeOperationInvokerPlatform'
+ StartedBy UpgradeOperationInvoker `json:"startedBy,omitempty"`
+ // TargetImageReference - READ-ONLY; Image Reference details
+ TargetImageReference *ImageReference `json:"targetImageReference,omitempty"`
+ // RollbackInfo - READ-ONLY; Information about OS rollback if performed
+ RollbackInfo *RollbackStatusInfo `json:"rollbackInfo,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for UpgradeOperationHistoricalStatusInfoProperties.
+func (uohsip UpgradeOperationHistoricalStatusInfoProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// UpgradeOperationHistoryStatus information about the current running state of the overall upgrade.
+type UpgradeOperationHistoryStatus struct {
+ // Code - READ-ONLY; Code indicating the current status of the upgrade. Possible values include: 'UpgradeStateRollingForward', 'UpgradeStateCancelled', 'UpgradeStateCompleted', 'UpgradeStateFaulted'
+ Code UpgradeState `json:"code,omitempty"`
+ // StartTime - READ-ONLY; Start time of the upgrade.
+ StartTime *date.Time `json:"startTime,omitempty"`
+ // EndTime - READ-ONLY; End time of the upgrade.
+ EndTime *date.Time `json:"endTime,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for UpgradeOperationHistoryStatus.
+func (uohs UpgradeOperationHistoryStatus) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// UpgradePolicy describes an upgrade policy - automatic, manual, or rolling.
+type UpgradePolicy struct {
+ // Mode - Specifies the mode of an upgrade to virtual machines in the scale set.
Possible values are:
**Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.
**Automatic** - All virtual machines in the scale set are automatically updated at the same time. Possible values include: 'UpgradeModeAutomatic', 'UpgradeModeManual', 'UpgradeModeRolling'
+ Mode UpgradeMode `json:"mode,omitempty"`
+ // RollingUpgradePolicy - The configuration parameters used while performing a rolling upgrade.
+ RollingUpgradePolicy *RollingUpgradePolicy `json:"rollingUpgradePolicy,omitempty"`
+ // AutomaticOSUpgradePolicy - Configuration parameters used for performing automatic OS Upgrade.
+ AutomaticOSUpgradePolicy *AutomaticOSUpgradePolicy `json:"automaticOSUpgradePolicy,omitempty"`
+}
+
+// Usage describes Compute Resource Usage.
+type Usage struct {
+ // Unit - An enum describing the unit of usage measurement.
+ Unit *string `json:"unit,omitempty"`
+ // CurrentValue - The current usage of the resource.
+ CurrentValue *int32 `json:"currentValue,omitempty"`
+ // Limit - The maximum permitted usage of the resource.
+ Limit *int64 `json:"limit,omitempty"`
+ // Name - The name of the type of usage.
+ Name *UsageName `json:"name,omitempty"`
+}
+
+// UsageName the Usage Names.
+type UsageName struct {
+ // Value - The name of the resource.
+ Value *string `json:"value,omitempty"`
+ // LocalizedValue - The localized name of the resource.
+ LocalizedValue *string `json:"localizedValue,omitempty"`
+}
+
+// UserArtifactManage ...
+type UserArtifactManage struct {
+ // Install - Required. The path and arguments to install the gallery application. This is limited to 4096 characters.
+ Install *string `json:"install,omitempty"`
+ // Remove - Required. The path and arguments to remove the gallery application. This is limited to 4096 characters.
+ Remove *string `json:"remove,omitempty"`
+ // Update - Optional. The path and arguments to update the gallery application. If not present, then update operation will invoke remove command on the previous version and install command on the current version of the gallery application. This is limited to 4096 characters.
+ Update *string `json:"update,omitempty"`
+}
+
+// UserArtifactSource the source image from which the Image Version is going to be created.
+type UserArtifactSource struct {
+ // MediaLink - Required. The mediaLink of the artifact, must be a readable storage page blob.
+ MediaLink *string `json:"mediaLink,omitempty"`
+ // DefaultConfigurationLink - Optional. The defaultConfigurationLink of the artifact, must be a readable storage page blob.
+ DefaultConfigurationLink *string `json:"defaultConfigurationLink,omitempty"`
+}
+
+// VaultCertificate describes a single certificate reference in a Key Vault, and where the certificate
+// should reside on the VM.
+type VaultCertificate struct {
+ // CertificateURL - This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8:
{
"data":"",
"dataType":"pfx",
"password":""
}
To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).
+ CertificateURL *string `json:"certificateUrl,omitempty"`
+ // CertificateStore - For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account.
For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name <UppercaseThumbprint>.crt for the X509 certificate file and <UppercaseThumbprint>.prv for private key. Both of these files are .pem formatted.
+ CertificateStore *string `json:"certificateStore,omitempty"`
+}
+
+// VaultSecretGroup describes a set of certificates which are all in the same Key Vault.
+type VaultSecretGroup struct {
+ // SourceVault - The relative URL of the Key Vault containing all of the certificates in VaultCertificates.
+ SourceVault *SubResource `json:"sourceVault,omitempty"`
+ // VaultCertificates - The list of key vault references in SourceVault which contain certificates.
+ VaultCertificates *[]VaultCertificate `json:"vaultCertificates,omitempty"`
+}
+
+// VirtualHardDisk describes the uri of a disk.
+type VirtualHardDisk struct {
+ // URI - Specifies the virtual hard disk's uri.
+ URI *string `json:"uri,omitempty"`
+}
+
+// VirtualMachine describes a Virtual Machine.
+type VirtualMachine struct {
+ autorest.Response `json:"-"`
+ // Plan - Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.
+ Plan *Plan `json:"plan,omitempty"`
+ *VirtualMachineProperties `json:"properties,omitempty"`
+ // Resources - READ-ONLY; The virtual machine child extension resources.
+ Resources *[]VirtualMachineExtension `json:"resources,omitempty"`
+ // Identity - The identity of the virtual machine, if configured.
+ Identity *VirtualMachineIdentity `json:"identity,omitempty"`
+ // Zones - The virtual machine zones.
+ Zones *[]string `json:"zones,omitempty"`
+ // ExtendedLocation - The extended location of the Virtual Machine.
+ ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachine.
+func (VM VirtualMachine) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if VM.Plan != nil {
+ objectMap["plan"] = VM.Plan
+ }
+ if VM.VirtualMachineProperties != nil {
+ objectMap["properties"] = VM.VirtualMachineProperties
+ }
+ if VM.Identity != nil {
+ objectMap["identity"] = VM.Identity
+ }
+ if VM.Zones != nil {
+ objectMap["zones"] = VM.Zones
+ }
+ if VM.ExtendedLocation != nil {
+ objectMap["extendedLocation"] = VM.ExtendedLocation
+ }
+ if VM.Location != nil {
+ objectMap["location"] = VM.Location
+ }
+ if VM.Tags != nil {
+ objectMap["tags"] = VM.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachine struct.
+func (VM *VirtualMachine) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "plan":
+ if v != nil {
+ var plan Plan
+ err = json.Unmarshal(*v, &plan)
+ if err != nil {
+ return err
+ }
+ VM.Plan = &plan
+ }
+ case "properties":
+ if v != nil {
+ var virtualMachineProperties VirtualMachineProperties
+ err = json.Unmarshal(*v, &virtualMachineProperties)
+ if err != nil {
+ return err
+ }
+ VM.VirtualMachineProperties = &virtualMachineProperties
+ }
+ case "resources":
+ if v != nil {
+ var resources []VirtualMachineExtension
+ err = json.Unmarshal(*v, &resources)
+ if err != nil {
+ return err
+ }
+ VM.Resources = &resources
+ }
+ case "identity":
+ if v != nil {
+ var identity VirtualMachineIdentity
+ err = json.Unmarshal(*v, &identity)
+ if err != nil {
+ return err
+ }
+ VM.Identity = &identity
+ }
+ case "zones":
+ if v != nil {
+ var zones []string
+ err = json.Unmarshal(*v, &zones)
+ if err != nil {
+ return err
+ }
+ VM.Zones = &zones
+ }
+ case "extendedLocation":
+ if v != nil {
+ var extendedLocation ExtendedLocation
+ err = json.Unmarshal(*v, &extendedLocation)
+ if err != nil {
+ return err
+ }
+ VM.ExtendedLocation = &extendedLocation
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ VM.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ VM.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ VM.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ VM.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ VM.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualMachineAgentInstanceView the instance view of the VM Agent running on the virtual machine.
+type VirtualMachineAgentInstanceView struct {
+ // VMAgentVersion - The VM Agent full version.
+ VMAgentVersion *string `json:"vmAgentVersion,omitempty"`
+ // ExtensionHandlers - The virtual machine extension handler instance view.
+ ExtensionHandlers *[]VirtualMachineExtensionHandlerInstanceView `json:"extensionHandlers,omitempty"`
+ // Statuses - The resource status information.
+ Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
+}
+
+// VirtualMachineAssessPatchesResult describes the properties of an AssessPatches result.
+type VirtualMachineAssessPatchesResult struct {
+ autorest.Response `json:"-"`
+ // Status - READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or "CompletedWithWarnings.". Possible values include: 'PatchOperationStatusUnknown', 'PatchOperationStatusInProgress', 'PatchOperationStatusFailed', 'PatchOperationStatusSucceeded', 'PatchOperationStatusCompletedWithWarnings'
+ Status PatchOperationStatus `json:"status,omitempty"`
+ // AssessmentActivityID - READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs.
+ AssessmentActivityID *string `json:"assessmentActivityId,omitempty"`
+ // RebootPending - READ-ONLY; The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete installation but the reboot has not yet occurred.
+ RebootPending *bool `json:"rebootPending,omitempty"`
+ // CriticalAndSecurityPatchCount - READ-ONLY; The number of critical or security patches that have been detected as available and not yet installed.
+ CriticalAndSecurityPatchCount *int32 `json:"criticalAndSecurityPatchCount,omitempty"`
+ // OtherPatchCount - READ-ONLY; The number of all available patches excluding critical and security.
+ OtherPatchCount *int32 `json:"otherPatchCount,omitempty"`
+ // StartDateTime - READ-ONLY; The UTC timestamp when the operation began.
+ StartDateTime *date.Time `json:"startDateTime,omitempty"`
+ // AvailablePatches - READ-ONLY; The list of patches that have been detected as available for installation.
+ AvailablePatches *[]VirtualMachineSoftwarePatchProperties `json:"availablePatches,omitempty"`
+ // Error - READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them.
+ Error *APIError `json:"error,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineAssessPatchesResult.
+func (vmapr VirtualMachineAssessPatchesResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// VirtualMachineCaptureParameters capture Virtual Machine parameters.
+type VirtualMachineCaptureParameters struct {
+ // VhdPrefix - The captured virtual hard disk's name prefix.
+ VhdPrefix *string `json:"vhdPrefix,omitempty"`
+ // DestinationContainerName - The destination container name.
+ DestinationContainerName *string `json:"destinationContainerName,omitempty"`
+ // OverwriteVhds - Specifies whether to overwrite the destination virtual hard disk, in case of conflict.
+ OverwriteVhds *bool `json:"overwriteVhds,omitempty"`
+}
+
+// VirtualMachineCaptureResult output of virtual machine capture operation.
+type VirtualMachineCaptureResult struct {
+ autorest.Response `json:"-"`
+ // Schema - READ-ONLY; the schema of the captured virtual machine
+ Schema *string `json:"$schema,omitempty"`
+ // ContentVersion - READ-ONLY; the version of the content
+ ContentVersion *string `json:"contentVersion,omitempty"`
+ // Parameters - READ-ONLY; parameters of the captured virtual machine
+ Parameters interface{} `json:"parameters,omitempty"`
+ // Resources - READ-ONLY; a list of resource items of the captured virtual machine
+ Resources *[]interface{} `json:"resources,omitempty"`
+ // ID - Resource Id
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineCaptureResult.
+func (vmcr VirtualMachineCaptureResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmcr.ID != nil {
+ objectMap["id"] = vmcr.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// VirtualMachineExtension describes a Virtual Machine Extension.
+type VirtualMachineExtension struct {
+ autorest.Response `json:"-"`
+ *VirtualMachineExtensionProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineExtension.
+func (vme VirtualMachineExtension) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vme.VirtualMachineExtensionProperties != nil {
+ objectMap["properties"] = vme.VirtualMachineExtensionProperties
+ }
+ if vme.Location != nil {
+ objectMap["location"] = vme.Location
+ }
+ if vme.Tags != nil {
+ objectMap["tags"] = vme.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachineExtension struct.
+func (vme *VirtualMachineExtension) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var virtualMachineExtensionProperties VirtualMachineExtensionProperties
+ err = json.Unmarshal(*v, &virtualMachineExtensionProperties)
+ if err != nil {
+ return err
+ }
+ vme.VirtualMachineExtensionProperties = &virtualMachineExtensionProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vme.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vme.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ vme.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ vme.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ vme.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualMachineExtensionHandlerInstanceView the instance view of a virtual machine extension handler.
+type VirtualMachineExtensionHandlerInstanceView struct {
+ // Type - Specifies the type of the extension; an example is "CustomScriptExtension".
+ Type *string `json:"type,omitempty"`
+ // TypeHandlerVersion - Specifies the version of the script handler.
+ TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
+ // Status - The extension handler status.
+ Status *InstanceViewStatus `json:"status,omitempty"`
+}
+
+// VirtualMachineExtensionImage describes a Virtual Machine Extension Image.
+type VirtualMachineExtensionImage struct {
+ autorest.Response `json:"-"`
+ *VirtualMachineExtensionImageProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineExtensionImage.
+func (vmei VirtualMachineExtensionImage) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmei.VirtualMachineExtensionImageProperties != nil {
+ objectMap["properties"] = vmei.VirtualMachineExtensionImageProperties
+ }
+ if vmei.Location != nil {
+ objectMap["location"] = vmei.Location
+ }
+ if vmei.Tags != nil {
+ objectMap["tags"] = vmei.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachineExtensionImage struct.
+func (vmei *VirtualMachineExtensionImage) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var virtualMachineExtensionImageProperties VirtualMachineExtensionImageProperties
+ err = json.Unmarshal(*v, &virtualMachineExtensionImageProperties)
+ if err != nil {
+ return err
+ }
+ vmei.VirtualMachineExtensionImageProperties = &virtualMachineExtensionImageProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vmei.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vmei.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ vmei.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ vmei.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ vmei.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualMachineExtensionImageProperties describes the properties of a Virtual Machine Extension Image.
+type VirtualMachineExtensionImageProperties struct {
+ // OperatingSystem - The operating system this extension supports.
+ OperatingSystem *string `json:"operatingSystem,omitempty"`
+ // ComputeRole - The type of role (IaaS or PaaS) this extension supports.
+ ComputeRole *string `json:"computeRole,omitempty"`
+ // HandlerSchema - The schema defined by publisher, where extension consumers should provide settings in a matching schema.
+ HandlerSchema *string `json:"handlerSchema,omitempty"`
+ // VMScaleSetEnabled - Whether the extension can be used on xRP VMScaleSets. By default existing extensions are usable on scalesets, but there might be cases where a publisher wants to explicitly indicate the extension is only enabled for CRP VMs but not VMSS.
+ VMScaleSetEnabled *bool `json:"vmScaleSetEnabled,omitempty"`
+ // SupportsMultipleExtensions - Whether the handler can support multiple extensions.
+ SupportsMultipleExtensions *bool `json:"supportsMultipleExtensions,omitempty"`
+}
+
+// VirtualMachineExtensionInstanceView the instance view of a virtual machine extension.
+type VirtualMachineExtensionInstanceView struct {
+ // Name - The virtual machine extension name.
+ Name *string `json:"name,omitempty"`
+ // Type - Specifies the type of the extension; an example is "CustomScriptExtension".
+ Type *string `json:"type,omitempty"`
+ // TypeHandlerVersion - Specifies the version of the script handler.
+ TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
+ // Substatuses - The resource status information.
+ Substatuses *[]InstanceViewStatus `json:"substatuses,omitempty"`
+ // Statuses - The resource status information.
+ Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
+}
+
+// VirtualMachineExtensionProperties describes the properties of a Virtual Machine Extension.
+type VirtualMachineExtensionProperties struct {
+ // ForceUpdateTag - How the extension handler should be forced to update even if the extension configuration has not changed.
+ ForceUpdateTag *string `json:"forceUpdateTag,omitempty"`
+ // Publisher - The name of the extension handler publisher.
+ Publisher *string `json:"publisher,omitempty"`
+ // Type - Specifies the type of the extension; an example is "CustomScriptExtension".
+ Type *string `json:"type,omitempty"`
+ // TypeHandlerVersion - Specifies the version of the script handler.
+ TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
+ // AutoUpgradeMinorVersion - Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.
+ AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"`
+ // EnableAutomaticUpgrade - Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.
+ EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"`
+ // Settings - Json formatted public settings for the extension.
+ Settings interface{} `json:"settings,omitempty"`
+ // ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
+ ProtectedSettings interface{} `json:"protectedSettings,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // InstanceView - The virtual machine extension instance view.
+ InstanceView *VirtualMachineExtensionInstanceView `json:"instanceView,omitempty"`
+ // SuppressFailures - Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false.
+ SuppressFailures *bool `json:"suppressFailures,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineExtensionProperties.
+func (vmep VirtualMachineExtensionProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmep.ForceUpdateTag != nil {
+ objectMap["forceUpdateTag"] = vmep.ForceUpdateTag
+ }
+ if vmep.Publisher != nil {
+ objectMap["publisher"] = vmep.Publisher
+ }
+ if vmep.Type != nil {
+ objectMap["type"] = vmep.Type
+ }
+ if vmep.TypeHandlerVersion != nil {
+ objectMap["typeHandlerVersion"] = vmep.TypeHandlerVersion
+ }
+ if vmep.AutoUpgradeMinorVersion != nil {
+ objectMap["autoUpgradeMinorVersion"] = vmep.AutoUpgradeMinorVersion
+ }
+ if vmep.EnableAutomaticUpgrade != nil {
+ objectMap["enableAutomaticUpgrade"] = vmep.EnableAutomaticUpgrade
+ }
+ if vmep.Settings != nil {
+ objectMap["settings"] = vmep.Settings
+ }
+ if vmep.ProtectedSettings != nil {
+ objectMap["protectedSettings"] = vmep.ProtectedSettings
+ }
+ if vmep.InstanceView != nil {
+ objectMap["instanceView"] = vmep.InstanceView
+ }
+ if vmep.SuppressFailures != nil {
+ objectMap["suppressFailures"] = vmep.SuppressFailures
+ }
+ return json.Marshal(objectMap)
+}
+
+// VirtualMachineExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
+type VirtualMachineExtensionsCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineExtensionsClient) (VirtualMachineExtension, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineExtensionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineExtensionsCreateOrUpdateFuture.Result.
+func (future *VirtualMachineExtensionsCreateOrUpdateFuture) result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vme.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent {
+ vme, err = client.CreateOrUpdateResponder(vme.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsCreateOrUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualMachineExtensionsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualMachineExtensionsDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineExtensionsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineExtensionsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineExtensionsDeleteFuture.Result.
+func (future *VirtualMachineExtensionsDeleteFuture) result(client VirtualMachineExtensionsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachineExtensionsListResult the List Extension operation response
+type VirtualMachineExtensionsListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of extensions
+ Value *[]VirtualMachineExtension `json:"value,omitempty"`
+}
+
+// VirtualMachineExtensionsUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualMachineExtensionsUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineExtensionsClient) (VirtualMachineExtension, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineExtensionsUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineExtensionsUpdateFuture.Result.
+func (future *VirtualMachineExtensionsUpdateFuture) result(client VirtualMachineExtensionsClient) (vme VirtualMachineExtension, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vme.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineExtensionsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vme.Response.Response, err = future.GetResult(sender); err == nil && vme.Response.Response.StatusCode != http.StatusNoContent {
+ vme, err = client.UpdateResponder(vme.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsUpdateFuture", "Result", vme.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualMachineExtensionUpdate describes a Virtual Machine Extension.
+type VirtualMachineExtensionUpdate struct {
+ *VirtualMachineExtensionUpdateProperties `json:"properties,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineExtensionUpdate.
+func (vmeu VirtualMachineExtensionUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmeu.VirtualMachineExtensionUpdateProperties != nil {
+ objectMap["properties"] = vmeu.VirtualMachineExtensionUpdateProperties
+ }
+ if vmeu.Tags != nil {
+ objectMap["tags"] = vmeu.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachineExtensionUpdate struct.
+func (vmeu *VirtualMachineExtensionUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var virtualMachineExtensionUpdateProperties VirtualMachineExtensionUpdateProperties
+ err = json.Unmarshal(*v, &virtualMachineExtensionUpdateProperties)
+ if err != nil {
+ return err
+ }
+ vmeu.VirtualMachineExtensionUpdateProperties = &virtualMachineExtensionUpdateProperties
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ vmeu.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualMachineExtensionUpdateProperties describes the properties of a Virtual Machine Extension.
+type VirtualMachineExtensionUpdateProperties struct {
+ // ForceUpdateTag - How the extension handler should be forced to update even if the extension configuration has not changed.
+ ForceUpdateTag *string `json:"forceUpdateTag,omitempty"`
+ // Publisher - The name of the extension handler publisher.
+ Publisher *string `json:"publisher,omitempty"`
+ // Type - Specifies the type of the extension; an example is "CustomScriptExtension".
+ Type *string `json:"type,omitempty"`
+ // TypeHandlerVersion - Specifies the version of the script handler.
+ TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
+ // AutoUpgradeMinorVersion - Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.
+ AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"`
+ // EnableAutomaticUpgrade - Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.
+ EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"`
+ // Settings - Json formatted public settings for the extension.
+ Settings interface{} `json:"settings,omitempty"`
+ // ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
+ ProtectedSettings interface{} `json:"protectedSettings,omitempty"`
+ // SuppressFailures - Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false.
+ SuppressFailures *bool `json:"suppressFailures,omitempty"`
+}
+
+// VirtualMachineHealthStatus the health status of the VM.
+type VirtualMachineHealthStatus struct {
+ // Status - READ-ONLY; The health status information for the VM.
+ Status *InstanceViewStatus `json:"status,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineHealthStatus.
+func (vmhs VirtualMachineHealthStatus) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// VirtualMachineIdentity identity for the virtual machine.
+type VirtualMachineIdentity struct {
+ // PrincipalID - READ-ONLY; The principal id of virtual machine identity. This property will only be provided for a system assigned identity.
+ PrincipalID *string `json:"principalId,omitempty"`
+ // TenantID - READ-ONLY; The tenant id associated with the virtual machine. This property will only be provided for a system assigned identity.
+ TenantID *string `json:"tenantId,omitempty"`
+ // Type - The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine. Possible values include: 'ResourceIdentityTypeSystemAssigned', 'ResourceIdentityTypeUserAssigned', 'ResourceIdentityTypeSystemAssignedUserAssigned', 'ResourceIdentityTypeNone'
+ Type ResourceIdentityType `json:"type,omitempty"`
+ // UserAssignedIdentities - The list of user identities associated with the Virtual Machine. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
+ UserAssignedIdentities map[string]*VirtualMachineIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineIdentity.
+func (vmi VirtualMachineIdentity) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmi.Type != "" {
+ objectMap["type"] = vmi.Type
+ }
+ if vmi.UserAssignedIdentities != nil {
+ objectMap["userAssignedIdentities"] = vmi.UserAssignedIdentities
+ }
+ return json.Marshal(objectMap)
+}
+
+// VirtualMachineIdentityUserAssignedIdentitiesValue ...
+type VirtualMachineIdentityUserAssignedIdentitiesValue struct {
+ // PrincipalID - READ-ONLY; The principal id of user assigned identity.
+ PrincipalID *string `json:"principalId,omitempty"`
+ // ClientID - READ-ONLY; The client id of user assigned identity.
+ ClientID *string `json:"clientId,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineIdentityUserAssignedIdentitiesValue.
+func (vmiAiv VirtualMachineIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// VirtualMachineImage describes a Virtual Machine Image.
+type VirtualMachineImage struct {
+ autorest.Response `json:"-"`
+ *VirtualMachineImageProperties `json:"properties,omitempty"`
+ // Name - The name of the resource.
+ Name *string `json:"name,omitempty"`
+ // Location - The supported Azure location of the resource.
+ Location *string `json:"location,omitempty"`
+ // Tags - Specifies the tags that are assigned to the virtual machine. For more information about using tags, see [Using tags to organize your Azure resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md).
+ Tags map[string]*string `json:"tags"`
+ // ExtendedLocation - The extended location of the Virtual Machine.
+ ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
+ // ID - Resource Id
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineImage.
+func (vmi VirtualMachineImage) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmi.VirtualMachineImageProperties != nil {
+ objectMap["properties"] = vmi.VirtualMachineImageProperties
+ }
+ if vmi.Name != nil {
+ objectMap["name"] = vmi.Name
+ }
+ if vmi.Location != nil {
+ objectMap["location"] = vmi.Location
+ }
+ if vmi.Tags != nil {
+ objectMap["tags"] = vmi.Tags
+ }
+ if vmi.ExtendedLocation != nil {
+ objectMap["extendedLocation"] = vmi.ExtendedLocation
+ }
+ if vmi.ID != nil {
+ objectMap["id"] = vmi.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachineImage struct.
+func (vmi *VirtualMachineImage) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var virtualMachineImageProperties VirtualMachineImageProperties
+ err = json.Unmarshal(*v, &virtualMachineImageProperties)
+ if err != nil {
+ return err
+ }
+ vmi.VirtualMachineImageProperties = &virtualMachineImageProperties
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vmi.Name = &name
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ vmi.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ vmi.Tags = tags
+ }
+ case "extendedLocation":
+ if v != nil {
+ var extendedLocation ExtendedLocation
+ err = json.Unmarshal(*v, &extendedLocation)
+ if err != nil {
+ return err
+ }
+ vmi.ExtendedLocation = &extendedLocation
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vmi.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualMachineImageFeature specifies additional capabilities supported by the image
+type VirtualMachineImageFeature struct {
+ // Name - The name of the feature.
+ Name *string `json:"name,omitempty"`
+ // Value - The corresponding value for the feature.
+ Value *string `json:"value,omitempty"`
+}
+
+// VirtualMachineImageProperties describes the properties of a Virtual Machine Image.
+type VirtualMachineImageProperties struct {
+ Plan *PurchasePlan `json:"plan,omitempty"`
+ OsDiskImage *OSDiskImage `json:"osDiskImage,omitempty"`
+ DataDiskImages *[]DataDiskImage `json:"dataDiskImages,omitempty"`
+ AutomaticOSUpgradeProperties *AutomaticOSUpgradeProperties `json:"automaticOSUpgradeProperties,omitempty"`
+ // HyperVGeneration - Possible values include: 'HyperVGenerationTypesV1', 'HyperVGenerationTypesV2'
+ HyperVGeneration HyperVGenerationTypes `json:"hyperVGeneration,omitempty"`
+ // Disallowed - Specifies disallowed configuration for the VirtualMachine created from the image
+ Disallowed *DisallowedConfiguration `json:"disallowed,omitempty"`
+ Features *[]VirtualMachineImageFeature `json:"features,omitempty"`
+}
+
+// VirtualMachineImageResource virtual machine image resource information.
+type VirtualMachineImageResource struct {
+ // Name - The name of the resource.
+ Name *string `json:"name,omitempty"`
+ // Location - The supported Azure location of the resource.
+ Location *string `json:"location,omitempty"`
+ // Tags - Specifies the tags that are assigned to the virtual machine. For more information about using tags, see [Using tags to organize your Azure resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md).
+ Tags map[string]*string `json:"tags"`
+ // ExtendedLocation - The extended location of the Virtual Machine.
+ ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
+ // ID - Resource Id
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineImageResource.
+func (vmir VirtualMachineImageResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmir.Name != nil {
+ objectMap["name"] = vmir.Name
+ }
+ if vmir.Location != nil {
+ objectMap["location"] = vmir.Location
+ }
+ if vmir.Tags != nil {
+ objectMap["tags"] = vmir.Tags
+ }
+ if vmir.ExtendedLocation != nil {
+ objectMap["extendedLocation"] = vmir.ExtendedLocation
+ }
+ if vmir.ID != nil {
+ objectMap["id"] = vmir.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// VirtualMachineInstallPatchesParameters input for InstallPatches as directly received by the API
+type VirtualMachineInstallPatchesParameters struct {
+ // MaximumDuration - Specifies the maximum amount of time that the operation will run. It must be an ISO 8601-compliant duration string such as PT4H (4 hours)
+ MaximumDuration *string `json:"maximumDuration,omitempty"`
+ // RebootSetting - Defines when it is acceptable to reboot a VM during a software update operation. Possible values include: 'VMGuestPatchRebootSettingIfRequired', 'VMGuestPatchRebootSettingNever', 'VMGuestPatchRebootSettingAlways'
+ RebootSetting VMGuestPatchRebootSetting `json:"rebootSetting,omitempty"`
+ // WindowsParameters - Input for InstallPatches on a Windows VM, as directly received by the API
+ WindowsParameters *WindowsParameters `json:"windowsParameters,omitempty"`
+ // LinuxParameters - Input for InstallPatches on a Linux VM, as directly received by the API
+ LinuxParameters *LinuxParameters `json:"linuxParameters,omitempty"`
+}
+
+// VirtualMachineInstallPatchesResult the result summary of an installation operation.
+type VirtualMachineInstallPatchesResult struct {
+ autorest.Response `json:"-"`
+ // Status - READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Failed", "Succeeded", "Unknown" or "CompletedWithWarnings.". Possible values include: 'PatchOperationStatusUnknown', 'PatchOperationStatusInProgress', 'PatchOperationStatusFailed', 'PatchOperationStatusSucceeded', 'PatchOperationStatusCompletedWithWarnings'
+ Status PatchOperationStatus `json:"status,omitempty"`
+ // InstallationActivityID - READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs.
+ InstallationActivityID *string `json:"installationActivityId,omitempty"`
+ // RebootStatus - READ-ONLY; The reboot state of the VM following completion of the operation. Possible values include: 'VMGuestPatchRebootStatusUnknown', 'VMGuestPatchRebootStatusNotNeeded', 'VMGuestPatchRebootStatusRequired', 'VMGuestPatchRebootStatusStarted', 'VMGuestPatchRebootStatusFailed', 'VMGuestPatchRebootStatusCompleted'
+ RebootStatus VMGuestPatchRebootStatus `json:"rebootStatus,omitempty"`
+ // MaintenanceWindowExceeded - READ-ONLY; Whether the operation ran out of time before it completed all its intended actions.
+ MaintenanceWindowExceeded *bool `json:"maintenanceWindowExceeded,omitempty"`
+ // ExcludedPatchCount - READ-ONLY; The number of patches that were not installed due to the user blocking their installation.
+ ExcludedPatchCount *int32 `json:"excludedPatchCount,omitempty"`
+ // NotSelectedPatchCount - READ-ONLY; The number of patches that were detected as available for install, but did not meet the operation's criteria.
+ NotSelectedPatchCount *int32 `json:"notSelectedPatchCount,omitempty"`
+ // PendingPatchCount - READ-ONLY; The number of patches that were identified as meeting the installation criteria, but were not able to be installed. Typically this happens when maintenanceWindowExceeded == true.
+ PendingPatchCount *int32 `json:"pendingPatchCount,omitempty"`
+ // InstalledPatchCount - READ-ONLY; The number of patches successfully installed.
+ InstalledPatchCount *int32 `json:"installedPatchCount,omitempty"`
+ // FailedPatchCount - READ-ONLY; The number of patches that could not be installed due to some issue. See errors for details.
+ FailedPatchCount *int32 `json:"failedPatchCount,omitempty"`
+ // Patches - READ-ONLY; The patches that were installed during the operation.
+ Patches *[]PatchInstallationDetail `json:"patches,omitempty"`
+ // StartDateTime - READ-ONLY; The UTC timestamp when the operation began.
+ StartDateTime *date.Time `json:"startDateTime,omitempty"`
+ // Error - READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them.
+ Error *APIError `json:"error,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineInstallPatchesResult.
+func (vmipr VirtualMachineInstallPatchesResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// VirtualMachineInstanceView the instance view of a virtual machine.
+type VirtualMachineInstanceView struct {
+ autorest.Response `json:"-"`
+ // PlatformUpdateDomain - Specifies the update domain of the virtual machine.
+ PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty"`
+ // PlatformFaultDomain - Specifies the fault domain of the virtual machine.
+ PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"`
+ // ComputerName - The computer name assigned to the virtual machine.
+ ComputerName *string `json:"computerName,omitempty"`
+ // OsName - The Operating System running on the virtual machine.
+ OsName *string `json:"osName,omitempty"`
+ // OsVersion - The version of Operating System running on the virtual machine.
+ OsVersion *string `json:"osVersion,omitempty"`
+ // HyperVGeneration - Specifies the HyperVGeneration Type associated with a resource. Possible values include: 'HyperVGenerationTypeV1', 'HyperVGenerationTypeV2'
+ HyperVGeneration HyperVGenerationType `json:"hyperVGeneration,omitempty"`
+ // RdpThumbPrint - The Remote desktop certificate thumbprint.
+ RdpThumbPrint *string `json:"rdpThumbPrint,omitempty"`
+ // VMAgent - The VM Agent running on the virtual machine.
+ VMAgent *VirtualMachineAgentInstanceView `json:"vmAgent,omitempty"`
+ // MaintenanceRedeployStatus - The Maintenance Operation status on the virtual machine.
+ MaintenanceRedeployStatus *MaintenanceRedeployStatus `json:"maintenanceRedeployStatus,omitempty"`
+ // Disks - The virtual machine disk information.
+ Disks *[]DiskInstanceView `json:"disks,omitempty"`
+ // Extensions - The extensions information.
+ Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
+ // VMHealth - READ-ONLY; The health status for the VM.
+ VMHealth *VirtualMachineHealthStatus `json:"vmHealth,omitempty"`
+ // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
You can easily view the output of your console log.
Azure also enables you to see a screenshot of the VM from the hypervisor.
+ BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
+ // AssignedHost - READ-ONLY; Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled.
Minimum api-version: 2020-06-01.
+ AssignedHost *string `json:"assignedHost,omitempty"`
+ // Statuses - The resource status information.
+ Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
+ // PatchStatus - [Preview Feature] The status of virtual machine patch operations.
+ PatchStatus *VirtualMachinePatchStatus `json:"patchStatus,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineInstanceView.
+func (vmiv VirtualMachineInstanceView) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmiv.PlatformUpdateDomain != nil {
+ objectMap["platformUpdateDomain"] = vmiv.PlatformUpdateDomain
+ }
+ if vmiv.PlatformFaultDomain != nil {
+ objectMap["platformFaultDomain"] = vmiv.PlatformFaultDomain
+ }
+ if vmiv.ComputerName != nil {
+ objectMap["computerName"] = vmiv.ComputerName
+ }
+ if vmiv.OsName != nil {
+ objectMap["osName"] = vmiv.OsName
+ }
+ if vmiv.OsVersion != nil {
+ objectMap["osVersion"] = vmiv.OsVersion
+ }
+ if vmiv.HyperVGeneration != "" {
+ objectMap["hyperVGeneration"] = vmiv.HyperVGeneration
+ }
+ if vmiv.RdpThumbPrint != nil {
+ objectMap["rdpThumbPrint"] = vmiv.RdpThumbPrint
+ }
+ if vmiv.VMAgent != nil {
+ objectMap["vmAgent"] = vmiv.VMAgent
+ }
+ if vmiv.MaintenanceRedeployStatus != nil {
+ objectMap["maintenanceRedeployStatus"] = vmiv.MaintenanceRedeployStatus
+ }
+ if vmiv.Disks != nil {
+ objectMap["disks"] = vmiv.Disks
+ }
+ if vmiv.Extensions != nil {
+ objectMap["extensions"] = vmiv.Extensions
+ }
+ if vmiv.BootDiagnostics != nil {
+ objectMap["bootDiagnostics"] = vmiv.BootDiagnostics
+ }
+ if vmiv.Statuses != nil {
+ objectMap["statuses"] = vmiv.Statuses
+ }
+ if vmiv.PatchStatus != nil {
+ objectMap["patchStatus"] = vmiv.PatchStatus
+ }
+ return json.Marshal(objectMap)
+}
+
+// VirtualMachineIPTag contains the IP tag associated with the public IP address.
+type VirtualMachineIPTag struct {
+ // IPTagType - IP tag type. Example: FirstPartyUsage.
+ IPTagType *string `json:"ipTagType,omitempty"`
+ // Tag - IP tag associated with the public IP. Example: SQL, Storage etc.
+ Tag *string `json:"tag,omitempty"`
+}
+
+// VirtualMachineListResult the List Virtual Machine operation response.
+type VirtualMachineListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of virtual machines.
+ Value *[]VirtualMachine `json:"value,omitempty"`
+ // NextLink - The URI to fetch the next page of VMs. Call ListNext() with this URI to fetch the next page of Virtual Machines.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// VirtualMachineListResultIterator provides access to a complete listing of VirtualMachine values.
+type VirtualMachineListResultIterator struct {
+ i int
+ page VirtualMachineListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *VirtualMachineListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *VirtualMachineListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter VirtualMachineListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter VirtualMachineListResultIterator) Response() VirtualMachineListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter VirtualMachineListResultIterator) Value() VirtualMachine {
+ if !iter.page.NotDone() {
+ return VirtualMachine{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the VirtualMachineListResultIterator type.
+func NewVirtualMachineListResultIterator(page VirtualMachineListResultPage) VirtualMachineListResultIterator {
+ return VirtualMachineListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (vmlr VirtualMachineListResult) IsEmpty() bool {
+ return vmlr.Value == nil || len(*vmlr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (vmlr VirtualMachineListResult) hasNextLink() bool {
+ return vmlr.NextLink != nil && len(*vmlr.NextLink) != 0
+}
+
+// virtualMachineListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (vmlr VirtualMachineListResult) virtualMachineListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !vmlr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(vmlr.NextLink)))
+}
+
+// VirtualMachineListResultPage contains a page of VirtualMachine values.
+type VirtualMachineListResultPage struct {
+ fn func(context.Context, VirtualMachineListResult) (VirtualMachineListResult, error)
+ vmlr VirtualMachineListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *VirtualMachineListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.vmlr)
+ if err != nil {
+ return err
+ }
+ page.vmlr = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *VirtualMachineListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page VirtualMachineListResultPage) NotDone() bool {
+ return !page.vmlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page VirtualMachineListResultPage) Response() VirtualMachineListResult {
+ return page.vmlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page VirtualMachineListResultPage) Values() []VirtualMachine {
+ if page.vmlr.IsEmpty() {
+ return nil
+ }
+ return *page.vmlr.Value
+}
+
+// Creates a new instance of the VirtualMachineListResultPage type.
+func NewVirtualMachineListResultPage(cur VirtualMachineListResult, getNextPage func(context.Context, VirtualMachineListResult) (VirtualMachineListResult, error)) VirtualMachineListResultPage {
+ return VirtualMachineListResultPage{
+ fn: getNextPage,
+ vmlr: cur,
+ }
+}
+
+// VirtualMachineNetworkInterfaceConfiguration describes a virtual machine network interface
+// configurations.
+type VirtualMachineNetworkInterfaceConfiguration struct {
+ // Name - The network interface configuration name.
+ Name *string `json:"name,omitempty"`
+ *VirtualMachineNetworkInterfaceConfigurationProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineNetworkInterfaceConfiguration.
+func (vmnic VirtualMachineNetworkInterfaceConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmnic.Name != nil {
+ objectMap["name"] = vmnic.Name
+ }
+ if vmnic.VirtualMachineNetworkInterfaceConfigurationProperties != nil {
+ objectMap["properties"] = vmnic.VirtualMachineNetworkInterfaceConfigurationProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachineNetworkInterfaceConfiguration struct.
+func (vmnic *VirtualMachineNetworkInterfaceConfiguration) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vmnic.Name = &name
+ }
+ case "properties":
+ if v != nil {
+ var virtualMachineNetworkInterfaceConfigurationProperties VirtualMachineNetworkInterfaceConfigurationProperties
+ err = json.Unmarshal(*v, &virtualMachineNetworkInterfaceConfigurationProperties)
+ if err != nil {
+ return err
+ }
+ vmnic.VirtualMachineNetworkInterfaceConfigurationProperties = &virtualMachineNetworkInterfaceConfigurationProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualMachineNetworkInterfaceConfigurationProperties describes a virtual machine network profile's IP
+// configuration.
+type VirtualMachineNetworkInterfaceConfigurationProperties struct {
+ // Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface.
+ Primary *bool `json:"primary,omitempty"`
+ // DeleteOption - Specify what happens to the network interface when the VM is deleted. Possible values include: 'DeleteOptionsDelete', 'DeleteOptionsDetach'
+ DeleteOption DeleteOptions `json:"deleteOption,omitempty"`
+ // EnableAcceleratedNetworking - Specifies whether the network interface is accelerated networking-enabled.
+ EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
+ // EnableFpga - Specifies whether the network interface is FPGA networking-enabled.
+ EnableFpga *bool `json:"enableFpga,omitempty"`
+ // EnableIPForwarding - Whether IP forwarding enabled on this NIC.
+ EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
+ // NetworkSecurityGroup - The network security group.
+ NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
+ // DNSSettings - The dns settings to be applied on the network interfaces.
+ DNSSettings *VirtualMachineNetworkInterfaceDNSSettingsConfiguration `json:"dnsSettings,omitempty"`
+ // IPConfigurations - Specifies the IP configurations of the network interface.
+ IPConfigurations *[]VirtualMachineNetworkInterfaceIPConfiguration `json:"ipConfigurations,omitempty"`
+ DscpConfiguration *SubResource `json:"dscpConfiguration,omitempty"`
+}
+
+// VirtualMachineNetworkInterfaceDNSSettingsConfiguration describes a virtual machines network
+// configuration's DNS settings.
+type VirtualMachineNetworkInterfaceDNSSettingsConfiguration struct {
+ // DNSServers - List of DNS servers IP addresses
+ DNSServers *[]string `json:"dnsServers,omitempty"`
+}
+
+// VirtualMachineNetworkInterfaceIPConfiguration describes a virtual machine network profile's IP
+// configuration.
+type VirtualMachineNetworkInterfaceIPConfiguration struct {
+ // Name - The IP configuration name.
+ Name *string `json:"name,omitempty"`
+ *VirtualMachineNetworkInterfaceIPConfigurationProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineNetworkInterfaceIPConfiguration.
+func (vmniic VirtualMachineNetworkInterfaceIPConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmniic.Name != nil {
+ objectMap["name"] = vmniic.Name
+ }
+ if vmniic.VirtualMachineNetworkInterfaceIPConfigurationProperties != nil {
+ objectMap["properties"] = vmniic.VirtualMachineNetworkInterfaceIPConfigurationProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachineNetworkInterfaceIPConfiguration struct.
+func (vmniic *VirtualMachineNetworkInterfaceIPConfiguration) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vmniic.Name = &name
+ }
+ case "properties":
+ if v != nil {
+ var virtualMachineNetworkInterfaceIPConfigurationProperties VirtualMachineNetworkInterfaceIPConfigurationProperties
+ err = json.Unmarshal(*v, &virtualMachineNetworkInterfaceIPConfigurationProperties)
+ if err != nil {
+ return err
+ }
+ vmniic.VirtualMachineNetworkInterfaceIPConfigurationProperties = &virtualMachineNetworkInterfaceIPConfigurationProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualMachineNetworkInterfaceIPConfigurationProperties describes a virtual machine network interface IP
+// configuration properties.
+type VirtualMachineNetworkInterfaceIPConfigurationProperties struct {
+ // Subnet - Specifies the identifier of the subnet.
+ Subnet *SubResource `json:"subnet,omitempty"`
+ // Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface.
+ Primary *bool `json:"primary,omitempty"`
+ // PublicIPAddressConfiguration - The publicIPAddressConfiguration.
+ PublicIPAddressConfiguration *VirtualMachinePublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"`
+ // PrivateIPAddressVersion - Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPVersionsIPv4', 'IPVersionsIPv6'
+ PrivateIPAddressVersion IPVersions `json:"privateIPAddressVersion,omitempty"`
+ // ApplicationSecurityGroups - Specifies an array of references to application security group.
+ ApplicationSecurityGroups *[]SubResource `json:"applicationSecurityGroups,omitempty"`
+ // ApplicationGatewayBackendAddressPools - Specifies an array of references to backend address pools of application gateways. A virtual machine can reference backend address pools of multiple application gateways. Multiple virtual machines cannot use the same application gateway.
+ ApplicationGatewayBackendAddressPools *[]SubResource `json:"applicationGatewayBackendAddressPools,omitempty"`
+ // LoadBalancerBackendAddressPools - Specifies an array of references to backend address pools of load balancers. A virtual machine can reference backend address pools of one public and one internal load balancer. [Multiple virtual machines cannot use the same basic sku load balancer].
+ LoadBalancerBackendAddressPools *[]SubResource `json:"loadBalancerBackendAddressPools,omitempty"`
+}
+
+// VirtualMachinePatchStatus the status of virtual machine patch operations.
+type VirtualMachinePatchStatus struct {
+ // AvailablePatchSummary - The available patch summary of the latest assessment operation for the virtual machine.
+ AvailablePatchSummary *AvailablePatchSummary `json:"availablePatchSummary,omitempty"`
+ // LastPatchInstallationSummary - The installation summary of the latest installation operation for the virtual machine.
+ LastPatchInstallationSummary *LastPatchInstallationSummary `json:"lastPatchInstallationSummary,omitempty"`
+ // ConfigurationStatuses - READ-ONLY; The enablement status of the specified patchMode
+ ConfigurationStatuses *[]InstanceViewStatus `json:"configurationStatuses,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachinePatchStatus.
+func (vmps VirtualMachinePatchStatus) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmps.AvailablePatchSummary != nil {
+ objectMap["availablePatchSummary"] = vmps.AvailablePatchSummary
+ }
+ if vmps.LastPatchInstallationSummary != nil {
+ objectMap["lastPatchInstallationSummary"] = vmps.LastPatchInstallationSummary
+ }
+ return json.Marshal(objectMap)
+}
+
+// VirtualMachineProperties describes the properties of a Virtual Machine.
+type VirtualMachineProperties struct {
+ // HardwareProfile - Specifies the hardware settings for the virtual machine.
+ HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"`
+ // StorageProfile - Specifies the storage settings for the virtual machine disks.
+ StorageProfile *StorageProfile `json:"storageProfile,omitempty"`
+ // AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the virtual machine.
+ AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
+ // OsProfile - Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned.
+ OsProfile *OSProfile `json:"osProfile,omitempty"`
+ // NetworkProfile - Specifies the network interfaces of the virtual machine.
+ NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"`
+ // SecurityProfile - Specifies the Security related profile settings for the virtual machine.
+ SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"`
+ // DiagnosticsProfile - Specifies the boot diagnostic settings state.
Minimum api-version: 2015-06-15.
+ DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
+ // AvailabilitySet - Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview).
For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates)
Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set.
This property cannot exist along with a non-null properties.virtualMachineScaleSet reference.
+ AvailabilitySet *SubResource `json:"availabilitySet,omitempty"`
+ // VirtualMachineScaleSet - Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set.
This property cannot exist along with a non-null properties.availabilitySet reference.
Minimum api‐version: 2019‐03‐01
+ VirtualMachineScaleSet *SubResource `json:"virtualMachineScaleSet,omitempty"`
+ // ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine should be assigned to.
Minimum api-version: 2018-04-01.
+ ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`
+ // Priority - Specifies the priority for the virtual machine.
Minimum api-version: 2019-03-01. Possible values include: 'VirtualMachinePriorityTypesRegular', 'VirtualMachinePriorityTypesLow', 'VirtualMachinePriorityTypesSpot'
+ Priority VirtualMachinePriorityTypes `json:"priority,omitempty"`
+ // EvictionPolicy - Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set.
For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01.
For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. Possible values include: 'VirtualMachineEvictionPolicyTypesDeallocate', 'VirtualMachineEvictionPolicyTypesDelete'
+ EvictionPolicy VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"`
+ // BillingProfile - Specifies the billing related details of a Azure Spot virtual machine.
Minimum api-version: 2019-03-01.
+ BillingProfile *BillingProfile `json:"billingProfile,omitempty"`
+ // Host - Specifies information about the dedicated host that the virtual machine resides in.
Minimum api-version: 2018-10-01.
+ Host *SubResource `json:"host,omitempty"`
+ // HostGroup - Specifies information about the dedicated host group that the virtual machine resides in.
Minimum api-version: 2020-06-01.
NOTE: User cannot specify both host and hostGroup properties.
+ HostGroup *SubResource `json:"hostGroup,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // InstanceView - READ-ONLY; The virtual machine instance view.
+ InstanceView *VirtualMachineInstanceView `json:"instanceView,omitempty"`
+ // LicenseType - Specifies that the image or disk that is being used was licensed on-premises.
Possible values for Windows Server operating system are:
Windows_Client
Windows_Server
Possible values for Linux Server operating system are:
RHEL_BYOS (for RHEL)
SLES_BYOS (for SUSE)
For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)
[Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)
Minimum api-version: 2015-06-15
+ LicenseType *string `json:"licenseType,omitempty"`
+ // VMID - READ-ONLY; Specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read using platform BIOS commands.
+ VMID *string `json:"vmId,omitempty"`
+ // ExtensionsTimeBudget - Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M).
Minimum api-version: 2020-06-01
+ ExtensionsTimeBudget *string `json:"extensionsTimeBudget,omitempty"`
+ // PlatformFaultDomain - Specifies the scale set logical fault domain into which the Virtual Machine will be created. By default, the Virtual Machine will by automatically assigned to a fault domain that best maintains balance across available fault domains.
This is applicable only if the 'virtualMachineScaleSet' property of this Virtual Machine is set.The Virtual Machine Scale Set that is referenced, must have 'platformFaultDomainCount' > 1.This property cannot be updated once the Virtual Machine is created.Fault domain assignment can be viewed in the Virtual Machine Instance View.
Minimum api‐version: 2020‐12‐01
+ PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"`
+ // ScheduledEventsProfile - Specifies Scheduled Event related configurations.
+ ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"`
+ // UserData - UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here.
Minimum api-version: 2021-03-01
+ UserData *string `json:"userData,omitempty"`
+ // CapacityReservation - Specifies information about the capacity reservation that is used to allocate virtual machine.
Minimum api-version: 2021-04-01.
+ CapacityReservation *CapacityReservationProfile `json:"capacityReservation,omitempty"`
+ // ApplicationProfile - Specifies the gallery applications that should be made available to the VM/VMSS
+ ApplicationProfile *ApplicationProfile `json:"applicationProfile,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineProperties.
+func (vmp VirtualMachineProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmp.HardwareProfile != nil {
+ objectMap["hardwareProfile"] = vmp.HardwareProfile
+ }
+ if vmp.StorageProfile != nil {
+ objectMap["storageProfile"] = vmp.StorageProfile
+ }
+ if vmp.AdditionalCapabilities != nil {
+ objectMap["additionalCapabilities"] = vmp.AdditionalCapabilities
+ }
+ if vmp.OsProfile != nil {
+ objectMap["osProfile"] = vmp.OsProfile
+ }
+ if vmp.NetworkProfile != nil {
+ objectMap["networkProfile"] = vmp.NetworkProfile
+ }
+ if vmp.SecurityProfile != nil {
+ objectMap["securityProfile"] = vmp.SecurityProfile
+ }
+ if vmp.DiagnosticsProfile != nil {
+ objectMap["diagnosticsProfile"] = vmp.DiagnosticsProfile
+ }
+ if vmp.AvailabilitySet != nil {
+ objectMap["availabilitySet"] = vmp.AvailabilitySet
+ }
+ if vmp.VirtualMachineScaleSet != nil {
+ objectMap["virtualMachineScaleSet"] = vmp.VirtualMachineScaleSet
+ }
+ if vmp.ProximityPlacementGroup != nil {
+ objectMap["proximityPlacementGroup"] = vmp.ProximityPlacementGroup
+ }
+ if vmp.Priority != "" {
+ objectMap["priority"] = vmp.Priority
+ }
+ if vmp.EvictionPolicy != "" {
+ objectMap["evictionPolicy"] = vmp.EvictionPolicy
+ }
+ if vmp.BillingProfile != nil {
+ objectMap["billingProfile"] = vmp.BillingProfile
+ }
+ if vmp.Host != nil {
+ objectMap["host"] = vmp.Host
+ }
+ if vmp.HostGroup != nil {
+ objectMap["hostGroup"] = vmp.HostGroup
+ }
+ if vmp.LicenseType != nil {
+ objectMap["licenseType"] = vmp.LicenseType
+ }
+ if vmp.ExtensionsTimeBudget != nil {
+ objectMap["extensionsTimeBudget"] = vmp.ExtensionsTimeBudget
+ }
+ if vmp.PlatformFaultDomain != nil {
+ objectMap["platformFaultDomain"] = vmp.PlatformFaultDomain
+ }
+ if vmp.ScheduledEventsProfile != nil {
+ objectMap["scheduledEventsProfile"] = vmp.ScheduledEventsProfile
+ }
+ if vmp.UserData != nil {
+ objectMap["userData"] = vmp.UserData
+ }
+ if vmp.CapacityReservation != nil {
+ objectMap["capacityReservation"] = vmp.CapacityReservation
+ }
+ if vmp.ApplicationProfile != nil {
+ objectMap["applicationProfile"] = vmp.ApplicationProfile
+ }
+ return json.Marshal(objectMap)
+}
+
+// VirtualMachinePublicIPAddressConfiguration describes a virtual machines IP Configuration's
+// PublicIPAddress configuration
+type VirtualMachinePublicIPAddressConfiguration struct {
+ // Name - The publicIP address configuration name.
+ Name *string `json:"name,omitempty"`
+ *VirtualMachinePublicIPAddressConfigurationProperties `json:"properties,omitempty"`
+ Sku *PublicIPAddressSku `json:"sku,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachinePublicIPAddressConfiguration.
+func (vmpiac VirtualMachinePublicIPAddressConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmpiac.Name != nil {
+ objectMap["name"] = vmpiac.Name
+ }
+ if vmpiac.VirtualMachinePublicIPAddressConfigurationProperties != nil {
+ objectMap["properties"] = vmpiac.VirtualMachinePublicIPAddressConfigurationProperties
+ }
+ if vmpiac.Sku != nil {
+ objectMap["sku"] = vmpiac.Sku
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachinePublicIPAddressConfiguration struct.
+func (vmpiac *VirtualMachinePublicIPAddressConfiguration) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vmpiac.Name = &name
+ }
+ case "properties":
+ if v != nil {
+ var virtualMachinePublicIPAddressConfigurationProperties VirtualMachinePublicIPAddressConfigurationProperties
+ err = json.Unmarshal(*v, &virtualMachinePublicIPAddressConfigurationProperties)
+ if err != nil {
+ return err
+ }
+ vmpiac.VirtualMachinePublicIPAddressConfigurationProperties = &virtualMachinePublicIPAddressConfigurationProperties
+ }
+ case "sku":
+ if v != nil {
+ var sku PublicIPAddressSku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ vmpiac.Sku = &sku
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualMachinePublicIPAddressConfigurationProperties describes a virtual machines IP Configuration's
+// PublicIPAddress configuration
+type VirtualMachinePublicIPAddressConfigurationProperties struct {
+ // IdleTimeoutInMinutes - The idle timeout of the public IP address.
+ IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
+ // DeleteOption - Specify what happens to the public IP address when the VM is deleted. Possible values include: 'DeleteOptionsDelete', 'DeleteOptionsDetach'
+ DeleteOption DeleteOptions `json:"deleteOption,omitempty"`
+ // DNSSettings - The dns settings to be applied on the publicIP addresses .
+ DNSSettings *VirtualMachinePublicIPAddressDNSSettingsConfiguration `json:"dnsSettings,omitempty"`
+ // IPTags - The list of IP tags associated with the public IP address.
+ IPTags *[]VirtualMachineIPTag `json:"ipTags,omitempty"`
+ // PublicIPPrefix - The PublicIPPrefix from which to allocate publicIP addresses.
+ PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
+ // PublicIPAddressVersion - Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPVersionsIPv4', 'IPVersionsIPv6'
+ PublicIPAddressVersion IPVersions `json:"publicIPAddressVersion,omitempty"`
+ // PublicIPAllocationMethod - Specify the public IP allocation type. Possible values include: 'PublicIPAllocationMethodDynamic', 'PublicIPAllocationMethodStatic'
+ PublicIPAllocationMethod PublicIPAllocationMethod `json:"publicIPAllocationMethod,omitempty"`
+}
+
+// VirtualMachinePublicIPAddressDNSSettingsConfiguration describes a virtual machines network
+// configuration's DNS settings.
+type VirtualMachinePublicIPAddressDNSSettingsConfiguration struct {
+ // DomainNameLabel - The Domain name label prefix of the PublicIPAddress resources that will be created. The generated name label is the concatenation of the domain name label and vm network profile unique ID.
+ DomainNameLabel *string `json:"domainNameLabel,omitempty"`
+}
+
+// VirtualMachineReimageParameters parameters for Reimaging Virtual Machine. NOTE: Virtual Machine OS disk
+// will always be reimaged
+type VirtualMachineReimageParameters struct {
+ // TempDisk - Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk.
+ TempDisk *bool `json:"tempDisk,omitempty"`
+}
+
+// VirtualMachineRunCommand describes a Virtual Machine run command.
+type VirtualMachineRunCommand struct {
+ autorest.Response `json:"-"`
+ *VirtualMachineRunCommandProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineRunCommand.
+func (vmrc VirtualMachineRunCommand) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmrc.VirtualMachineRunCommandProperties != nil {
+ objectMap["properties"] = vmrc.VirtualMachineRunCommandProperties
+ }
+ if vmrc.Location != nil {
+ objectMap["location"] = vmrc.Location
+ }
+ if vmrc.Tags != nil {
+ objectMap["tags"] = vmrc.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachineRunCommand struct.
+func (vmrc *VirtualMachineRunCommand) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var virtualMachineRunCommandProperties VirtualMachineRunCommandProperties
+ err = json.Unmarshal(*v, &virtualMachineRunCommandProperties)
+ if err != nil {
+ return err
+ }
+ vmrc.VirtualMachineRunCommandProperties = &virtualMachineRunCommandProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vmrc.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vmrc.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ vmrc.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ vmrc.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ vmrc.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualMachineRunCommandInstanceView the instance view of a virtual machine run command.
+type VirtualMachineRunCommandInstanceView struct {
+ // ExecutionState - Script execution status. Possible values include: 'ExecutionStateUnknown', 'ExecutionStatePending', 'ExecutionStateRunning', 'ExecutionStateFailed', 'ExecutionStateSucceeded', 'ExecutionStateTimedOut', 'ExecutionStateCanceled'
+ ExecutionState ExecutionState `json:"executionState,omitempty"`
+ // ExecutionMessage - Communicate script configuration errors or execution messages.
+ ExecutionMessage *string `json:"executionMessage,omitempty"`
+ // ExitCode - Exit code returned from script execution.
+ ExitCode *int32 `json:"exitCode,omitempty"`
+ // Output - Script output stream.
+ Output *string `json:"output,omitempty"`
+ // Error - Script error stream.
+ Error *string `json:"error,omitempty"`
+ // StartTime - Script start time.
+ StartTime *date.Time `json:"startTime,omitempty"`
+ // EndTime - Script end time.
+ EndTime *date.Time `json:"endTime,omitempty"`
+ // Statuses - The resource status information.
+ Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
+}
+
+// VirtualMachineRunCommandProperties describes the properties of a Virtual Machine run command.
+type VirtualMachineRunCommandProperties struct {
+ // Source - The source of the run command script.
+ Source *VirtualMachineRunCommandScriptSource `json:"source,omitempty"`
+ // Parameters - The parameters used by the script.
+ Parameters *[]RunCommandInputParameter `json:"parameters,omitempty"`
+ // ProtectedParameters - The parameters used by the script.
+ ProtectedParameters *[]RunCommandInputParameter `json:"protectedParameters,omitempty"`
+ // AsyncExecution - Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete.
+ AsyncExecution *bool `json:"asyncExecution,omitempty"`
+ // RunAsUser - Specifies the user account on the VM when executing the run command.
+ RunAsUser *string `json:"runAsUser,omitempty"`
+ // RunAsPassword - Specifies the user account password on the VM when executing the run command.
+ RunAsPassword *string `json:"runAsPassword,omitempty"`
+ // TimeoutInSeconds - The timeout in seconds to execute the run command.
+ TimeoutInSeconds *int32 `json:"timeoutInSeconds,omitempty"`
+ // OutputBlobURI - Specifies the Azure storage blob where script output stream will be uploaded.
+ OutputBlobURI *string `json:"outputBlobUri,omitempty"`
+ // ErrorBlobURI - Specifies the Azure storage blob where script error stream will be uploaded.
+ ErrorBlobURI *string `json:"errorBlobUri,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // InstanceView - READ-ONLY; The virtual machine run command instance view.
+ InstanceView *VirtualMachineRunCommandInstanceView `json:"instanceView,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineRunCommandProperties.
+func (vmrcp VirtualMachineRunCommandProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmrcp.Source != nil {
+ objectMap["source"] = vmrcp.Source
+ }
+ if vmrcp.Parameters != nil {
+ objectMap["parameters"] = vmrcp.Parameters
+ }
+ if vmrcp.ProtectedParameters != nil {
+ objectMap["protectedParameters"] = vmrcp.ProtectedParameters
+ }
+ if vmrcp.AsyncExecution != nil {
+ objectMap["asyncExecution"] = vmrcp.AsyncExecution
+ }
+ if vmrcp.RunAsUser != nil {
+ objectMap["runAsUser"] = vmrcp.RunAsUser
+ }
+ if vmrcp.RunAsPassword != nil {
+ objectMap["runAsPassword"] = vmrcp.RunAsPassword
+ }
+ if vmrcp.TimeoutInSeconds != nil {
+ objectMap["timeoutInSeconds"] = vmrcp.TimeoutInSeconds
+ }
+ if vmrcp.OutputBlobURI != nil {
+ objectMap["outputBlobUri"] = vmrcp.OutputBlobURI
+ }
+ if vmrcp.ErrorBlobURI != nil {
+ objectMap["errorBlobUri"] = vmrcp.ErrorBlobURI
+ }
+ return json.Marshal(objectMap)
+}
+
+// VirtualMachineRunCommandsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
+type VirtualMachineRunCommandsCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineRunCommandsClient) (VirtualMachineRunCommand, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineRunCommandsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineRunCommandsCreateOrUpdateFuture.Result.
+func (future *VirtualMachineRunCommandsCreateOrUpdateFuture) result(client VirtualMachineRunCommandsClient) (vmrc VirtualMachineRunCommand, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vmrc.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineRunCommandsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmrc.Response.Response, err = future.GetResult(sender); err == nil && vmrc.Response.Response.StatusCode != http.StatusNoContent {
+ vmrc, err = client.CreateOrUpdateResponder(vmrc.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsCreateOrUpdateFuture", "Result", vmrc.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualMachineRunCommandScriptSource describes the script sources for run command.
+type VirtualMachineRunCommandScriptSource struct {
+ // Script - Specifies the script content to be executed on the VM.
+ Script *string `json:"script,omitempty"`
+ // ScriptURI - Specifies the script download location.
+ ScriptURI *string `json:"scriptUri,omitempty"`
+ // CommandID - Specifies a commandId of predefined built-in script.
+ CommandID *string `json:"commandId,omitempty"`
+}
+
+// VirtualMachineRunCommandsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualMachineRunCommandsDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineRunCommandsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineRunCommandsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineRunCommandsDeleteFuture.Result.
+func (future *VirtualMachineRunCommandsDeleteFuture) result(client VirtualMachineRunCommandsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineRunCommandsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachineRunCommandsListResult the List run command operation response
+type VirtualMachineRunCommandsListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of run commands
+ Value *[]VirtualMachineRunCommand `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of run commands.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// VirtualMachineRunCommandsListResultIterator provides access to a complete listing of
+// VirtualMachineRunCommand values.
+type VirtualMachineRunCommandsListResultIterator struct {
+ i int
+ page VirtualMachineRunCommandsListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *VirtualMachineRunCommandsListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *VirtualMachineRunCommandsListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter VirtualMachineRunCommandsListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter VirtualMachineRunCommandsListResultIterator) Response() VirtualMachineRunCommandsListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter VirtualMachineRunCommandsListResultIterator) Value() VirtualMachineRunCommand {
+ if !iter.page.NotDone() {
+ return VirtualMachineRunCommand{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the VirtualMachineRunCommandsListResultIterator type.
+func NewVirtualMachineRunCommandsListResultIterator(page VirtualMachineRunCommandsListResultPage) VirtualMachineRunCommandsListResultIterator {
+ return VirtualMachineRunCommandsListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (vmrclr VirtualMachineRunCommandsListResult) IsEmpty() bool {
+ return vmrclr.Value == nil || len(*vmrclr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (vmrclr VirtualMachineRunCommandsListResult) hasNextLink() bool {
+ return vmrclr.NextLink != nil && len(*vmrclr.NextLink) != 0
+}
+
+// virtualMachineRunCommandsListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (vmrclr VirtualMachineRunCommandsListResult) virtualMachineRunCommandsListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !vmrclr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(vmrclr.NextLink)))
+}
+
+// VirtualMachineRunCommandsListResultPage contains a page of VirtualMachineRunCommand values.
+type VirtualMachineRunCommandsListResultPage struct {
+ fn func(context.Context, VirtualMachineRunCommandsListResult) (VirtualMachineRunCommandsListResult, error)
+ vmrclr VirtualMachineRunCommandsListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *VirtualMachineRunCommandsListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.vmrclr)
+ if err != nil {
+ return err
+ }
+ page.vmrclr = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *VirtualMachineRunCommandsListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page VirtualMachineRunCommandsListResultPage) NotDone() bool {
+ return !page.vmrclr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page VirtualMachineRunCommandsListResultPage) Response() VirtualMachineRunCommandsListResult {
+ return page.vmrclr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page VirtualMachineRunCommandsListResultPage) Values() []VirtualMachineRunCommand {
+ if page.vmrclr.IsEmpty() {
+ return nil
+ }
+ return *page.vmrclr.Value
+}
+
+// Creates a new instance of the VirtualMachineRunCommandsListResultPage type.
+func NewVirtualMachineRunCommandsListResultPage(cur VirtualMachineRunCommandsListResult, getNextPage func(context.Context, VirtualMachineRunCommandsListResult) (VirtualMachineRunCommandsListResult, error)) VirtualMachineRunCommandsListResultPage {
+ return VirtualMachineRunCommandsListResultPage{
+ fn: getNextPage,
+ vmrclr: cur,
+ }
+}
+
+// VirtualMachineRunCommandsUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualMachineRunCommandsUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineRunCommandsClient) (VirtualMachineRunCommand, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineRunCommandsUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineRunCommandsUpdateFuture.Result.
+func (future *VirtualMachineRunCommandsUpdateFuture) result(client VirtualMachineRunCommandsClient) (vmrc VirtualMachineRunCommand, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vmrc.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineRunCommandsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmrc.Response.Response, err = future.GetResult(sender); err == nil && vmrc.Response.Response.StatusCode != http.StatusNoContent {
+ vmrc, err = client.UpdateResponder(vmrc.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsUpdateFuture", "Result", vmrc.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualMachineRunCommandUpdate describes a Virtual Machine run command.
+type VirtualMachineRunCommandUpdate struct {
+ *VirtualMachineRunCommandProperties `json:"properties,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineRunCommandUpdate.
+func (vmrcu VirtualMachineRunCommandUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmrcu.VirtualMachineRunCommandProperties != nil {
+ objectMap["properties"] = vmrcu.VirtualMachineRunCommandProperties
+ }
+ if vmrcu.Tags != nil {
+ objectMap["tags"] = vmrcu.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachineRunCommandUpdate struct.
+func (vmrcu *VirtualMachineRunCommandUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var virtualMachineRunCommandProperties VirtualMachineRunCommandProperties
+ err = json.Unmarshal(*v, &virtualMachineRunCommandProperties)
+ if err != nil {
+ return err
+ }
+ vmrcu.VirtualMachineRunCommandProperties = &virtualMachineRunCommandProperties
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ vmrcu.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualMachinesAssessPatchesFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualMachinesAssessPatchesFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachinesClient) (VirtualMachineAssessPatchesResult, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachinesAssessPatchesFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachinesAssessPatchesFuture.Result.
+func (future *VirtualMachinesAssessPatchesFuture) result(client VirtualMachinesClient) (vmapr VirtualMachineAssessPatchesResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesAssessPatchesFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vmapr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesAssessPatchesFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmapr.Response.Response, err = future.GetResult(sender); err == nil && vmapr.Response.Response.StatusCode != http.StatusNoContent {
+ vmapr, err = client.AssessPatchesResponder(vmapr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesAssessPatchesFuture", "Result", vmapr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualMachineScaleSet describes a Virtual Machine Scale Set.
+type VirtualMachineScaleSet struct {
+ autorest.Response `json:"-"`
+ // Sku - The virtual machine scale set sku.
+ Sku *Sku `json:"sku,omitempty"`
+ // Plan - Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.
+ Plan *Plan `json:"plan,omitempty"`
+ *VirtualMachineScaleSetProperties `json:"properties,omitempty"`
+ // Identity - The identity of the virtual machine scale set, if configured.
+ Identity *VirtualMachineScaleSetIdentity `json:"identity,omitempty"`
+ // Zones - The virtual machine scale set zones. NOTE: Availability zones can only be set when you create the scale set
+ Zones *[]string `json:"zones,omitempty"`
+ // ExtendedLocation - The extended location of the Virtual Machine Scale Set.
+ ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSet.
+func (vmss VirtualMachineScaleSet) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmss.Sku != nil {
+ objectMap["sku"] = vmss.Sku
+ }
+ if vmss.Plan != nil {
+ objectMap["plan"] = vmss.Plan
+ }
+ if vmss.VirtualMachineScaleSetProperties != nil {
+ objectMap["properties"] = vmss.VirtualMachineScaleSetProperties
+ }
+ if vmss.Identity != nil {
+ objectMap["identity"] = vmss.Identity
+ }
+ if vmss.Zones != nil {
+ objectMap["zones"] = vmss.Zones
+ }
+ if vmss.ExtendedLocation != nil {
+ objectMap["extendedLocation"] = vmss.ExtendedLocation
+ }
+ if vmss.Location != nil {
+ objectMap["location"] = vmss.Location
+ }
+ if vmss.Tags != nil {
+ objectMap["tags"] = vmss.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSet struct.
+func (vmss *VirtualMachineScaleSet) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "sku":
+ if v != nil {
+ var sku Sku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ vmss.Sku = &sku
+ }
+ case "plan":
+ if v != nil {
+ var plan Plan
+ err = json.Unmarshal(*v, &plan)
+ if err != nil {
+ return err
+ }
+ vmss.Plan = &plan
+ }
+ case "properties":
+ if v != nil {
+ var virtualMachineScaleSetProperties VirtualMachineScaleSetProperties
+ err = json.Unmarshal(*v, &virtualMachineScaleSetProperties)
+ if err != nil {
+ return err
+ }
+ vmss.VirtualMachineScaleSetProperties = &virtualMachineScaleSetProperties
+ }
+ case "identity":
+ if v != nil {
+ var identity VirtualMachineScaleSetIdentity
+ err = json.Unmarshal(*v, &identity)
+ if err != nil {
+ return err
+ }
+ vmss.Identity = &identity
+ }
+ case "zones":
+ if v != nil {
+ var zones []string
+ err = json.Unmarshal(*v, &zones)
+ if err != nil {
+ return err
+ }
+ vmss.Zones = &zones
+ }
+ case "extendedLocation":
+ if v != nil {
+ var extendedLocation ExtendedLocation
+ err = json.Unmarshal(*v, &extendedLocation)
+ if err != nil {
+ return err
+ }
+ vmss.ExtendedLocation = &extendedLocation
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vmss.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vmss.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ vmss.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ vmss.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ vmss.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualMachineScaleSetDataDisk describes a virtual machine scale set data disk.
+type VirtualMachineScaleSetDataDisk struct {
+ // Name - The disk name.
+ Name *string `json:"name,omitempty"`
+ // Lun - Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
+ Lun *int32 `json:"lun,omitempty"`
+ // Caching - Specifies the caching requirements.
Possible values are:
**None**
**ReadOnly**
**ReadWrite**
Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite'
+ Caching CachingTypes `json:"caching,omitempty"`
+ // WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
+ WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
+ // CreateOption - The create option. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach'
+ CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
+ // DiskSizeGB - Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.
This value cannot be larger than 1023 GB
+ DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
+ // ManagedDisk - The managed disk parameters.
+ ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"`
+ // DiskIOPSReadWrite - Specifies the Read-Write IOPS for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB.
+ DiskIOPSReadWrite *int64 `json:"diskIOPSReadWrite,omitempty"`
+ // DiskMBpsReadWrite - Specifies the bandwidth in MB per second for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB.
+ DiskMBpsReadWrite *int64 `json:"diskMBpsReadWrite,omitempty"`
+}
+
+// VirtualMachineScaleSetExtension describes a Virtual Machine Scale Set Extension.
+type VirtualMachineScaleSetExtension struct {
+ autorest.Response `json:"-"`
+ // Name - The name of the extension.
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ *VirtualMachineScaleSetExtensionProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetExtension.
+func (vmsse VirtualMachineScaleSetExtension) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmsse.Name != nil {
+ objectMap["name"] = vmsse.Name
+ }
+ if vmsse.VirtualMachineScaleSetExtensionProperties != nil {
+ objectMap["properties"] = vmsse.VirtualMachineScaleSetExtensionProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetExtension struct.
+func (vmsse *VirtualMachineScaleSetExtension) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vmsse.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ vmsse.Type = &typeVar
+ }
+ case "properties":
+ if v != nil {
+ var virtualMachineScaleSetExtensionProperties VirtualMachineScaleSetExtensionProperties
+ err = json.Unmarshal(*v, &virtualMachineScaleSetExtensionProperties)
+ if err != nil {
+ return err
+ }
+ vmsse.VirtualMachineScaleSetExtensionProperties = &virtualMachineScaleSetExtensionProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vmsse.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualMachineScaleSetExtensionListResult the List VM scale set extension operation response.
+type VirtualMachineScaleSetExtensionListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of VM scale set extensions.
+ Value *[]VirtualMachineScaleSetExtension `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of VM scale set extensions. Call ListNext() with this to fetch the next page of VM scale set extensions.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// VirtualMachineScaleSetExtensionListResultIterator provides access to a complete listing of
+// VirtualMachineScaleSetExtension values.
+type VirtualMachineScaleSetExtensionListResultIterator struct {
+ i int
+ page VirtualMachineScaleSetExtensionListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *VirtualMachineScaleSetExtensionListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *VirtualMachineScaleSetExtensionListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter VirtualMachineScaleSetExtensionListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter VirtualMachineScaleSetExtensionListResultIterator) Response() VirtualMachineScaleSetExtensionListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter VirtualMachineScaleSetExtensionListResultIterator) Value() VirtualMachineScaleSetExtension {
+ if !iter.page.NotDone() {
+ return VirtualMachineScaleSetExtension{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the VirtualMachineScaleSetExtensionListResultIterator type.
+func NewVirtualMachineScaleSetExtensionListResultIterator(page VirtualMachineScaleSetExtensionListResultPage) VirtualMachineScaleSetExtensionListResultIterator {
+ return VirtualMachineScaleSetExtensionListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (vmsselr VirtualMachineScaleSetExtensionListResult) IsEmpty() bool {
+ return vmsselr.Value == nil || len(*vmsselr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (vmsselr VirtualMachineScaleSetExtensionListResult) hasNextLink() bool {
+ return vmsselr.NextLink != nil && len(*vmsselr.NextLink) != 0
+}
+
+// virtualMachineScaleSetExtensionListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (vmsselr VirtualMachineScaleSetExtensionListResult) virtualMachineScaleSetExtensionListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !vmsselr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(vmsselr.NextLink)))
+}
+
+// VirtualMachineScaleSetExtensionListResultPage contains a page of VirtualMachineScaleSetExtension values.
+type VirtualMachineScaleSetExtensionListResultPage struct {
+ fn func(context.Context, VirtualMachineScaleSetExtensionListResult) (VirtualMachineScaleSetExtensionListResult, error)
+ vmsselr VirtualMachineScaleSetExtensionListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *VirtualMachineScaleSetExtensionListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.vmsselr)
+ if err != nil {
+ return err
+ }
+ page.vmsselr = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *VirtualMachineScaleSetExtensionListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page VirtualMachineScaleSetExtensionListResultPage) NotDone() bool {
+ return !page.vmsselr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page VirtualMachineScaleSetExtensionListResultPage) Response() VirtualMachineScaleSetExtensionListResult {
+ return page.vmsselr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page VirtualMachineScaleSetExtensionListResultPage) Values() []VirtualMachineScaleSetExtension {
+ if page.vmsselr.IsEmpty() {
+ return nil
+ }
+ return *page.vmsselr.Value
+}
+
+// Creates a new instance of the VirtualMachineScaleSetExtensionListResultPage type.
+func NewVirtualMachineScaleSetExtensionListResultPage(cur VirtualMachineScaleSetExtensionListResult, getNextPage func(context.Context, VirtualMachineScaleSetExtensionListResult) (VirtualMachineScaleSetExtensionListResult, error)) VirtualMachineScaleSetExtensionListResultPage {
+ return VirtualMachineScaleSetExtensionListResultPage{
+ fn: getNextPage,
+ vmsselr: cur,
+ }
+}
+
+// VirtualMachineScaleSetExtensionProfile describes a virtual machine scale set extension profile.
+type VirtualMachineScaleSetExtensionProfile struct {
+ // Extensions - The virtual machine scale set child extension resources.
+ Extensions *[]VirtualMachineScaleSetExtension `json:"extensions,omitempty"`
+ // ExtensionsTimeBudget - Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M).
Minimum api-version: 2020-06-01
+ ExtensionsTimeBudget *string `json:"extensionsTimeBudget,omitempty"`
+}
+
+// VirtualMachineScaleSetExtensionProperties describes the properties of a Virtual Machine Scale Set
+// Extension.
+type VirtualMachineScaleSetExtensionProperties struct {
+ // ForceUpdateTag - If a value is provided and is different from the previous value, the extension handler will be forced to update even if the extension configuration has not changed.
+ ForceUpdateTag *string `json:"forceUpdateTag,omitempty"`
+ // Publisher - The name of the extension handler publisher.
+ Publisher *string `json:"publisher,omitempty"`
+ // Type - Specifies the type of the extension; an example is "CustomScriptExtension".
+ Type *string `json:"type,omitempty"`
+ // TypeHandlerVersion - Specifies the version of the script handler.
+ TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"`
+ // AutoUpgradeMinorVersion - Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.
+ AutoUpgradeMinorVersion *bool `json:"autoUpgradeMinorVersion,omitempty"`
+ // EnableAutomaticUpgrade - Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.
+ EnableAutomaticUpgrade *bool `json:"enableAutomaticUpgrade,omitempty"`
+ // Settings - Json formatted public settings for the extension.
+ Settings interface{} `json:"settings,omitempty"`
+ // ProtectedSettings - The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
+ ProtectedSettings interface{} `json:"protectedSettings,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // ProvisionAfterExtensions - Collection of extension names after which this extension needs to be provisioned.
+ ProvisionAfterExtensions *[]string `json:"provisionAfterExtensions,omitempty"`
+ // SuppressFailures - Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false.
+ SuppressFailures *bool `json:"suppressFailures,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetExtensionProperties.
+func (vmssep VirtualMachineScaleSetExtensionProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmssep.ForceUpdateTag != nil {
+ objectMap["forceUpdateTag"] = vmssep.ForceUpdateTag
+ }
+ if vmssep.Publisher != nil {
+ objectMap["publisher"] = vmssep.Publisher
+ }
+ if vmssep.Type != nil {
+ objectMap["type"] = vmssep.Type
+ }
+ if vmssep.TypeHandlerVersion != nil {
+ objectMap["typeHandlerVersion"] = vmssep.TypeHandlerVersion
+ }
+ if vmssep.AutoUpgradeMinorVersion != nil {
+ objectMap["autoUpgradeMinorVersion"] = vmssep.AutoUpgradeMinorVersion
+ }
+ if vmssep.EnableAutomaticUpgrade != nil {
+ objectMap["enableAutomaticUpgrade"] = vmssep.EnableAutomaticUpgrade
+ }
+ if vmssep.Settings != nil {
+ objectMap["settings"] = vmssep.Settings
+ }
+ if vmssep.ProtectedSettings != nil {
+ objectMap["protectedSettings"] = vmssep.ProtectedSettings
+ }
+ if vmssep.ProvisionAfterExtensions != nil {
+ objectMap["provisionAfterExtensions"] = vmssep.ProvisionAfterExtensions
+ }
+ if vmssep.SuppressFailures != nil {
+ objectMap["suppressFailures"] = vmssep.SuppressFailures
+ }
+ return json.Marshal(objectMap)
+}
+
+// VirtualMachineScaleSetExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
+type VirtualMachineScaleSetExtensionsCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetExtensionsClient) (VirtualMachineScaleSetExtension, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetExtensionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetExtensionsCreateOrUpdateFuture.Result.
+func (future *VirtualMachineScaleSetExtensionsCreateOrUpdateFuture) result(client VirtualMachineScaleSetExtensionsClient) (vmsse VirtualMachineScaleSetExtension, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vmsse.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmsse.Response.Response, err = future.GetResult(sender); err == nil && vmsse.Response.Response.StatusCode != http.StatusNoContent {
+ vmsse, err = client.CreateOrUpdateResponder(vmsse.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsCreateOrUpdateFuture", "Result", vmsse.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualMachineScaleSetExtensionsDeleteFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
+type VirtualMachineScaleSetExtensionsDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetExtensionsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetExtensionsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetExtensionsDeleteFuture.Result.
+func (future *VirtualMachineScaleSetExtensionsDeleteFuture) result(client VirtualMachineScaleSetExtensionsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachineScaleSetExtensionsUpdateFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
+type VirtualMachineScaleSetExtensionsUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetExtensionsClient) (VirtualMachineScaleSetExtension, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetExtensionsUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetExtensionsUpdateFuture.Result.
+func (future *VirtualMachineScaleSetExtensionsUpdateFuture) result(client VirtualMachineScaleSetExtensionsClient) (vmsse VirtualMachineScaleSetExtension, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vmsse.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetExtensionsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmsse.Response.Response, err = future.GetResult(sender); err == nil && vmsse.Response.Response.StatusCode != http.StatusNoContent {
+ vmsse, err = client.UpdateResponder(vmsse.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsUpdateFuture", "Result", vmsse.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualMachineScaleSetExtensionUpdate describes a Virtual Machine Scale Set Extension.
+type VirtualMachineScaleSetExtensionUpdate struct {
+ // Name - READ-ONLY; The name of the extension.
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ *VirtualMachineScaleSetExtensionProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetExtensionUpdate.
+func (vmsseu VirtualMachineScaleSetExtensionUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmsseu.VirtualMachineScaleSetExtensionProperties != nil {
+ objectMap["properties"] = vmsseu.VirtualMachineScaleSetExtensionProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetExtensionUpdate struct.
+func (vmsseu *VirtualMachineScaleSetExtensionUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vmsseu.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ vmsseu.Type = &typeVar
+ }
+ case "properties":
+ if v != nil {
+ var virtualMachineScaleSetExtensionProperties VirtualMachineScaleSetExtensionProperties
+ err = json.Unmarshal(*v, &virtualMachineScaleSetExtensionProperties)
+ if err != nil {
+ return err
+ }
+ vmsseu.VirtualMachineScaleSetExtensionProperties = &virtualMachineScaleSetExtensionProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vmsseu.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualMachineScaleSetIdentity identity for the virtual machine scale set.
+type VirtualMachineScaleSetIdentity struct {
+ // PrincipalID - READ-ONLY; The principal id of virtual machine scale set identity. This property will only be provided for a system assigned identity.
+ PrincipalID *string `json:"principalId,omitempty"`
+ // TenantID - READ-ONLY; The tenant id associated with the virtual machine scale set. This property will only be provided for a system assigned identity.
+ TenantID *string `json:"tenantId,omitempty"`
+ // Type - The type of identity used for the virtual machine scale set. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine scale set. Possible values include: 'ResourceIdentityTypeSystemAssigned', 'ResourceIdentityTypeUserAssigned', 'ResourceIdentityTypeSystemAssignedUserAssigned', 'ResourceIdentityTypeNone'
+ Type ResourceIdentityType `json:"type,omitempty"`
+ // UserAssignedIdentities - The list of user identities associated with the virtual machine scale set. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
+ UserAssignedIdentities map[string]*VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetIdentity.
+func (vmssi VirtualMachineScaleSetIdentity) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmssi.Type != "" {
+ objectMap["type"] = vmssi.Type
+ }
+ if vmssi.UserAssignedIdentities != nil {
+ objectMap["userAssignedIdentities"] = vmssi.UserAssignedIdentities
+ }
+ return json.Marshal(objectMap)
+}
+
+// VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue ...
+type VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue struct {
+ // PrincipalID - READ-ONLY; The principal id of user assigned identity.
+ PrincipalID *string `json:"principalId,omitempty"`
+ // ClientID - READ-ONLY; The client id of user assigned identity.
+ ClientID *string `json:"clientId,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue.
+func (vmssiAiv VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// VirtualMachineScaleSetInstanceView the instance view of a virtual machine scale set.
+type VirtualMachineScaleSetInstanceView struct {
+ autorest.Response `json:"-"`
+ // VirtualMachine - READ-ONLY; The instance view status summary for the virtual machine scale set.
+ VirtualMachine *VirtualMachineScaleSetInstanceViewStatusesSummary `json:"virtualMachine,omitempty"`
+ // Extensions - READ-ONLY; The extensions information.
+ Extensions *[]VirtualMachineScaleSetVMExtensionsSummary `json:"extensions,omitempty"`
+ // Statuses - The resource status information.
+ Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
+ // OrchestrationServices - READ-ONLY; The orchestration services information.
+ OrchestrationServices *[]OrchestrationServiceSummary `json:"orchestrationServices,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetInstanceView.
+func (vmssiv VirtualMachineScaleSetInstanceView) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmssiv.Statuses != nil {
+ objectMap["statuses"] = vmssiv.Statuses
+ }
+ return json.Marshal(objectMap)
+}
+
+// VirtualMachineScaleSetInstanceViewStatusesSummary instance view statuses summary for virtual machines of
+// a virtual machine scale set.
+type VirtualMachineScaleSetInstanceViewStatusesSummary struct {
+ // StatusesSummary - READ-ONLY; The extensions information.
+ StatusesSummary *[]VirtualMachineStatusCodeCount `json:"statusesSummary,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetInstanceViewStatusesSummary.
+func (vmssivss VirtualMachineScaleSetInstanceViewStatusesSummary) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// VirtualMachineScaleSetIPConfiguration describes a virtual machine scale set network profile's IP
+// configuration.
+type VirtualMachineScaleSetIPConfiguration struct {
+ // Name - The IP configuration name.
+ Name *string `json:"name,omitempty"`
+ *VirtualMachineScaleSetIPConfigurationProperties `json:"properties,omitempty"`
+ // ID - Resource Id
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetIPConfiguration.
+func (vmssic VirtualMachineScaleSetIPConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmssic.Name != nil {
+ objectMap["name"] = vmssic.Name
+ }
+ if vmssic.VirtualMachineScaleSetIPConfigurationProperties != nil {
+ objectMap["properties"] = vmssic.VirtualMachineScaleSetIPConfigurationProperties
+ }
+ if vmssic.ID != nil {
+ objectMap["id"] = vmssic.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetIPConfiguration struct.
+func (vmssic *VirtualMachineScaleSetIPConfiguration) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vmssic.Name = &name
+ }
+ case "properties":
+ if v != nil {
+ var virtualMachineScaleSetIPConfigurationProperties VirtualMachineScaleSetIPConfigurationProperties
+ err = json.Unmarshal(*v, &virtualMachineScaleSetIPConfigurationProperties)
+ if err != nil {
+ return err
+ }
+ vmssic.VirtualMachineScaleSetIPConfigurationProperties = &virtualMachineScaleSetIPConfigurationProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vmssic.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualMachineScaleSetIPConfigurationProperties describes a virtual machine scale set network profile's
+// IP configuration properties.
+type VirtualMachineScaleSetIPConfigurationProperties struct {
+ // Subnet - Specifies the identifier of the subnet.
+ Subnet *APIEntityReference `json:"subnet,omitempty"`
+ // Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface.
+ Primary *bool `json:"primary,omitempty"`
+ // PublicIPAddressConfiguration - The publicIPAddressConfiguration.
+ PublicIPAddressConfiguration *VirtualMachineScaleSetPublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"`
+ // PrivateIPAddressVersion - Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPVersionIPv4', 'IPVersionIPv6'
+ PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
+ // ApplicationGatewayBackendAddressPools - Specifies an array of references to backend address pools of application gateways. A scale set can reference backend address pools of multiple application gateways. Multiple scale sets cannot use the same application gateway.
+ ApplicationGatewayBackendAddressPools *[]SubResource `json:"applicationGatewayBackendAddressPools,omitempty"`
+ // ApplicationSecurityGroups - Specifies an array of references to application security group.
+ ApplicationSecurityGroups *[]SubResource `json:"applicationSecurityGroups,omitempty"`
+ // LoadBalancerBackendAddressPools - Specifies an array of references to backend address pools of load balancers. A scale set can reference backend address pools of one public and one internal load balancer. Multiple scale sets cannot use the same basic sku load balancer.
+ LoadBalancerBackendAddressPools *[]SubResource `json:"loadBalancerBackendAddressPools,omitempty"`
+ // LoadBalancerInboundNatPools - Specifies an array of references to inbound Nat pools of the load balancers. A scale set can reference inbound nat pools of one public and one internal load balancer. Multiple scale sets cannot use the same basic sku load balancer.
+ LoadBalancerInboundNatPools *[]SubResource `json:"loadBalancerInboundNatPools,omitempty"`
+}
+
+// VirtualMachineScaleSetIPTag contains the IP tag associated with the public IP address.
+type VirtualMachineScaleSetIPTag struct {
+ // IPTagType - IP tag type. Example: FirstPartyUsage.
+ IPTagType *string `json:"ipTagType,omitempty"`
+ // Tag - IP tag associated with the public IP. Example: SQL, Storage etc.
+ Tag *string `json:"tag,omitempty"`
+}
+
+// VirtualMachineScaleSetListOSUpgradeHistory list of Virtual Machine Scale Set OS Upgrade History
+// operation response.
+type VirtualMachineScaleSetListOSUpgradeHistory struct {
+ autorest.Response `json:"-"`
+ // Value - The list of OS upgrades performed on the virtual machine scale set.
+ Value *[]UpgradeOperationHistoricalStatusInfo `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of OS Upgrade History. Call ListNext() with this to fetch the next page of history of upgrades.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// VirtualMachineScaleSetListOSUpgradeHistoryIterator provides access to a complete listing of
+// UpgradeOperationHistoricalStatusInfo values.
+type VirtualMachineScaleSetListOSUpgradeHistoryIterator struct {
+ i int
+ page VirtualMachineScaleSetListOSUpgradeHistoryPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *VirtualMachineScaleSetListOSUpgradeHistoryIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListOSUpgradeHistoryIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *VirtualMachineScaleSetListOSUpgradeHistoryIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter VirtualMachineScaleSetListOSUpgradeHistoryIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter VirtualMachineScaleSetListOSUpgradeHistoryIterator) Response() VirtualMachineScaleSetListOSUpgradeHistory {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter VirtualMachineScaleSetListOSUpgradeHistoryIterator) Value() UpgradeOperationHistoricalStatusInfo {
+ if !iter.page.NotDone() {
+ return UpgradeOperationHistoricalStatusInfo{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the VirtualMachineScaleSetListOSUpgradeHistoryIterator type.
+func NewVirtualMachineScaleSetListOSUpgradeHistoryIterator(page VirtualMachineScaleSetListOSUpgradeHistoryPage) VirtualMachineScaleSetListOSUpgradeHistoryIterator {
+ return VirtualMachineScaleSetListOSUpgradeHistoryIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) IsEmpty() bool {
+ return vmsslouh.Value == nil || len(*vmsslouh.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) hasNextLink() bool {
+ return vmsslouh.NextLink != nil && len(*vmsslouh.NextLink) != 0
+}
+
+// virtualMachineScaleSetListOSUpgradeHistoryPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) virtualMachineScaleSetListOSUpgradeHistoryPreparer(ctx context.Context) (*http.Request, error) {
+ if !vmsslouh.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(vmsslouh.NextLink)))
+}
+
+// VirtualMachineScaleSetListOSUpgradeHistoryPage contains a page of UpgradeOperationHistoricalStatusInfo
+// values.
+type VirtualMachineScaleSetListOSUpgradeHistoryPage struct {
+ fn func(context.Context, VirtualMachineScaleSetListOSUpgradeHistory) (VirtualMachineScaleSetListOSUpgradeHistory, error)
+ vmsslouh VirtualMachineScaleSetListOSUpgradeHistory
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *VirtualMachineScaleSetListOSUpgradeHistoryPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListOSUpgradeHistoryPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.vmsslouh)
+ if err != nil {
+ return err
+ }
+ page.vmsslouh = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *VirtualMachineScaleSetListOSUpgradeHistoryPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) NotDone() bool {
+ return !page.vmsslouh.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) Response() VirtualMachineScaleSetListOSUpgradeHistory {
+ return page.vmsslouh
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) Values() []UpgradeOperationHistoricalStatusInfo {
+ if page.vmsslouh.IsEmpty() {
+ return nil
+ }
+ return *page.vmsslouh.Value
+}
+
+// Creates a new instance of the VirtualMachineScaleSetListOSUpgradeHistoryPage type.
+func NewVirtualMachineScaleSetListOSUpgradeHistoryPage(cur VirtualMachineScaleSetListOSUpgradeHistory, getNextPage func(context.Context, VirtualMachineScaleSetListOSUpgradeHistory) (VirtualMachineScaleSetListOSUpgradeHistory, error)) VirtualMachineScaleSetListOSUpgradeHistoryPage {
+ return VirtualMachineScaleSetListOSUpgradeHistoryPage{
+ fn: getNextPage,
+ vmsslouh: cur,
+ }
+}
+
+// VirtualMachineScaleSetListResult the List Virtual Machine operation response.
+type VirtualMachineScaleSetListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of virtual machine scale sets.
+ Value *[]VirtualMachineScaleSet `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of Virtual Machine Scale Sets. Call ListNext() with this to fetch the next page of VMSS.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// VirtualMachineScaleSetListResultIterator provides access to a complete listing of VirtualMachineScaleSet
+// values.
+type VirtualMachineScaleSetListResultIterator struct {
+ i int
+ page VirtualMachineScaleSetListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *VirtualMachineScaleSetListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *VirtualMachineScaleSetListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter VirtualMachineScaleSetListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter VirtualMachineScaleSetListResultIterator) Response() VirtualMachineScaleSetListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter VirtualMachineScaleSetListResultIterator) Value() VirtualMachineScaleSet {
+ if !iter.page.NotDone() {
+ return VirtualMachineScaleSet{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the VirtualMachineScaleSetListResultIterator type.
+func NewVirtualMachineScaleSetListResultIterator(page VirtualMachineScaleSetListResultPage) VirtualMachineScaleSetListResultIterator {
+ return VirtualMachineScaleSetListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (vmsslr VirtualMachineScaleSetListResult) IsEmpty() bool {
+ return vmsslr.Value == nil || len(*vmsslr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (vmsslr VirtualMachineScaleSetListResult) hasNextLink() bool {
+ return vmsslr.NextLink != nil && len(*vmsslr.NextLink) != 0
+}
+
+// virtualMachineScaleSetListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (vmsslr VirtualMachineScaleSetListResult) virtualMachineScaleSetListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !vmsslr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(vmsslr.NextLink)))
+}
+
+// VirtualMachineScaleSetListResultPage contains a page of VirtualMachineScaleSet values.
+type VirtualMachineScaleSetListResultPage struct {
+ fn func(context.Context, VirtualMachineScaleSetListResult) (VirtualMachineScaleSetListResult, error)
+ vmsslr VirtualMachineScaleSetListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *VirtualMachineScaleSetListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.vmsslr)
+ if err != nil {
+ return err
+ }
+ page.vmsslr = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *VirtualMachineScaleSetListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page VirtualMachineScaleSetListResultPage) NotDone() bool {
+ return !page.vmsslr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page VirtualMachineScaleSetListResultPage) Response() VirtualMachineScaleSetListResult {
+ return page.vmsslr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page VirtualMachineScaleSetListResultPage) Values() []VirtualMachineScaleSet {
+ if page.vmsslr.IsEmpty() {
+ return nil
+ }
+ return *page.vmsslr.Value
+}
+
+// Creates a new instance of the VirtualMachineScaleSetListResultPage type.
+func NewVirtualMachineScaleSetListResultPage(cur VirtualMachineScaleSetListResult, getNextPage func(context.Context, VirtualMachineScaleSetListResult) (VirtualMachineScaleSetListResult, error)) VirtualMachineScaleSetListResultPage {
+ return VirtualMachineScaleSetListResultPage{
+ fn: getNextPage,
+ vmsslr: cur,
+ }
+}
+
+// VirtualMachineScaleSetListSkusResult the Virtual Machine Scale Set List Skus operation response.
+type VirtualMachineScaleSetListSkusResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of skus available for the virtual machine scale set.
+ Value *[]VirtualMachineScaleSetSku `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of Virtual Machine Scale Set Skus. Call ListNext() with this to fetch the next page of VMSS Skus.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// VirtualMachineScaleSetListSkusResultIterator provides access to a complete listing of
+// VirtualMachineScaleSetSku values.
+type VirtualMachineScaleSetListSkusResultIterator struct {
+ i int
+ page VirtualMachineScaleSetListSkusResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *VirtualMachineScaleSetListSkusResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListSkusResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *VirtualMachineScaleSetListSkusResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter VirtualMachineScaleSetListSkusResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter VirtualMachineScaleSetListSkusResultIterator) Response() VirtualMachineScaleSetListSkusResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter VirtualMachineScaleSetListSkusResultIterator) Value() VirtualMachineScaleSetSku {
+ if !iter.page.NotDone() {
+ return VirtualMachineScaleSetSku{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the VirtualMachineScaleSetListSkusResultIterator type.
+func NewVirtualMachineScaleSetListSkusResultIterator(page VirtualMachineScaleSetListSkusResultPage) VirtualMachineScaleSetListSkusResultIterator {
+ return VirtualMachineScaleSetListSkusResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (vmsslsr VirtualMachineScaleSetListSkusResult) IsEmpty() bool {
+ return vmsslsr.Value == nil || len(*vmsslsr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (vmsslsr VirtualMachineScaleSetListSkusResult) hasNextLink() bool {
+ return vmsslsr.NextLink != nil && len(*vmsslsr.NextLink) != 0
+}
+
+// virtualMachineScaleSetListSkusResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (vmsslsr VirtualMachineScaleSetListSkusResult) virtualMachineScaleSetListSkusResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !vmsslsr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(vmsslsr.NextLink)))
+}
+
+// VirtualMachineScaleSetListSkusResultPage contains a page of VirtualMachineScaleSetSku values.
+type VirtualMachineScaleSetListSkusResultPage struct {
+ fn func(context.Context, VirtualMachineScaleSetListSkusResult) (VirtualMachineScaleSetListSkusResult, error)
+ vmsslsr VirtualMachineScaleSetListSkusResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *VirtualMachineScaleSetListSkusResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListSkusResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.vmsslsr)
+ if err != nil {
+ return err
+ }
+ page.vmsslsr = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *VirtualMachineScaleSetListSkusResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page VirtualMachineScaleSetListSkusResultPage) NotDone() bool {
+ return !page.vmsslsr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page VirtualMachineScaleSetListSkusResultPage) Response() VirtualMachineScaleSetListSkusResult {
+ return page.vmsslsr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page VirtualMachineScaleSetListSkusResultPage) Values() []VirtualMachineScaleSetSku {
+ if page.vmsslsr.IsEmpty() {
+ return nil
+ }
+ return *page.vmsslsr.Value
+}
+
+// Creates a new instance of the VirtualMachineScaleSetListSkusResultPage type.
+func NewVirtualMachineScaleSetListSkusResultPage(cur VirtualMachineScaleSetListSkusResult, getNextPage func(context.Context, VirtualMachineScaleSetListSkusResult) (VirtualMachineScaleSetListSkusResult, error)) VirtualMachineScaleSetListSkusResultPage {
+ return VirtualMachineScaleSetListSkusResultPage{
+ fn: getNextPage,
+ vmsslsr: cur,
+ }
+}
+
+// VirtualMachineScaleSetListWithLinkResult the List Virtual Machine operation response.
+type VirtualMachineScaleSetListWithLinkResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of virtual machine scale sets.
+ Value *[]VirtualMachineScaleSet `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of Virtual Machine Scale Sets. Call ListNext() with this to fetch the next page of Virtual Machine Scale Sets.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// VirtualMachineScaleSetListWithLinkResultIterator provides access to a complete listing of
+// VirtualMachineScaleSet values.
+type VirtualMachineScaleSetListWithLinkResultIterator struct {
+ i int
+ page VirtualMachineScaleSetListWithLinkResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *VirtualMachineScaleSetListWithLinkResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListWithLinkResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *VirtualMachineScaleSetListWithLinkResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter VirtualMachineScaleSetListWithLinkResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter VirtualMachineScaleSetListWithLinkResultIterator) Response() VirtualMachineScaleSetListWithLinkResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter VirtualMachineScaleSetListWithLinkResultIterator) Value() VirtualMachineScaleSet {
+ if !iter.page.NotDone() {
+ return VirtualMachineScaleSet{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the VirtualMachineScaleSetListWithLinkResultIterator type.
+func NewVirtualMachineScaleSetListWithLinkResultIterator(page VirtualMachineScaleSetListWithLinkResultPage) VirtualMachineScaleSetListWithLinkResultIterator {
+ return VirtualMachineScaleSetListWithLinkResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (vmsslwlr VirtualMachineScaleSetListWithLinkResult) IsEmpty() bool {
+ return vmsslwlr.Value == nil || len(*vmsslwlr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (vmsslwlr VirtualMachineScaleSetListWithLinkResult) hasNextLink() bool {
+ return vmsslwlr.NextLink != nil && len(*vmsslwlr.NextLink) != 0
+}
+
+// virtualMachineScaleSetListWithLinkResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (vmsslwlr VirtualMachineScaleSetListWithLinkResult) virtualMachineScaleSetListWithLinkResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !vmsslwlr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(vmsslwlr.NextLink)))
+}
+
+// VirtualMachineScaleSetListWithLinkResultPage contains a page of VirtualMachineScaleSet values.
+type VirtualMachineScaleSetListWithLinkResultPage struct {
+ fn func(context.Context, VirtualMachineScaleSetListWithLinkResult) (VirtualMachineScaleSetListWithLinkResult, error)
+ vmsslwlr VirtualMachineScaleSetListWithLinkResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *VirtualMachineScaleSetListWithLinkResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListWithLinkResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.vmsslwlr)
+ if err != nil {
+ return err
+ }
+ page.vmsslwlr = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *VirtualMachineScaleSetListWithLinkResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page VirtualMachineScaleSetListWithLinkResultPage) NotDone() bool {
+ return !page.vmsslwlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page VirtualMachineScaleSetListWithLinkResultPage) Response() VirtualMachineScaleSetListWithLinkResult {
+ return page.vmsslwlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page VirtualMachineScaleSetListWithLinkResultPage) Values() []VirtualMachineScaleSet {
+ if page.vmsslwlr.IsEmpty() {
+ return nil
+ }
+ return *page.vmsslwlr.Value
+}
+
+// Creates a new instance of the VirtualMachineScaleSetListWithLinkResultPage type.
+func NewVirtualMachineScaleSetListWithLinkResultPage(cur VirtualMachineScaleSetListWithLinkResult, getNextPage func(context.Context, VirtualMachineScaleSetListWithLinkResult) (VirtualMachineScaleSetListWithLinkResult, error)) VirtualMachineScaleSetListWithLinkResultPage {
+ return VirtualMachineScaleSetListWithLinkResultPage{
+ fn: getNextPage,
+ vmsslwlr: cur,
+ }
+}
+
+// VirtualMachineScaleSetManagedDiskParameters describes the parameters of a ScaleSet managed disk.
+type VirtualMachineScaleSetManagedDiskParameters struct {
+ // StorageAccountType - Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS', 'StorageAccountTypesPremiumZRS', 'StorageAccountTypesStandardSSDZRS'
+ StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
+ // DiskEncryptionSet - Specifies the customer managed disk encryption set resource id for the managed disk.
+ DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"`
+}
+
+// VirtualMachineScaleSetNetworkConfiguration describes a virtual machine scale set network profile's
+// network configurations.
+type VirtualMachineScaleSetNetworkConfiguration struct {
+ // Name - The network configuration name.
+ Name *string `json:"name,omitempty"`
+ *VirtualMachineScaleSetNetworkConfigurationProperties `json:"properties,omitempty"`
+ // ID - Resource Id
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetNetworkConfiguration.
+func (vmssnc VirtualMachineScaleSetNetworkConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmssnc.Name != nil {
+ objectMap["name"] = vmssnc.Name
+ }
+ if vmssnc.VirtualMachineScaleSetNetworkConfigurationProperties != nil {
+ objectMap["properties"] = vmssnc.VirtualMachineScaleSetNetworkConfigurationProperties
+ }
+ if vmssnc.ID != nil {
+ objectMap["id"] = vmssnc.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetNetworkConfiguration struct.
+func (vmssnc *VirtualMachineScaleSetNetworkConfiguration) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vmssnc.Name = &name
+ }
+ case "properties":
+ if v != nil {
+ var virtualMachineScaleSetNetworkConfigurationProperties VirtualMachineScaleSetNetworkConfigurationProperties
+ err = json.Unmarshal(*v, &virtualMachineScaleSetNetworkConfigurationProperties)
+ if err != nil {
+ return err
+ }
+ vmssnc.VirtualMachineScaleSetNetworkConfigurationProperties = &virtualMachineScaleSetNetworkConfigurationProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vmssnc.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualMachineScaleSetNetworkConfigurationDNSSettings describes a virtual machines scale sets network
+// configuration's DNS settings.
+type VirtualMachineScaleSetNetworkConfigurationDNSSettings struct {
+ // DNSServers - List of DNS servers IP addresses
+ DNSServers *[]string `json:"dnsServers,omitempty"`
+}
+
+// VirtualMachineScaleSetNetworkConfigurationProperties describes a virtual machine scale set network
+// profile's IP configuration.
+type VirtualMachineScaleSetNetworkConfigurationProperties struct {
+ // Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface.
+ Primary *bool `json:"primary,omitempty"`
+ // EnableAcceleratedNetworking - Specifies whether the network interface is accelerated networking-enabled.
+ EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
+ // EnableFpga - Specifies whether the network interface is FPGA networking-enabled.
+ EnableFpga *bool `json:"enableFpga,omitempty"`
+ // NetworkSecurityGroup - The network security group.
+ NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
+ // DNSSettings - The dns settings to be applied on the network interfaces.
+ DNSSettings *VirtualMachineScaleSetNetworkConfigurationDNSSettings `json:"dnsSettings,omitempty"`
+ // IPConfigurations - Specifies the IP configurations of the network interface.
+ IPConfigurations *[]VirtualMachineScaleSetIPConfiguration `json:"ipConfigurations,omitempty"`
+ // EnableIPForwarding - Whether IP forwarding enabled on this NIC.
+ EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
+ // DeleteOption - Specify what happens to the network interface when the VM is deleted. Possible values include: 'DeleteOptionsDelete', 'DeleteOptionsDetach'
+ DeleteOption DeleteOptions `json:"deleteOption,omitempty"`
+}
+
+// VirtualMachineScaleSetNetworkProfile describes a virtual machine scale set network profile.
+type VirtualMachineScaleSetNetworkProfile struct {
+ // HealthProbe - A reference to a load balancer probe used to determine the health of an instance in the virtual machine scale set. The reference will be in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'.
+ HealthProbe *APIEntityReference `json:"healthProbe,omitempty"`
+ // NetworkInterfaceConfigurations - The list of network configurations.
+ NetworkInterfaceConfigurations *[]VirtualMachineScaleSetNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"`
+ // NetworkAPIVersion - specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations for Virtual Machine Scale Set with orchestration mode 'Flexible'. Possible values include: 'NetworkAPIVersionTwoZeroTwoZeroHyphenMinusOneOneHyphenMinusZeroOne'
+ NetworkAPIVersion NetworkAPIVersion `json:"networkApiVersion,omitempty"`
+}
+
+// VirtualMachineScaleSetOSDisk describes a virtual machine scale set operating system disk.
+type VirtualMachineScaleSetOSDisk struct {
+ // Name - The disk name.
+ Name *string `json:"name,omitempty"`
+ // Caching - Specifies the caching requirements.
Possible values are:
**None**
**ReadOnly**
**ReadWrite**
Default: **None for Standard storage. ReadOnly for Premium storage**. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite'
+ Caching CachingTypes `json:"caching,omitempty"`
+ // WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
+ WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
+ // CreateOption - Specifies how the virtual machines in the scale set should be created.
The only allowed value is: **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach'
+ CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
+ // DiffDiskSettings - Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine scale set.
+ DiffDiskSettings *DiffDiskSettings `json:"diffDiskSettings,omitempty"`
+ // DiskSizeGB - Specifies the size of the operating system disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.
This value cannot be larger than 1023 GB
+ DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
+ // OsType - This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD.
Possible values are:
**Windows**
**Linux**. Possible values include: 'OperatingSystemTypesWindows', 'OperatingSystemTypesLinux'
+ OsType OperatingSystemTypes `json:"osType,omitempty"`
+ // Image - Specifies information about the unmanaged user image to base the scale set on.
+ Image *VirtualHardDisk `json:"image,omitempty"`
+ // VhdContainers - Specifies the container urls that are used to store operating system disks for the scale set.
+ VhdContainers *[]string `json:"vhdContainers,omitempty"`
+ // ManagedDisk - The managed disk parameters.
+ ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"`
+}
+
+// VirtualMachineScaleSetOSProfile describes a virtual machine scale set OS profile.
+type VirtualMachineScaleSetOSProfile struct {
+ // ComputerNamePrefix - Specifies the computer name prefix for all of the virtual machines in the scale set. Computer name prefixes must be 1 to 15 characters long.
+ ComputerNamePrefix *string `json:"computerNamePrefix,omitempty"`
+ // AdminUsername - Specifies the name of the administrator account.
**Windows-only restriction:** Cannot end in "."
**Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".
**Minimum-length (Linux):** 1 character
**Max-length (Linux):** 64 characters
**Max-length (Windows):** 20 characters
+ AdminUsername *string `json:"adminUsername,omitempty"`
+ // AdminPassword - Specifies the password of the administrator account.
**Minimum-length (Windows):** 8 characters
**Minimum-length (Linux):** 6 characters
**Max-length (Windows):** 123 characters
**Max-length (Linux):** 72 characters
**Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
Has lower characters
Has upper characters
Has a digit
Has a special character (Regex match [\W_])
**Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"
For resetting the password, see [How to reset the Remote Desktop service or its login password in a Windows VM](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/reset-rdp)
For resetting root password, see [Manage users, SSH, and check or repair disks on Azure Linux VMs using the VMAccess Extension](https://docs.microsoft.com/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection)
+ AdminPassword *string `json:"adminPassword,omitempty"`
+ // CustomData - Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes.
For using cloud-init for your VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init)
+ CustomData *string `json:"customData,omitempty"`
+ // WindowsConfiguration - Specifies Windows operating system settings on the virtual machine.
+ WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"`
+ // LinuxConfiguration - Specifies the Linux operating system settings on the virtual machine.
For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/linux/endorsed-distros).
+ LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"`
+ // Secrets - Specifies set of certificates that should be installed onto the virtual machines in the scale set. To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).
+ Secrets *[]VaultSecretGroup `json:"secrets,omitempty"`
+}
+
+// VirtualMachineScaleSetProperties describes the properties of a Virtual Machine Scale Set.
+type VirtualMachineScaleSetProperties struct {
+ // UpgradePolicy - The upgrade policy.
+ UpgradePolicy *UpgradePolicy `json:"upgradePolicy,omitempty"`
+ // AutomaticRepairsPolicy - Policy for automatic repairs.
+ AutomaticRepairsPolicy *AutomaticRepairsPolicy `json:"automaticRepairsPolicy,omitempty"`
+ // VirtualMachineProfile - The virtual machine profile.
+ VirtualMachineProfile *VirtualMachineScaleSetVMProfile `json:"virtualMachineProfile,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // Overprovision - Specifies whether the Virtual Machine Scale Set should be overprovisioned.
+ Overprovision *bool `json:"overprovision,omitempty"`
+ // DoNotRunExtensionsOnOverprovisionedVMs - When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs.
+ DoNotRunExtensionsOnOverprovisionedVMs *bool `json:"doNotRunExtensionsOnOverprovisionedVMs,omitempty"`
+ // UniqueID - READ-ONLY; Specifies the ID which uniquely identifies a Virtual Machine Scale Set.
+ UniqueID *string `json:"uniqueId,omitempty"`
+ // SinglePlacementGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true.
+ SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"`
+ // ZoneBalance - Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage. zoneBalance property can only be set if the zones property of the scale set contains more than one zone. If there are no zones or only one zone specified, then zoneBalance property should not be set.
+ ZoneBalance *bool `json:"zoneBalance,omitempty"`
+ // PlatformFaultDomainCount - Fault Domain count for each placement group.
+ PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"`
+ // ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine scale set should be assigned to.
Minimum api-version: 2018-04-01.
+ ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`
+ // HostGroup - Specifies information about the dedicated host group that the virtual machine scale set resides in.
Minimum api-version: 2020-06-01.
+ HostGroup *SubResource `json:"hostGroup,omitempty"`
+ // AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type.
+ AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
+ // ScaleInPolicy - Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set.
+ ScaleInPolicy *ScaleInPolicy `json:"scaleInPolicy,omitempty"`
+ // OrchestrationMode - Specifies the orchestration mode for the virtual machine scale set. Possible values include: 'OrchestrationModeUniform', 'OrchestrationModeFlexible'
+ OrchestrationMode OrchestrationMode `json:"orchestrationMode,omitempty"`
+ // SpotRestorePolicy - Specifies the Spot Restore properties for the virtual machine scale set.
+ SpotRestorePolicy *SpotRestorePolicy `json:"spotRestorePolicy,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetProperties.
+func (vmssp VirtualMachineScaleSetProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmssp.UpgradePolicy != nil {
+ objectMap["upgradePolicy"] = vmssp.UpgradePolicy
+ }
+ if vmssp.AutomaticRepairsPolicy != nil {
+ objectMap["automaticRepairsPolicy"] = vmssp.AutomaticRepairsPolicy
+ }
+ if vmssp.VirtualMachineProfile != nil {
+ objectMap["virtualMachineProfile"] = vmssp.VirtualMachineProfile
+ }
+ if vmssp.Overprovision != nil {
+ objectMap["overprovision"] = vmssp.Overprovision
+ }
+ if vmssp.DoNotRunExtensionsOnOverprovisionedVMs != nil {
+ objectMap["doNotRunExtensionsOnOverprovisionedVMs"] = vmssp.DoNotRunExtensionsOnOverprovisionedVMs
+ }
+ if vmssp.SinglePlacementGroup != nil {
+ objectMap["singlePlacementGroup"] = vmssp.SinglePlacementGroup
+ }
+ if vmssp.ZoneBalance != nil {
+ objectMap["zoneBalance"] = vmssp.ZoneBalance
+ }
+ if vmssp.PlatformFaultDomainCount != nil {
+ objectMap["platformFaultDomainCount"] = vmssp.PlatformFaultDomainCount
+ }
+ if vmssp.ProximityPlacementGroup != nil {
+ objectMap["proximityPlacementGroup"] = vmssp.ProximityPlacementGroup
+ }
+ if vmssp.HostGroup != nil {
+ objectMap["hostGroup"] = vmssp.HostGroup
+ }
+ if vmssp.AdditionalCapabilities != nil {
+ objectMap["additionalCapabilities"] = vmssp.AdditionalCapabilities
+ }
+ if vmssp.ScaleInPolicy != nil {
+ objectMap["scaleInPolicy"] = vmssp.ScaleInPolicy
+ }
+ if vmssp.OrchestrationMode != "" {
+ objectMap["orchestrationMode"] = vmssp.OrchestrationMode
+ }
+ if vmssp.SpotRestorePolicy != nil {
+ objectMap["spotRestorePolicy"] = vmssp.SpotRestorePolicy
+ }
+ return json.Marshal(objectMap)
+}
+
+// VirtualMachineScaleSetPublicIPAddressConfiguration describes a virtual machines scale set IP
+// Configuration's PublicIPAddress configuration
+type VirtualMachineScaleSetPublicIPAddressConfiguration struct {
+ // Name - The publicIP address configuration name.
+ Name *string `json:"name,omitempty"`
+ *VirtualMachineScaleSetPublicIPAddressConfigurationProperties `json:"properties,omitempty"`
+ Sku *PublicIPAddressSku `json:"sku,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetPublicIPAddressConfiguration.
+func (vmsspiac VirtualMachineScaleSetPublicIPAddressConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmsspiac.Name != nil {
+ objectMap["name"] = vmsspiac.Name
+ }
+ if vmsspiac.VirtualMachineScaleSetPublicIPAddressConfigurationProperties != nil {
+ objectMap["properties"] = vmsspiac.VirtualMachineScaleSetPublicIPAddressConfigurationProperties
+ }
+ if vmsspiac.Sku != nil {
+ objectMap["sku"] = vmsspiac.Sku
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetPublicIPAddressConfiguration struct.
+func (vmsspiac *VirtualMachineScaleSetPublicIPAddressConfiguration) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vmsspiac.Name = &name
+ }
+ case "properties":
+ if v != nil {
+ var virtualMachineScaleSetPublicIPAddressConfigurationProperties VirtualMachineScaleSetPublicIPAddressConfigurationProperties
+ err = json.Unmarshal(*v, &virtualMachineScaleSetPublicIPAddressConfigurationProperties)
+ if err != nil {
+ return err
+ }
+ vmsspiac.VirtualMachineScaleSetPublicIPAddressConfigurationProperties = &virtualMachineScaleSetPublicIPAddressConfigurationProperties
+ }
+ case "sku":
+ if v != nil {
+ var sku PublicIPAddressSku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ vmsspiac.Sku = &sku
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings describes a virtual machines scale sets
+// network configuration's DNS settings.
+type VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings struct {
+ // DomainNameLabel - The Domain name label.The concatenation of the domain name label and vm index will be the domain name labels of the PublicIPAddress resources that will be created
+ DomainNameLabel *string `json:"domainNameLabel,omitempty"`
+}
+
+// VirtualMachineScaleSetPublicIPAddressConfigurationProperties describes a virtual machines scale set IP
+// Configuration's PublicIPAddress configuration
+type VirtualMachineScaleSetPublicIPAddressConfigurationProperties struct {
+ // IdleTimeoutInMinutes - The idle timeout of the public IP address.
+ IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
+ // DNSSettings - The dns settings to be applied on the publicIP addresses .
+ DNSSettings *VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings `json:"dnsSettings,omitempty"`
+ // IPTags - The list of IP tags associated with the public IP address.
+ IPTags *[]VirtualMachineScaleSetIPTag `json:"ipTags,omitempty"`
+ // PublicIPPrefix - The PublicIPPrefix from which to allocate publicIP addresses.
+ PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
+ // PublicIPAddressVersion - Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPVersionIPv4', 'IPVersionIPv6'
+ PublicIPAddressVersion IPVersion `json:"publicIPAddressVersion,omitempty"`
+ // DeleteOption - Specify what happens to the public IP when the VM is deleted. Possible values include: 'DeleteOptionsDelete', 'DeleteOptionsDetach'
+ DeleteOption DeleteOptions `json:"deleteOption,omitempty"`
+}
+
+// VirtualMachineScaleSetReimageParameters describes a Virtual Machine Scale Set VM Reimage Parameters.
+type VirtualMachineScaleSetReimageParameters struct {
+ // InstanceIds - The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
+ InstanceIds *[]string `json:"instanceIds,omitempty"`
+ // TempDisk - Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk.
+ TempDisk *bool `json:"tempDisk,omitempty"`
+}
+
+// VirtualMachineScaleSetRollingUpgradesCancelFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
+type VirtualMachineScaleSetRollingUpgradesCancelFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetRollingUpgradesClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetRollingUpgradesCancelFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetRollingUpgradesCancelFuture.Result.
+func (future *VirtualMachineScaleSetRollingUpgradesCancelFuture) result(client VirtualMachineScaleSetRollingUpgradesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesCancelFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesCancelFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture an abstraction for monitoring and
+// retrieving the results of a long-running operation.
+type VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetRollingUpgradesClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture.Result.
+func (future *VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture) result(client VirtualMachineScaleSetRollingUpgradesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture an abstraction for monitoring and retrieving
+// the results of a long-running operation.
+type VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetRollingUpgradesClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture.Result.
+func (future *VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture) result(client VirtualMachineScaleSetRollingUpgradesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachineScaleSetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
+type VirtualMachineScaleSetsCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetsClient) (VirtualMachineScaleSet, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetsCreateOrUpdateFuture.Result.
+func (future *VirtualMachineScaleSetsCreateOrUpdateFuture) result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vmss.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmss.Response.Response, err = future.GetResult(sender); err == nil && vmss.Response.Response.StatusCode != http.StatusNoContent {
+ vmss, err = client.CreateOrUpdateResponder(vmss.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsCreateOrUpdateFuture", "Result", vmss.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualMachineScaleSetsDeallocateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualMachineScaleSetsDeallocateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetsDeallocateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetsDeallocateFuture.Result.
+func (future *VirtualMachineScaleSetsDeallocateFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeallocateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeallocateFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachineScaleSetsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualMachineScaleSetsDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetsDeleteFuture.Result.
+func (future *VirtualMachineScaleSetsDeleteFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachineScaleSetsDeleteInstancesFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
+type VirtualMachineScaleSetsDeleteInstancesFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetsDeleteInstancesFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetsDeleteInstancesFuture.Result.
+func (future *VirtualMachineScaleSetsDeleteInstancesFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsDeleteInstancesFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsDeleteInstancesFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachineScaleSetSku describes an available virtual machine scale set sku.
+type VirtualMachineScaleSetSku struct {
+ // ResourceType - READ-ONLY; The type of resource the sku applies to.
+ ResourceType *string `json:"resourceType,omitempty"`
+ // Sku - READ-ONLY; The Sku.
+ Sku *Sku `json:"sku,omitempty"`
+ // Capacity - READ-ONLY; Specifies the number of virtual machines in the scale set.
+ Capacity *VirtualMachineScaleSetSkuCapacity `json:"capacity,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetSku.
+func (vmsss VirtualMachineScaleSetSku) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// VirtualMachineScaleSetSkuCapacity describes scaling information of a sku.
+type VirtualMachineScaleSetSkuCapacity struct {
+ // Minimum - READ-ONLY; The minimum capacity.
+ Minimum *int64 `json:"minimum,omitempty"`
+ // Maximum - READ-ONLY; The maximum capacity that can be set.
+ Maximum *int64 `json:"maximum,omitempty"`
+ // DefaultCapacity - READ-ONLY; The default capacity.
+ DefaultCapacity *int64 `json:"defaultCapacity,omitempty"`
+ // ScaleType - READ-ONLY; The scale type applicable to the sku. Possible values include: 'VirtualMachineScaleSetSkuScaleTypeAutomatic', 'VirtualMachineScaleSetSkuScaleTypeNone'
+ ScaleType VirtualMachineScaleSetSkuScaleType `json:"scaleType,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetSkuCapacity.
+func (vmsssc VirtualMachineScaleSetSkuCapacity) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// VirtualMachineScaleSetsPerformMaintenanceFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
+type VirtualMachineScaleSetsPerformMaintenanceFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetsPerformMaintenanceFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetsPerformMaintenanceFuture.Result.
+func (future *VirtualMachineScaleSetsPerformMaintenanceFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPerformMaintenanceFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPerformMaintenanceFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachineScaleSetsPowerOffFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualMachineScaleSetsPowerOffFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetsPowerOffFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetsPowerOffFuture.Result.
+func (future *VirtualMachineScaleSetsPowerOffFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsPowerOffFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsPowerOffFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachineScaleSetsRedeployFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualMachineScaleSetsRedeployFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetsRedeployFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetsRedeployFuture.Result.
+func (future *VirtualMachineScaleSetsRedeployFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRedeployFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRedeployFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachineScaleSetsReimageAllFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualMachineScaleSetsReimageAllFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetsReimageAllFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetsReimageAllFuture.Result.
+func (future *VirtualMachineScaleSetsReimageAllFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageAllFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageAllFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachineScaleSetsReimageFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualMachineScaleSetsReimageFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetsReimageFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetsReimageFuture.Result.
+func (future *VirtualMachineScaleSetsReimageFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsReimageFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsReimageFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachineScaleSetsRestartFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualMachineScaleSetsRestartFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetsRestartFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetsRestartFuture.Result.
+func (future *VirtualMachineScaleSetsRestartFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsRestartFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsRestartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachineScaleSetsSetOrchestrationServiceStateFuture an abstraction for monitoring and retrieving
+// the results of a long-running operation.
+type VirtualMachineScaleSetsSetOrchestrationServiceStateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetsSetOrchestrationServiceStateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetsSetOrchestrationServiceStateFuture.Result.
+func (future *VirtualMachineScaleSetsSetOrchestrationServiceStateFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsSetOrchestrationServiceStateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsSetOrchestrationServiceStateFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachineScaleSetsStartFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualMachineScaleSetsStartFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetsStartFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetsStartFuture.Result.
+func (future *VirtualMachineScaleSetsStartFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsStartFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsStartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachineScaleSetStorageProfile describes a virtual machine scale set storage profile.
+type VirtualMachineScaleSetStorageProfile struct {
+ // ImageReference - Specifies information about the image to use. You can specify information about platform images, marketplace images, or virtual machine images. This element is required when you want to use a platform image, marketplace image, or virtual machine image, but is not used in other creation operations.
+ ImageReference *ImageReference `json:"imageReference,omitempty"`
+ // OsDisk - Specifies information about the operating system disk used by the virtual machines in the scale set.
For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).
+ OsDisk *VirtualMachineScaleSetOSDisk `json:"osDisk,omitempty"`
+ // DataDisks - Specifies the parameters that are used to add data disks to the virtual machines in the scale set.
For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).
+ DataDisks *[]VirtualMachineScaleSetDataDisk `json:"dataDisks,omitempty"`
+}
+
+// VirtualMachineScaleSetsUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualMachineScaleSetsUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetsClient) (VirtualMachineScaleSet, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetsUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetsUpdateFuture.Result.
+func (future *VirtualMachineScaleSetsUpdateFuture) result(client VirtualMachineScaleSetsClient) (vmss VirtualMachineScaleSet, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vmss.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmss.Response.Response, err = future.GetResult(sender); err == nil && vmss.Response.Response.StatusCode != http.StatusNoContent {
+ vmss, err = client.UpdateResponder(vmss.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateFuture", "Result", vmss.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualMachineScaleSetsUpdateInstancesFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
+type VirtualMachineScaleSetsUpdateInstancesFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetsUpdateInstancesFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetsUpdateInstancesFuture.Result.
+func (future *VirtualMachineScaleSetsUpdateInstancesFuture) result(client VirtualMachineScaleSetsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsUpdateInstancesFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetsUpdateInstancesFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachineScaleSetUpdate describes a Virtual Machine Scale Set.
+type VirtualMachineScaleSetUpdate struct {
+ // Sku - The virtual machine scale set sku.
+ Sku *Sku `json:"sku,omitempty"`
+ // Plan - The purchase plan when deploying a virtual machine scale set from VM Marketplace images.
+ Plan *Plan `json:"plan,omitempty"`
+ *VirtualMachineScaleSetUpdateProperties `json:"properties,omitempty"`
+ // Identity - The identity of the virtual machine scale set, if configured.
+ Identity *VirtualMachineScaleSetIdentity `json:"identity,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdate.
+func (vmssu VirtualMachineScaleSetUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmssu.Sku != nil {
+ objectMap["sku"] = vmssu.Sku
+ }
+ if vmssu.Plan != nil {
+ objectMap["plan"] = vmssu.Plan
+ }
+ if vmssu.VirtualMachineScaleSetUpdateProperties != nil {
+ objectMap["properties"] = vmssu.VirtualMachineScaleSetUpdateProperties
+ }
+ if vmssu.Identity != nil {
+ objectMap["identity"] = vmssu.Identity
+ }
+ if vmssu.Tags != nil {
+ objectMap["tags"] = vmssu.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdate struct.
+func (vmssu *VirtualMachineScaleSetUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "sku":
+ if v != nil {
+ var sku Sku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ vmssu.Sku = &sku
+ }
+ case "plan":
+ if v != nil {
+ var plan Plan
+ err = json.Unmarshal(*v, &plan)
+ if err != nil {
+ return err
+ }
+ vmssu.Plan = &plan
+ }
+ case "properties":
+ if v != nil {
+ var virtualMachineScaleSetUpdateProperties VirtualMachineScaleSetUpdateProperties
+ err = json.Unmarshal(*v, &virtualMachineScaleSetUpdateProperties)
+ if err != nil {
+ return err
+ }
+ vmssu.VirtualMachineScaleSetUpdateProperties = &virtualMachineScaleSetUpdateProperties
+ }
+ case "identity":
+ if v != nil {
+ var identity VirtualMachineScaleSetIdentity
+ err = json.Unmarshal(*v, &identity)
+ if err != nil {
+ return err
+ }
+ vmssu.Identity = &identity
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ vmssu.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualMachineScaleSetUpdateIPConfiguration describes a virtual machine scale set network profile's IP
+// configuration. NOTE: The subnet of a scale set may be modified as long as the original subnet and the
+// new subnet are in the same virtual network
+type VirtualMachineScaleSetUpdateIPConfiguration struct {
+ // Name - The IP configuration name.
+ Name *string `json:"name,omitempty"`
+ *VirtualMachineScaleSetUpdateIPConfigurationProperties `json:"properties,omitempty"`
+ // ID - Resource Id
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdateIPConfiguration.
+func (vmssuic VirtualMachineScaleSetUpdateIPConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmssuic.Name != nil {
+ objectMap["name"] = vmssuic.Name
+ }
+ if vmssuic.VirtualMachineScaleSetUpdateIPConfigurationProperties != nil {
+ objectMap["properties"] = vmssuic.VirtualMachineScaleSetUpdateIPConfigurationProperties
+ }
+ if vmssuic.ID != nil {
+ objectMap["id"] = vmssuic.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdateIPConfiguration struct.
+func (vmssuic *VirtualMachineScaleSetUpdateIPConfiguration) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vmssuic.Name = &name
+ }
+ case "properties":
+ if v != nil {
+ var virtualMachineScaleSetUpdateIPConfigurationProperties VirtualMachineScaleSetUpdateIPConfigurationProperties
+ err = json.Unmarshal(*v, &virtualMachineScaleSetUpdateIPConfigurationProperties)
+ if err != nil {
+ return err
+ }
+ vmssuic.VirtualMachineScaleSetUpdateIPConfigurationProperties = &virtualMachineScaleSetUpdateIPConfigurationProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vmssuic.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualMachineScaleSetUpdateIPConfigurationProperties describes a virtual machine scale set network
+// profile's IP configuration properties.
+type VirtualMachineScaleSetUpdateIPConfigurationProperties struct {
+ // Subnet - The subnet.
+ Subnet *APIEntityReference `json:"subnet,omitempty"`
+ // Primary - Specifies the primary IP Configuration in case the network interface has more than one IP Configuration.
+ Primary *bool `json:"primary,omitempty"`
+ // PublicIPAddressConfiguration - The publicIPAddressConfiguration.
+ PublicIPAddressConfiguration *VirtualMachineScaleSetUpdatePublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"`
+ // PrivateIPAddressVersion - Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPVersionIPv4', 'IPVersionIPv6'
+ PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"`
+ // ApplicationGatewayBackendAddressPools - The application gateway backend address pools.
+ ApplicationGatewayBackendAddressPools *[]SubResource `json:"applicationGatewayBackendAddressPools,omitempty"`
+ // ApplicationSecurityGroups - Specifies an array of references to application security group.
+ ApplicationSecurityGroups *[]SubResource `json:"applicationSecurityGroups,omitempty"`
+ // LoadBalancerBackendAddressPools - The load balancer backend address pools.
+ LoadBalancerBackendAddressPools *[]SubResource `json:"loadBalancerBackendAddressPools,omitempty"`
+ // LoadBalancerInboundNatPools - The load balancer inbound nat pools.
+ LoadBalancerInboundNatPools *[]SubResource `json:"loadBalancerInboundNatPools,omitempty"`
+}
+
+// VirtualMachineScaleSetUpdateNetworkConfiguration describes a virtual machine scale set network profile's
+// network configurations.
+type VirtualMachineScaleSetUpdateNetworkConfiguration struct {
+ // Name - The network configuration name.
+ Name *string `json:"name,omitempty"`
+ *VirtualMachineScaleSetUpdateNetworkConfigurationProperties `json:"properties,omitempty"`
+ // ID - Resource Id
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdateNetworkConfiguration.
+func (vmssunc VirtualMachineScaleSetUpdateNetworkConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmssunc.Name != nil {
+ objectMap["name"] = vmssunc.Name
+ }
+ if vmssunc.VirtualMachineScaleSetUpdateNetworkConfigurationProperties != nil {
+ objectMap["properties"] = vmssunc.VirtualMachineScaleSetUpdateNetworkConfigurationProperties
+ }
+ if vmssunc.ID != nil {
+ objectMap["id"] = vmssunc.ID
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdateNetworkConfiguration struct.
+func (vmssunc *VirtualMachineScaleSetUpdateNetworkConfiguration) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vmssunc.Name = &name
+ }
+ case "properties":
+ if v != nil {
+ var virtualMachineScaleSetUpdateNetworkConfigurationProperties VirtualMachineScaleSetUpdateNetworkConfigurationProperties
+ err = json.Unmarshal(*v, &virtualMachineScaleSetUpdateNetworkConfigurationProperties)
+ if err != nil {
+ return err
+ }
+ vmssunc.VirtualMachineScaleSetUpdateNetworkConfigurationProperties = &virtualMachineScaleSetUpdateNetworkConfigurationProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vmssunc.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualMachineScaleSetUpdateNetworkConfigurationProperties describes a virtual machine scale set
+// updatable network profile's IP configuration.Use this object for updating network profile's IP
+// Configuration.
+type VirtualMachineScaleSetUpdateNetworkConfigurationProperties struct {
+ // Primary - Whether this is a primary NIC on a virtual machine.
+ Primary *bool `json:"primary,omitempty"`
+ // EnableAcceleratedNetworking - Specifies whether the network interface is accelerated networking-enabled.
+ EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"`
+ // EnableFpga - Specifies whether the network interface is FPGA networking-enabled.
+ EnableFpga *bool `json:"enableFpga,omitempty"`
+ // NetworkSecurityGroup - The network security group.
+ NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"`
+ // DNSSettings - The dns settings to be applied on the network interfaces.
+ DNSSettings *VirtualMachineScaleSetNetworkConfigurationDNSSettings `json:"dnsSettings,omitempty"`
+ // IPConfigurations - The virtual machine scale set IP Configuration.
+ IPConfigurations *[]VirtualMachineScaleSetUpdateIPConfiguration `json:"ipConfigurations,omitempty"`
+ // EnableIPForwarding - Whether IP forwarding enabled on this NIC.
+ EnableIPForwarding *bool `json:"enableIPForwarding,omitempty"`
+ // DeleteOption - Specify what happens to the network interface when the VM is deleted. Possible values include: 'DeleteOptionsDelete', 'DeleteOptionsDetach'
+ DeleteOption DeleteOptions `json:"deleteOption,omitempty"`
+}
+
+// VirtualMachineScaleSetUpdateNetworkProfile describes a virtual machine scale set network profile.
+type VirtualMachineScaleSetUpdateNetworkProfile struct {
+ // HealthProbe - A reference to a load balancer probe used to determine the health of an instance in the virtual machine scale set. The reference will be in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'.
+ HealthProbe *APIEntityReference `json:"healthProbe,omitempty"`
+ // NetworkInterfaceConfigurations - The list of network configurations.
+ NetworkInterfaceConfigurations *[]VirtualMachineScaleSetUpdateNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"`
+ // NetworkAPIVersion - specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations for Virtual Machine Scale Set with orchestration mode 'Flexible'. Possible values include: 'NetworkAPIVersionTwoZeroTwoZeroHyphenMinusOneOneHyphenMinusZeroOne'
+ NetworkAPIVersion NetworkAPIVersion `json:"networkApiVersion,omitempty"`
+}
+
+// VirtualMachineScaleSetUpdateOSDisk describes virtual machine scale set operating system disk Update
+// Object. This should be used for Updating VMSS OS Disk.
+type VirtualMachineScaleSetUpdateOSDisk struct {
+ // Caching - The caching type. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite'
+ Caching CachingTypes `json:"caching,omitempty"`
+ // WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
+ WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
+ // DiskSizeGB - Specifies the size of the operating system disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.
This value cannot be larger than 1023 GB
+ DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
+ // Image - The Source User Image VirtualHardDisk. This VirtualHardDisk will be copied before using it to attach to the Virtual Machine. If SourceImage is provided, the destination VirtualHardDisk should not exist.
+ Image *VirtualHardDisk `json:"image,omitempty"`
+ // VhdContainers - The list of virtual hard disk container uris.
+ VhdContainers *[]string `json:"vhdContainers,omitempty"`
+ // ManagedDisk - The managed disk parameters.
+ ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"`
+}
+
+// VirtualMachineScaleSetUpdateOSProfile describes a virtual machine scale set OS profile.
+type VirtualMachineScaleSetUpdateOSProfile struct {
+ // CustomData - A base-64 encoded string of custom data.
+ CustomData *string `json:"customData,omitempty"`
+ // WindowsConfiguration - The Windows Configuration of the OS profile.
+ WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"`
+ // LinuxConfiguration - The Linux Configuration of the OS profile.
+ LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"`
+ // Secrets - The List of certificates for addition to the VM.
+ Secrets *[]VaultSecretGroup `json:"secrets,omitempty"`
+}
+
+// VirtualMachineScaleSetUpdateProperties describes the properties of a Virtual Machine Scale Set.
+type VirtualMachineScaleSetUpdateProperties struct {
+ // UpgradePolicy - The upgrade policy.
+ UpgradePolicy *UpgradePolicy `json:"upgradePolicy,omitempty"`
+ // AutomaticRepairsPolicy - Policy for automatic repairs.
+ AutomaticRepairsPolicy *AutomaticRepairsPolicy `json:"automaticRepairsPolicy,omitempty"`
+ // VirtualMachineProfile - The virtual machine profile.
+ VirtualMachineProfile *VirtualMachineScaleSetUpdateVMProfile `json:"virtualMachineProfile,omitempty"`
+ // Overprovision - Specifies whether the Virtual Machine Scale Set should be overprovisioned.
+ Overprovision *bool `json:"overprovision,omitempty"`
+ // DoNotRunExtensionsOnOverprovisionedVMs - When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs.
+ DoNotRunExtensionsOnOverprovisionedVMs *bool `json:"doNotRunExtensionsOnOverprovisionedVMs,omitempty"`
+ // SinglePlacementGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true.
+ SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"`
+ // AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type.
+ AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
+ // ScaleInPolicy - Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set.
+ ScaleInPolicy *ScaleInPolicy `json:"scaleInPolicy,omitempty"`
+ // ProximityPlacementGroup - Specifies information about the proximity placement group that the virtual machine scale set should be assigned to.
Minimum api-version: 2018-04-01.
+ ProximityPlacementGroup *SubResource `json:"proximityPlacementGroup,omitempty"`
+}
+
+// VirtualMachineScaleSetUpdatePublicIPAddressConfiguration describes a virtual machines scale set IP
+// Configuration's PublicIPAddress configuration
+type VirtualMachineScaleSetUpdatePublicIPAddressConfiguration struct {
+ // Name - The publicIP address configuration name.
+ Name *string `json:"name,omitempty"`
+ *VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetUpdatePublicIPAddressConfiguration.
+func (vmssupiac VirtualMachineScaleSetUpdatePublicIPAddressConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmssupiac.Name != nil {
+ objectMap["name"] = vmssupiac.Name
+ }
+ if vmssupiac.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties != nil {
+ objectMap["properties"] = vmssupiac.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetUpdatePublicIPAddressConfiguration struct.
+func (vmssupiac *VirtualMachineScaleSetUpdatePublicIPAddressConfiguration) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vmssupiac.Name = &name
+ }
+ case "properties":
+ if v != nil {
+ var virtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties
+ err = json.Unmarshal(*v, &virtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties)
+ if err != nil {
+ return err
+ }
+ vmssupiac.VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties = &virtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties describes a virtual machines scale
+// set IP Configuration's PublicIPAddress configuration
+type VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties struct {
+ // IdleTimeoutInMinutes - The idle timeout of the public IP address.
+ IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
+ // DNSSettings - The dns settings to be applied on the publicIP addresses .
+ DNSSettings *VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings `json:"dnsSettings,omitempty"`
+ // DeleteOption - Specify what happens to the public IP when the VM is deleted. Possible values include: 'DeleteOptionsDelete', 'DeleteOptionsDetach'
+ DeleteOption DeleteOptions `json:"deleteOption,omitempty"`
+}
+
+// VirtualMachineScaleSetUpdateStorageProfile describes a virtual machine scale set storage profile.
+type VirtualMachineScaleSetUpdateStorageProfile struct {
+ // ImageReference - The image reference.
+ ImageReference *ImageReference `json:"imageReference,omitempty"`
+ // OsDisk - The OS disk.
+ OsDisk *VirtualMachineScaleSetUpdateOSDisk `json:"osDisk,omitempty"`
+ // DataDisks - The data disks.
+ DataDisks *[]VirtualMachineScaleSetDataDisk `json:"dataDisks,omitempty"`
+}
+
+// VirtualMachineScaleSetUpdateVMProfile describes a virtual machine scale set virtual machine profile.
+type VirtualMachineScaleSetUpdateVMProfile struct {
+ // OsProfile - The virtual machine scale set OS profile.
+ OsProfile *VirtualMachineScaleSetUpdateOSProfile `json:"osProfile,omitempty"`
+ // StorageProfile - The virtual machine scale set storage profile.
+ StorageProfile *VirtualMachineScaleSetUpdateStorageProfile `json:"storageProfile,omitempty"`
+ // NetworkProfile - The virtual machine scale set network profile.
+ NetworkProfile *VirtualMachineScaleSetUpdateNetworkProfile `json:"networkProfile,omitempty"`
+ // SecurityProfile - The virtual machine scale set Security profile
+ SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"`
+ // DiagnosticsProfile - The virtual machine scale set diagnostics profile.
+ DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
+ // ExtensionProfile - The virtual machine scale set extension profile.
+ ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"`
+ // LicenseType - The license type, which is for bring your own license scenario.
+ LicenseType *string `json:"licenseType,omitempty"`
+ // BillingProfile - Specifies the billing related details of a Azure Spot VMSS.
Minimum api-version: 2019-03-01.
+ BillingProfile *BillingProfile `json:"billingProfile,omitempty"`
+ // ScheduledEventsProfile - Specifies Scheduled Event related configurations.
+ ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"`
+ // UserData - UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here.
Minimum api-version: 2021-03-01
+ UserData *string `json:"userData,omitempty"`
+}
+
+// VirtualMachineScaleSetVM describes a virtual machine scale set virtual machine.
+type VirtualMachineScaleSetVM struct {
+ autorest.Response `json:"-"`
+ // InstanceID - READ-ONLY; The virtual machine instance ID.
+ InstanceID *string `json:"instanceId,omitempty"`
+ // Sku - READ-ONLY; The virtual machine SKU.
+ Sku *Sku `json:"sku,omitempty"`
+ *VirtualMachineScaleSetVMProperties `json:"properties,omitempty"`
+ // Plan - Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.
+ Plan *Plan `json:"plan,omitempty"`
+ // Resources - READ-ONLY; The virtual machine child extension resources.
+ Resources *[]VirtualMachineExtension `json:"resources,omitempty"`
+ // Zones - READ-ONLY; The virtual machine zones.
+ Zones *[]string `json:"zones,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVM.
+func (vmssv VirtualMachineScaleSetVM) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmssv.VirtualMachineScaleSetVMProperties != nil {
+ objectMap["properties"] = vmssv.VirtualMachineScaleSetVMProperties
+ }
+ if vmssv.Plan != nil {
+ objectMap["plan"] = vmssv.Plan
+ }
+ if vmssv.Location != nil {
+ objectMap["location"] = vmssv.Location
+ }
+ if vmssv.Tags != nil {
+ objectMap["tags"] = vmssv.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetVM struct.
+func (vmssv *VirtualMachineScaleSetVM) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "instanceId":
+ if v != nil {
+ var instanceID string
+ err = json.Unmarshal(*v, &instanceID)
+ if err != nil {
+ return err
+ }
+ vmssv.InstanceID = &instanceID
+ }
+ case "sku":
+ if v != nil {
+ var sku Sku
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ vmssv.Sku = &sku
+ }
+ case "properties":
+ if v != nil {
+ var virtualMachineScaleSetVMProperties VirtualMachineScaleSetVMProperties
+ err = json.Unmarshal(*v, &virtualMachineScaleSetVMProperties)
+ if err != nil {
+ return err
+ }
+ vmssv.VirtualMachineScaleSetVMProperties = &virtualMachineScaleSetVMProperties
+ }
+ case "plan":
+ if v != nil {
+ var plan Plan
+ err = json.Unmarshal(*v, &plan)
+ if err != nil {
+ return err
+ }
+ vmssv.Plan = &plan
+ }
+ case "resources":
+ if v != nil {
+ var resources []VirtualMachineExtension
+ err = json.Unmarshal(*v, &resources)
+ if err != nil {
+ return err
+ }
+ vmssv.Resources = &resources
+ }
+ case "zones":
+ if v != nil {
+ var zones []string
+ err = json.Unmarshal(*v, &zones)
+ if err != nil {
+ return err
+ }
+ vmssv.Zones = &zones
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vmssv.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vmssv.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ vmssv.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ vmssv.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ vmssv.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualMachineScaleSetVMExtension describes a VMSS VM Extension.
+type VirtualMachineScaleSetVMExtension struct {
+ autorest.Response `json:"-"`
+ // Name - READ-ONLY; The name of the extension.
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ *VirtualMachineExtensionProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMExtension.
+func (vmssve VirtualMachineScaleSetVMExtension) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmssve.VirtualMachineExtensionProperties != nil {
+ objectMap["properties"] = vmssve.VirtualMachineExtensionProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetVMExtension struct.
+func (vmssve *VirtualMachineScaleSetVMExtension) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vmssve.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ vmssve.Type = &typeVar
+ }
+ case "properties":
+ if v != nil {
+ var virtualMachineExtensionProperties VirtualMachineExtensionProperties
+ err = json.Unmarshal(*v, &virtualMachineExtensionProperties)
+ if err != nil {
+ return err
+ }
+ vmssve.VirtualMachineExtensionProperties = &virtualMachineExtensionProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vmssve.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
+type VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetVMExtensionsClient) (VirtualMachineScaleSetVMExtension, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture.Result.
+func (future *VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture) result(client VirtualMachineScaleSetVMExtensionsClient) (vmssve VirtualMachineScaleSetVMExtension, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vmssve.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmssve.Response.Response, err = future.GetResult(sender); err == nil && vmssve.Response.Response.StatusCode != http.StatusNoContent {
+ vmssve, err = client.CreateOrUpdateResponder(vmssve.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture", "Result", vmssve.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualMachineScaleSetVMExtensionsDeleteFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
+type VirtualMachineScaleSetVMExtensionsDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetVMExtensionsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetVMExtensionsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetVMExtensionsDeleteFuture.Result.
+func (future *VirtualMachineScaleSetVMExtensionsDeleteFuture) result(client VirtualMachineScaleSetVMExtensionsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMExtensionsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachineScaleSetVMExtensionsListResult the List VMSS VM Extension operation response
+type VirtualMachineScaleSetVMExtensionsListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of VMSS VM extensions
+ Value *[]VirtualMachineScaleSetVMExtension `json:"value,omitempty"`
+}
+
+// VirtualMachineScaleSetVMExtensionsSummary extensions summary for virtual machines of a virtual machine
+// scale set.
+type VirtualMachineScaleSetVMExtensionsSummary struct {
+ // Name - READ-ONLY; The extension name.
+ Name *string `json:"name,omitempty"`
+ // StatusesSummary - READ-ONLY; The extensions information.
+ StatusesSummary *[]VirtualMachineStatusCodeCount `json:"statusesSummary,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMExtensionsSummary.
+func (vmssves VirtualMachineScaleSetVMExtensionsSummary) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// VirtualMachineScaleSetVMExtensionsUpdateFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
+type VirtualMachineScaleSetVMExtensionsUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetVMExtensionsClient) (VirtualMachineScaleSetVMExtension, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetVMExtensionsUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetVMExtensionsUpdateFuture.Result.
+func (future *VirtualMachineScaleSetVMExtensionsUpdateFuture) result(client VirtualMachineScaleSetVMExtensionsClient) (vmssve VirtualMachineScaleSetVMExtension, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vmssve.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMExtensionsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmssve.Response.Response, err = future.GetResult(sender); err == nil && vmssve.Response.Response.StatusCode != http.StatusNoContent {
+ vmssve, err = client.UpdateResponder(vmssve.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsUpdateFuture", "Result", vmssve.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualMachineScaleSetVMExtensionUpdate describes a VMSS VM Extension.
+type VirtualMachineScaleSetVMExtensionUpdate struct {
+ // Name - READ-ONLY; The name of the extension.
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ *VirtualMachineExtensionUpdateProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMExtensionUpdate.
+func (vmssveu VirtualMachineScaleSetVMExtensionUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmssveu.VirtualMachineExtensionUpdateProperties != nil {
+ objectMap["properties"] = vmssveu.VirtualMachineExtensionUpdateProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachineScaleSetVMExtensionUpdate struct.
+func (vmssveu *VirtualMachineScaleSetVMExtensionUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vmssveu.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ vmssveu.Type = &typeVar
+ }
+ case "properties":
+ if v != nil {
+ var virtualMachineExtensionUpdateProperties VirtualMachineExtensionUpdateProperties
+ err = json.Unmarshal(*v, &virtualMachineExtensionUpdateProperties)
+ if err != nil {
+ return err
+ }
+ vmssveu.VirtualMachineExtensionUpdateProperties = &virtualMachineExtensionUpdateProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vmssveu.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualMachineScaleSetVMInstanceIDs specifies a list of virtual machine instance IDs from the VM scale
+// set.
+type VirtualMachineScaleSetVMInstanceIDs struct {
+ // InstanceIds - The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
+ InstanceIds *[]string `json:"instanceIds,omitempty"`
+}
+
+// VirtualMachineScaleSetVMInstanceRequiredIDs specifies a list of virtual machine instance IDs from the VM
+// scale set.
+type VirtualMachineScaleSetVMInstanceRequiredIDs struct {
+ // InstanceIds - The virtual machine scale set instance ids.
+ InstanceIds *[]string `json:"instanceIds,omitempty"`
+}
+
+// VirtualMachineScaleSetVMInstanceView the instance view of a virtual machine scale set VM.
+type VirtualMachineScaleSetVMInstanceView struct {
+ autorest.Response `json:"-"`
+ // PlatformUpdateDomain - The Update Domain count.
+ PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty"`
+ // PlatformFaultDomain - The Fault Domain count.
+ PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"`
+ // RdpThumbPrint - The Remote desktop certificate thumbprint.
+ RdpThumbPrint *string `json:"rdpThumbPrint,omitempty"`
+ // VMAgent - The VM Agent running on the virtual machine.
+ VMAgent *VirtualMachineAgentInstanceView `json:"vmAgent,omitempty"`
+ // MaintenanceRedeployStatus - The Maintenance Operation status on the virtual machine.
+ MaintenanceRedeployStatus *MaintenanceRedeployStatus `json:"maintenanceRedeployStatus,omitempty"`
+ // Disks - The disks information.
+ Disks *[]DiskInstanceView `json:"disks,omitempty"`
+ // Extensions - The extensions information.
+ Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
+ // VMHealth - READ-ONLY; The health status for the VM.
+ VMHealth *VirtualMachineHealthStatus `json:"vmHealth,omitempty"`
+ // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
You can easily view the output of your console log.
Azure also enables you to see a screenshot of the VM from the hypervisor.
+ BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
+ // Statuses - The resource status information.
+ Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
+ // AssignedHost - READ-ONLY; Resource id of the dedicated host, on which the virtual machine is allocated through automatic placement, when the virtual machine is associated with a dedicated host group that has automatic placement enabled.
Minimum api-version: 2020-06-01.
+ AssignedHost *string `json:"assignedHost,omitempty"`
+ // PlacementGroupID - The placement group in which the VM is running. If the VM is deallocated it will not have a placementGroupId.
+ PlacementGroupID *string `json:"placementGroupId,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMInstanceView.
+func (vmssviv VirtualMachineScaleSetVMInstanceView) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmssviv.PlatformUpdateDomain != nil {
+ objectMap["platformUpdateDomain"] = vmssviv.PlatformUpdateDomain
+ }
+ if vmssviv.PlatformFaultDomain != nil {
+ objectMap["platformFaultDomain"] = vmssviv.PlatformFaultDomain
+ }
+ if vmssviv.RdpThumbPrint != nil {
+ objectMap["rdpThumbPrint"] = vmssviv.RdpThumbPrint
+ }
+ if vmssviv.VMAgent != nil {
+ objectMap["vmAgent"] = vmssviv.VMAgent
+ }
+ if vmssviv.MaintenanceRedeployStatus != nil {
+ objectMap["maintenanceRedeployStatus"] = vmssviv.MaintenanceRedeployStatus
+ }
+ if vmssviv.Disks != nil {
+ objectMap["disks"] = vmssviv.Disks
+ }
+ if vmssviv.Extensions != nil {
+ objectMap["extensions"] = vmssviv.Extensions
+ }
+ if vmssviv.BootDiagnostics != nil {
+ objectMap["bootDiagnostics"] = vmssviv.BootDiagnostics
+ }
+ if vmssviv.Statuses != nil {
+ objectMap["statuses"] = vmssviv.Statuses
+ }
+ if vmssviv.PlacementGroupID != nil {
+ objectMap["placementGroupId"] = vmssviv.PlacementGroupID
+ }
+ return json.Marshal(objectMap)
+}
+
+// VirtualMachineScaleSetVMListResult the List Virtual Machine Scale Set VMs operation response.
+type VirtualMachineScaleSetVMListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of virtual machine scale sets VMs.
+ Value *[]VirtualMachineScaleSetVM `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of Virtual Machine Scale Set VMs. Call ListNext() with this to fetch the next page of VMSS VMs
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// VirtualMachineScaleSetVMListResultIterator provides access to a complete listing of
+// VirtualMachineScaleSetVM values.
+type VirtualMachineScaleSetVMListResultIterator struct {
+ i int
+ page VirtualMachineScaleSetVMListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *VirtualMachineScaleSetVMListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *VirtualMachineScaleSetVMListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter VirtualMachineScaleSetVMListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter VirtualMachineScaleSetVMListResultIterator) Response() VirtualMachineScaleSetVMListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter VirtualMachineScaleSetVMListResultIterator) Value() VirtualMachineScaleSetVM {
+ if !iter.page.NotDone() {
+ return VirtualMachineScaleSetVM{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the VirtualMachineScaleSetVMListResultIterator type.
+func NewVirtualMachineScaleSetVMListResultIterator(page VirtualMachineScaleSetVMListResultPage) VirtualMachineScaleSetVMListResultIterator {
+ return VirtualMachineScaleSetVMListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (vmssvlr VirtualMachineScaleSetVMListResult) IsEmpty() bool {
+ return vmssvlr.Value == nil || len(*vmssvlr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (vmssvlr VirtualMachineScaleSetVMListResult) hasNextLink() bool {
+ return vmssvlr.NextLink != nil && len(*vmssvlr.NextLink) != 0
+}
+
+// virtualMachineScaleSetVMListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (vmssvlr VirtualMachineScaleSetVMListResult) virtualMachineScaleSetVMListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !vmssvlr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(vmssvlr.NextLink)))
+}
+
+// VirtualMachineScaleSetVMListResultPage contains a page of VirtualMachineScaleSetVM values.
+type VirtualMachineScaleSetVMListResultPage struct {
+ fn func(context.Context, VirtualMachineScaleSetVMListResult) (VirtualMachineScaleSetVMListResult, error)
+ vmssvlr VirtualMachineScaleSetVMListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *VirtualMachineScaleSetVMListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.vmssvlr)
+ if err != nil {
+ return err
+ }
+ page.vmssvlr = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *VirtualMachineScaleSetVMListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page VirtualMachineScaleSetVMListResultPage) NotDone() bool {
+ return !page.vmssvlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page VirtualMachineScaleSetVMListResultPage) Response() VirtualMachineScaleSetVMListResult {
+ return page.vmssvlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page VirtualMachineScaleSetVMListResultPage) Values() []VirtualMachineScaleSetVM {
+ if page.vmssvlr.IsEmpty() {
+ return nil
+ }
+ return *page.vmssvlr.Value
+}
+
+// Creates a new instance of the VirtualMachineScaleSetVMListResultPage type.
+func NewVirtualMachineScaleSetVMListResultPage(cur VirtualMachineScaleSetVMListResult, getNextPage func(context.Context, VirtualMachineScaleSetVMListResult) (VirtualMachineScaleSetVMListResult, error)) VirtualMachineScaleSetVMListResultPage {
+ return VirtualMachineScaleSetVMListResultPage{
+ fn: getNextPage,
+ vmssvlr: cur,
+ }
+}
+
+// VirtualMachineScaleSetVMNetworkProfileConfiguration describes a virtual machine scale set VM network
+// profile.
+type VirtualMachineScaleSetVMNetworkProfileConfiguration struct {
+ // NetworkInterfaceConfigurations - The list of network configurations.
+ NetworkInterfaceConfigurations *[]VirtualMachineScaleSetNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"`
+}
+
+// VirtualMachineScaleSetVMProfile describes a virtual machine scale set virtual machine profile.
+type VirtualMachineScaleSetVMProfile struct {
+ // OsProfile - Specifies the operating system settings for the virtual machines in the scale set.
+ OsProfile *VirtualMachineScaleSetOSProfile `json:"osProfile,omitempty"`
+ // StorageProfile - Specifies the storage settings for the virtual machine disks.
+ StorageProfile *VirtualMachineScaleSetStorageProfile `json:"storageProfile,omitempty"`
+ // NetworkProfile - Specifies properties of the network interfaces of the virtual machines in the scale set.
+ NetworkProfile *VirtualMachineScaleSetNetworkProfile `json:"networkProfile,omitempty"`
+ // SecurityProfile - Specifies the Security related profile settings for the virtual machines in the scale set.
+ SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"`
+ // DiagnosticsProfile - Specifies the boot diagnostic settings state.
Minimum api-version: 2015-06-15.
+ DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
+ // ExtensionProfile - Specifies a collection of settings for extensions installed on virtual machines in the scale set.
+ ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"`
+ // LicenseType - Specifies that the image or disk that is being used was licensed on-premises.
Possible values for Windows Server operating system are:
Windows_Client
Windows_Server
Possible values for Linux Server operating system are:
RHEL_BYOS (for RHEL)
SLES_BYOS (for SUSE)
For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)
[Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)
Minimum api-version: 2015-06-15
+ LicenseType *string `json:"licenseType,omitempty"`
+ // Priority - Specifies the priority for the virtual machines in the scale set.
Minimum api-version: 2017-10-30-preview. Possible values include: 'VirtualMachinePriorityTypesRegular', 'VirtualMachinePriorityTypesLow', 'VirtualMachinePriorityTypesSpot'
+ Priority VirtualMachinePriorityTypes `json:"priority,omitempty"`
+ // EvictionPolicy - Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set.
For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01.
For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview. Possible values include: 'VirtualMachineEvictionPolicyTypesDeallocate', 'VirtualMachineEvictionPolicyTypesDelete'
+ EvictionPolicy VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"`
+ // BillingProfile - Specifies the billing related details of a Azure Spot VMSS.
Minimum api-version: 2019-03-01.
+ BillingProfile *BillingProfile `json:"billingProfile,omitempty"`
+ // ScheduledEventsProfile - Specifies Scheduled Event related configurations.
+ ScheduledEventsProfile *ScheduledEventsProfile `json:"scheduledEventsProfile,omitempty"`
+ // UserData - UserData for the virtual machines in the scale set, which must be base-64 encoded. Customer should not pass any secrets in here.
Minimum api-version: 2021-03-01
+ UserData *string `json:"userData,omitempty"`
+ // CapacityReservation - Specifies the capacity reservation related details of a scale set.
Minimum api-version: 2021-04-01.
+ CapacityReservation *CapacityReservationProfile `json:"capacityReservation,omitempty"`
+ // ApplicationProfile - Specifies the gallery applications that should be made available to the VM/VMSS
+ ApplicationProfile *ApplicationProfile `json:"applicationProfile,omitempty"`
+}
+
+// VirtualMachineScaleSetVMProperties describes the properties of a virtual machine scale set virtual
+// machine.
+type VirtualMachineScaleSetVMProperties struct {
+ // LatestModelApplied - READ-ONLY; Specifies whether the latest model has been applied to the virtual machine.
+ LatestModelApplied *bool `json:"latestModelApplied,omitempty"`
+ // VMID - READ-ONLY; Azure VM unique ID.
+ VMID *string `json:"vmId,omitempty"`
+ // InstanceView - READ-ONLY; The virtual machine instance view.
+ InstanceView *VirtualMachineScaleSetVMInstanceView `json:"instanceView,omitempty"`
+ // HardwareProfile - Specifies the hardware settings for the virtual machine.
+ HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"`
+ // StorageProfile - Specifies the storage settings for the virtual machine disks.
+ StorageProfile *StorageProfile `json:"storageProfile,omitempty"`
+ // AdditionalCapabilities - Specifies additional capabilities enabled or disabled on the virtual machine in the scale set. For instance: whether the virtual machine has the capability to support attaching managed data disks with UltraSSD_LRS storage account type.
+ AdditionalCapabilities *AdditionalCapabilities `json:"additionalCapabilities,omitempty"`
+ // OsProfile - Specifies the operating system settings for the virtual machine.
+ OsProfile *OSProfile `json:"osProfile,omitempty"`
+ // SecurityProfile - Specifies the Security related profile settings for the virtual machine.
+ SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"`
+ // NetworkProfile - Specifies the network interfaces of the virtual machine.
+ NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"`
+ // NetworkProfileConfiguration - Specifies the network profile configuration of the virtual machine.
+ NetworkProfileConfiguration *VirtualMachineScaleSetVMNetworkProfileConfiguration `json:"networkProfileConfiguration,omitempty"`
+ // DiagnosticsProfile - Specifies the boot diagnostic settings state.
Minimum api-version: 2015-06-15.
+ DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
+ // AvailabilitySet - Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview).
For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates)
Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set.
+ AvailabilitySet *SubResource `json:"availabilitySet,omitempty"`
+ // ProvisioningState - READ-ONLY; The provisioning state, which only appears in the response.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // LicenseType - Specifies that the image or disk that is being used was licensed on-premises.
Possible values for Windows Server operating system are:
Windows_Client
Windows_Server
Possible values for Linux Server operating system are:
RHEL_BYOS (for RHEL)
SLES_BYOS (for SUSE)
For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing)
[Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux)
Minimum api-version: 2015-06-15
+ LicenseType *string `json:"licenseType,omitempty"`
+ // ModelDefinitionApplied - READ-ONLY; Specifies whether the model applied to the virtual machine is the model of the virtual machine scale set or the customized model for the virtual machine.
+ ModelDefinitionApplied *string `json:"modelDefinitionApplied,omitempty"`
+ // ProtectionPolicy - Specifies the protection policy of the virtual machine.
+ ProtectionPolicy *VirtualMachineScaleSetVMProtectionPolicy `json:"protectionPolicy,omitempty"`
+ // UserData - UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here.
Minimum api-version: 2021-03-01
+ UserData *string `json:"userData,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineScaleSetVMProperties.
+func (vmssvp VirtualMachineScaleSetVMProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmssvp.HardwareProfile != nil {
+ objectMap["hardwareProfile"] = vmssvp.HardwareProfile
+ }
+ if vmssvp.StorageProfile != nil {
+ objectMap["storageProfile"] = vmssvp.StorageProfile
+ }
+ if vmssvp.AdditionalCapabilities != nil {
+ objectMap["additionalCapabilities"] = vmssvp.AdditionalCapabilities
+ }
+ if vmssvp.OsProfile != nil {
+ objectMap["osProfile"] = vmssvp.OsProfile
+ }
+ if vmssvp.SecurityProfile != nil {
+ objectMap["securityProfile"] = vmssvp.SecurityProfile
+ }
+ if vmssvp.NetworkProfile != nil {
+ objectMap["networkProfile"] = vmssvp.NetworkProfile
+ }
+ if vmssvp.NetworkProfileConfiguration != nil {
+ objectMap["networkProfileConfiguration"] = vmssvp.NetworkProfileConfiguration
+ }
+ if vmssvp.DiagnosticsProfile != nil {
+ objectMap["diagnosticsProfile"] = vmssvp.DiagnosticsProfile
+ }
+ if vmssvp.AvailabilitySet != nil {
+ objectMap["availabilitySet"] = vmssvp.AvailabilitySet
+ }
+ if vmssvp.LicenseType != nil {
+ objectMap["licenseType"] = vmssvp.LicenseType
+ }
+ if vmssvp.ProtectionPolicy != nil {
+ objectMap["protectionPolicy"] = vmssvp.ProtectionPolicy
+ }
+ if vmssvp.UserData != nil {
+ objectMap["userData"] = vmssvp.UserData
+ }
+ return json.Marshal(objectMap)
+}
+
+// VirtualMachineScaleSetVMProtectionPolicy the protection policy of a virtual machine scale set VM.
+type VirtualMachineScaleSetVMProtectionPolicy struct {
+ // ProtectFromScaleIn - Indicates that the virtual machine scale set VM shouldn't be considered for deletion during a scale-in operation.
+ ProtectFromScaleIn *bool `json:"protectFromScaleIn,omitempty"`
+ // ProtectFromScaleSetActions - Indicates that model updates or actions (including scale-in) initiated on the virtual machine scale set should not be applied to the virtual machine scale set VM.
+ ProtectFromScaleSetActions *bool `json:"protectFromScaleSetActions,omitempty"`
+}
+
+// VirtualMachineScaleSetVMReimageParameters describes a Virtual Machine Scale Set VM Reimage Parameters.
+type VirtualMachineScaleSetVMReimageParameters struct {
+ // TempDisk - Specifies whether to reimage temp disk. Default value: false. Note: This temp disk reimage parameter is only supported for VM/VMSS with Ephemeral OS disk.
+ TempDisk *bool `json:"tempDisk,omitempty"`
+}
+
+// VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
+type VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetVMRunCommandsClient) (VirtualMachineRunCommand, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture.Result.
+func (future *VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture) result(client VirtualMachineScaleSetVMRunCommandsClient) (vmrc VirtualMachineRunCommand, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vmrc.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmrc.Response.Response, err = future.GetResult(sender); err == nil && vmrc.Response.Response.StatusCode != http.StatusNoContent {
+ vmrc, err = client.CreateOrUpdateResponder(vmrc.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture", "Result", vmrc.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualMachineScaleSetVMRunCommandsDeleteFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
+type VirtualMachineScaleSetVMRunCommandsDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetVMRunCommandsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetVMRunCommandsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetVMRunCommandsDeleteFuture.Result.
+func (future *VirtualMachineScaleSetVMRunCommandsDeleteFuture) result(client VirtualMachineScaleSetVMRunCommandsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMRunCommandsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachineScaleSetVMRunCommandsUpdateFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
+type VirtualMachineScaleSetVMRunCommandsUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetVMRunCommandsClient) (VirtualMachineRunCommand, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetVMRunCommandsUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetVMRunCommandsUpdateFuture.Result.
+func (future *VirtualMachineScaleSetVMRunCommandsUpdateFuture) result(client VirtualMachineScaleSetVMRunCommandsClient) (vmrc VirtualMachineRunCommand, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vmrc.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMRunCommandsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmrc.Response.Response, err = future.GetResult(sender); err == nil && vmrc.Response.Response.StatusCode != http.StatusNoContent {
+ vmrc, err = client.UpdateResponder(vmrc.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsUpdateFuture", "Result", vmrc.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualMachineScaleSetVMsDeallocateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualMachineScaleSetVMsDeallocateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetVMsDeallocateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetVMsDeallocateFuture.Result.
+func (future *VirtualMachineScaleSetVMsDeallocateFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeallocateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeallocateFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachineScaleSetVMsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualMachineScaleSetVMsDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetVMsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetVMsDeleteFuture.Result.
+func (future *VirtualMachineScaleSetVMsDeleteFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachineScaleSetVMsPerformMaintenanceFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
+type VirtualMachineScaleSetVMsPerformMaintenanceFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetVMsPerformMaintenanceFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetVMsPerformMaintenanceFuture.Result.
+func (future *VirtualMachineScaleSetVMsPerformMaintenanceFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPerformMaintenanceFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachineScaleSetVMsPowerOffFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualMachineScaleSetVMsPowerOffFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetVMsPowerOffFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetVMsPowerOffFuture.Result.
+func (future *VirtualMachineScaleSetVMsPowerOffFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsPowerOffFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsPowerOffFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachineScaleSetVMsRedeployFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualMachineScaleSetVMsRedeployFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetVMsRedeployFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetVMsRedeployFuture.Result.
+func (future *VirtualMachineScaleSetVMsRedeployFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRedeployFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRedeployFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachineScaleSetVMsReimageAllFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualMachineScaleSetVMsReimageAllFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetVMsReimageAllFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetVMsReimageAllFuture.Result.
+func (future *VirtualMachineScaleSetVMsReimageAllFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageAllFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageAllFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachineScaleSetVMsReimageFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualMachineScaleSetVMsReimageFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetVMsReimageFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetVMsReimageFuture.Result.
+func (future *VirtualMachineScaleSetVMsReimageFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsReimageFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsReimageFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachineScaleSetVMsRestartFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualMachineScaleSetVMsRestartFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetVMsRestartFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetVMsRestartFuture.Result.
+func (future *VirtualMachineScaleSetVMsRestartFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRestartFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRestartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachineScaleSetVMsRunCommandFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualMachineScaleSetVMsRunCommandFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetVMsClient) (RunCommandResult, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetVMsRunCommandFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetVMsRunCommandFuture.Result.
+func (future *VirtualMachineScaleSetVMsRunCommandFuture) result(client VirtualMachineScaleSetVMsClient) (rcr RunCommandResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRunCommandFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ rcr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsRunCommandFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rcr.Response.Response, err = future.GetResult(sender); err == nil && rcr.Response.Response.StatusCode != http.StatusNoContent {
+ rcr, err = client.RunCommandResponder(rcr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsRunCommandFuture", "Result", rcr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualMachineScaleSetVMsStartFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualMachineScaleSetVMsStartFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetVMsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetVMsStartFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetVMsStartFuture.Result.
+func (future *VirtualMachineScaleSetVMsStartFuture) result(client VirtualMachineScaleSetVMsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsStartFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsStartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachineScaleSetVMsUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualMachineScaleSetVMsUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachineScaleSetVMsClient) (VirtualMachineScaleSetVM, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachineScaleSetVMsUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachineScaleSetVMsUpdateFuture.Result.
+func (future *VirtualMachineScaleSetVMsUpdateFuture) result(client VirtualMachineScaleSetVMsClient) (vmssv VirtualMachineScaleSetVM, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vmssv.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachineScaleSetVMsUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmssv.Response.Response, err = future.GetResult(sender); err == nil && vmssv.Response.Response.StatusCode != http.StatusNoContent {
+ vmssv, err = client.UpdateResponder(vmssv.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsUpdateFuture", "Result", vmssv.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualMachinesCaptureFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type VirtualMachinesCaptureFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachinesClient) (VirtualMachineCaptureResult, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachinesCaptureFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachinesCaptureFuture.Result.
+func (future *VirtualMachinesCaptureFuture) result(client VirtualMachinesClient) (vmcr VirtualMachineCaptureResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vmcr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCaptureFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmcr.Response.Response, err = future.GetResult(sender); err == nil && vmcr.Response.Response.StatusCode != http.StatusNoContent {
+ vmcr, err = client.CaptureResponder(vmcr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCaptureFuture", "Result", vmcr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualMachinesConvertToManagedDisksFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualMachinesConvertToManagedDisksFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachinesClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachinesConvertToManagedDisksFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachinesConvertToManagedDisksFuture.Result.
+func (future *VirtualMachinesConvertToManagedDisksFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesConvertToManagedDisksFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesConvertToManagedDisksFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachinesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualMachinesCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachinesClient) (VirtualMachine, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachinesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachinesCreateOrUpdateFuture.Result.
+func (future *VirtualMachinesCreateOrUpdateFuture) result(client VirtualMachinesClient) (VM VirtualMachine, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ VM.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if VM.Response.Response, err = future.GetResult(sender); err == nil && VM.Response.Response.StatusCode != http.StatusNoContent {
+ VM, err = client.CreateOrUpdateResponder(VM.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesCreateOrUpdateFuture", "Result", VM.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualMachinesDeallocateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualMachinesDeallocateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachinesClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachinesDeallocateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachinesDeallocateFuture.Result.
+func (future *VirtualMachinesDeallocateFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeallocateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeallocateFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachinesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type VirtualMachinesDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachinesClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachinesDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachinesDeleteFuture.Result.
+func (future *VirtualMachinesDeleteFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachinesInstallPatchesFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualMachinesInstallPatchesFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachinesClient) (VirtualMachineInstallPatchesResult, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachinesInstallPatchesFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachinesInstallPatchesFuture.Result.
+func (future *VirtualMachinesInstallPatchesFuture) result(client VirtualMachinesClient) (vmipr VirtualMachineInstallPatchesResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesInstallPatchesFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ vmipr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesInstallPatchesFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vmipr.Response.Response, err = future.GetResult(sender); err == nil && vmipr.Response.Response.StatusCode != http.StatusNoContent {
+ vmipr, err = client.InstallPatchesResponder(vmipr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesInstallPatchesFuture", "Result", vmipr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualMachineSize describes the properties of a VM size.
+type VirtualMachineSize struct {
+ // Name - The name of the virtual machine size.
+ Name *string `json:"name,omitempty"`
+ // NumberOfCores - The number of cores supported by the virtual machine size. For Constrained vCPU capable VM sizes, this number represents the total vCPUs of quota that the VM uses. For accurate vCPU count, please refer to https://docs.microsoft.com/azure/virtual-machines/constrained-vcpu or https://docs.microsoft.com/rest/api/compute/resourceskus/list
+ NumberOfCores *int32 `json:"numberOfCores,omitempty"`
+ // OsDiskSizeInMB - The OS disk size, in MB, allowed by the virtual machine size.
+ OsDiskSizeInMB *int32 `json:"osDiskSizeInMB,omitempty"`
+ // ResourceDiskSizeInMB - The resource disk size, in MB, allowed by the virtual machine size.
+ ResourceDiskSizeInMB *int32 `json:"resourceDiskSizeInMB,omitempty"`
+ // MemoryInMB - The amount of memory, in MB, supported by the virtual machine size.
+ MemoryInMB *int32 `json:"memoryInMB,omitempty"`
+ // MaxDataDiskCount - The maximum number of data disks that can be attached to the virtual machine size.
+ MaxDataDiskCount *int32 `json:"maxDataDiskCount,omitempty"`
+}
+
+// VirtualMachineSizeListResult the List Virtual Machine operation response.
+type VirtualMachineSizeListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of virtual machine sizes.
+ Value *[]VirtualMachineSize `json:"value,omitempty"`
+}
+
+// VirtualMachineSoftwarePatchProperties describes the properties of a Virtual Machine software patch.
+type VirtualMachineSoftwarePatchProperties struct {
+ // PatchID - READ-ONLY; A unique identifier for the patch.
+ PatchID *string `json:"patchId,omitempty"`
+ // Name - READ-ONLY; The friendly name of the patch.
+ Name *string `json:"name,omitempty"`
+ // Version - READ-ONLY; The version number of the patch. This property applies only to Linux patches.
+ Version *string `json:"version,omitempty"`
+ // KbID - READ-ONLY; The KBID of the patch. Only applies to Windows patches.
+ KbID *string `json:"kbId,omitempty"`
+ // Classifications - READ-ONLY; The classification(s) of the patch as provided by the patch publisher.
+ Classifications *[]string `json:"classifications,omitempty"`
+ // RebootBehavior - READ-ONLY; Describes the reboot requirements of the patch. Possible values include: 'VMGuestPatchRebootBehaviorUnknown', 'VMGuestPatchRebootBehaviorNeverReboots', 'VMGuestPatchRebootBehaviorAlwaysRequiresReboot', 'VMGuestPatchRebootBehaviorCanRequestReboot'
+ RebootBehavior VMGuestPatchRebootBehavior `json:"rebootBehavior,omitempty"`
+ // ActivityID - READ-ONLY; The activity ID of the operation that produced this result. It is used to correlate across CRP and extension logs.
+ ActivityID *string `json:"activityId,omitempty"`
+ // PublishedDate - READ-ONLY; The UTC timestamp when the repository published this patch.
+ PublishedDate *date.Time `json:"publishedDate,omitempty"`
+ // LastModifiedDateTime - READ-ONLY; The UTC timestamp of the last update to this patch record.
+ LastModifiedDateTime *date.Time `json:"lastModifiedDateTime,omitempty"`
+ // AssessmentState - READ-ONLY; Describes the availability of a given patch. Possible values include: 'PatchAssessmentStateUnknown', 'PatchAssessmentStateAvailable'
+ AssessmentState PatchAssessmentState `json:"assessmentState,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineSoftwarePatchProperties.
+func (vmspp VirtualMachineSoftwarePatchProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// VirtualMachinesPerformMaintenanceFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualMachinesPerformMaintenanceFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachinesClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachinesPerformMaintenanceFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachinesPerformMaintenanceFuture.Result.
+func (future *VirtualMachinesPerformMaintenanceFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPerformMaintenanceFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPerformMaintenanceFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachinesPowerOffFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type VirtualMachinesPowerOffFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachinesClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachinesPowerOffFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachinesPowerOffFuture.Result.
+func (future *VirtualMachinesPowerOffFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesPowerOffFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesPowerOffFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachinesReapplyFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type VirtualMachinesReapplyFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachinesClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachinesReapplyFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachinesReapplyFuture.Result.
+func (future *VirtualMachinesReapplyFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesReapplyFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesReapplyFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachinesRedeployFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type VirtualMachinesRedeployFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachinesClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachinesRedeployFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachinesRedeployFuture.Result.
+func (future *VirtualMachinesRedeployFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRedeployFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRedeployFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachinesReimageFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type VirtualMachinesReimageFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachinesClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachinesReimageFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachinesReimageFuture.Result.
+func (future *VirtualMachinesReimageFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesReimageFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesReimageFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachinesRestartFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type VirtualMachinesRestartFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachinesClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachinesRestartFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachinesRestartFuture.Result.
+func (future *VirtualMachinesRestartFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRestartFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRestartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachinesRunCommandFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualMachinesRunCommandFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachinesClient) (RunCommandResult, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachinesRunCommandFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachinesRunCommandFuture.Result.
+func (future *VirtualMachinesRunCommandFuture) result(client VirtualMachinesClient) (rcr RunCommandResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRunCommandFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ rcr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesRunCommandFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rcr.Response.Response, err = future.GetResult(sender); err == nil && rcr.Response.Response.StatusCode != http.StatusNoContent {
+ rcr, err = client.RunCommandResponder(rcr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesRunCommandFuture", "Result", rcr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualMachinesStartFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type VirtualMachinesStartFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachinesClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachinesStartFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachinesStartFuture.Result.
+func (future *VirtualMachinesStartFuture) result(client VirtualMachinesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesStartFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesStartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// VirtualMachineStatusCodeCount the status code and count of the virtual machine scale set instance view
+// status summary.
+type VirtualMachineStatusCodeCount struct {
+ // Code - READ-ONLY; The instance view status code.
+ Code *string `json:"code,omitempty"`
+ // Count - READ-ONLY; The number of instances having a particular status code.
+ Count *int32 `json:"count,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineStatusCodeCount.
+func (vmscc VirtualMachineStatusCodeCount) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// VirtualMachinesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type VirtualMachinesUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(VirtualMachinesClient) (VirtualMachine, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *VirtualMachinesUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for VirtualMachinesUpdateFuture.Result.
+func (future *VirtualMachinesUpdateFuture) result(client VirtualMachinesClient) (VM VirtualMachine, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ VM.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if VM.Response.Response, err = future.GetResult(sender); err == nil && VM.Response.Response.StatusCode != http.StatusNoContent {
+ VM, err = client.UpdateResponder(VM.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesUpdateFuture", "Result", VM.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualMachineUpdate describes a Virtual Machine Update.
+type VirtualMachineUpdate struct {
+ // Plan - Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.
+ Plan *Plan `json:"plan,omitempty"`
+ *VirtualMachineProperties `json:"properties,omitempty"`
+ // Identity - The identity of the virtual machine, if configured.
+ Identity *VirtualMachineIdentity `json:"identity,omitempty"`
+ // Zones - The virtual machine zones.
+ Zones *[]string `json:"zones,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualMachineUpdate.
+func (vmu VirtualMachineUpdate) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vmu.Plan != nil {
+ objectMap["plan"] = vmu.Plan
+ }
+ if vmu.VirtualMachineProperties != nil {
+ objectMap["properties"] = vmu.VirtualMachineProperties
+ }
+ if vmu.Identity != nil {
+ objectMap["identity"] = vmu.Identity
+ }
+ if vmu.Zones != nil {
+ objectMap["zones"] = vmu.Zones
+ }
+ if vmu.Tags != nil {
+ objectMap["tags"] = vmu.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualMachineUpdate struct.
+func (vmu *VirtualMachineUpdate) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "plan":
+ if v != nil {
+ var plan Plan
+ err = json.Unmarshal(*v, &plan)
+ if err != nil {
+ return err
+ }
+ vmu.Plan = &plan
+ }
+ case "properties":
+ if v != nil {
+ var virtualMachineProperties VirtualMachineProperties
+ err = json.Unmarshal(*v, &virtualMachineProperties)
+ if err != nil {
+ return err
+ }
+ vmu.VirtualMachineProperties = &virtualMachineProperties
+ }
+ case "identity":
+ if v != nil {
+ var identity VirtualMachineIdentity
+ err = json.Unmarshal(*v, &identity)
+ if err != nil {
+ return err
+ }
+ vmu.Identity = &identity
+ }
+ case "zones":
+ if v != nil {
+ var zones []string
+ err = json.Unmarshal(*v, &zones)
+ if err != nil {
+ return err
+ }
+ vmu.Zones = &zones
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ vmu.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// VMGalleryApplication specifies the required information to reference a compute gallery application
+// version
+type VMGalleryApplication struct {
+ // Tags - Optional, Specifies a passthrough value for more generic context.
+ Tags *string `json:"tags,omitempty"`
+ // Order - Optional, Specifies the order in which the packages have to be installed
+ Order *int32 `json:"order,omitempty"`
+ // PackageReferenceID - Specifies the GalleryApplicationVersion resource id on the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version}
+ PackageReferenceID *string `json:"packageReferenceId,omitempty"`
+ // ConfigurationReference - Optional, Specifies the uri to an azure blob that will replace the default configuration for the package if provided
+ ConfigurationReference *string `json:"configurationReference,omitempty"`
+}
+
+// VMScaleSetConvertToSinglePlacementGroupInput ...
+type VMScaleSetConvertToSinglePlacementGroupInput struct {
+ // ActivePlacementGroupID - Id of the placement group in which you want future virtual machine instances to be placed. To query placement group Id, please use Virtual Machine Scale Set VMs - Get API. If not provided, the platform will choose one with maximum number of virtual machine instances.
+ ActivePlacementGroupID *string `json:"activePlacementGroupId,omitempty"`
+}
+
+// VMSizeProperties specifies VM Size Property settings on the virtual machine.
+type VMSizeProperties struct {
+ // VCPUsAvailable - Specifies the number of vCPUs available for the VM.
When this property is not specified in the request body the default behavior is to set it to the value of vCPUs available for that VM size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list) .
+ VCPUsAvailable *int32 `json:"vCPUsAvailable,omitempty"`
+ // VCPUsPerCore - Specifies the vCPU to physical core ratio.
When this property is not specified in the request body the default behavior is set to the value of vCPUsPerCore for the VM Size exposed in api response of [List all available virtual machine sizes in a region](https://docs.microsoft.com/en-us/rest/api/compute/resource-skus/list)
Setting this property to 1 also means that hyper-threading is disabled.
+ VCPUsPerCore *int32 `json:"vCPUsPerCore,omitempty"`
+}
+
+// WindowsConfiguration specifies Windows operating system settings on the virtual machine.
+type WindowsConfiguration struct {
+ // ProvisionVMAgent - Indicates whether virtual machine agent should be provisioned on the virtual machine.
When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later.
+ ProvisionVMAgent *bool `json:"provisionVMAgent,omitempty"`
+ // EnableAutomaticUpdates - Indicates whether Automatic Updates is enabled for the Windows virtual machine. Default value is true.
For virtual machine scale sets, this property can be updated and updates will take effect on OS reprovisioning.
+ EnableAutomaticUpdates *bool `json:"enableAutomaticUpdates,omitempty"`
+ // TimeZone - Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time".
Possible values can be [TimeZoneInfo.Id](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.id?#System_TimeZoneInfo_Id) value from time zones returned by [TimeZoneInfo.GetSystemTimeZones](https://docs.microsoft.com/dotnet/api/system.timezoneinfo.getsystemtimezones).
+ TimeZone *string `json:"timeZone,omitempty"`
+ // AdditionalUnattendContent - Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup.
+ AdditionalUnattendContent *[]AdditionalUnattendContent `json:"additionalUnattendContent,omitempty"`
+ // PatchSettings - [Preview Feature] Specifies settings related to VM Guest Patching on Windows.
+ PatchSettings *PatchSettings `json:"patchSettings,omitempty"`
+ // WinRM - Specifies the Windows Remote Management listeners. This enables remote Windows PowerShell.
+ WinRM *WinRMConfiguration `json:"winRM,omitempty"`
+}
+
+// WindowsParameters input for InstallPatches on a Windows VM, as directly received by the API
+type WindowsParameters struct {
+ // ClassificationsToInclude - The update classifications to select when installing patches for Windows.
+ ClassificationsToInclude *[]VMGuestPatchClassificationWindows `json:"classificationsToInclude,omitempty"`
+ // KbNumbersToInclude - Kbs to include in the patch operation
+ KbNumbersToInclude *[]string `json:"kbNumbersToInclude,omitempty"`
+ // KbNumbersToExclude - Kbs to exclude in the patch operation
+ KbNumbersToExclude *[]string `json:"kbNumbersToExclude,omitempty"`
+ // ExcludeKbsRequiringReboot - Filters out Kbs that don't have an InstallationRebootBehavior of 'NeverReboots' when this is set to true.
+ ExcludeKbsRequiringReboot *bool `json:"excludeKbsRequiringReboot,omitempty"`
+ // MaxPatchPublishDate - This is used to install patches that were published on or before this given max published date.
+ MaxPatchPublishDate *date.Time `json:"maxPatchPublishDate,omitempty"`
+}
+
+// WinRMConfiguration describes Windows Remote Management configuration of the VM
+type WinRMConfiguration struct {
+ // Listeners - The list of Windows Remote Management listeners
+ Listeners *[]WinRMListener `json:"listeners,omitempty"`
+}
+
+// WinRMListener describes Protocol and thumbprint of Windows Remote Management listener
+type WinRMListener struct {
+ // Protocol - Specifies the protocol of WinRM listener.
Possible values are:
**http**
**https**. Possible values include: 'ProtocolTypesHTTP', 'ProtocolTypesHTTPS'
+ Protocol ProtocolTypes `json:"protocol,omitempty"`
+ // CertificateURL - This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8:
{
"data":"",
"dataType":"pfx",
"password":""
}
To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).
+ CertificateURL *string `json:"certificateUrl,omitempty"`
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/operations.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/operations.go
new file mode 100644
index 000000000000..b76ee91bfdf0
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/operations.go
@@ -0,0 +1,98 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// OperationsClient is the compute Client
+type OperationsClient struct {
+ BaseClient
+}
+
+// NewOperationsClient creates an instance of the OperationsClient client.
+func NewOperationsClient(subscriptionID string) OperationsClient {
+ return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client using a custom endpoint. Use this
+// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient {
+ return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// List gets a list of compute operations.
+func (client OperationsClient) List(ctx context.Context) (result OperationListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.OperationsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.OperationsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.OperationsClient", "List", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.Compute/operations"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/proximityplacementgroups.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/proximityplacementgroups.go
new file mode 100644
index 000000000000..8144933b91db
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/proximityplacementgroups.go
@@ -0,0 +1,575 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// ProximityPlacementGroupsClient is the compute Client
+type ProximityPlacementGroupsClient struct {
+ BaseClient
+}
+
+// NewProximityPlacementGroupsClient creates an instance of the ProximityPlacementGroupsClient client.
+func NewProximityPlacementGroupsClient(subscriptionID string) ProximityPlacementGroupsClient {
+ return NewProximityPlacementGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewProximityPlacementGroupsClientWithBaseURI creates an instance of the ProximityPlacementGroupsClient client using
+// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign
+// clouds, Azure stack).
+func NewProximityPlacementGroupsClientWithBaseURI(baseURI string, subscriptionID string) ProximityPlacementGroupsClient {
+ return ProximityPlacementGroupsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate create or update a proximity placement group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// proximityPlacementGroupName - the name of the proximity placement group.
+// parameters - parameters supplied to the Create Proximity Placement Group operation.
+func (client ProximityPlacementGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, parameters ProximityPlacementGroup) (result ProximityPlacementGroup, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, proximityPlacementGroupName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client ProximityPlacementGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, parameters ProximityPlacementGroup) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "proximityPlacementGroupName": autorest.Encode("path", proximityPlacementGroupName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client ProximityPlacementGroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client ProximityPlacementGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result ProximityPlacementGroup, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete delete a proximity placement group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// proximityPlacementGroupName - the name of the proximity placement group.
+func (client ProximityPlacementGroupsClient) Delete(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, proximityPlacementGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Delete", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client ProximityPlacementGroupsClient) DeletePreparer(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "proximityPlacementGroupName": autorest.Encode("path", proximityPlacementGroupName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client ProximityPlacementGroupsClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client ProximityPlacementGroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get retrieves information about a proximity placement group .
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// proximityPlacementGroupName - the name of the proximity placement group.
+// includeColocationStatus - includeColocationStatus=true enables fetching the colocation status of all the
+// resources in the proximity placement group.
+func (client ProximityPlacementGroupsClient) Get(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, includeColocationStatus string) (result ProximityPlacementGroup, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, proximityPlacementGroupName, includeColocationStatus)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ProximityPlacementGroupsClient) GetPreparer(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, includeColocationStatus string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "proximityPlacementGroupName": autorest.Encode("path", proximityPlacementGroupName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(includeColocationStatus) > 0 {
+ queryParameters["includeColocationStatus"] = autorest.Encode("query", includeColocationStatus)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client ProximityPlacementGroupsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client ProximityPlacementGroupsClient) GetResponder(resp *http.Response) (result ProximityPlacementGroup, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByResourceGroup lists all proximity placement groups in a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client ProximityPlacementGroupsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ProximityPlacementGroupListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.ppglr.Response.Response != nil {
+ sc = result.ppglr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.ppglr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.ppglr, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "ListByResourceGroup", resp, "Failure responding to request")
+ return
+ }
+ if result.ppglr.hasNextLink() && result.ppglr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client ProximityPlacementGroupsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client ProximityPlacementGroupsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client ProximityPlacementGroupsClient) ListByResourceGroupResponder(resp *http.Response) (result ProximityPlacementGroupListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByResourceGroupNextResults retrieves the next set of results, if any.
+func (client ProximityPlacementGroupsClient) listByResourceGroupNextResults(ctx context.Context, lastResults ProximityPlacementGroupListResult) (result ProximityPlacementGroupListResult, err error) {
+ req, err := lastResults.proximityPlacementGroupListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ProximityPlacementGroupsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ProximityPlacementGroupListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByResourceGroup(ctx, resourceGroupName)
+ return
+}
+
+// ListBySubscription lists all proximity placement groups in a subscription.
+func (client ProximityPlacementGroupsClient) ListBySubscription(ctx context.Context) (result ProximityPlacementGroupListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.ppglr.Response.Response != nil {
+ sc = result.ppglr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listBySubscriptionNextResults
+ req, err := client.ListBySubscriptionPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "ListBySubscription", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListBySubscriptionSender(req)
+ if err != nil {
+ result.ppglr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "ListBySubscription", resp, "Failure sending request")
+ return
+ }
+
+ result.ppglr, err = client.ListBySubscriptionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "ListBySubscription", resp, "Failure responding to request")
+ return
+ }
+ if result.ppglr.hasNextLink() && result.ppglr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListBySubscriptionPreparer prepares the ListBySubscription request.
+func (client ProximityPlacementGroupsClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/proximityPlacementGroups", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListBySubscriptionSender sends the ListBySubscription request. The method will close the
+// http.Response Body if it receives an error.
+func (client ProximityPlacementGroupsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always
+// closes the http.Response Body.
+func (client ProximityPlacementGroupsClient) ListBySubscriptionResponder(resp *http.Response) (result ProximityPlacementGroupListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listBySubscriptionNextResults retrieves the next set of results, if any.
+func (client ProximityPlacementGroupsClient) listBySubscriptionNextResults(ctx context.Context, lastResults ProximityPlacementGroupListResult) (result ProximityPlacementGroupListResult, err error) {
+ req, err := lastResults.proximityPlacementGroupListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListBySubscriptionSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "listBySubscriptionNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListBySubscriptionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ProximityPlacementGroupsClient) ListBySubscriptionComplete(ctx context.Context) (result ProximityPlacementGroupListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListBySubscription(ctx)
+ return
+}
+
+// Update update a proximity placement group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// proximityPlacementGroupName - the name of the proximity placement group.
+// parameters - parameters supplied to the Update Proximity Placement Group operation.
+func (client ProximityPlacementGroupsClient) Update(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, parameters ProximityPlacementGroupUpdate) (result ProximityPlacementGroup, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProximityPlacementGroupsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, proximityPlacementGroupName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ProximityPlacementGroupsClient", "Update", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client ProximityPlacementGroupsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, proximityPlacementGroupName string, parameters ProximityPlacementGroupUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "proximityPlacementGroupName": autorest.Encode("path", proximityPlacementGroupName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/proximityPlacementGroups/{proximityPlacementGroupName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client ProximityPlacementGroupsClient) UpdateSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client ProximityPlacementGroupsClient) UpdateResponder(resp *http.Response) (result ProximityPlacementGroup, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/resourceskus.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/resourceskus.go
new file mode 100644
index 000000000000..35266973811b
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/resourceskus.go
@@ -0,0 +1,153 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// ResourceSkusClient is the compute Client
+type ResourceSkusClient struct {
+ BaseClient
+}
+
+// NewResourceSkusClient creates an instance of the ResourceSkusClient client.
+func NewResourceSkusClient(subscriptionID string) ResourceSkusClient {
+ return NewResourceSkusClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewResourceSkusClientWithBaseURI creates an instance of the ResourceSkusClient client using a custom endpoint. Use
+// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewResourceSkusClientWithBaseURI(baseURI string, subscriptionID string) ResourceSkusClient {
+ return ResourceSkusClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// List gets the list of Microsoft.Compute SKUs available for your Subscription.
+// Parameters:
+// filter - the filter to apply on the operation. Only **location** filter is supported currently.
+// includeExtendedLocations - to Include Extended Locations information or not in the response.
+func (client ResourceSkusClient) List(ctx context.Context, filter string, includeExtendedLocations string) (result ResourceSkusResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusClient.List")
+ defer func() {
+ sc := -1
+ if result.rsr.Response.Response != nil {
+ sc = result.rsr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, filter, includeExtendedLocations)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.rsr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.rsr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "List", resp, "Failure responding to request")
+ return
+ }
+ if result.rsr.hasNextLink() && result.rsr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ResourceSkusClient) ListPreparer(ctx context.Context, filter string, includeExtendedLocations string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if len(includeExtendedLocations) > 0 {
+ queryParameters["includeExtendedLocations"] = autorest.Encode("query", includeExtendedLocations)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/skus", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client ResourceSkusClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client ResourceSkusClient) ListResponder(resp *http.Response) (result ResourceSkusResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client ResourceSkusClient) listNextResults(ctx context.Context, lastResults ResourceSkusResult) (result ResourceSkusResult, err error) {
+ req, err := lastResults.resourceSkusResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ResourceSkusClient) ListComplete(ctx context.Context, filter string, includeExtendedLocations string) (result ResourceSkusResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx, filter, includeExtendedLocations)
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/restorepointcollections.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/restorepointcollections.go
new file mode 100644
index 000000000000..ea9d27484cef
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/restorepointcollections.go
@@ -0,0 +1,582 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// RestorePointCollectionsClient is the compute Client
+type RestorePointCollectionsClient struct {
+ BaseClient
+}
+
+// NewRestorePointCollectionsClient creates an instance of the RestorePointCollectionsClient client.
+func NewRestorePointCollectionsClient(subscriptionID string) RestorePointCollectionsClient {
+ return NewRestorePointCollectionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewRestorePointCollectionsClientWithBaseURI creates an instance of the RestorePointCollectionsClient client using a
+// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds,
+// Azure stack).
+func NewRestorePointCollectionsClientWithBaseURI(baseURI string, subscriptionID string) RestorePointCollectionsClient {
+ return RestorePointCollectionsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate the operation to create or update the restore point collection. Please refer to
+// https://aka.ms/RestorePoints for more details. When updating a restore point collection, only tags may be modified.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// restorePointCollectionName - the name of the restore point collection.
+// parameters - parameters supplied to the Create or Update restore point collection operation.
+func (client RestorePointCollectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, restorePointCollectionName string, parameters RestorePointCollection) (result RestorePointCollection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointCollectionsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, restorePointCollectionName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client RestorePointCollectionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, restorePointCollectionName string, parameters RestorePointCollection) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "restorePointCollectionName": autorest.Encode("path", restorePointCollectionName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client RestorePointCollectionsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client RestorePointCollectionsClient) CreateOrUpdateResponder(resp *http.Response) (result RestorePointCollection, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete the operation to delete the restore point collection. This operation will also delete all the contained
+// restore points.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// restorePointCollectionName - the name of the Restore Point Collection.
+func (client RestorePointCollectionsClient) Delete(ctx context.Context, resourceGroupName string, restorePointCollectionName string) (result RestorePointCollectionsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointCollectionsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, restorePointCollectionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client RestorePointCollectionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, restorePointCollectionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "restorePointCollectionName": autorest.Encode("path", restorePointCollectionName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client RestorePointCollectionsClient) DeleteSender(req *http.Request) (future RestorePointCollectionsDeleteFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client RestorePointCollectionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get the operation to get the restore point collection.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// restorePointCollectionName - the name of the restore point collection.
+// expand - the expand expression to apply on the operation. If expand=restorePoints, server will return all
+// contained restore points in the restorePointCollection.
+func (client RestorePointCollectionsClient) Get(ctx context.Context, resourceGroupName string, restorePointCollectionName string, expand RestorePointCollectionExpandOptions) (result RestorePointCollection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointCollectionsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, restorePointCollectionName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client RestorePointCollectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, restorePointCollectionName string, expand RestorePointCollectionExpandOptions) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "restorePointCollectionName": autorest.Encode("path", restorePointCollectionName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(string(expand)) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client RestorePointCollectionsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client RestorePointCollectionsClient) GetResponder(resp *http.Response) (result RestorePointCollection, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List gets the list of restore point collections in a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client RestorePointCollectionsClient) List(ctx context.Context, resourceGroupName string) (result RestorePointCollectionListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointCollectionsClient.List")
+ defer func() {
+ sc := -1
+ if result.rpclr.Response.Response != nil {
+ sc = result.rpclr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.rpclr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.rpclr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "List", resp, "Failure responding to request")
+ return
+ }
+ if result.rpclr.hasNextLink() && result.rpclr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client RestorePointCollectionsClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client RestorePointCollectionsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client RestorePointCollectionsClient) ListResponder(resp *http.Response) (result RestorePointCollectionListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client RestorePointCollectionsClient) listNextResults(ctx context.Context, lastResults RestorePointCollectionListResult) (result RestorePointCollectionListResult, err error) {
+ req, err := lastResults.restorePointCollectionListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client RestorePointCollectionsClient) ListComplete(ctx context.Context, resourceGroupName string) (result RestorePointCollectionListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointCollectionsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx, resourceGroupName)
+ return
+}
+
+// ListAll gets the list of restore point collections in the subscription. Use nextLink property in the response to get
+// the next page of restore point collections. Do this till nextLink is not null to fetch all the restore point
+// collections.
+func (client RestorePointCollectionsClient) ListAll(ctx context.Context) (result RestorePointCollectionListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointCollectionsClient.ListAll")
+ defer func() {
+ sc := -1
+ if result.rpclr.Response.Response != nil {
+ sc = result.rpclr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listAllNextResults
+ req, err := client.ListAllPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "ListAll", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListAllSender(req)
+ if err != nil {
+ result.rpclr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "ListAll", resp, "Failure sending request")
+ return
+ }
+
+ result.rpclr, err = client.ListAllResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "ListAll", resp, "Failure responding to request")
+ return
+ }
+ if result.rpclr.hasNextLink() && result.rpclr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListAllPreparer prepares the ListAll request.
+func (client RestorePointCollectionsClient) ListAllPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/restorePointCollections", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListAllSender sends the ListAll request. The method will close the
+// http.Response Body if it receives an error.
+func (client RestorePointCollectionsClient) ListAllSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListAllResponder handles the response to the ListAll request. The method always
+// closes the http.Response Body.
+func (client RestorePointCollectionsClient) ListAllResponder(resp *http.Response) (result RestorePointCollectionListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listAllNextResults retrieves the next set of results, if any.
+func (client RestorePointCollectionsClient) listAllNextResults(ctx context.Context, lastResults RestorePointCollectionListResult) (result RestorePointCollectionListResult, err error) {
+ req, err := lastResults.restorePointCollectionListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "listAllNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListAllSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "listAllNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListAllResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "listAllNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
+func (client RestorePointCollectionsClient) ListAllComplete(ctx context.Context) (result RestorePointCollectionListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointCollectionsClient.ListAll")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListAll(ctx)
+ return
+}
+
+// Update the operation to update the restore point collection.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// restorePointCollectionName - the name of the restore point collection.
+// parameters - parameters supplied to the Update restore point collection operation.
+func (client RestorePointCollectionsClient) Update(ctx context.Context, resourceGroupName string, restorePointCollectionName string, parameters RestorePointCollectionUpdate) (result RestorePointCollection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointCollectionsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, restorePointCollectionName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.RestorePointCollectionsClient", "Update", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client RestorePointCollectionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, restorePointCollectionName string, parameters RestorePointCollectionUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "restorePointCollectionName": autorest.Encode("path", restorePointCollectionName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client RestorePointCollectionsClient) UpdateSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client RestorePointCollectionsClient) UpdateResponder(resp *http.Response) (result RestorePointCollection, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/restorepoints.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/restorepoints.go
new file mode 100644
index 000000000000..ad79c4b0eec5
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/restorepoints.go
@@ -0,0 +1,297 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// RestorePointsClient is the compute Client
+type RestorePointsClient struct {
+ BaseClient
+}
+
+// NewRestorePointsClient creates an instance of the RestorePointsClient client.
+func NewRestorePointsClient(subscriptionID string) RestorePointsClient {
+ return NewRestorePointsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewRestorePointsClientWithBaseURI creates an instance of the RestorePointsClient client using a custom endpoint.
+// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewRestorePointsClientWithBaseURI(baseURI string, subscriptionID string) RestorePointsClient {
+ return RestorePointsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Create the operation to create the restore point. Updating properties of an existing restore point is not allowed
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// restorePointCollectionName - the name of the restore point collection.
+// restorePointName - the name of the restore point.
+// parameters - parameters supplied to the Create restore point operation.
+func (client RestorePointsClient) Create(ctx context.Context, resourceGroupName string, restorePointCollectionName string, restorePointName string, parameters RestorePoint) (result RestorePointsCreateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointsClient.Create")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.RestorePointProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.RestorePointProperties.SourceMetadata", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.RestorePointProperties.SourceMetadata.StorageProfile", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.RestorePointProperties.SourceMetadata.StorageProfile.OsDisk", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.RestorePointProperties.SourceMetadata.StorageProfile.OsDisk.EncryptionSettings", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.RestorePointProperties.SourceMetadata.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.RestorePointProperties.SourceMetadata.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey.SecretURL", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.RestorePointProperties.SourceMetadata.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil},
+ }},
+ {Target: "parameters.RestorePointProperties.SourceMetadata.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.RestorePointProperties.SourceMetadata.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey.KeyURL", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.RestorePointProperties.SourceMetadata.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil},
+ }},
+ }},
+ }},
+ }},
+ }},
+ }}}}}); err != nil {
+ return result, validation.NewError("compute.RestorePointsClient", "Create", err.Error())
+ }
+
+ req, err := client.CreatePreparer(ctx, resourceGroupName, restorePointCollectionName, restorePointName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.RestorePointsClient", "Create", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.RestorePointsClient", "Create", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreatePreparer prepares the Create request.
+func (client RestorePointsClient) CreatePreparer(ctx context.Context, resourceGroupName string, restorePointCollectionName string, restorePointName string, parameters RestorePoint) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "restorePointCollectionName": autorest.Encode("path", restorePointCollectionName),
+ "restorePointName": autorest.Encode("path", restorePointName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{restorePointName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateSender sends the Create request. The method will close the
+// http.Response Body if it receives an error.
+func (client RestorePointsClient) CreateSender(req *http.Request) (future RestorePointsCreateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// CreateResponder handles the response to the Create request. The method always
+// closes the http.Response Body.
+func (client RestorePointsClient) CreateResponder(resp *http.Response) (result RestorePoint, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete the operation to delete the restore point.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// restorePointCollectionName - the name of the Restore Point Collection.
+// restorePointName - the name of the restore point.
+func (client RestorePointsClient) Delete(ctx context.Context, resourceGroupName string, restorePointCollectionName string, restorePointName string) (result RestorePointsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, restorePointCollectionName, restorePointName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.RestorePointsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.RestorePointsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client RestorePointsClient) DeletePreparer(ctx context.Context, resourceGroupName string, restorePointCollectionName string, restorePointName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "restorePointCollectionName": autorest.Encode("path", restorePointCollectionName),
+ "restorePointName": autorest.Encode("path", restorePointName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{restorePointName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client RestorePointsClient) DeleteSender(req *http.Request) (future RestorePointsDeleteFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client RestorePointsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get the operation to get the restore point.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// restorePointCollectionName - the name of the restore point collection.
+// restorePointName - the name of the restore point.
+func (client RestorePointsClient) Get(ctx context.Context, resourceGroupName string, restorePointCollectionName string, restorePointName string) (result RestorePoint, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RestorePointsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, restorePointCollectionName, restorePointName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.RestorePointsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.RestorePointsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.RestorePointsClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client RestorePointsClient) GetPreparer(ctx context.Context, resourceGroupName string, restorePointCollectionName string, restorePointName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "restorePointCollectionName": autorest.Encode("path", restorePointCollectionName),
+ "restorePointName": autorest.Encode("path", restorePointName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{restorePointName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client RestorePointsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client RestorePointsClient) GetResponder(resp *http.Response) (result RestorePoint, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/sharedgalleries.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/sharedgalleries.go
new file mode 100644
index 000000000000..261ed0770ac0
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/sharedgalleries.go
@@ -0,0 +1,227 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// SharedGalleriesClient is the compute Client
+type SharedGalleriesClient struct {
+ BaseClient
+}
+
+// NewSharedGalleriesClient creates an instance of the SharedGalleriesClient client.
+func NewSharedGalleriesClient(subscriptionID string) SharedGalleriesClient {
+ return NewSharedGalleriesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewSharedGalleriesClientWithBaseURI creates an instance of the SharedGalleriesClient client using a custom endpoint.
+// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewSharedGalleriesClientWithBaseURI(baseURI string, subscriptionID string) SharedGalleriesClient {
+ return SharedGalleriesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Get get a shared gallery by subscription id or tenant id.
+// Parameters:
+// location - resource location.
+// galleryUniqueName - the unique name of the Shared Gallery.
+func (client SharedGalleriesClient) Get(ctx context.Context, location string, galleryUniqueName string) (result SharedGallery, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SharedGalleriesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, location, galleryUniqueName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SharedGalleriesClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.SharedGalleriesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SharedGalleriesClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client SharedGalleriesClient) GetPreparer(ctx context.Context, location string, galleryUniqueName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryUniqueName": autorest.Encode("path", galleryUniqueName),
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client SharedGalleriesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client SharedGalleriesClient) GetResponder(resp *http.Response) (result SharedGallery, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List list shared galleries by subscription id or tenant id.
+// Parameters:
+// location - resource location.
+// sharedTo - the query parameter to decide what shared galleries to fetch when doing listing operations.
+func (client SharedGalleriesClient) List(ctx context.Context, location string, sharedTo SharedToValues) (result SharedGalleryListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SharedGalleriesClient.List")
+ defer func() {
+ sc := -1
+ if result.sgl.Response.Response != nil {
+ sc = result.sgl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, location, sharedTo)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SharedGalleriesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.sgl.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.SharedGalleriesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.sgl, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SharedGalleriesClient", "List", resp, "Failure responding to request")
+ return
+ }
+ if result.sgl.hasNextLink() && result.sgl.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client SharedGalleriesClient) ListPreparer(ctx context.Context, location string, sharedTo SharedToValues) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(string(sharedTo)) > 0 {
+ queryParameters["sharedTo"] = autorest.Encode("query", sharedTo)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client SharedGalleriesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client SharedGalleriesClient) ListResponder(resp *http.Response) (result SharedGalleryList, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client SharedGalleriesClient) listNextResults(ctx context.Context, lastResults SharedGalleryList) (result SharedGalleryList, err error) {
+ req, err := lastResults.sharedGalleryListPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.SharedGalleriesClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.SharedGalleriesClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SharedGalleriesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client SharedGalleriesClient) ListComplete(ctx context.Context, location string, sharedTo SharedToValues) (result SharedGalleryListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SharedGalleriesClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx, location, sharedTo)
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/sharedgalleryimages.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/sharedgalleryimages.go
new file mode 100644
index 000000000000..5378b4f89811
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/sharedgalleryimages.go
@@ -0,0 +1,233 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// SharedGalleryImagesClient is the compute Client
+type SharedGalleryImagesClient struct {
+ BaseClient
+}
+
+// NewSharedGalleryImagesClient creates an instance of the SharedGalleryImagesClient client.
+func NewSharedGalleryImagesClient(subscriptionID string) SharedGalleryImagesClient {
+ return NewSharedGalleryImagesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewSharedGalleryImagesClientWithBaseURI creates an instance of the SharedGalleryImagesClient client using a custom
+// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
+// stack).
+func NewSharedGalleryImagesClientWithBaseURI(baseURI string, subscriptionID string) SharedGalleryImagesClient {
+ return SharedGalleryImagesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Get get a shared gallery image by subscription id or tenant id.
+// Parameters:
+// location - resource location.
+// galleryUniqueName - the unique name of the Shared Gallery.
+// galleryImageName - the name of the Shared Gallery Image Definition from which the Image Versions are to be
+// listed.
+func (client SharedGalleryImagesClient) Get(ctx context.Context, location string, galleryUniqueName string, galleryImageName string) (result SharedGalleryImage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SharedGalleryImagesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, location, galleryUniqueName, galleryImageName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SharedGalleryImagesClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.SharedGalleryImagesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SharedGalleryImagesClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client SharedGalleryImagesClient) GetPreparer(ctx context.Context, location string, galleryUniqueName string, galleryImageName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryImageName": autorest.Encode("path", galleryImageName),
+ "galleryUniqueName": autorest.Encode("path", galleryUniqueName),
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images/{galleryImageName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client SharedGalleryImagesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client SharedGalleryImagesClient) GetResponder(resp *http.Response) (result SharedGalleryImage, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List list shared gallery images by subscription id or tenant id.
+// Parameters:
+// location - resource location.
+// galleryUniqueName - the unique name of the Shared Gallery.
+// sharedTo - the query parameter to decide what shared galleries to fetch when doing listing operations.
+func (client SharedGalleryImagesClient) List(ctx context.Context, location string, galleryUniqueName string, sharedTo SharedToValues) (result SharedGalleryImageListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SharedGalleryImagesClient.List")
+ defer func() {
+ sc := -1
+ if result.sgil.Response.Response != nil {
+ sc = result.sgil.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, location, galleryUniqueName, sharedTo)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SharedGalleryImagesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.sgil.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.SharedGalleryImagesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.sgil, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SharedGalleryImagesClient", "List", resp, "Failure responding to request")
+ return
+ }
+ if result.sgil.hasNextLink() && result.sgil.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client SharedGalleryImagesClient) ListPreparer(ctx context.Context, location string, galleryUniqueName string, sharedTo SharedToValues) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryUniqueName": autorest.Encode("path", galleryUniqueName),
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(string(sharedTo)) > 0 {
+ queryParameters["sharedTo"] = autorest.Encode("query", sharedTo)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client SharedGalleryImagesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client SharedGalleryImagesClient) ListResponder(resp *http.Response) (result SharedGalleryImageList, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client SharedGalleryImagesClient) listNextResults(ctx context.Context, lastResults SharedGalleryImageList) (result SharedGalleryImageList, err error) {
+ req, err := lastResults.sharedGalleryImageListPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.SharedGalleryImagesClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.SharedGalleryImagesClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SharedGalleryImagesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client SharedGalleryImagesClient) ListComplete(ctx context.Context, location string, galleryUniqueName string, sharedTo SharedToValues) (result SharedGalleryImageListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SharedGalleryImagesClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx, location, galleryUniqueName, sharedTo)
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/sharedgalleryimageversions.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/sharedgalleryimageversions.go
new file mode 100644
index 000000000000..325d3f48b3e9
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/sharedgalleryimageversions.go
@@ -0,0 +1,240 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// SharedGalleryImageVersionsClient is the compute Client
+type SharedGalleryImageVersionsClient struct {
+ BaseClient
+}
+
+// NewSharedGalleryImageVersionsClient creates an instance of the SharedGalleryImageVersionsClient client.
+func NewSharedGalleryImageVersionsClient(subscriptionID string) SharedGalleryImageVersionsClient {
+ return NewSharedGalleryImageVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewSharedGalleryImageVersionsClientWithBaseURI creates an instance of the SharedGalleryImageVersionsClient client
+// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign
+// clouds, Azure stack).
+func NewSharedGalleryImageVersionsClientWithBaseURI(baseURI string, subscriptionID string) SharedGalleryImageVersionsClient {
+ return SharedGalleryImageVersionsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Get get a shared gallery image version by subscription id or tenant id.
+// Parameters:
+// location - resource location.
+// galleryUniqueName - the unique name of the Shared Gallery.
+// galleryImageName - the name of the Shared Gallery Image Definition from which the Image Versions are to be
+// listed.
+// galleryImageVersionName - the name of the gallery image version to be created. Needs to follow semantic
+// version name pattern: The allowed characters are digit and period. Digits must be within the range of a
+// 32-bit integer. Format: ..
+func (client SharedGalleryImageVersionsClient) Get(ctx context.Context, location string, galleryUniqueName string, galleryImageName string, galleryImageVersionName string) (result SharedGalleryImageVersion, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SharedGalleryImageVersionsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, location, galleryUniqueName, galleryImageName, galleryImageVersionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SharedGalleryImageVersionsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.SharedGalleryImageVersionsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SharedGalleryImageVersionsClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client SharedGalleryImageVersionsClient) GetPreparer(ctx context.Context, location string, galleryUniqueName string, galleryImageName string, galleryImageVersionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryImageName": autorest.Encode("path", galleryImageName),
+ "galleryImageVersionName": autorest.Encode("path", galleryImageVersionName),
+ "galleryUniqueName": autorest.Encode("path", galleryUniqueName),
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images/{galleryImageName}/versions/{galleryImageVersionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client SharedGalleryImageVersionsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client SharedGalleryImageVersionsClient) GetResponder(resp *http.Response) (result SharedGalleryImageVersion, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List list shared gallery image versions by subscription id or tenant id.
+// Parameters:
+// location - resource location.
+// galleryUniqueName - the unique name of the Shared Gallery.
+// galleryImageName - the name of the Shared Gallery Image Definition from which the Image Versions are to be
+// listed.
+// sharedTo - the query parameter to decide what shared galleries to fetch when doing listing operations.
+func (client SharedGalleryImageVersionsClient) List(ctx context.Context, location string, galleryUniqueName string, galleryImageName string, sharedTo SharedToValues) (result SharedGalleryImageVersionListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SharedGalleryImageVersionsClient.List")
+ defer func() {
+ sc := -1
+ if result.sgivl.Response.Response != nil {
+ sc = result.sgivl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, location, galleryUniqueName, galleryImageName, sharedTo)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SharedGalleryImageVersionsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.sgivl.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.SharedGalleryImageVersionsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.sgivl, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SharedGalleryImageVersionsClient", "List", resp, "Failure responding to request")
+ return
+ }
+ if result.sgivl.hasNextLink() && result.sgivl.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client SharedGalleryImageVersionsClient) ListPreparer(ctx context.Context, location string, galleryUniqueName string, galleryImageName string, sharedTo SharedToValues) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "galleryImageName": autorest.Encode("path", galleryImageName),
+ "galleryUniqueName": autorest.Encode("path", galleryUniqueName),
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(string(sharedTo)) > 0 {
+ queryParameters["sharedTo"] = autorest.Encode("query", sharedTo)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images/{galleryImageName}/versions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client SharedGalleryImageVersionsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client SharedGalleryImageVersionsClient) ListResponder(resp *http.Response) (result SharedGalleryImageVersionList, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client SharedGalleryImageVersionsClient) listNextResults(ctx context.Context, lastResults SharedGalleryImageVersionList) (result SharedGalleryImageVersionList, err error) {
+ req, err := lastResults.sharedGalleryImageVersionListPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.SharedGalleryImageVersionsClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.SharedGalleryImageVersionsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SharedGalleryImageVersionsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client SharedGalleryImageVersionsClient) ListComplete(ctx context.Context, location string, galleryUniqueName string, galleryImageName string, sharedTo SharedToValues) (result SharedGalleryImageVersionListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SharedGalleryImageVersionsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx, location, galleryUniqueName, galleryImageName, sharedTo)
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/snapshots.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/snapshots.go
new file mode 100644
index 000000000000..3590bc688f6b
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/snapshots.go
@@ -0,0 +1,778 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// SnapshotsClient is the compute Client
+type SnapshotsClient struct {
+ BaseClient
+}
+
+// NewSnapshotsClient creates an instance of the SnapshotsClient client.
+func NewSnapshotsClient(subscriptionID string) SnapshotsClient {
+ return NewSnapshotsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewSnapshotsClientWithBaseURI creates an instance of the SnapshotsClient client using a custom endpoint. Use this
+// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewSnapshotsClientWithBaseURI(baseURI string, subscriptionID string) SnapshotsClient {
+ return SnapshotsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates a snapshot.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// snapshotName - the name of the snapshot that is being created. The name can't be changed after the snapshot
+// is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80
+// characters.
+// snapshot - snapshot object supplied in the body of the Put disk operation.
+func (client SnapshotsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, snapshotName string, snapshot Snapshot) (result SnapshotsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: snapshot,
+ Constraints: []validation.Constraint{{Target: "snapshot.SnapshotProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.PurchasePlan", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.PurchasePlan.Publisher", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "snapshot.SnapshotProperties.PurchasePlan.Name", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "snapshot.SnapshotProperties.PurchasePlan.Product", Name: validation.Null, Rule: true, Chain: nil},
+ }},
+ {Target: "snapshot.SnapshotProperties.CreationData", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData.ImageReference", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData.ImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}},
+ {Target: "snapshot.SnapshotProperties.CreationData.GalleryImageReference", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.CreationData.GalleryImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}},
+ }},
+ {Target: "snapshot.SnapshotProperties.EncryptionSettingsCollection", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "snapshot.SnapshotProperties.EncryptionSettingsCollection.Enabled", Name: validation.Null, Rule: true, Chain: nil}}},
+ }}}}}); err != nil {
+ return result, validation.NewError("compute.SnapshotsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, snapshotName, snapshot)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client SnapshotsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, snapshotName string, snapshot Snapshot) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "snapshotName": autorest.Encode("path", snapshotName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ snapshot.ManagedBy = nil
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}", pathParameters),
+ autorest.WithJSON(snapshot),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client SnapshotsClient) CreateOrUpdateSender(req *http.Request) (future SnapshotsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client SnapshotsClient) CreateOrUpdateResponder(resp *http.Response) (result Snapshot, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete deletes a snapshot.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// snapshotName - the name of the snapshot that is being created. The name can't be changed after the snapshot
+// is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80
+// characters.
+func (client SnapshotsClient) Delete(ctx context.Context, resourceGroupName string, snapshotName string) (result SnapshotsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, snapshotName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client SnapshotsClient) DeletePreparer(ctx context.Context, resourceGroupName string, snapshotName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "snapshotName": autorest.Encode("path", snapshotName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client SnapshotsClient) DeleteSender(req *http.Request) (future SnapshotsDeleteFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client SnapshotsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get gets information about a snapshot.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// snapshotName - the name of the snapshot that is being created. The name can't be changed after the snapshot
+// is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80
+// characters.
+func (client SnapshotsClient) Get(ctx context.Context, resourceGroupName string, snapshotName string) (result Snapshot, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, snapshotName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client SnapshotsClient) GetPreparer(ctx context.Context, resourceGroupName string, snapshotName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "snapshotName": autorest.Encode("path", snapshotName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client SnapshotsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client SnapshotsClient) GetResponder(resp *http.Response) (result Snapshot, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GrantAccess grants access to a snapshot.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// snapshotName - the name of the snapshot that is being created. The name can't be changed after the snapshot
+// is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80
+// characters.
+// grantAccessData - access data object supplied in the body of the get snapshot access operation.
+func (client SnapshotsClient) GrantAccess(ctx context.Context, resourceGroupName string, snapshotName string, grantAccessData GrantAccessData) (result SnapshotsGrantAccessFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.GrantAccess")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: grantAccessData,
+ Constraints: []validation.Constraint{{Target: "grantAccessData.DurationInSeconds", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("compute.SnapshotsClient", "GrantAccess", err.Error())
+ }
+
+ req, err := client.GrantAccessPreparer(ctx, resourceGroupName, snapshotName, grantAccessData)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "GrantAccess", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.GrantAccessSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "GrantAccess", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// GrantAccessPreparer prepares the GrantAccess request.
+func (client SnapshotsClient) GrantAccessPreparer(ctx context.Context, resourceGroupName string, snapshotName string, grantAccessData GrantAccessData) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "snapshotName": autorest.Encode("path", snapshotName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/beginGetAccess", pathParameters),
+ autorest.WithJSON(grantAccessData),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GrantAccessSender sends the GrantAccess request. The method will close the
+// http.Response Body if it receives an error.
+func (client SnapshotsClient) GrantAccessSender(req *http.Request) (future SnapshotsGrantAccessFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// GrantAccessResponder handles the response to the GrantAccess request. The method always
+// closes the http.Response Body.
+func (client SnapshotsClient) GrantAccessResponder(resp *http.Response) (result AccessURI, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List lists snapshots under a subscription.
+func (client SnapshotsClient) List(ctx context.Context) (result SnapshotListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.List")
+ defer func() {
+ sc := -1
+ if result.sl.Response.Response != nil {
+ sc = result.sl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.sl.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.sl, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "List", resp, "Failure responding to request")
+ return
+ }
+ if result.sl.hasNextLink() && result.sl.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client SnapshotsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/snapshots", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client SnapshotsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client SnapshotsClient) ListResponder(resp *http.Response) (result SnapshotList, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client SnapshotsClient) listNextResults(ctx context.Context, lastResults SnapshotList) (result SnapshotList, err error) {
+ req, err := lastResults.snapshotListPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.SnapshotsClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.SnapshotsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client SnapshotsClient) ListComplete(ctx context.Context) (result SnapshotListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx)
+ return
+}
+
+// ListByResourceGroup lists snapshots under a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client SnapshotsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result SnapshotListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.sl.Response.Response != nil {
+ sc = result.sl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.sl.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.sl, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "ListByResourceGroup", resp, "Failure responding to request")
+ return
+ }
+ if result.sl.hasNextLink() && result.sl.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client SnapshotsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client SnapshotsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client SnapshotsClient) ListByResourceGroupResponder(resp *http.Response) (result SnapshotList, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByResourceGroupNextResults retrieves the next set of results, if any.
+func (client SnapshotsClient) listByResourceGroupNextResults(ctx context.Context, lastResults SnapshotList) (result SnapshotList, err error) {
+ req, err := lastResults.snapshotListPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.SnapshotsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.SnapshotsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client SnapshotsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result SnapshotListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByResourceGroup(ctx, resourceGroupName)
+ return
+}
+
+// RevokeAccess revokes access to a snapshot.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// snapshotName - the name of the snapshot that is being created. The name can't be changed after the snapshot
+// is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80
+// characters.
+func (client SnapshotsClient) RevokeAccess(ctx context.Context, resourceGroupName string, snapshotName string) (result SnapshotsRevokeAccessFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.RevokeAccess")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.RevokeAccessPreparer(ctx, resourceGroupName, snapshotName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "RevokeAccess", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.RevokeAccessSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "RevokeAccess", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// RevokeAccessPreparer prepares the RevokeAccess request.
+func (client SnapshotsClient) RevokeAccessPreparer(ctx context.Context, resourceGroupName string, snapshotName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "snapshotName": autorest.Encode("path", snapshotName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/endGetAccess", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RevokeAccessSender sends the RevokeAccess request. The method will close the
+// http.Response Body if it receives an error.
+func (client SnapshotsClient) RevokeAccessSender(req *http.Request) (future SnapshotsRevokeAccessFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// RevokeAccessResponder handles the response to the RevokeAccess request. The method always
+// closes the http.Response Body.
+func (client SnapshotsClient) RevokeAccessResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Update updates (patches) a snapshot.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// snapshotName - the name of the snapshot that is being created. The name can't be changed after the snapshot
+// is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The max name length is 80
+// characters.
+// snapshot - snapshot object supplied in the body of the Patch snapshot operation.
+func (client SnapshotsClient) Update(ctx context.Context, resourceGroupName string, snapshotName string, snapshot SnapshotUpdate) (result SnapshotsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.Update")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, snapshotName, snapshot)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client SnapshotsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, snapshotName string, snapshot SnapshotUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "snapshotName": autorest.Encode("path", snapshotName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-04-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}", pathParameters),
+ autorest.WithJSON(snapshot),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client SnapshotsClient) UpdateSender(req *http.Request) (future SnapshotsUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client SnapshotsClient) UpdateResponder(resp *http.Response) (result Snapshot, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/sshpublickeys.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/sshpublickeys.go
new file mode 100644
index 000000000000..896ec1f1edbf
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/sshpublickeys.go
@@ -0,0 +1,649 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// SSHPublicKeysClient is the compute Client
+type SSHPublicKeysClient struct {
+ BaseClient
+}
+
+// NewSSHPublicKeysClient creates an instance of the SSHPublicKeysClient client.
+func NewSSHPublicKeysClient(subscriptionID string) SSHPublicKeysClient {
+ return NewSSHPublicKeysClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewSSHPublicKeysClientWithBaseURI creates an instance of the SSHPublicKeysClient client using a custom endpoint.
+// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewSSHPublicKeysClientWithBaseURI(baseURI string, subscriptionID string) SSHPublicKeysClient {
+ return SSHPublicKeysClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Create creates a new SSH public key resource.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// SSHPublicKeyName - the name of the SSH public key.
+// parameters - parameters supplied to create the SSH public key.
+func (client SSHPublicKeysClient) Create(ctx context.Context, resourceGroupName string, SSHPublicKeyName string, parameters SSHPublicKeyResource) (result SSHPublicKeyResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.Create")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.CreatePreparer(ctx, resourceGroupName, SSHPublicKeyName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Create", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Create", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Create", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// CreatePreparer prepares the Create request.
+func (client SSHPublicKeysClient) CreatePreparer(ctx context.Context, resourceGroupName string, SSHPublicKeyName string, parameters SSHPublicKeyResource) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "sshPublicKeyName": autorest.Encode("path", SSHPublicKeyName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateSender sends the Create request. The method will close the
+// http.Response Body if it receives an error.
+func (client SSHPublicKeysClient) CreateSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateResponder handles the response to the Create request. The method always
+// closes the http.Response Body.
+func (client SSHPublicKeysClient) CreateResponder(resp *http.Response) (result SSHPublicKeyResource, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete delete an SSH public key.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// SSHPublicKeyName - the name of the SSH public key.
+func (client SSHPublicKeysClient) Delete(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, SSHPublicKeyName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Delete", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client SSHPublicKeysClient) DeletePreparer(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "sshPublicKeyName": autorest.Encode("path", SSHPublicKeyName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client SSHPublicKeysClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client SSHPublicKeysClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// GenerateKeyPair generates and returns a public/private key pair and populates the SSH public key resource with the
+// public key. The length of the key will be 3072 bits. This operation can only be performed once per SSH public key
+// resource.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// SSHPublicKeyName - the name of the SSH public key.
+func (client SSHPublicKeysClient) GenerateKeyPair(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (result SSHPublicKeyGenerateKeyPairResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.GenerateKeyPair")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GenerateKeyPairPreparer(ctx, resourceGroupName, SSHPublicKeyName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "GenerateKeyPair", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GenerateKeyPairSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "GenerateKeyPair", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GenerateKeyPairResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "GenerateKeyPair", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GenerateKeyPairPreparer prepares the GenerateKeyPair request.
+func (client SSHPublicKeysClient) GenerateKeyPairPreparer(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "sshPublicKeyName": autorest.Encode("path", SSHPublicKeyName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}/generateKeyPair", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GenerateKeyPairSender sends the GenerateKeyPair request. The method will close the
+// http.Response Body if it receives an error.
+func (client SSHPublicKeysClient) GenerateKeyPairSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GenerateKeyPairResponder handles the response to the GenerateKeyPair request. The method always
+// closes the http.Response Body.
+func (client SSHPublicKeysClient) GenerateKeyPairResponder(resp *http.Response) (result SSHPublicKeyGenerateKeyPairResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Get retrieves information about an SSH public key.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// SSHPublicKeyName - the name of the SSH public key.
+func (client SSHPublicKeysClient) Get(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (result SSHPublicKeyResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, SSHPublicKeyName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client SSHPublicKeysClient) GetPreparer(ctx context.Context, resourceGroupName string, SSHPublicKeyName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "sshPublicKeyName": autorest.Encode("path", SSHPublicKeyName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client SSHPublicKeysClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client SSHPublicKeysClient) GetResponder(resp *http.Response) (result SSHPublicKeyResource, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByResourceGroup lists all of the SSH public keys in the specified resource group. Use the nextLink property in
+// the response to get the next page of SSH public keys.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client SSHPublicKeysClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result SSHPublicKeysGroupListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.spkglr.Response.Response != nil {
+ sc = result.spkglr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.spkglr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.spkglr, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListByResourceGroup", resp, "Failure responding to request")
+ return
+ }
+ if result.spkglr.hasNextLink() && result.spkglr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client SSHPublicKeysClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client SSHPublicKeysClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client SSHPublicKeysClient) ListByResourceGroupResponder(resp *http.Response) (result SSHPublicKeysGroupListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByResourceGroupNextResults retrieves the next set of results, if any.
+func (client SSHPublicKeysClient) listByResourceGroupNextResults(ctx context.Context, lastResults SSHPublicKeysGroupListResult) (result SSHPublicKeysGroupListResult, err error) {
+ req, err := lastResults.sSHPublicKeysGroupListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client SSHPublicKeysClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result SSHPublicKeysGroupListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByResourceGroup(ctx, resourceGroupName)
+ return
+}
+
+// ListBySubscription lists all of the SSH public keys in the subscription. Use the nextLink property in the response
+// to get the next page of SSH public keys.
+func (client SSHPublicKeysClient) ListBySubscription(ctx context.Context) (result SSHPublicKeysGroupListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.spkglr.Response.Response != nil {
+ sc = result.spkglr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listBySubscriptionNextResults
+ req, err := client.ListBySubscriptionPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListBySubscription", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListBySubscriptionSender(req)
+ if err != nil {
+ result.spkglr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListBySubscription", resp, "Failure sending request")
+ return
+ }
+
+ result.spkglr, err = client.ListBySubscriptionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "ListBySubscription", resp, "Failure responding to request")
+ return
+ }
+ if result.spkglr.hasNextLink() && result.spkglr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListBySubscriptionPreparer prepares the ListBySubscription request.
+func (client SSHPublicKeysClient) ListBySubscriptionPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/sshPublicKeys", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListBySubscriptionSender sends the ListBySubscription request. The method will close the
+// http.Response Body if it receives an error.
+func (client SSHPublicKeysClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always
+// closes the http.Response Body.
+func (client SSHPublicKeysClient) ListBySubscriptionResponder(resp *http.Response) (result SSHPublicKeysGroupListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listBySubscriptionNextResults retrieves the next set of results, if any.
+func (client SSHPublicKeysClient) listBySubscriptionNextResults(ctx context.Context, lastResults SSHPublicKeysGroupListResult) (result SSHPublicKeysGroupListResult, err error) {
+ req, err := lastResults.sSHPublicKeysGroupListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListBySubscriptionSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listBySubscriptionNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListBySubscriptionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "listBySubscriptionNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required.
+func (client SSHPublicKeysClient) ListBySubscriptionComplete(ctx context.Context) (result SSHPublicKeysGroupListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListBySubscription(ctx)
+ return
+}
+
+// Update updates a new SSH public key resource.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// SSHPublicKeyName - the name of the SSH public key.
+// parameters - parameters supplied to update the SSH public key.
+func (client SSHPublicKeysClient) Update(ctx context.Context, resourceGroupName string, SSHPublicKeyName string, parameters SSHPublicKeyUpdateResource) (result SSHPublicKeyResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SSHPublicKeysClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, SSHPublicKeyName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.SSHPublicKeysClient", "Update", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client SSHPublicKeysClient) UpdatePreparer(ctx context.Context, resourceGroupName string, SSHPublicKeyName string, parameters SSHPublicKeyUpdateResource) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "sshPublicKeyName": autorest.Encode("path", SSHPublicKeyName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/sshPublicKeys/{sshPublicKeyName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client SSHPublicKeysClient) UpdateSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client SSHPublicKeysClient) UpdateResponder(resp *http.Response) (result SSHPublicKeyResource, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/usage.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/usage.go
new file mode 100644
index 000000000000..ab20765aebf9
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/usage.go
@@ -0,0 +1,155 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// UsageClient is the compute Client
+type UsageClient struct {
+ BaseClient
+}
+
+// NewUsageClient creates an instance of the UsageClient client.
+func NewUsageClient(subscriptionID string) UsageClient {
+ return NewUsageClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewUsageClientWithBaseURI creates an instance of the UsageClient client using a custom endpoint. Use this when
+// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewUsageClientWithBaseURI(baseURI string, subscriptionID string) UsageClient {
+ return UsageClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// List gets, for the specified location, the current compute resource usage information as well as the limits for
+// compute resources under the subscription.
+// Parameters:
+// location - the location for which resource usage is queried.
+func (client UsageClient) List(ctx context.Context, location string) (result ListUsagesResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UsageClient.List")
+ defer func() {
+ sc := -1
+ if result.lur.Response.Response != nil {
+ sc = result.lur.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: location,
+ Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("compute.UsageClient", "List", err.Error())
+ }
+
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, location)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.UsageClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.lur.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.UsageClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.lur, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.UsageClient", "List", resp, "Failure responding to request")
+ return
+ }
+ if result.lur.hasNextLink() && result.lur.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client UsageClient) ListPreparer(ctx context.Context, location string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/usages", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client UsageClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client UsageClient) ListResponder(resp *http.Response) (result ListUsagesResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client UsageClient) listNextResults(ctx context.Context, lastResults ListUsagesResult) (result ListUsagesResult, err error) {
+ req, err := lastResults.listUsagesResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.UsageClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.UsageClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.UsageClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client UsageClient) ListComplete(ctx context.Context, location string) (result ListUsagesResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UsageClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx, location)
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/version.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/version.go
new file mode 100644
index 000000000000..56cb9d0c28d7
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/version.go
@@ -0,0 +1,19 @@
+package compute
+
+import "github.com/Azure/azure-sdk-for-go/version"
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// UserAgent returns the UserAgent string to use when sending http.Requests.
+func UserAgent() string {
+ return "Azure-SDK-For-Go/" + Version() + " compute/2021-07-01"
+}
+
+// Version returns the semantic version (see http://semver.org) of the client.
+func Version() string {
+ return version.Number
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachineextensionimages.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachineextensionimages.go
new file mode 100644
index 000000000000..e359238e21cb
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachineextensionimages.go
@@ -0,0 +1,270 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// VirtualMachineExtensionImagesClient is the compute Client
+type VirtualMachineExtensionImagesClient struct {
+ BaseClient
+}
+
+// NewVirtualMachineExtensionImagesClient creates an instance of the VirtualMachineExtensionImagesClient client.
+func NewVirtualMachineExtensionImagesClient(subscriptionID string) VirtualMachineExtensionImagesClient {
+ return NewVirtualMachineExtensionImagesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewVirtualMachineExtensionImagesClientWithBaseURI creates an instance of the VirtualMachineExtensionImagesClient
+// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI
+// (sovereign clouds, Azure stack).
+func NewVirtualMachineExtensionImagesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineExtensionImagesClient {
+ return VirtualMachineExtensionImagesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Get gets a virtual machine extension image.
+// Parameters:
+// location - the name of a supported Azure region.
+func (client VirtualMachineExtensionImagesClient) Get(ctx context.Context, location string, publisherName string, typeParameter string, version string) (result VirtualMachineExtensionImage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionImagesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, location, publisherName, typeParameter, version)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client VirtualMachineExtensionImagesClient) GetPreparer(ctx context.Context, location string, publisherName string, typeParameter string, version string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "publisherName": autorest.Encode("path", publisherName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "type": autorest.Encode("path", typeParameter),
+ "version": autorest.Encode("path", version),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions/{version}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineExtensionImagesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineExtensionImagesClient) GetResponder(resp *http.Response) (result VirtualMachineExtensionImage, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListTypes gets a list of virtual machine extension image types.
+// Parameters:
+// location - the name of a supported Azure region.
+func (client VirtualMachineExtensionImagesClient) ListTypes(ctx context.Context, location string, publisherName string) (result ListVirtualMachineExtensionImage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionImagesClient.ListTypes")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListTypesPreparer(ctx, location, publisherName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "ListTypes", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListTypesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "ListTypes", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListTypesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "ListTypes", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// ListTypesPreparer prepares the ListTypes request.
+func (client VirtualMachineExtensionImagesClient) ListTypesPreparer(ctx context.Context, location string, publisherName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "publisherName": autorest.Encode("path", publisherName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListTypesSender sends the ListTypes request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineExtensionImagesClient) ListTypesSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListTypesResponder handles the response to the ListTypes request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineExtensionImagesClient) ListTypesResponder(resp *http.Response) (result ListVirtualMachineExtensionImage, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListVersions gets a list of virtual machine extension image versions.
+// Parameters:
+// location - the name of a supported Azure region.
+// filter - the filter to apply on the operation.
+func (client VirtualMachineExtensionImagesClient) ListVersions(ctx context.Context, location string, publisherName string, typeParameter string, filter string, top *int32, orderby string) (result ListVirtualMachineExtensionImage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionImagesClient.ListVersions")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListVersionsPreparer(ctx, location, publisherName, typeParameter, filter, top, orderby)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "ListVersions", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListVersionsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "ListVersions", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListVersionsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "ListVersions", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// ListVersionsPreparer prepares the ListVersions request.
+func (client VirtualMachineExtensionImagesClient) ListVersionsPreparer(ctx context.Context, location string, publisherName string, typeParameter string, filter string, top *int32, orderby string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "publisherName": autorest.Encode("path", publisherName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "type": autorest.Encode("path", typeParameter),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+ if len(orderby) > 0 {
+ queryParameters["$orderby"] = autorest.Encode("query", orderby)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListVersionsSender sends the ListVersions request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineExtensionImagesClient) ListVersionsSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListVersionsResponder handles the response to the ListVersions request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineExtensionImagesClient) ListVersionsResponder(resp *http.Response) (result ListVirtualMachineExtensionImage, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachineextensions.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachineextensions.go
new file mode 100644
index 000000000000..a73c28d02725
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachineextensions.go
@@ -0,0 +1,442 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// VirtualMachineExtensionsClient is the compute Client
+type VirtualMachineExtensionsClient struct {
+ BaseClient
+}
+
+// NewVirtualMachineExtensionsClient creates an instance of the VirtualMachineExtensionsClient client.
+func NewVirtualMachineExtensionsClient(subscriptionID string) VirtualMachineExtensionsClient {
+ return NewVirtualMachineExtensionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewVirtualMachineExtensionsClientWithBaseURI creates an instance of the VirtualMachineExtensionsClient client using
+// a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign
+// clouds, Azure stack).
+func NewVirtualMachineExtensionsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineExtensionsClient {
+ return VirtualMachineExtensionsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate the operation to create or update the extension.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine where the extension should be created or updated.
+// VMExtensionName - the name of the virtual machine extension.
+// extensionParameters - parameters supplied to the Create Virtual Machine Extension operation.
+func (client VirtualMachineExtensionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string, extensionParameters VirtualMachineExtension) (result VirtualMachineExtensionsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, VMName, VMExtensionName, extensionParameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client VirtualMachineExtensionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string, extensionParameters VirtualMachineExtension) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmExtensionName": autorest.Encode("path", VMExtensionName),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}", pathParameters),
+ autorest.WithJSON(extensionParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineExtensionsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineExtensionsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualMachineExtension, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete the operation to delete the extension.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine where the extension should be deleted.
+// VMExtensionName - the name of the virtual machine extension.
+func (client VirtualMachineExtensionsClient) Delete(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string) (result VirtualMachineExtensionsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, VMName, VMExtensionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client VirtualMachineExtensionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmExtensionName": autorest.Encode("path", VMExtensionName),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineExtensionsDeleteFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineExtensionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get the operation to get the extension.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine containing the extension.
+// VMExtensionName - the name of the virtual machine extension.
+// expand - the expand expression to apply on the operation.
+func (client VirtualMachineExtensionsClient) Get(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string, expand string) (result VirtualMachineExtension, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, VMName, VMExtensionName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client VirtualMachineExtensionsClient) GetPreparer(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string, expand string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmExtensionName": autorest.Encode("path", VMExtensionName),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(expand) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineExtensionsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineExtensionsClient) GetResponder(resp *http.Response) (result VirtualMachineExtension, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List the operation to get all extensions of a Virtual Machine.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine containing the extension.
+// expand - the expand expression to apply on the operation.
+func (client VirtualMachineExtensionsClient) List(ctx context.Context, resourceGroupName string, VMName string, expand string) (result VirtualMachineExtensionsListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListPreparer(ctx, resourceGroupName, VMName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "List", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client VirtualMachineExtensionsClient) ListPreparer(ctx context.Context, resourceGroupName string, VMName string, expand string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(expand) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineExtensionsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineExtensionsClient) ListResponder(resp *http.Response) (result VirtualMachineExtensionsListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Update the operation to update the extension.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine where the extension should be updated.
+// VMExtensionName - the name of the virtual machine extension.
+// extensionParameters - parameters supplied to the Update Virtual Machine Extension operation.
+func (client VirtualMachineExtensionsClient) Update(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string, extensionParameters VirtualMachineExtensionUpdate) (result VirtualMachineExtensionsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionsClient.Update")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, VMName, VMExtensionName, extensionParameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client VirtualMachineExtensionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string, extensionParameters VirtualMachineExtensionUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmExtensionName": autorest.Encode("path", VMExtensionName),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}", pathParameters),
+ autorest.WithJSON(extensionParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineExtensionsUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineExtensionsClient) UpdateResponder(resp *http.Response) (result VirtualMachineExtension, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachineimages.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachineimages.go
new file mode 100644
index 000000000000..95b6c52e34af
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachineimages.go
@@ -0,0 +1,432 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// VirtualMachineImagesClient is the compute Client
+type VirtualMachineImagesClient struct {
+ BaseClient
+}
+
+// NewVirtualMachineImagesClient creates an instance of the VirtualMachineImagesClient client.
+func NewVirtualMachineImagesClient(subscriptionID string) VirtualMachineImagesClient {
+ return NewVirtualMachineImagesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewVirtualMachineImagesClientWithBaseURI creates an instance of the VirtualMachineImagesClient client using a custom
+// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
+// stack).
+func NewVirtualMachineImagesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineImagesClient {
+ return VirtualMachineImagesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Get gets a virtual machine image.
+// Parameters:
+// location - the name of a supported Azure region.
+// publisherName - a valid image publisher.
+// offer - a valid image publisher offer.
+// skus - a valid image SKU.
+// version - a valid image SKU version.
+func (client VirtualMachineImagesClient) Get(ctx context.Context, location string, publisherName string, offer string, skus string, version string) (result VirtualMachineImage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineImagesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, location, publisherName, offer, skus, version)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client VirtualMachineImagesClient) GetPreparer(ctx context.Context, location string, publisherName string, offer string, skus string, version string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "offer": autorest.Encode("path", offer),
+ "publisherName": autorest.Encode("path", publisherName),
+ "skus": autorest.Encode("path", skus),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "version": autorest.Encode("path", version),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineImagesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineImagesClient) GetResponder(resp *http.Response) (result VirtualMachineImage, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List gets a list of all virtual machine image versions for the specified location, publisher, offer, and SKU.
+// Parameters:
+// location - the name of a supported Azure region.
+// publisherName - a valid image publisher.
+// offer - a valid image publisher offer.
+// skus - a valid image SKU.
+// expand - the expand expression to apply on the operation.
+func (client VirtualMachineImagesClient) List(ctx context.Context, location string, publisherName string, offer string, skus string, expand string, top *int32, orderby string) (result ListVirtualMachineImageResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineImagesClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListPreparer(ctx, location, publisherName, offer, skus, expand, top, orderby)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "List", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client VirtualMachineImagesClient) ListPreparer(ctx context.Context, location string, publisherName string, offer string, skus string, expand string, top *int32, orderby string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "offer": autorest.Encode("path", offer),
+ "publisherName": autorest.Encode("path", publisherName),
+ "skus": autorest.Encode("path", skus),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(expand) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+ if len(orderby) > 0 {
+ queryParameters["$orderby"] = autorest.Encode("query", orderby)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineImagesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineImagesClient) ListResponder(resp *http.Response) (result ListVirtualMachineImageResource, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListOffers gets a list of virtual machine image offers for the specified location and publisher.
+// Parameters:
+// location - the name of a supported Azure region.
+// publisherName - a valid image publisher.
+func (client VirtualMachineImagesClient) ListOffers(ctx context.Context, location string, publisherName string) (result ListVirtualMachineImageResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineImagesClient.ListOffers")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListOffersPreparer(ctx, location, publisherName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListOffers", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListOffersSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListOffers", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListOffersResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListOffers", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// ListOffersPreparer prepares the ListOffers request.
+func (client VirtualMachineImagesClient) ListOffersPreparer(ctx context.Context, location string, publisherName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "publisherName": autorest.Encode("path", publisherName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListOffersSender sends the ListOffers request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineImagesClient) ListOffersSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListOffersResponder handles the response to the ListOffers request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineImagesClient) ListOffersResponder(resp *http.Response) (result ListVirtualMachineImageResource, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListPublishers gets a list of virtual machine image publishers for the specified Azure location.
+// Parameters:
+// location - the name of a supported Azure region.
+func (client VirtualMachineImagesClient) ListPublishers(ctx context.Context, location string) (result ListVirtualMachineImageResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineImagesClient.ListPublishers")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListPublishersPreparer(ctx, location)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListPublishers", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListPublishersSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListPublishers", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListPublishersResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListPublishers", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// ListPublishersPreparer prepares the ListPublishers request.
+func (client VirtualMachineImagesClient) ListPublishersPreparer(ctx context.Context, location string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListPublishersSender sends the ListPublishers request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineImagesClient) ListPublishersSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListPublishersResponder handles the response to the ListPublishers request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineImagesClient) ListPublishersResponder(resp *http.Response) (result ListVirtualMachineImageResource, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListSkus gets a list of virtual machine image SKUs for the specified location, publisher, and offer.
+// Parameters:
+// location - the name of a supported Azure region.
+// publisherName - a valid image publisher.
+// offer - a valid image publisher offer.
+func (client VirtualMachineImagesClient) ListSkus(ctx context.Context, location string, publisherName string, offer string) (result ListVirtualMachineImageResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineImagesClient.ListSkus")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListSkusPreparer(ctx, location, publisherName, offer)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListSkus", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSkusSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListSkus", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListSkusResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListSkus", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// ListSkusPreparer prepares the ListSkus request.
+func (client VirtualMachineImagesClient) ListSkusPreparer(ctx context.Context, location string, publisherName string, offer string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "offer": autorest.Encode("path", offer),
+ "publisherName": autorest.Encode("path", publisherName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSkusSender sends the ListSkus request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineImagesClient) ListSkusSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListSkusResponder handles the response to the ListSkus request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineImagesClient) ListSkusResponder(resp *http.Response) (result ListVirtualMachineImageResource, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachineimagesedgezone.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachineimagesedgezone.go
new file mode 100644
index 000000000000..8fb48bf680d2
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachineimagesedgezone.go
@@ -0,0 +1,445 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// VirtualMachineImagesEdgeZoneClient is the compute Client
+type VirtualMachineImagesEdgeZoneClient struct {
+ BaseClient
+}
+
+// NewVirtualMachineImagesEdgeZoneClient creates an instance of the VirtualMachineImagesEdgeZoneClient client.
+func NewVirtualMachineImagesEdgeZoneClient(subscriptionID string) VirtualMachineImagesEdgeZoneClient {
+ return NewVirtualMachineImagesEdgeZoneClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewVirtualMachineImagesEdgeZoneClientWithBaseURI creates an instance of the VirtualMachineImagesEdgeZoneClient
+// client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI
+// (sovereign clouds, Azure stack).
+func NewVirtualMachineImagesEdgeZoneClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineImagesEdgeZoneClient {
+ return VirtualMachineImagesEdgeZoneClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Get gets a virtual machine image in an edge zone.
+// Parameters:
+// location - the name of a supported Azure region.
+// edgeZone - the name of the edge zone.
+// publisherName - a valid image publisher.
+// offer - a valid image publisher offer.
+// skus - a valid image SKU.
+// version - a valid image SKU version.
+func (client VirtualMachineImagesEdgeZoneClient) Get(ctx context.Context, location string, edgeZone string, publisherName string, offer string, skus string, version string) (result VirtualMachineImage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineImagesEdgeZoneClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, location, edgeZone, publisherName, offer, skus, version)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesEdgeZoneClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesEdgeZoneClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesEdgeZoneClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client VirtualMachineImagesEdgeZoneClient) GetPreparer(ctx context.Context, location string, edgeZone string, publisherName string, offer string, skus string, version string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "edgeZone": autorest.Encode("path", edgeZone),
+ "location": autorest.Encode("path", location),
+ "offer": autorest.Encode("path", offer),
+ "publisherName": autorest.Encode("path", publisherName),
+ "skus": autorest.Encode("path", skus),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "version": autorest.Encode("path", version),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineImagesEdgeZoneClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineImagesEdgeZoneClient) GetResponder(resp *http.Response) (result VirtualMachineImage, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List gets a list of all virtual machine image versions for the specified location, edge zone, publisher, offer, and
+// SKU.
+// Parameters:
+// location - the name of a supported Azure region.
+// edgeZone - the name of the edge zone.
+// publisherName - a valid image publisher.
+// offer - a valid image publisher offer.
+// skus - a valid image SKU.
+// expand - the expand expression to apply on the operation.
+// top - an integer value specifying the number of images to return that matches supplied values.
+// orderby - specifies the order of the results returned. Formatted as an OData query.
+func (client VirtualMachineImagesEdgeZoneClient) List(ctx context.Context, location string, edgeZone string, publisherName string, offer string, skus string, expand string, top *int32, orderby string) (result ListVirtualMachineImageResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineImagesEdgeZoneClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListPreparer(ctx, location, edgeZone, publisherName, offer, skus, expand, top, orderby)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesEdgeZoneClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesEdgeZoneClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesEdgeZoneClient", "List", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client VirtualMachineImagesEdgeZoneClient) ListPreparer(ctx context.Context, location string, edgeZone string, publisherName string, offer string, skus string, expand string, top *int32, orderby string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "edgeZone": autorest.Encode("path", edgeZone),
+ "location": autorest.Encode("path", location),
+ "offer": autorest.Encode("path", offer),
+ "publisherName": autorest.Encode("path", publisherName),
+ "skus": autorest.Encode("path", skus),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(expand) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+ if len(orderby) > 0 {
+ queryParameters["$orderby"] = autorest.Encode("query", orderby)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineImagesEdgeZoneClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineImagesEdgeZoneClient) ListResponder(resp *http.Response) (result ListVirtualMachineImageResource, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListOffers gets a list of virtual machine image offers for the specified location, edge zone and publisher.
+// Parameters:
+// location - the name of a supported Azure region.
+// edgeZone - the name of the edge zone.
+// publisherName - a valid image publisher.
+func (client VirtualMachineImagesEdgeZoneClient) ListOffers(ctx context.Context, location string, edgeZone string, publisherName string) (result ListVirtualMachineImageResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineImagesEdgeZoneClient.ListOffers")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListOffersPreparer(ctx, location, edgeZone, publisherName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesEdgeZoneClient", "ListOffers", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListOffersSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesEdgeZoneClient", "ListOffers", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListOffersResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesEdgeZoneClient", "ListOffers", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// ListOffersPreparer prepares the ListOffers request.
+func (client VirtualMachineImagesEdgeZoneClient) ListOffersPreparer(ctx context.Context, location string, edgeZone string, publisherName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "edgeZone": autorest.Encode("path", edgeZone),
+ "location": autorest.Encode("path", location),
+ "publisherName": autorest.Encode("path", publisherName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListOffersSender sends the ListOffers request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineImagesEdgeZoneClient) ListOffersSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListOffersResponder handles the response to the ListOffers request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineImagesEdgeZoneClient) ListOffersResponder(resp *http.Response) (result ListVirtualMachineImageResource, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListPublishers gets a list of virtual machine image publishers for the specified Azure location and edge zone.
+// Parameters:
+// location - the name of a supported Azure region.
+// edgeZone - the name of the edge zone.
+func (client VirtualMachineImagesEdgeZoneClient) ListPublishers(ctx context.Context, location string, edgeZone string) (result ListVirtualMachineImageResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineImagesEdgeZoneClient.ListPublishers")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListPublishersPreparer(ctx, location, edgeZone)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesEdgeZoneClient", "ListPublishers", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListPublishersSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesEdgeZoneClient", "ListPublishers", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListPublishersResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesEdgeZoneClient", "ListPublishers", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// ListPublishersPreparer prepares the ListPublishers request.
+func (client VirtualMachineImagesEdgeZoneClient) ListPublishersPreparer(ctx context.Context, location string, edgeZone string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "edgeZone": autorest.Encode("path", edgeZone),
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListPublishersSender sends the ListPublishers request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineImagesEdgeZoneClient) ListPublishersSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListPublishersResponder handles the response to the ListPublishers request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineImagesEdgeZoneClient) ListPublishersResponder(resp *http.Response) (result ListVirtualMachineImageResource, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListSkus gets a list of virtual machine image SKUs for the specified location, edge zone, publisher, and offer.
+// Parameters:
+// location - the name of a supported Azure region.
+// edgeZone - the name of the edge zone.
+// publisherName - a valid image publisher.
+// offer - a valid image publisher offer.
+func (client VirtualMachineImagesEdgeZoneClient) ListSkus(ctx context.Context, location string, edgeZone string, publisherName string, offer string) (result ListVirtualMachineImageResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineImagesEdgeZoneClient.ListSkus")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListSkusPreparer(ctx, location, edgeZone, publisherName, offer)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesEdgeZoneClient", "ListSkus", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSkusSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesEdgeZoneClient", "ListSkus", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListSkusResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesEdgeZoneClient", "ListSkus", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// ListSkusPreparer prepares the ListSkus request.
+func (client VirtualMachineImagesEdgeZoneClient) ListSkusPreparer(ctx context.Context, location string, edgeZone string, publisherName string, offer string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "edgeZone": autorest.Encode("path", edgeZone),
+ "location": autorest.Encode("path", location),
+ "offer": autorest.Encode("path", offer),
+ "publisherName": autorest.Encode("path", publisherName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSkusSender sends the ListSkus request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineImagesEdgeZoneClient) ListSkusSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListSkusResponder handles the response to the ListSkus request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineImagesEdgeZoneClient) ListSkusResponder(resp *http.Response) (result ListVirtualMachineImageResource, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result.Value),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachineruncommands.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachineruncommands.go
new file mode 100644
index 000000000000..5a2f07fafb75
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachineruncommands.go
@@ -0,0 +1,689 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// VirtualMachineRunCommandsClient is the compute Client
+type VirtualMachineRunCommandsClient struct {
+ BaseClient
+}
+
+// NewVirtualMachineRunCommandsClient creates an instance of the VirtualMachineRunCommandsClient client.
+func NewVirtualMachineRunCommandsClient(subscriptionID string) VirtualMachineRunCommandsClient {
+ return NewVirtualMachineRunCommandsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewVirtualMachineRunCommandsClientWithBaseURI creates an instance of the VirtualMachineRunCommandsClient client
+// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign
+// clouds, Azure stack).
+func NewVirtualMachineRunCommandsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineRunCommandsClient {
+ return VirtualMachineRunCommandsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate the operation to create or update the run command.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine where the run command should be created or updated.
+// runCommandName - the name of the virtual machine run command.
+// runCommand - parameters supplied to the Create Virtual Machine RunCommand operation.
+func (client VirtualMachineRunCommandsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMName string, runCommandName string, runCommand VirtualMachineRunCommand) (result VirtualMachineRunCommandsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, VMName, runCommandName, runCommand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client VirtualMachineRunCommandsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, VMName string, runCommandName string, runCommand VirtualMachineRunCommand) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "runCommandName": autorest.Encode("path", runCommandName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}", pathParameters),
+ autorest.WithJSON(runCommand),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineRunCommandsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineRunCommandsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineRunCommandsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualMachineRunCommand, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete the operation to delete the run command.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine where the run command should be deleted.
+// runCommandName - the name of the virtual machine run command.
+func (client VirtualMachineRunCommandsClient) Delete(ctx context.Context, resourceGroupName string, VMName string, runCommandName string) (result VirtualMachineRunCommandsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, VMName, runCommandName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client VirtualMachineRunCommandsClient) DeletePreparer(ctx context.Context, resourceGroupName string, VMName string, runCommandName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "runCommandName": autorest.Encode("path", runCommandName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineRunCommandsClient) DeleteSender(req *http.Request) (future VirtualMachineRunCommandsDeleteFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineRunCommandsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get gets specific run command for a subscription in a location.
+// Parameters:
+// location - the location upon which run commands is queried.
+// commandID - the command id.
+func (client VirtualMachineRunCommandsClient) Get(ctx context.Context, location string, commandID string) (result RunCommandDocument, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: location,
+ Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("compute.VirtualMachineRunCommandsClient", "Get", err.Error())
+ }
+
+ req, err := client.GetPreparer(ctx, location, commandID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client VirtualMachineRunCommandsClient) GetPreparer(ctx context.Context, location string, commandID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "commandId": autorest.Encode("path", commandID),
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands/{commandId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineRunCommandsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineRunCommandsClient) GetResponder(resp *http.Response) (result RunCommandDocument, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetByVirtualMachine the operation to get the run command.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine containing the run command.
+// runCommandName - the name of the virtual machine run command.
+// expand - the expand expression to apply on the operation.
+func (client VirtualMachineRunCommandsClient) GetByVirtualMachine(ctx context.Context, resourceGroupName string, VMName string, runCommandName string, expand string) (result VirtualMachineRunCommand, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsClient.GetByVirtualMachine")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetByVirtualMachinePreparer(ctx, resourceGroupName, VMName, runCommandName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "GetByVirtualMachine", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetByVirtualMachineSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "GetByVirtualMachine", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetByVirtualMachineResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "GetByVirtualMachine", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetByVirtualMachinePreparer prepares the GetByVirtualMachine request.
+func (client VirtualMachineRunCommandsClient) GetByVirtualMachinePreparer(ctx context.Context, resourceGroupName string, VMName string, runCommandName string, expand string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "runCommandName": autorest.Encode("path", runCommandName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(expand) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetByVirtualMachineSender sends the GetByVirtualMachine request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineRunCommandsClient) GetByVirtualMachineSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetByVirtualMachineResponder handles the response to the GetByVirtualMachine request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineRunCommandsClient) GetByVirtualMachineResponder(resp *http.Response) (result VirtualMachineRunCommand, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List lists all available run commands for a subscription in a location.
+// Parameters:
+// location - the location upon which run commands is queried.
+func (client VirtualMachineRunCommandsClient) List(ctx context.Context, location string) (result RunCommandListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsClient.List")
+ defer func() {
+ sc := -1
+ if result.rclr.Response.Response != nil {
+ sc = result.rclr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: location,
+ Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("compute.VirtualMachineRunCommandsClient", "List", err.Error())
+ }
+
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, location)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.rclr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.rclr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "List", resp, "Failure responding to request")
+ return
+ }
+ if result.rclr.hasNextLink() && result.rclr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client VirtualMachineRunCommandsClient) ListPreparer(ctx context.Context, location string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineRunCommandsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineRunCommandsClient) ListResponder(resp *http.Response) (result RunCommandListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client VirtualMachineRunCommandsClient) listNextResults(ctx context.Context, lastResults RunCommandListResult) (result RunCommandListResult, err error) {
+ req, err := lastResults.runCommandListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualMachineRunCommandsClient) ListComplete(ctx context.Context, location string) (result RunCommandListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx, location)
+ return
+}
+
+// ListByVirtualMachine the operation to get all run commands of a Virtual Machine.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine containing the run command.
+// expand - the expand expression to apply on the operation.
+func (client VirtualMachineRunCommandsClient) ListByVirtualMachine(ctx context.Context, resourceGroupName string, VMName string, expand string) (result VirtualMachineRunCommandsListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsClient.ListByVirtualMachine")
+ defer func() {
+ sc := -1
+ if result.vmrclr.Response.Response != nil {
+ sc = result.vmrclr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByVirtualMachineNextResults
+ req, err := client.ListByVirtualMachinePreparer(ctx, resourceGroupName, VMName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "ListByVirtualMachine", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByVirtualMachineSender(req)
+ if err != nil {
+ result.vmrclr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "ListByVirtualMachine", resp, "Failure sending request")
+ return
+ }
+
+ result.vmrclr, err = client.ListByVirtualMachineResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "ListByVirtualMachine", resp, "Failure responding to request")
+ return
+ }
+ if result.vmrclr.hasNextLink() && result.vmrclr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListByVirtualMachinePreparer prepares the ListByVirtualMachine request.
+func (client VirtualMachineRunCommandsClient) ListByVirtualMachinePreparer(ctx context.Context, resourceGroupName string, VMName string, expand string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(expand) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByVirtualMachineSender sends the ListByVirtualMachine request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineRunCommandsClient) ListByVirtualMachineSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByVirtualMachineResponder handles the response to the ListByVirtualMachine request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineRunCommandsClient) ListByVirtualMachineResponder(resp *http.Response) (result VirtualMachineRunCommandsListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByVirtualMachineNextResults retrieves the next set of results, if any.
+func (client VirtualMachineRunCommandsClient) listByVirtualMachineNextResults(ctx context.Context, lastResults VirtualMachineRunCommandsListResult) (result VirtualMachineRunCommandsListResult, err error) {
+ req, err := lastResults.virtualMachineRunCommandsListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "listByVirtualMachineNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByVirtualMachineSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "listByVirtualMachineNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByVirtualMachineResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "listByVirtualMachineNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByVirtualMachineComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualMachineRunCommandsClient) ListByVirtualMachineComplete(ctx context.Context, resourceGroupName string, VMName string, expand string) (result VirtualMachineRunCommandsListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsClient.ListByVirtualMachine")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByVirtualMachine(ctx, resourceGroupName, VMName, expand)
+ return
+}
+
+// Update the operation to update the run command.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine where the run command should be updated.
+// runCommandName - the name of the virtual machine run command.
+// runCommand - parameters supplied to the Update Virtual Machine RunCommand operation.
+func (client VirtualMachineRunCommandsClient) Update(ctx context.Context, resourceGroupName string, VMName string, runCommandName string, runCommand VirtualMachineRunCommandUpdate) (result VirtualMachineRunCommandsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsClient.Update")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, VMName, runCommandName, runCommand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client VirtualMachineRunCommandsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMName string, runCommandName string, runCommand VirtualMachineRunCommandUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "runCommandName": autorest.Encode("path", runCommandName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}", pathParameters),
+ autorest.WithJSON(runCommand),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineRunCommandsClient) UpdateSender(req *http.Request) (future VirtualMachineRunCommandsUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineRunCommandsClient) UpdateResponder(resp *http.Response) (result VirtualMachineRunCommand, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachines.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachines.go
new file mode 100644
index 000000000000..d1aff5e7573b
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachines.go
@@ -0,0 +1,2193 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// VirtualMachinesClient is the compute Client
+type VirtualMachinesClient struct {
+ BaseClient
+}
+
+// NewVirtualMachinesClient creates an instance of the VirtualMachinesClient client.
+func NewVirtualMachinesClient(subscriptionID string) VirtualMachinesClient {
+ return NewVirtualMachinesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewVirtualMachinesClientWithBaseURI creates an instance of the VirtualMachinesClient client using a custom endpoint.
+// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewVirtualMachinesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachinesClient {
+ return VirtualMachinesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// AssessPatches assess patches on the VM.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+func (client VirtualMachinesClient) AssessPatches(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesAssessPatchesFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.AssessPatches")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.AssessPatchesPreparer(ctx, resourceGroupName, VMName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "AssessPatches", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.AssessPatchesSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "AssessPatches", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// AssessPatchesPreparer prepares the AssessPatches request.
+func (client VirtualMachinesClient) AssessPatchesPreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/assessPatches", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// AssessPatchesSender sends the AssessPatches request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) AssessPatchesSender(req *http.Request) (future VirtualMachinesAssessPatchesFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// AssessPatchesResponder handles the response to the AssessPatches request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) AssessPatchesResponder(resp *http.Response) (result VirtualMachineAssessPatchesResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Capture captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create
+// similar VMs.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+// parameters - parameters supplied to the Capture Virtual Machine operation.
+func (client VirtualMachinesClient) Capture(ctx context.Context, resourceGroupName string, VMName string, parameters VirtualMachineCaptureParameters) (result VirtualMachinesCaptureFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Capture")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.VhdPrefix", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.DestinationContainerName", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.OverwriteVhds", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("compute.VirtualMachinesClient", "Capture", err.Error())
+ }
+
+ req, err := client.CapturePreparer(ctx, resourceGroupName, VMName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Capture", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CaptureSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Capture", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CapturePreparer prepares the Capture request.
+func (client VirtualMachinesClient) CapturePreparer(ctx context.Context, resourceGroupName string, VMName string, parameters VirtualMachineCaptureParameters) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/capture", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CaptureSender sends the Capture request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) CaptureSender(req *http.Request) (future VirtualMachinesCaptureFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// CaptureResponder handles the response to the Capture request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) CaptureResponder(resp *http.Response) (result VirtualMachineCaptureResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ConvertToManagedDisks converts virtual machine disks from blob-based to managed disks. Virtual machine must be
+// stop-deallocated before invoking this operation.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+func (client VirtualMachinesClient) ConvertToManagedDisks(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesConvertToManagedDisksFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.ConvertToManagedDisks")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ConvertToManagedDisksPreparer(ctx, resourceGroupName, VMName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ConvertToManagedDisks", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ConvertToManagedDisksSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ConvertToManagedDisks", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ConvertToManagedDisksPreparer prepares the ConvertToManagedDisks request.
+func (client VirtualMachinesClient) ConvertToManagedDisksPreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/convertToManagedDisks", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ConvertToManagedDisksSender sends the ConvertToManagedDisks request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) ConvertToManagedDisksSender(req *http.Request) (future VirtualMachinesConvertToManagedDisksFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// ConvertToManagedDisksResponder handles the response to the ConvertToManagedDisks request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) ConvertToManagedDisksResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// CreateOrUpdate the operation to create or update a virtual machine. Please note some properties can be set only
+// during virtual machine creation.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+// parameters - parameters supplied to the Create Virtual Machine operation.
+func (client VirtualMachinesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMName string, parameters VirtualMachine) (result VirtualMachinesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.VirtualMachineProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.VirtualMachineProperties.StorageProfile", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk.EncryptionSettings", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey.SecretURL", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil},
+ }},
+ {Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey.KeyURL", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.VirtualMachineProperties.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil},
+ }},
+ }},
+ }},
+ }},
+ }}}}}); err != nil {
+ return result, validation.NewError("compute.VirtualMachinesClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, VMName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client VirtualMachinesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, VMName string, parameters VirtualMachine) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ parameters.Resources = nil
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachinesCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualMachine, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Deallocate shuts down the virtual machine and releases the compute resources. You are not billed for the compute
+// resources that this virtual machine uses.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+// hibernate - optional parameter to hibernate a virtual machine. (Feature in Preview)
+func (client VirtualMachinesClient) Deallocate(ctx context.Context, resourceGroupName string, VMName string, hibernate *bool) (result VirtualMachinesDeallocateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Deallocate")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeallocatePreparer(ctx, resourceGroupName, VMName, hibernate)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Deallocate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeallocateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Deallocate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeallocatePreparer prepares the Deallocate request.
+func (client VirtualMachinesClient) DeallocatePreparer(ctx context.Context, resourceGroupName string, VMName string, hibernate *bool) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if hibernate != nil {
+ queryParameters["hibernate"] = autorest.Encode("query", *hibernate)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeallocateSender sends the Deallocate request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) DeallocateSender(req *http.Request) (future VirtualMachinesDeallocateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// DeallocateResponder handles the response to the Deallocate request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) DeallocateResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Delete the operation to delete a virtual machine.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+// forceDeletion - optional parameter to force delete virtual machines.(Feature in Preview)
+func (client VirtualMachinesClient) Delete(ctx context.Context, resourceGroupName string, VMName string, forceDeletion *bool) (result VirtualMachinesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, VMName, forceDeletion)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client VirtualMachinesClient) DeletePreparer(ctx context.Context, resourceGroupName string, VMName string, forceDeletion *bool) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if forceDeletion != nil {
+ queryParameters["forceDeletion"] = autorest.Encode("query", *forceDeletion)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) DeleteSender(req *http.Request) (future VirtualMachinesDeleteFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Generalize sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine
+// before performing this operation.
For Windows, please refer to [Create a managed image of a generalized VM in
+// Azure](https://docs.microsoft.com/azure/virtual-machines/windows/capture-image-resource).
For Linux, please refer
+// to [How to create an image of a virtual machine or
+// VHD](https://docs.microsoft.com/azure/virtual-machines/linux/capture-image).
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+func (client VirtualMachinesClient) Generalize(ctx context.Context, resourceGroupName string, VMName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Generalize")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GeneralizePreparer(ctx, resourceGroupName, VMName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Generalize", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GeneralizeSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Generalize", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GeneralizeResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Generalize", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GeneralizePreparer prepares the Generalize request.
+func (client VirtualMachinesClient) GeneralizePreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/generalize", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GeneralizeSender sends the Generalize request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) GeneralizeSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GeneralizeResponder handles the response to the Generalize request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) GeneralizeResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get retrieves information about the model view or the instance view of a virtual machine.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+// expand - the expand expression to apply on the operation. 'InstanceView' retrieves a snapshot of the runtime
+// properties of the virtual machine that is managed by the platform and can change outside of control plane
+// operations. 'UserData' retrieves the UserData property as part of the VM model view that was provided by the
+// user during the VM Create/Update operation.
+func (client VirtualMachinesClient) Get(ctx context.Context, resourceGroupName string, VMName string, expand InstanceViewTypes) (result VirtualMachine, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, VMName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client VirtualMachinesClient) GetPreparer(ctx context.Context, resourceGroupName string, VMName string, expand InstanceViewTypes) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(string(expand)) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) GetResponder(resp *http.Response) (result VirtualMachine, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// InstallPatches installs patches on the VM.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+// installPatchesInput - input for InstallPatches as directly received by the API
+func (client VirtualMachinesClient) InstallPatches(ctx context.Context, resourceGroupName string, VMName string, installPatchesInput VirtualMachineInstallPatchesParameters) (result VirtualMachinesInstallPatchesFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.InstallPatches")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.InstallPatchesPreparer(ctx, resourceGroupName, VMName, installPatchesInput)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "InstallPatches", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.InstallPatchesSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "InstallPatches", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// InstallPatchesPreparer prepares the InstallPatches request.
+func (client VirtualMachinesClient) InstallPatchesPreparer(ctx context.Context, resourceGroupName string, VMName string, installPatchesInput VirtualMachineInstallPatchesParameters) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/installPatches", pathParameters),
+ autorest.WithJSON(installPatchesInput),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// InstallPatchesSender sends the InstallPatches request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) InstallPatchesSender(req *http.Request) (future VirtualMachinesInstallPatchesFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// InstallPatchesResponder handles the response to the InstallPatches request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) InstallPatchesResponder(resp *http.Response) (result VirtualMachineInstallPatchesResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// InstanceView retrieves information about the run-time state of a virtual machine.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+func (client VirtualMachinesClient) InstanceView(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachineInstanceView, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.InstanceView")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.InstanceViewPreparer(ctx, resourceGroupName, VMName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "InstanceView", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.InstanceViewSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "InstanceView", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.InstanceViewResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "InstanceView", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// InstanceViewPreparer prepares the InstanceView request.
+func (client VirtualMachinesClient) InstanceViewPreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// InstanceViewSender sends the InstanceView request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) InstanceViewSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// InstanceViewResponder handles the response to the InstanceView request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) InstanceViewResponder(resp *http.Response) (result VirtualMachineInstanceView, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to
+// get the next page of virtual machines.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client VirtualMachinesClient) List(ctx context.Context, resourceGroupName string) (result VirtualMachineListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.List")
+ defer func() {
+ sc := -1
+ if result.vmlr.Response.Response != nil {
+ sc = result.vmlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.vmlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.vmlr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "List", resp, "Failure responding to request")
+ return
+ }
+ if result.vmlr.hasNextLink() && result.vmlr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client VirtualMachinesClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) ListResponder(resp *http.Response) (result VirtualMachineListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client VirtualMachinesClient) listNextResults(ctx context.Context, lastResults VirtualMachineListResult) (result VirtualMachineListResult, err error) {
+ req, err := lastResults.virtualMachineListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualMachinesClient) ListComplete(ctx context.Context, resourceGroupName string) (result VirtualMachineListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx, resourceGroupName)
+ return
+}
+
+// ListAll lists all of the virtual machines in the specified subscription. Use the nextLink property in the response
+// to get the next page of virtual machines.
+// Parameters:
+// statusOnly - statusOnly=true enables fetching run time status of all Virtual Machines in the subscription.
+func (client VirtualMachinesClient) ListAll(ctx context.Context, statusOnly string) (result VirtualMachineListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.ListAll")
+ defer func() {
+ sc := -1
+ if result.vmlr.Response.Response != nil {
+ sc = result.vmlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listAllNextResults
+ req, err := client.ListAllPreparer(ctx, statusOnly)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListAll", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListAllSender(req)
+ if err != nil {
+ result.vmlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListAll", resp, "Failure sending request")
+ return
+ }
+
+ result.vmlr, err = client.ListAllResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListAll", resp, "Failure responding to request")
+ return
+ }
+ if result.vmlr.hasNextLink() && result.vmlr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListAllPreparer prepares the ListAll request.
+func (client VirtualMachinesClient) ListAllPreparer(ctx context.Context, statusOnly string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(statusOnly) > 0 {
+ queryParameters["statusOnly"] = autorest.Encode("query", statusOnly)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListAllSender sends the ListAll request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) ListAllSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListAllResponder handles the response to the ListAll request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) ListAllResponder(resp *http.Response) (result VirtualMachineListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listAllNextResults retrieves the next set of results, if any.
+func (client VirtualMachinesClient) listAllNextResults(ctx context.Context, lastResults VirtualMachineListResult) (result VirtualMachineListResult, err error) {
+ req, err := lastResults.virtualMachineListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listAllNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListAllSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listAllNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListAllResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listAllNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualMachinesClient) ListAllComplete(ctx context.Context, statusOnly string) (result VirtualMachineListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.ListAll")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListAll(ctx, statusOnly)
+ return
+}
+
+// ListAvailableSizes lists all available virtual machine sizes to which the specified virtual machine can be resized.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+func (client VirtualMachinesClient) ListAvailableSizes(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachineSizeListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.ListAvailableSizes")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListAvailableSizesPreparer(ctx, resourceGroupName, VMName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListAvailableSizes", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListAvailableSizesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListAvailableSizes", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListAvailableSizesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListAvailableSizes", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// ListAvailableSizesPreparer prepares the ListAvailableSizes request.
+func (client VirtualMachinesClient) ListAvailableSizesPreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListAvailableSizesSender sends the ListAvailableSizes request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) ListAvailableSizesSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListAvailableSizesResponder handles the response to the ListAvailableSizes request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) ListAvailableSizesResponder(resp *http.Response) (result VirtualMachineSizeListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByLocation gets all the virtual machines under the specified subscription for the specified location.
+// Parameters:
+// location - the location for which virtual machines under the subscription are queried.
+func (client VirtualMachinesClient) ListByLocation(ctx context.Context, location string) (result VirtualMachineListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.ListByLocation")
+ defer func() {
+ sc := -1
+ if result.vmlr.Response.Response != nil {
+ sc = result.vmlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: location,
+ Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("compute.VirtualMachinesClient", "ListByLocation", err.Error())
+ }
+
+ result.fn = client.listByLocationNextResults
+ req, err := client.ListByLocationPreparer(ctx, location)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListByLocation", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByLocationSender(req)
+ if err != nil {
+ result.vmlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListByLocation", resp, "Failure sending request")
+ return
+ }
+
+ result.vmlr, err = client.ListByLocationResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListByLocation", resp, "Failure responding to request")
+ return
+ }
+ if result.vmlr.hasNextLink() && result.vmlr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListByLocationPreparer prepares the ListByLocation request.
+func (client VirtualMachinesClient) ListByLocationPreparer(ctx context.Context, location string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachines", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByLocationSender sends the ListByLocation request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) ListByLocationSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByLocationResponder handles the response to the ListByLocation request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) ListByLocationResponder(resp *http.Response) (result VirtualMachineListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByLocationNextResults retrieves the next set of results, if any.
+func (client VirtualMachinesClient) listByLocationNextResults(ctx context.Context, lastResults VirtualMachineListResult) (result VirtualMachineListResult, err error) {
+ req, err := lastResults.virtualMachineListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listByLocationNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByLocationSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listByLocationNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByLocationResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listByLocationNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByLocationComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualMachinesClient) ListByLocationComplete(ctx context.Context, location string) (result VirtualMachineListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.ListByLocation")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByLocation(ctx, location)
+ return
+}
+
+// PerformMaintenance the operation to perform maintenance on a virtual machine.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+func (client VirtualMachinesClient) PerformMaintenance(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesPerformMaintenanceFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.PerformMaintenance")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.PerformMaintenancePreparer(ctx, resourceGroupName, VMName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PerformMaintenance", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.PerformMaintenanceSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PerformMaintenance", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// PerformMaintenancePreparer prepares the PerformMaintenance request.
+func (client VirtualMachinesClient) PerformMaintenancePreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/performMaintenance", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// PerformMaintenanceSender sends the PerformMaintenance request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) PerformMaintenanceSender(req *http.Request) (future VirtualMachinesPerformMaintenanceFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// PerformMaintenanceResponder handles the response to the PerformMaintenance request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) PerformMaintenanceResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// PowerOff the operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same
+// provisioned resources. You are still charged for this virtual machine.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+// skipShutdown - the parameter to request non-graceful VM shutdown. True value for this flag indicates
+// non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not
+// specified
+func (client VirtualMachinesClient) PowerOff(ctx context.Context, resourceGroupName string, VMName string, skipShutdown *bool) (result VirtualMachinesPowerOffFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.PowerOff")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.PowerOffPreparer(ctx, resourceGroupName, VMName, skipShutdown)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PowerOff", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.PowerOffSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PowerOff", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// PowerOffPreparer prepares the PowerOff request.
+func (client VirtualMachinesClient) PowerOffPreparer(ctx context.Context, resourceGroupName string, VMName string, skipShutdown *bool) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if skipShutdown != nil {
+ queryParameters["skipShutdown"] = autorest.Encode("query", *skipShutdown)
+ } else {
+ queryParameters["skipShutdown"] = autorest.Encode("query", false)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/powerOff", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// PowerOffSender sends the PowerOff request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) PowerOffSender(req *http.Request) (future VirtualMachinesPowerOffFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// PowerOffResponder handles the response to the PowerOff request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) PowerOffResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Reapply the operation to reapply a virtual machine's state.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+func (client VirtualMachinesClient) Reapply(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesReapplyFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Reapply")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ReapplyPreparer(ctx, resourceGroupName, VMName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reapply", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ReapplySender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reapply", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ReapplyPreparer prepares the Reapply request.
+func (client VirtualMachinesClient) ReapplyPreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reapply", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ReapplySender sends the Reapply request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) ReapplySender(req *http.Request) (future VirtualMachinesReapplyFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// ReapplyResponder handles the response to the Reapply request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) ReapplyResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Redeploy shuts down the virtual machine, moves it to a new node, and powers it back on.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+func (client VirtualMachinesClient) Redeploy(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesRedeployFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Redeploy")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.RedeployPreparer(ctx, resourceGroupName, VMName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Redeploy", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.RedeploySender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Redeploy", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// RedeployPreparer prepares the Redeploy request.
+func (client VirtualMachinesClient) RedeployPreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RedeploySender sends the Redeploy request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) RedeploySender(req *http.Request) (future VirtualMachinesRedeployFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// RedeployResponder handles the response to the Redeploy request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) RedeployResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Reimage reimages the virtual machine which has an ephemeral OS disk back to its initial state.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+// parameters - parameters supplied to the Reimage Virtual Machine operation.
+func (client VirtualMachinesClient) Reimage(ctx context.Context, resourceGroupName string, VMName string, parameters *VirtualMachineReimageParameters) (result VirtualMachinesReimageFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Reimage")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ReimagePreparer(ctx, resourceGroupName, VMName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reimage", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ReimageSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reimage", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ReimagePreparer prepares the Reimage request.
+func (client VirtualMachinesClient) ReimagePreparer(ctx context.Context, resourceGroupName string, VMName string, parameters *VirtualMachineReimageParameters) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/reimage", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if parameters != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(parameters))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ReimageSender sends the Reimage request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) ReimageSender(req *http.Request) (future VirtualMachinesReimageFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// ReimageResponder handles the response to the Reimage request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) ReimageResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Restart the operation to restart a virtual machine.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+func (client VirtualMachinesClient) Restart(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesRestartFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Restart")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.RestartPreparer(ctx, resourceGroupName, VMName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Restart", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.RestartSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Restart", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// RestartPreparer prepares the Restart request.
+func (client VirtualMachinesClient) RestartPreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/restart", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RestartSender sends the Restart request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) RestartSender(req *http.Request) (future VirtualMachinesRestartFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// RestartResponder handles the response to the Restart request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) RestartResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// RetrieveBootDiagnosticsData the operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+// sasURIExpirationTimeInMinutes - expiration duration in minutes for the SAS URIs with a value between 1 to
+// 1440 minutes.
NOTE: If not specified, SAS URIs will be generated with a default expiration duration
+// of 120 minutes.
+func (client VirtualMachinesClient) RetrieveBootDiagnosticsData(ctx context.Context, resourceGroupName string, VMName string, sasURIExpirationTimeInMinutes *int32) (result RetrieveBootDiagnosticsDataResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.RetrieveBootDiagnosticsData")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.RetrieveBootDiagnosticsDataPreparer(ctx, resourceGroupName, VMName, sasURIExpirationTimeInMinutes)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "RetrieveBootDiagnosticsData", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.RetrieveBootDiagnosticsDataSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "RetrieveBootDiagnosticsData", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.RetrieveBootDiagnosticsDataResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "RetrieveBootDiagnosticsData", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// RetrieveBootDiagnosticsDataPreparer prepares the RetrieveBootDiagnosticsData request.
+func (client VirtualMachinesClient) RetrieveBootDiagnosticsDataPreparer(ctx context.Context, resourceGroupName string, VMName string, sasURIExpirationTimeInMinutes *int32) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if sasURIExpirationTimeInMinutes != nil {
+ queryParameters["sasUriExpirationTimeInMinutes"] = autorest.Encode("query", *sasURIExpirationTimeInMinutes)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/retrieveBootDiagnosticsData", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RetrieveBootDiagnosticsDataSender sends the RetrieveBootDiagnosticsData request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) RetrieveBootDiagnosticsDataSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// RetrieveBootDiagnosticsDataResponder handles the response to the RetrieveBootDiagnosticsData request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) RetrieveBootDiagnosticsDataResponder(resp *http.Response) (result RetrieveBootDiagnosticsDataResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// RunCommand run command on the VM.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+// parameters - parameters supplied to the Run command operation.
+func (client VirtualMachinesClient) RunCommand(ctx context.Context, resourceGroupName string, VMName string, parameters RunCommandInput) (result VirtualMachinesRunCommandFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.RunCommand")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.CommandID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("compute.VirtualMachinesClient", "RunCommand", err.Error())
+ }
+
+ req, err := client.RunCommandPreparer(ctx, resourceGroupName, VMName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "RunCommand", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.RunCommandSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "RunCommand", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// RunCommandPreparer prepares the RunCommand request.
+func (client VirtualMachinesClient) RunCommandPreparer(ctx context.Context, resourceGroupName string, VMName string, parameters RunCommandInput) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RunCommandSender sends the RunCommand request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) RunCommandSender(req *http.Request) (future VirtualMachinesRunCommandFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// RunCommandResponder handles the response to the RunCommand request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) RunCommandResponder(resp *http.Response) (result RunCommandResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// SimulateEviction the operation to simulate the eviction of spot virtual machine.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+func (client VirtualMachinesClient) SimulateEviction(ctx context.Context, resourceGroupName string, VMName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.SimulateEviction")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.SimulateEvictionPreparer(ctx, resourceGroupName, VMName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "SimulateEviction", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.SimulateEvictionSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "SimulateEviction", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.SimulateEvictionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "SimulateEviction", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// SimulateEvictionPreparer prepares the SimulateEviction request.
+func (client VirtualMachinesClient) SimulateEvictionPreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/simulateEviction", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// SimulateEvictionSender sends the SimulateEviction request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) SimulateEvictionSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// SimulateEvictionResponder handles the response to the SimulateEviction request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) SimulateEvictionResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Start the operation to start a virtual machine.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+func (client VirtualMachinesClient) Start(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesStartFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Start")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.StartPreparer(ctx, resourceGroupName, VMName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Start", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.StartSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Start", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// StartPreparer prepares the Start request.
+func (client VirtualMachinesClient) StartPreparer(ctx context.Context, resourceGroupName string, VMName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/start", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// StartSender sends the Start request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) StartSender(req *http.Request) (future VirtualMachinesStartFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// StartResponder handles the response to the Start request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) StartResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Update the operation to update a virtual machine.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+// parameters - parameters supplied to the Update Virtual Machine operation.
+func (client VirtualMachinesClient) Update(ctx context.Context, resourceGroupName string, VMName string, parameters VirtualMachineUpdate) (result VirtualMachinesUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Update")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, VMName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client VirtualMachinesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMName string, parameters VirtualMachineUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) UpdateSender(req *http.Request) (future VirtualMachinesUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) UpdateResponder(resp *http.Response) (result VirtualMachine, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetextensions.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetextensions.go
new file mode 100644
index 000000000000..9e71f3ba9100
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetextensions.go
@@ -0,0 +1,483 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// VirtualMachineScaleSetExtensionsClient is the compute Client
+type VirtualMachineScaleSetExtensionsClient struct {
+ BaseClient
+}
+
+// NewVirtualMachineScaleSetExtensionsClient creates an instance of the VirtualMachineScaleSetExtensionsClient client.
+func NewVirtualMachineScaleSetExtensionsClient(subscriptionID string) VirtualMachineScaleSetExtensionsClient {
+ return NewVirtualMachineScaleSetExtensionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewVirtualMachineScaleSetExtensionsClientWithBaseURI creates an instance of the
+// VirtualMachineScaleSetExtensionsClient client using a custom endpoint. Use this when interacting with an Azure
+// cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewVirtualMachineScaleSetExtensionsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetExtensionsClient {
+ return VirtualMachineScaleSetExtensionsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate the operation to create or update an extension.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set where the extension should be create or updated.
+// vmssExtensionName - the name of the VM scale set extension.
+// extensionParameters - parameters supplied to the Create VM scale set Extension operation.
+func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtension) (result VirtualMachineScaleSetExtensionsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, VMScaleSetName, vmssExtensionName, extensionParameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtension) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ "vmssExtensionName": autorest.Encode("path", vmssExtensionName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ extensionParameters.Type = nil
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}", pathParameters),
+ autorest.WithJSON(extensionParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetExtensionsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualMachineScaleSetExtension, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete the operation to delete the extension.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set where the extension should be deleted.
+// vmssExtensionName - the name of the VM scale set extension.
+func (client VirtualMachineScaleSetExtensionsClient) Delete(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string) (result VirtualMachineScaleSetExtensionsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, VMScaleSetName, vmssExtensionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client VirtualMachineScaleSetExtensionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ "vmssExtensionName": autorest.Encode("path", vmssExtensionName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetExtensionsDeleteFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetExtensionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get the operation to get the extension.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set containing the extension.
+// vmssExtensionName - the name of the VM scale set extension.
+// expand - the expand expression to apply on the operation.
+func (client VirtualMachineScaleSetExtensionsClient) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, expand string) (result VirtualMachineScaleSetExtension, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, VMScaleSetName, vmssExtensionName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client VirtualMachineScaleSetExtensionsClient) GetPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, expand string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ "vmssExtensionName": autorest.Encode("path", vmssExtensionName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(expand) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetExtensionsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetExtensionsClient) GetResponder(resp *http.Response) (result VirtualMachineScaleSetExtension, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List gets a list of all extensions in a VM scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set containing the extension.
+func (client VirtualMachineScaleSetExtensionsClient) List(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetExtensionListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionsClient.List")
+ defer func() {
+ sc := -1
+ if result.vmsselr.Response.Response != nil {
+ sc = result.vmsselr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName, VMScaleSetName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.vmsselr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.vmsselr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "List", resp, "Failure responding to request")
+ return
+ }
+ if result.vmsselr.hasNextLink() && result.vmsselr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client VirtualMachineScaleSetExtensionsClient) ListPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetExtensionsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetExtensionsClient) ListResponder(resp *http.Response) (result VirtualMachineScaleSetExtensionListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client VirtualMachineScaleSetExtensionsClient) listNextResults(ctx context.Context, lastResults VirtualMachineScaleSetExtensionListResult) (result VirtualMachineScaleSetExtensionListResult, err error) {
+ req, err := lastResults.virtualMachineScaleSetExtensionListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualMachineScaleSetExtensionsClient) ListComplete(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetExtensionListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx, resourceGroupName, VMScaleSetName)
+ return
+}
+
+// Update the operation to update an extension.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set where the extension should be updated.
+// vmssExtensionName - the name of the VM scale set extension.
+// extensionParameters - parameters supplied to the Update VM scale set Extension operation.
+func (client VirtualMachineScaleSetExtensionsClient) Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtensionUpdate) (result VirtualMachineScaleSetExtensionsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionsClient.Update")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, VMScaleSetName, vmssExtensionName, extensionParameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client VirtualMachineScaleSetExtensionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtensionUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ "vmssExtensionName": autorest.Encode("path", vmssExtensionName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ extensionParameters.Name = nil
+ extensionParameters.Type = nil
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}", pathParameters),
+ autorest.WithJSON(extensionParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetExtensionsUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetExtensionsClient) UpdateResponder(resp *http.Response) (result VirtualMachineScaleSetExtension, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetrollingupgrades.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetrollingupgrades.go
new file mode 100644
index 000000000000..be9de5194bb5
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetrollingupgrades.go
@@ -0,0 +1,346 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// VirtualMachineScaleSetRollingUpgradesClient is the compute Client
+type VirtualMachineScaleSetRollingUpgradesClient struct {
+ BaseClient
+}
+
+// NewVirtualMachineScaleSetRollingUpgradesClient creates an instance of the
+// VirtualMachineScaleSetRollingUpgradesClient client.
+func NewVirtualMachineScaleSetRollingUpgradesClient(subscriptionID string) VirtualMachineScaleSetRollingUpgradesClient {
+ return NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI creates an instance of the
+// VirtualMachineScaleSetRollingUpgradesClient client using a custom endpoint. Use this when interacting with an Azure
+// cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetRollingUpgradesClient {
+ return VirtualMachineScaleSetRollingUpgradesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Cancel cancels the current virtual machine scale set rolling upgrade.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+func (client VirtualMachineScaleSetRollingUpgradesClient) Cancel(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetRollingUpgradesCancelFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetRollingUpgradesClient.Cancel")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.CancelPreparer(ctx, resourceGroupName, VMScaleSetName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "Cancel", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CancelSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "Cancel", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CancelPreparer prepares the Cancel request.
+func (client VirtualMachineScaleSetRollingUpgradesClient) CancelPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/cancel", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CancelSender sends the Cancel request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetRollingUpgradesClient) CancelSender(req *http.Request) (future VirtualMachineScaleSetRollingUpgradesCancelFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// CancelResponder handles the response to the Cancel request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetRollingUpgradesClient) CancelResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// GetLatest gets the status of the latest virtual machine scale set rolling upgrade.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatest(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result RollingUpgradeStatusInfo, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetRollingUpgradesClient.GetLatest")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetLatestPreparer(ctx, resourceGroupName, VMScaleSetName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "GetLatest", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetLatestSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "GetLatest", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetLatestResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "GetLatest", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetLatestPreparer prepares the GetLatest request.
+func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatestPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/latest", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetLatestSender sends the GetLatest request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatestSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetLatestResponder handles the response to the GetLatest request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatestResponder(resp *http.Response) (result RollingUpgradeStatusInfo, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// StartExtensionUpgrade starts a rolling upgrade to move all extensions for all virtual machine scale set instances to
+// the latest available extension version. Instances which are already running the latest extension versions are not
+// affected.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgrade(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetRollingUpgradesClient.StartExtensionUpgrade")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.StartExtensionUpgradePreparer(ctx, resourceGroupName, VMScaleSetName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartExtensionUpgrade", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.StartExtensionUpgradeSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartExtensionUpgrade", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// StartExtensionUpgradePreparer prepares the StartExtensionUpgrade request.
+func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensionRollingUpgrade", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// StartExtensionUpgradeSender sends the StartExtensionUpgrade request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeSender(req *http.Request) (future VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// StartExtensionUpgradeResponder handles the response to the StartExtensionUpgrade request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// StartOSUpgrade starts a rolling upgrade to move all virtual machine scale set instances to the latest available
+// Platform Image OS version. Instances which are already running the latest available OS version are not affected.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgrade(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetRollingUpgradesClient.StartOSUpgrade")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.StartOSUpgradePreparer(ctx, resourceGroupName, VMScaleSetName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartOSUpgrade", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.StartOSUpgradeSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartOSUpgrade", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// StartOSUpgradePreparer prepares the StartOSUpgrade request.
+func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osRollingUpgrade", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// StartOSUpgradeSender sends the StartOSUpgrade request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradeSender(req *http.Request) (future VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// StartOSUpgradeResponder handles the response to the StartOSUpgrade request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradeResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesets.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesets.go
new file mode 100644
index 000000000000..28523a860773
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesets.go
@@ -0,0 +1,2154 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// VirtualMachineScaleSetsClient is the compute Client
+type VirtualMachineScaleSetsClient struct {
+ BaseClient
+}
+
+// NewVirtualMachineScaleSetsClient creates an instance of the VirtualMachineScaleSetsClient client.
+func NewVirtualMachineScaleSetsClient(subscriptionID string) VirtualMachineScaleSetsClient {
+ return NewVirtualMachineScaleSetsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewVirtualMachineScaleSetsClientWithBaseURI creates an instance of the VirtualMachineScaleSetsClient client using a
+// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds,
+// Azure stack).
+func NewVirtualMachineScaleSetsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetsClient {
+ return VirtualMachineScaleSetsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// ConvertToSinglePlacementGroup converts SinglePlacementGroup property to false for a existing virtual machine scale
+// set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the virtual machine scale set to create or update.
+// parameters - the input object for ConvertToSinglePlacementGroup API.
+func (client VirtualMachineScaleSetsClient) ConvertToSinglePlacementGroup(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters VMScaleSetConvertToSinglePlacementGroupInput) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ConvertToSinglePlacementGroup")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ConvertToSinglePlacementGroupPreparer(ctx, resourceGroupName, VMScaleSetName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ConvertToSinglePlacementGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ConvertToSinglePlacementGroupSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ConvertToSinglePlacementGroup", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ConvertToSinglePlacementGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ConvertToSinglePlacementGroup", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// ConvertToSinglePlacementGroupPreparer prepares the ConvertToSinglePlacementGroup request.
+func (client VirtualMachineScaleSetsClient) ConvertToSinglePlacementGroupPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters VMScaleSetConvertToSinglePlacementGroupInput) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/convertToSinglePlacementGroup", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ConvertToSinglePlacementGroupSender sends the ConvertToSinglePlacementGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetsClient) ConvertToSinglePlacementGroupSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ConvertToSinglePlacementGroupResponder handles the response to the ConvertToSinglePlacementGroup request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) ConvertToSinglePlacementGroupResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// CreateOrUpdate create or update a VM scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set to create or update.
+// parameters - the scale set object.
+func (client VirtualMachineScaleSetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters VirtualMachineScaleSet) (result VirtualMachineScaleSetsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil},
+ {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.InclusiveMinimum, Rule: int64(5), Chain: nil},
+ }},
+ {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil},
+ {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.InclusiveMinimum, Rule: int64(5), Chain: nil},
+ }},
+ {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil},
+ {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
+ }},
+ }},
+ }},
+ }}}}}); err != nil {
+ return result, validation.NewError("compute.VirtualMachineScaleSetsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, VMScaleSetName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client VirtualMachineScaleSetsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters VirtualMachineScaleSet) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualMachineScaleSet, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Deallocate deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the
+// compute resources. You are not billed for the compute resources that this virtual machine scale set deallocates.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set.
+func (client VirtualMachineScaleSetsClient) Deallocate(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (result VirtualMachineScaleSetsDeallocateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Deallocate")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeallocatePreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Deallocate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeallocateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Deallocate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeallocatePreparer prepares the Deallocate request.
+func (client VirtualMachineScaleSetsClient) DeallocatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/deallocate", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if VMInstanceIDs != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(VMInstanceIDs))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeallocateSender sends the Deallocate request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetsClient) DeallocateSender(req *http.Request) (future VirtualMachineScaleSetsDeallocateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// DeallocateResponder handles the response to the Deallocate request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) DeallocateResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Delete deletes a VM scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// forceDeletion - optional parameter to force delete a VM scale set. (Feature in Preview)
+func (client VirtualMachineScaleSetsClient) Delete(ctx context.Context, resourceGroupName string, VMScaleSetName string, forceDeletion *bool) (result VirtualMachineScaleSetsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, VMScaleSetName, forceDeletion)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client VirtualMachineScaleSetsClient) DeletePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, forceDeletion *bool) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if forceDeletion != nil {
+ queryParameters["forceDeletion"] = autorest.Encode("query", *forceDeletion)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetsDeleteFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// DeleteInstances deletes virtual machines in a VM scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set.
+// forceDeletion - optional parameter to force delete virtual machines from the VM scale set. (Feature in
+// Preview)
+func (client VirtualMachineScaleSetsClient) DeleteInstances(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs VirtualMachineScaleSetVMInstanceRequiredIDs, forceDeletion *bool) (result VirtualMachineScaleSetsDeleteInstancesFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.DeleteInstances")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: VMInstanceIDs,
+ Constraints: []validation.Constraint{{Target: "VMInstanceIDs.InstanceIds", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("compute.VirtualMachineScaleSetsClient", "DeleteInstances", err.Error())
+ }
+
+ req, err := client.DeleteInstancesPreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs, forceDeletion)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "DeleteInstances", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteInstancesSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "DeleteInstances", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeleteInstancesPreparer prepares the DeleteInstances request.
+func (client VirtualMachineScaleSetsClient) DeleteInstancesPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs VirtualMachineScaleSetVMInstanceRequiredIDs, forceDeletion *bool) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if forceDeletion != nil {
+ queryParameters["forceDeletion"] = autorest.Encode("query", *forceDeletion)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/delete", pathParameters),
+ autorest.WithJSON(VMInstanceIDs),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteInstancesSender sends the DeleteInstances request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetsClient) DeleteInstancesSender(req *http.Request) (future VirtualMachineScaleSetsDeleteInstancesFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// DeleteInstancesResponder handles the response to the DeleteInstances request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) DeleteInstancesResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// ForceRecoveryServiceFabricPlatformUpdateDomainWalk manual platform update domain walk to update virtual machines in
+// a service fabric virtual machine scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// platformUpdateDomain - the platform update domain for which a manual recovery walk is requested
+func (client VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUpdateDomainWalk(ctx context.Context, resourceGroupName string, VMScaleSetName string, platformUpdateDomain int32) (result RecoveryWalkResponse, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ForceRecoveryServiceFabricPlatformUpdateDomainWalk")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ForceRecoveryServiceFabricPlatformUpdateDomainWalkPreparer(ctx, resourceGroupName, VMScaleSetName, platformUpdateDomain)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ForceRecoveryServiceFabricPlatformUpdateDomainWalk", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ForceRecoveryServiceFabricPlatformUpdateDomainWalkSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ForceRecoveryServiceFabricPlatformUpdateDomainWalk", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ForceRecoveryServiceFabricPlatformUpdateDomainWalkResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ForceRecoveryServiceFabricPlatformUpdateDomainWalk", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// ForceRecoveryServiceFabricPlatformUpdateDomainWalkPreparer prepares the ForceRecoveryServiceFabricPlatformUpdateDomainWalk request.
+func (client VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUpdateDomainWalkPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, platformUpdateDomain int32) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ "platformUpdateDomain": autorest.Encode("query", platformUpdateDomain),
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/forceRecoveryServiceFabricPlatformUpdateDomainWalk", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ForceRecoveryServiceFabricPlatformUpdateDomainWalkSender sends the ForceRecoveryServiceFabricPlatformUpdateDomainWalk request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUpdateDomainWalkSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ForceRecoveryServiceFabricPlatformUpdateDomainWalkResponder handles the response to the ForceRecoveryServiceFabricPlatformUpdateDomainWalk request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUpdateDomainWalkResponder(resp *http.Response) (result RecoveryWalkResponse, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Get display information about a virtual machine scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// expand - the expand expression to apply on the operation. 'UserData' retrieves the UserData property of the
+// VM scale set that was provided by the user during the VM scale set Create/Update operation
+func (client VirtualMachineScaleSetsClient) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, expand ExpandTypesForGetVMScaleSets) (result VirtualMachineScaleSet, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, VMScaleSetName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client VirtualMachineScaleSetsClient) GetPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, expand ExpandTypesForGetVMScaleSets) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(string(expand)) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) GetResponder(resp *http.Response) (result VirtualMachineScaleSet, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetInstanceView gets the status of a VM scale set instance.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+func (client VirtualMachineScaleSetsClient) GetInstanceView(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetInstanceView, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.GetInstanceView")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetInstanceViewPreparer(ctx, resourceGroupName, VMScaleSetName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "GetInstanceView", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetInstanceViewSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "GetInstanceView", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetInstanceViewResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "GetInstanceView", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetInstanceViewPreparer prepares the GetInstanceView request.
+func (client VirtualMachineScaleSetsClient) GetInstanceViewPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetInstanceViewSender sends the GetInstanceView request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetsClient) GetInstanceViewSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetInstanceViewResponder handles the response to the GetInstanceView request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) GetInstanceViewResponder(resp *http.Response) (result VirtualMachineScaleSetInstanceView, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetOSUpgradeHistory gets list of OS upgrades on a VM scale set instance.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistory(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetListOSUpgradeHistoryPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.GetOSUpgradeHistory")
+ defer func() {
+ sc := -1
+ if result.vmsslouh.Response.Response != nil {
+ sc = result.vmsslouh.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.getOSUpgradeHistoryNextResults
+ req, err := client.GetOSUpgradeHistoryPreparer(ctx, resourceGroupName, VMScaleSetName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "GetOSUpgradeHistory", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetOSUpgradeHistorySender(req)
+ if err != nil {
+ result.vmsslouh.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "GetOSUpgradeHistory", resp, "Failure sending request")
+ return
+ }
+
+ result.vmsslouh, err = client.GetOSUpgradeHistoryResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "GetOSUpgradeHistory", resp, "Failure responding to request")
+ return
+ }
+ if result.vmsslouh.hasNextLink() && result.vmsslouh.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// GetOSUpgradeHistoryPreparer prepares the GetOSUpgradeHistory request.
+func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistoryPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osUpgradeHistory", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetOSUpgradeHistorySender sends the GetOSUpgradeHistory request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistorySender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetOSUpgradeHistoryResponder handles the response to the GetOSUpgradeHistory request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistoryResponder(resp *http.Response) (result VirtualMachineScaleSetListOSUpgradeHistory, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// getOSUpgradeHistoryNextResults retrieves the next set of results, if any.
+func (client VirtualMachineScaleSetsClient) getOSUpgradeHistoryNextResults(ctx context.Context, lastResults VirtualMachineScaleSetListOSUpgradeHistory) (result VirtualMachineScaleSetListOSUpgradeHistory, err error) {
+ req, err := lastResults.virtualMachineScaleSetListOSUpgradeHistoryPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "getOSUpgradeHistoryNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.GetOSUpgradeHistorySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "getOSUpgradeHistoryNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.GetOSUpgradeHistoryResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "getOSUpgradeHistoryNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// GetOSUpgradeHistoryComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistoryComplete(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetListOSUpgradeHistoryIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.GetOSUpgradeHistory")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.GetOSUpgradeHistory(ctx, resourceGroupName, VMScaleSetName)
+ return
+}
+
+// List gets a list of all VM scale sets under a resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client VirtualMachineScaleSetsClient) List(ctx context.Context, resourceGroupName string) (result VirtualMachineScaleSetListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.List")
+ defer func() {
+ sc := -1
+ if result.vmsslr.Response.Response != nil {
+ sc = result.vmsslr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.vmsslr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.vmsslr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "List", resp, "Failure responding to request")
+ return
+ }
+ if result.vmsslr.hasNextLink() && result.vmsslr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client VirtualMachineScaleSetsClient) ListPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) ListResponder(resp *http.Response) (result VirtualMachineScaleSetListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client VirtualMachineScaleSetsClient) listNextResults(ctx context.Context, lastResults VirtualMachineScaleSetListResult) (result VirtualMachineScaleSetListResult, err error) {
+ req, err := lastResults.virtualMachineScaleSetListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualMachineScaleSetsClient) ListComplete(ctx context.Context, resourceGroupName string) (result VirtualMachineScaleSetListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx, resourceGroupName)
+ return
+}
+
+// ListAll gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group. Use
+// nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink is null to fetch all
+// the VM Scale Sets.
+func (client VirtualMachineScaleSetsClient) ListAll(ctx context.Context) (result VirtualMachineScaleSetListWithLinkResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ListAll")
+ defer func() {
+ sc := -1
+ if result.vmsslwlr.Response.Response != nil {
+ sc = result.vmsslwlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listAllNextResults
+ req, err := client.ListAllPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ListAll", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListAllSender(req)
+ if err != nil {
+ result.vmsslwlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ListAll", resp, "Failure sending request")
+ return
+ }
+
+ result.vmsslwlr, err = client.ListAllResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ListAll", resp, "Failure responding to request")
+ return
+ }
+ if result.vmsslwlr.hasNextLink() && result.vmsslwlr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListAllPreparer prepares the ListAll request.
+func (client VirtualMachineScaleSetsClient) ListAllPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachineScaleSets", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListAllSender sends the ListAll request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetsClient) ListAllSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListAllResponder handles the response to the ListAll request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) ListAllResponder(resp *http.Response) (result VirtualMachineScaleSetListWithLinkResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listAllNextResults retrieves the next set of results, if any.
+func (client VirtualMachineScaleSetsClient) listAllNextResults(ctx context.Context, lastResults VirtualMachineScaleSetListWithLinkResult) (result VirtualMachineScaleSetListWithLinkResult, err error) {
+ req, err := lastResults.virtualMachineScaleSetListWithLinkResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listAllNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListAllSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listAllNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListAllResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listAllNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualMachineScaleSetsClient) ListAllComplete(ctx context.Context) (result VirtualMachineScaleSetListWithLinkResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ListAll")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListAll(ctx)
+ return
+}
+
+// ListByLocation gets all the VM scale sets under the specified subscription for the specified location.
+// Parameters:
+// location - the location for which VM scale sets under the subscription are queried.
+func (client VirtualMachineScaleSetsClient) ListByLocation(ctx context.Context, location string) (result VirtualMachineScaleSetListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ListByLocation")
+ defer func() {
+ sc := -1
+ if result.vmsslr.Response.Response != nil {
+ sc = result.vmsslr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: location,
+ Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("compute.VirtualMachineScaleSetsClient", "ListByLocation", err.Error())
+ }
+
+ result.fn = client.listByLocationNextResults
+ req, err := client.ListByLocationPreparer(ctx, location)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ListByLocation", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByLocationSender(req)
+ if err != nil {
+ result.vmsslr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ListByLocation", resp, "Failure sending request")
+ return
+ }
+
+ result.vmsslr, err = client.ListByLocationResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ListByLocation", resp, "Failure responding to request")
+ return
+ }
+ if result.vmsslr.hasNextLink() && result.vmsslr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListByLocationPreparer prepares the ListByLocation request.
+func (client VirtualMachineScaleSetsClient) ListByLocationPreparer(ctx context.Context, location string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachineScaleSets", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByLocationSender sends the ListByLocation request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetsClient) ListByLocationSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByLocationResponder handles the response to the ListByLocation request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) ListByLocationResponder(resp *http.Response) (result VirtualMachineScaleSetListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByLocationNextResults retrieves the next set of results, if any.
+func (client VirtualMachineScaleSetsClient) listByLocationNextResults(ctx context.Context, lastResults VirtualMachineScaleSetListResult) (result VirtualMachineScaleSetListResult, err error) {
+ req, err := lastResults.virtualMachineScaleSetListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listByLocationNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByLocationSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listByLocationNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByLocationResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listByLocationNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByLocationComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualMachineScaleSetsClient) ListByLocationComplete(ctx context.Context, location string) (result VirtualMachineScaleSetListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ListByLocation")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByLocation(ctx, location)
+ return
+}
+
+// ListSkus gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed
+// for each SKU.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+func (client VirtualMachineScaleSetsClient) ListSkus(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetListSkusResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ListSkus")
+ defer func() {
+ sc := -1
+ if result.vmsslsr.Response.Response != nil {
+ sc = result.vmsslsr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listSkusNextResults
+ req, err := client.ListSkusPreparer(ctx, resourceGroupName, VMScaleSetName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ListSkus", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSkusSender(req)
+ if err != nil {
+ result.vmsslsr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ListSkus", resp, "Failure sending request")
+ return
+ }
+
+ result.vmsslsr, err = client.ListSkusResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ListSkus", resp, "Failure responding to request")
+ return
+ }
+ if result.vmsslsr.hasNextLink() && result.vmsslsr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListSkusPreparer prepares the ListSkus request.
+func (client VirtualMachineScaleSetsClient) ListSkusPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSkusSender sends the ListSkus request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetsClient) ListSkusSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListSkusResponder handles the response to the ListSkus request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) ListSkusResponder(resp *http.Response) (result VirtualMachineScaleSetListSkusResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listSkusNextResults retrieves the next set of results, if any.
+func (client VirtualMachineScaleSetsClient) listSkusNextResults(ctx context.Context, lastResults VirtualMachineScaleSetListSkusResult) (result VirtualMachineScaleSetListSkusResult, err error) {
+ req, err := lastResults.virtualMachineScaleSetListSkusResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listSkusNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSkusSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listSkusNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListSkusResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listSkusNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListSkusComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualMachineScaleSetsClient) ListSkusComplete(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetListSkusResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ListSkus")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListSkus(ctx, resourceGroupName, VMScaleSetName)
+ return
+}
+
+// PerformMaintenance perform maintenance on one or more virtual machines in a VM scale set. Operation on instances
+// which are not eligible for perform maintenance will be failed. Please refer to best practices for more details:
+// https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set.
+func (client VirtualMachineScaleSetsClient) PerformMaintenance(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (result VirtualMachineScaleSetsPerformMaintenanceFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.PerformMaintenance")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.PerformMaintenancePreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PerformMaintenance", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.PerformMaintenanceSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PerformMaintenance", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// PerformMaintenancePreparer prepares the PerformMaintenance request.
+func (client VirtualMachineScaleSetsClient) PerformMaintenancePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/performMaintenance", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if VMInstanceIDs != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(VMInstanceIDs))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// PerformMaintenanceSender sends the PerformMaintenance request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetsClient) PerformMaintenanceSender(req *http.Request) (future VirtualMachineScaleSetsPerformMaintenanceFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// PerformMaintenanceResponder handles the response to the PerformMaintenance request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) PerformMaintenanceResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// PowerOff power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and
+// you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set.
+// skipShutdown - the parameter to request non-graceful VM shutdown. True value for this flag indicates
+// non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not
+// specified
+func (client VirtualMachineScaleSetsClient) PowerOff(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs, skipShutdown *bool) (result VirtualMachineScaleSetsPowerOffFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.PowerOff")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.PowerOffPreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs, skipShutdown)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PowerOff", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.PowerOffSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PowerOff", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// PowerOffPreparer prepares the PowerOff request.
+func (client VirtualMachineScaleSetsClient) PowerOffPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs, skipShutdown *bool) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if skipShutdown != nil {
+ queryParameters["skipShutdown"] = autorest.Encode("query", *skipShutdown)
+ } else {
+ queryParameters["skipShutdown"] = autorest.Encode("query", false)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if VMInstanceIDs != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(VMInstanceIDs))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// PowerOffSender sends the PowerOff request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetsClient) PowerOffSender(req *http.Request) (future VirtualMachineScaleSetsPowerOffFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// PowerOffResponder handles the response to the PowerOff request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) PowerOffResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Redeploy shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers
+// them back on.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set.
+func (client VirtualMachineScaleSetsClient) Redeploy(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (result VirtualMachineScaleSetsRedeployFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Redeploy")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.RedeployPreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Redeploy", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.RedeploySender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Redeploy", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// RedeployPreparer prepares the Redeploy request.
+func (client VirtualMachineScaleSetsClient) RedeployPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/redeploy", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if VMInstanceIDs != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(VMInstanceIDs))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RedeploySender sends the Redeploy request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetsClient) RedeploySender(req *http.Request) (future VirtualMachineScaleSetsRedeployFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// RedeployResponder handles the response to the Redeploy request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) RedeployResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Reimage reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a
+// ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// VMScaleSetReimageInput - parameters for Reimaging VM ScaleSet.
+func (client VirtualMachineScaleSetsClient) Reimage(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMScaleSetReimageInput *VirtualMachineScaleSetReimageParameters) (result VirtualMachineScaleSetsReimageFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Reimage")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ReimagePreparer(ctx, resourceGroupName, VMScaleSetName, VMScaleSetReimageInput)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Reimage", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ReimageSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Reimage", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ReimagePreparer prepares the Reimage request.
+func (client VirtualMachineScaleSetsClient) ReimagePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMScaleSetReimageInput *VirtualMachineScaleSetReimageParameters) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if VMScaleSetReimageInput != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(VMScaleSetReimageInput))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ReimageSender sends the Reimage request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetsClient) ReimageSender(req *http.Request) (future VirtualMachineScaleSetsReimageFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// ReimageResponder handles the response to the Reimage request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) ReimageResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// ReimageAll reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation
+// is only supported for managed disks.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set.
+func (client VirtualMachineScaleSetsClient) ReimageAll(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (result VirtualMachineScaleSetsReimageAllFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ReimageAll")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ReimageAllPreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ReimageAll", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ReimageAllSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ReimageAll", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ReimageAllPreparer prepares the ReimageAll request.
+func (client VirtualMachineScaleSetsClient) ReimageAllPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimageall", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if VMInstanceIDs != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(VMInstanceIDs))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ReimageAllSender sends the ReimageAll request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetsClient) ReimageAllSender(req *http.Request) (future VirtualMachineScaleSetsReimageAllFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// ReimageAllResponder handles the response to the ReimageAll request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) ReimageAllResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Restart restarts one or more virtual machines in a VM scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set.
+func (client VirtualMachineScaleSetsClient) Restart(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (result VirtualMachineScaleSetsRestartFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Restart")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.RestartPreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Restart", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.RestartSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Restart", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// RestartPreparer prepares the Restart request.
+func (client VirtualMachineScaleSetsClient) RestartPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/restart", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if VMInstanceIDs != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(VMInstanceIDs))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RestartSender sends the Restart request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetsClient) RestartSender(req *http.Request) (future VirtualMachineScaleSetsRestartFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// RestartResponder handles the response to the Restart request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) RestartResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// SetOrchestrationServiceState changes ServiceState property for a given service
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the virtual machine scale set to create or update.
+// parameters - the input object for SetOrchestrationServiceState API.
+func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceState(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters OrchestrationServiceStateInput) (result VirtualMachineScaleSetsSetOrchestrationServiceStateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.SetOrchestrationServiceState")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.SetOrchestrationServiceStatePreparer(ctx, resourceGroupName, VMScaleSetName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "SetOrchestrationServiceState", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.SetOrchestrationServiceStateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "SetOrchestrationServiceState", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// SetOrchestrationServiceStatePreparer prepares the SetOrchestrationServiceState request.
+func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceStatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters OrchestrationServiceStateInput) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/setOrchestrationServiceState", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// SetOrchestrationServiceStateSender sends the SetOrchestrationServiceState request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceStateSender(req *http.Request) (future VirtualMachineScaleSetsSetOrchestrationServiceStateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// SetOrchestrationServiceStateResponder handles the response to the SetOrchestrationServiceState request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) SetOrchestrationServiceStateResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Start starts one or more virtual machines in a VM scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set.
+func (client VirtualMachineScaleSetsClient) Start(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (result VirtualMachineScaleSetsStartFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Start")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.StartPreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Start", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.StartSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Start", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// StartPreparer prepares the Start request.
+func (client VirtualMachineScaleSetsClient) StartPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/start", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if VMInstanceIDs != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(VMInstanceIDs))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// StartSender sends the Start request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetsClient) StartSender(req *http.Request) (future VirtualMachineScaleSetsStartFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// StartResponder handles the response to the Start request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) StartResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Update update a VM scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set to create or update.
+// parameters - the scale set object.
+func (client VirtualMachineScaleSetsClient) Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters VirtualMachineScaleSetUpdate) (result VirtualMachineScaleSetsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Update")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, VMScaleSetName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client VirtualMachineScaleSetsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters VirtualMachineScaleSetUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetsUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) UpdateResponder(resp *http.Response) (result VirtualMachineScaleSet, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// UpdateInstances upgrades one or more virtual machines to the latest SKU set in the VM scale set model.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set.
+func (client VirtualMachineScaleSetsClient) UpdateInstances(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs VirtualMachineScaleSetVMInstanceRequiredIDs) (result VirtualMachineScaleSetsUpdateInstancesFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.UpdateInstances")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: VMInstanceIDs,
+ Constraints: []validation.Constraint{{Target: "VMInstanceIDs.InstanceIds", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("compute.VirtualMachineScaleSetsClient", "UpdateInstances", err.Error())
+ }
+
+ req, err := client.UpdateInstancesPreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "UpdateInstances", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateInstancesSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "UpdateInstances", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdateInstancesPreparer prepares the UpdateInstances request.
+func (client VirtualMachineScaleSetsClient) UpdateInstancesPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs VirtualMachineScaleSetVMInstanceRequiredIDs) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/manualupgrade", pathParameters),
+ autorest.WithJSON(VMInstanceIDs),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateInstancesSender sends the UpdateInstances request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetsClient) UpdateInstancesSender(req *http.Request) (future VirtualMachineScaleSetsUpdateInstancesFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// UpdateInstancesResponder handles the response to the UpdateInstances request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetsClient) UpdateInstancesResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetvmextensions.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetvmextensions.go
new file mode 100644
index 000000000000..9713046e25d8
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetvmextensions.go
@@ -0,0 +1,457 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// VirtualMachineScaleSetVMExtensionsClient is the compute Client
+type VirtualMachineScaleSetVMExtensionsClient struct {
+ BaseClient
+}
+
+// NewVirtualMachineScaleSetVMExtensionsClient creates an instance of the VirtualMachineScaleSetVMExtensionsClient
+// client.
+func NewVirtualMachineScaleSetVMExtensionsClient(subscriptionID string) VirtualMachineScaleSetVMExtensionsClient {
+ return NewVirtualMachineScaleSetVMExtensionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewVirtualMachineScaleSetVMExtensionsClientWithBaseURI creates an instance of the
+// VirtualMachineScaleSetVMExtensionsClient client using a custom endpoint. Use this when interacting with an Azure
+// cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewVirtualMachineScaleSetVMExtensionsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetVMExtensionsClient {
+ return VirtualMachineScaleSetVMExtensionsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate the operation to create or update the VMSS VM extension.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+// VMExtensionName - the name of the virtual machine extension.
+// extensionParameters - parameters supplied to the Create Virtual Machine Extension operation.
+func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string, extensionParameters VirtualMachineScaleSetVMExtension) (result VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMExtensionsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, VMExtensionName, extensionParameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string, extensionParameters VirtualMachineScaleSetVMExtension) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmExtensionName": autorest.Encode("path", VMExtensionName),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ extensionParameters.Name = nil
+ extensionParameters.Type = nil
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}", pathParameters),
+ autorest.WithJSON(extensionParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetVMExtensionsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMExtensionsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualMachineScaleSetVMExtension, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete the operation to delete the VMSS VM extension.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+// VMExtensionName - the name of the virtual machine extension.
+func (client VirtualMachineScaleSetVMExtensionsClient) Delete(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string) (result VirtualMachineScaleSetVMExtensionsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMExtensionsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, VMExtensionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client VirtualMachineScaleSetVMExtensionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmExtensionName": autorest.Encode("path", VMExtensionName),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMExtensionsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetVMExtensionsDeleteFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMExtensionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get the operation to get the VMSS VM extension.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+// VMExtensionName - the name of the virtual machine extension.
+// expand - the expand expression to apply on the operation.
+func (client VirtualMachineScaleSetVMExtensionsClient) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string, expand string) (result VirtualMachineScaleSetVMExtension, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMExtensionsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, VMExtensionName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client VirtualMachineScaleSetVMExtensionsClient) GetPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string, expand string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmExtensionName": autorest.Encode("path", VMExtensionName),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(expand) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMExtensionsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMExtensionsClient) GetResponder(resp *http.Response) (result VirtualMachineScaleSetVMExtension, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List the operation to get all extensions of an instance in Virtual Machine Scaleset.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+// expand - the expand expression to apply on the operation.
+func (client VirtualMachineScaleSetVMExtensionsClient) List(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, expand string) (result VirtualMachineScaleSetVMExtensionsListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMExtensionsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "List", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client VirtualMachineScaleSetVMExtensionsClient) ListPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, expand string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(expand) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMExtensionsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMExtensionsClient) ListResponder(resp *http.Response) (result VirtualMachineScaleSetVMExtensionsListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Update the operation to update the VMSS VM extension.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+// VMExtensionName - the name of the virtual machine extension.
+// extensionParameters - parameters supplied to the Update Virtual Machine Extension operation.
+func (client VirtualMachineScaleSetVMExtensionsClient) Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string, extensionParameters VirtualMachineScaleSetVMExtensionUpdate) (result VirtualMachineScaleSetVMExtensionsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMExtensionsClient.Update")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, VMExtensionName, extensionParameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMExtensionsClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client VirtualMachineScaleSetVMExtensionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMExtensionName string, extensionParameters VirtualMachineScaleSetVMExtensionUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmExtensionName": autorest.Encode("path", VMExtensionName),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ extensionParameters.Name = nil
+ extensionParameters.Type = nil
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/extensions/{vmExtensionName}", pathParameters),
+ autorest.WithJSON(extensionParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMExtensionsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetVMExtensionsUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMExtensionsClient) UpdateResponder(resp *http.Response) (result VirtualMachineScaleSetVMExtension, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetvmruncommands.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetvmruncommands.go
new file mode 100644
index 000000000000..4fbb0c104507
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetvmruncommands.go
@@ -0,0 +1,495 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// VirtualMachineScaleSetVMRunCommandsClient is the compute Client
+type VirtualMachineScaleSetVMRunCommandsClient struct {
+ BaseClient
+}
+
+// NewVirtualMachineScaleSetVMRunCommandsClient creates an instance of the VirtualMachineScaleSetVMRunCommandsClient
+// client.
+func NewVirtualMachineScaleSetVMRunCommandsClient(subscriptionID string) VirtualMachineScaleSetVMRunCommandsClient {
+ return NewVirtualMachineScaleSetVMRunCommandsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewVirtualMachineScaleSetVMRunCommandsClientWithBaseURI creates an instance of the
+// VirtualMachineScaleSetVMRunCommandsClient client using a custom endpoint. Use this when interacting with an Azure
+// cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewVirtualMachineScaleSetVMRunCommandsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetVMRunCommandsClient {
+ return VirtualMachineScaleSetVMRunCommandsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate the operation to create or update the VMSS VM run command.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+// runCommandName - the name of the virtual machine run command.
+// runCommand - parameters supplied to the Create Virtual Machine RunCommand operation.
+func (client VirtualMachineScaleSetVMRunCommandsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, runCommandName string, runCommand VirtualMachineRunCommand) (result VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMRunCommandsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, runCommandName, runCommand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client VirtualMachineScaleSetVMRunCommandsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, runCommandName string, runCommand VirtualMachineRunCommand) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "runCommandName": autorest.Encode("path", runCommandName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}", pathParameters),
+ autorest.WithJSON(runCommand),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMRunCommandsClient) CreateOrUpdateSender(req *http.Request) (future VirtualMachineScaleSetVMRunCommandsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMRunCommandsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualMachineRunCommand, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete the operation to delete the VMSS VM run command.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+// runCommandName - the name of the virtual machine run command.
+func (client VirtualMachineScaleSetVMRunCommandsClient) Delete(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, runCommandName string) (result VirtualMachineScaleSetVMRunCommandsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMRunCommandsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, runCommandName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client VirtualMachineScaleSetVMRunCommandsClient) DeletePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, runCommandName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "runCommandName": autorest.Encode("path", runCommandName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMRunCommandsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetVMRunCommandsDeleteFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMRunCommandsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get the operation to get the VMSS VM run command.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+// runCommandName - the name of the virtual machine run command.
+// expand - the expand expression to apply on the operation.
+func (client VirtualMachineScaleSetVMRunCommandsClient) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, runCommandName string, expand string) (result VirtualMachineRunCommand, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMRunCommandsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, runCommandName, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client VirtualMachineScaleSetVMRunCommandsClient) GetPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, runCommandName string, expand string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "runCommandName": autorest.Encode("path", runCommandName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(expand) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMRunCommandsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMRunCommandsClient) GetResponder(resp *http.Response) (result VirtualMachineRunCommand, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List the operation to get all run commands of an instance in Virtual Machine Scaleset.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+// expand - the expand expression to apply on the operation.
+func (client VirtualMachineScaleSetVMRunCommandsClient) List(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, expand string) (result VirtualMachineRunCommandsListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMRunCommandsClient.List")
+ defer func() {
+ sc := -1
+ if result.vmrclr.Response.Response != nil {
+ sc = result.vmrclr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.vmrclr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.vmrclr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "List", resp, "Failure responding to request")
+ return
+ }
+ if result.vmrclr.hasNextLink() && result.vmrclr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client VirtualMachineScaleSetVMRunCommandsClient) ListPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, expand string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(expand) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMRunCommandsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMRunCommandsClient) ListResponder(resp *http.Response) (result VirtualMachineRunCommandsListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client VirtualMachineScaleSetVMRunCommandsClient) listNextResults(ctx context.Context, lastResults VirtualMachineRunCommandsListResult) (result VirtualMachineRunCommandsListResult, err error) {
+ req, err := lastResults.virtualMachineRunCommandsListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualMachineScaleSetVMRunCommandsClient) ListComplete(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, expand string) (result VirtualMachineRunCommandsListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMRunCommandsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx, resourceGroupName, VMScaleSetName, instanceID, expand)
+ return
+}
+
+// Update the operation to update the VMSS VM run command.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+// runCommandName - the name of the virtual machine run command.
+// runCommand - parameters supplied to the Update Virtual Machine RunCommand operation.
+func (client VirtualMachineScaleSetVMRunCommandsClient) Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, runCommandName string, runCommand VirtualMachineRunCommandUpdate) (result VirtualMachineScaleSetVMRunCommandsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMRunCommandsClient.Update")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, runCommandName, runCommand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMRunCommandsClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client VirtualMachineScaleSetVMRunCommandsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, runCommandName string, runCommand VirtualMachineRunCommandUpdate) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "runCommandName": autorest.Encode("path", runCommandName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}", pathParameters),
+ autorest.WithJSON(runCommand),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMRunCommandsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetVMRunCommandsUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMRunCommandsClient) UpdateResponder(resp *http.Response) (result VirtualMachineRunCommand, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetvms.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetvms.go
new file mode 100644
index 000000000000..f46f6c4f52f1
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachinescalesetvms.go
@@ -0,0 +1,1430 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// VirtualMachineScaleSetVMsClient is the compute Client
+type VirtualMachineScaleSetVMsClient struct {
+ BaseClient
+}
+
+// NewVirtualMachineScaleSetVMsClient creates an instance of the VirtualMachineScaleSetVMsClient client.
+func NewVirtualMachineScaleSetVMsClient(subscriptionID string) VirtualMachineScaleSetVMsClient {
+ return NewVirtualMachineScaleSetVMsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewVirtualMachineScaleSetVMsClientWithBaseURI creates an instance of the VirtualMachineScaleSetVMsClient client
+// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign
+// clouds, Azure stack).
+func NewVirtualMachineScaleSetVMsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetVMsClient {
+ return VirtualMachineScaleSetVMsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Deallocate deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and releases the
+// compute resources it uses. You are not billed for the compute resources of this virtual machine once it is
+// deallocated.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+func (client VirtualMachineScaleSetVMsClient) Deallocate(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsDeallocateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Deallocate")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeallocatePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Deallocate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeallocateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Deallocate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeallocatePreparer prepares the Deallocate request.
+func (client VirtualMachineScaleSetVMsClient) DeallocatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/deallocate", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeallocateSender sends the Deallocate request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMsClient) DeallocateSender(req *http.Request) (future VirtualMachineScaleSetVMsDeallocateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// DeallocateResponder handles the response to the Deallocate request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMsClient) DeallocateResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Delete deletes a virtual machine from a VM scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+// forceDeletion - optional parameter to force delete a virtual machine from a VM scale set. (Feature in
+// Preview)
+func (client VirtualMachineScaleSetVMsClient) Delete(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, forceDeletion *bool) (result VirtualMachineScaleSetVMsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, forceDeletion)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client VirtualMachineScaleSetVMsClient) DeletePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, forceDeletion *bool) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if forceDeletion != nil {
+ queryParameters["forceDeletion"] = autorest.Encode("query", *forceDeletion)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMsClient) DeleteSender(req *http.Request) (future VirtualMachineScaleSetVMsDeleteFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get gets a virtual machine from a VM scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+// expand - the expand expression to apply on the operation. 'InstanceView' will retrieve the instance view of
+// the virtual machine. 'UserData' will retrieve the UserData of the virtual machine.
+func (client VirtualMachineScaleSetVMsClient) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, expand InstanceViewTypes) (result VirtualMachineScaleSetVM, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client VirtualMachineScaleSetVMsClient) GetPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, expand InstanceViewTypes) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(string(expand)) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMsClient) GetResponder(resp *http.Response) (result VirtualMachineScaleSetVM, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetInstanceView gets the status of a virtual machine from a VM scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+func (client VirtualMachineScaleSetVMsClient) GetInstanceView(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMInstanceView, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.GetInstanceView")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetInstanceViewPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "GetInstanceView", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetInstanceViewSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "GetInstanceView", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetInstanceViewResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "GetInstanceView", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetInstanceViewPreparer prepares the GetInstanceView request.
+func (client VirtualMachineScaleSetVMsClient) GetInstanceViewPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/instanceView", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetInstanceViewSender sends the GetInstanceView request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMsClient) GetInstanceViewSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetInstanceViewResponder handles the response to the GetInstanceView request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMsClient) GetInstanceViewResponder(resp *http.Response) (result VirtualMachineScaleSetVMInstanceView, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List gets a list of all virtual machines in a VM scale sets.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// virtualMachineScaleSetName - the name of the VM scale set.
+// filter - the filter to apply to the operation. Allowed values are 'startswith(instanceView/statuses/code,
+// 'PowerState') eq true', 'properties/latestModelApplied eq true', 'properties/latestModelApplied eq false'.
+// selectParameter - the list parameters. Allowed values are 'instanceView', 'instanceView/statuses'.
+// expand - the expand expression to apply to the operation. Allowed values are 'instanceView'.
+func (client VirtualMachineScaleSetVMsClient) List(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, filter string, selectParameter string, expand string) (result VirtualMachineScaleSetVMListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.List")
+ defer func() {
+ sc := -1
+ if result.vmssvlr.Response.Response != nil {
+ sc = result.vmssvlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName, virtualMachineScaleSetName, filter, selectParameter, expand)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.vmssvlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.vmssvlr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "List", resp, "Failure responding to request")
+ return
+ }
+ if result.vmssvlr.hasNextLink() && result.vmssvlr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client VirtualMachineScaleSetVMsClient) ListPreparer(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, filter string, selectParameter string, expand string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if len(selectParameter) > 0 {
+ queryParameters["$select"] = autorest.Encode("query", selectParameter)
+ }
+ if len(expand) > 0 {
+ queryParameters["$expand"] = autorest.Encode("query", expand)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMsClient) ListResponder(resp *http.Response) (result VirtualMachineScaleSetVMListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client VirtualMachineScaleSetVMsClient) listNextResults(ctx context.Context, lastResults VirtualMachineScaleSetVMListResult) (result VirtualMachineScaleSetVMListResult, err error) {
+ req, err := lastResults.virtualMachineScaleSetVMListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualMachineScaleSetVMsClient) ListComplete(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, filter string, selectParameter string, expand string) (result VirtualMachineScaleSetVMListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx, resourceGroupName, virtualMachineScaleSetName, filter, selectParameter, expand)
+ return
+}
+
+// PerformMaintenance performs maintenance on a virtual machine in a VM scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+func (client VirtualMachineScaleSetVMsClient) PerformMaintenance(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsPerformMaintenanceFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.PerformMaintenance")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.PerformMaintenancePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PerformMaintenance", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.PerformMaintenanceSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PerformMaintenance", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// PerformMaintenancePreparer prepares the PerformMaintenance request.
+func (client VirtualMachineScaleSetVMsClient) PerformMaintenancePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/performMaintenance", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// PerformMaintenanceSender sends the PerformMaintenance request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMsClient) PerformMaintenanceSender(req *http.Request) (future VirtualMachineScaleSetVMsPerformMaintenanceFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// PerformMaintenanceResponder handles the response to the PerformMaintenance request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMsClient) PerformMaintenanceResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// PowerOff power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are
+// getting charged for the resources. Instead, use deallocate to release resources and avoid charges.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+// skipShutdown - the parameter to request non-graceful VM shutdown. True value for this flag indicates
+// non-graceful shutdown whereas false indicates otherwise. Default value for this flag is false if not
+// specified
+func (client VirtualMachineScaleSetVMsClient) PowerOff(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, skipShutdown *bool) (result VirtualMachineScaleSetVMsPowerOffFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.PowerOff")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.PowerOffPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, skipShutdown)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PowerOff", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.PowerOffSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PowerOff", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// PowerOffPreparer prepares the PowerOff request.
+func (client VirtualMachineScaleSetVMsClient) PowerOffPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, skipShutdown *bool) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if skipShutdown != nil {
+ queryParameters["skipShutdown"] = autorest.Encode("query", *skipShutdown)
+ } else {
+ queryParameters["skipShutdown"] = autorest.Encode("query", false)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/poweroff", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// PowerOffSender sends the PowerOff request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMsClient) PowerOffSender(req *http.Request) (future VirtualMachineScaleSetVMsPowerOffFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// PowerOffResponder handles the response to the PowerOff request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMsClient) PowerOffResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Redeploy shuts down the virtual machine in the virtual machine scale set, moves it to a new node, and powers it back
+// on.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+func (client VirtualMachineScaleSetVMsClient) Redeploy(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsRedeployFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Redeploy")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.RedeployPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Redeploy", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.RedeploySender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Redeploy", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// RedeployPreparer prepares the Redeploy request.
+func (client VirtualMachineScaleSetVMsClient) RedeployPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/redeploy", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RedeploySender sends the Redeploy request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMsClient) RedeploySender(req *http.Request) (future VirtualMachineScaleSetVMsRedeployFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// RedeployResponder handles the response to the Redeploy request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMsClient) RedeployResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Reimage reimages (upgrade the operating system) a specific virtual machine in a VM scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+// VMScaleSetVMReimageInput - parameters for the Reimaging Virtual machine in ScaleSet.
+func (client VirtualMachineScaleSetVMsClient) Reimage(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMScaleSetVMReimageInput *VirtualMachineScaleSetVMReimageParameters) (result VirtualMachineScaleSetVMsReimageFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Reimage")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ReimagePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, VMScaleSetVMReimageInput)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Reimage", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ReimageSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Reimage", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ReimagePreparer prepares the Reimage request.
+func (client VirtualMachineScaleSetVMsClient) ReimagePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMScaleSetVMReimageInput *VirtualMachineScaleSetVMReimageParameters) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimage", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if VMScaleSetVMReimageInput != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(VMScaleSetVMReimageInput))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ReimageSender sends the Reimage request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMsClient) ReimageSender(req *http.Request) (future VirtualMachineScaleSetVMsReimageFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// ReimageResponder handles the response to the Reimage request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMsClient) ReimageResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// ReimageAll allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This
+// operation is only supported for managed disks.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+func (client VirtualMachineScaleSetVMsClient) ReimageAll(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsReimageAllFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.ReimageAll")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ReimageAllPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "ReimageAll", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ReimageAllSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "ReimageAll", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ReimageAllPreparer prepares the ReimageAll request.
+func (client VirtualMachineScaleSetVMsClient) ReimageAllPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimageall", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ReimageAllSender sends the ReimageAll request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMsClient) ReimageAllSender(req *http.Request) (future VirtualMachineScaleSetVMsReimageAllFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// ReimageAllResponder handles the response to the ReimageAll request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMsClient) ReimageAllResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Restart restarts a virtual machine in a VM scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+func (client VirtualMachineScaleSetVMsClient) Restart(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsRestartFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Restart")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.RestartPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Restart", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.RestartSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Restart", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// RestartPreparer prepares the Restart request.
+func (client VirtualMachineScaleSetVMsClient) RestartPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/restart", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RestartSender sends the Restart request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMsClient) RestartSender(req *http.Request) (future VirtualMachineScaleSetVMsRestartFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// RestartResponder handles the response to the Restart request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMsClient) RestartResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// RetrieveBootDiagnosticsData the operation to retrieve SAS URIs of boot diagnostic logs for a virtual machine in a VM
+// scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+// sasURIExpirationTimeInMinutes - expiration duration in minutes for the SAS URIs with a value between 1 to
+// 1440 minutes.
NOTE: If not specified, SAS URIs will be generated with a default expiration duration
+// of 120 minutes.
+func (client VirtualMachineScaleSetVMsClient) RetrieveBootDiagnosticsData(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, sasURIExpirationTimeInMinutes *int32) (result RetrieveBootDiagnosticsDataResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.RetrieveBootDiagnosticsData")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.RetrieveBootDiagnosticsDataPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, sasURIExpirationTimeInMinutes)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "RetrieveBootDiagnosticsData", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.RetrieveBootDiagnosticsDataSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "RetrieveBootDiagnosticsData", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.RetrieveBootDiagnosticsDataResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "RetrieveBootDiagnosticsData", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// RetrieveBootDiagnosticsDataPreparer prepares the RetrieveBootDiagnosticsData request.
+func (client VirtualMachineScaleSetVMsClient) RetrieveBootDiagnosticsDataPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, sasURIExpirationTimeInMinutes *int32) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if sasURIExpirationTimeInMinutes != nil {
+ queryParameters["sasUriExpirationTimeInMinutes"] = autorest.Encode("query", *sasURIExpirationTimeInMinutes)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/retrieveBootDiagnosticsData", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RetrieveBootDiagnosticsDataSender sends the RetrieveBootDiagnosticsData request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMsClient) RetrieveBootDiagnosticsDataSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// RetrieveBootDiagnosticsDataResponder handles the response to the RetrieveBootDiagnosticsData request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMsClient) RetrieveBootDiagnosticsDataResponder(resp *http.Response) (result RetrieveBootDiagnosticsDataResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// RunCommand run command on a virtual machine in a VM scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+// parameters - parameters supplied to the Run command operation.
+func (client VirtualMachineScaleSetVMsClient) RunCommand(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, parameters RunCommandInput) (result VirtualMachineScaleSetVMsRunCommandFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.RunCommand")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.CommandID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("compute.VirtualMachineScaleSetVMsClient", "RunCommand", err.Error())
+ }
+
+ req, err := client.RunCommandPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "RunCommand", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.RunCommandSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "RunCommand", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// RunCommandPreparer prepares the RunCommand request.
+func (client VirtualMachineScaleSetVMsClient) RunCommandPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, parameters RunCommandInput) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/runCommand", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RunCommandSender sends the RunCommand request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMsClient) RunCommandSender(req *http.Request) (future VirtualMachineScaleSetVMsRunCommandFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// RunCommandResponder handles the response to the RunCommand request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMsClient) RunCommandResponder(resp *http.Response) (result RunCommandResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// SimulateEviction the operation to simulate the eviction of spot virtual machine in a VM scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+func (client VirtualMachineScaleSetVMsClient) SimulateEviction(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.SimulateEviction")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.SimulateEvictionPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "SimulateEviction", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.SimulateEvictionSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "SimulateEviction", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.SimulateEvictionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "SimulateEviction", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// SimulateEvictionPreparer prepares the SimulateEviction request.
+func (client VirtualMachineScaleSetVMsClient) SimulateEvictionPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/simulateEviction", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// SimulateEvictionSender sends the SimulateEviction request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMsClient) SimulateEvictionSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// SimulateEvictionResponder handles the response to the SimulateEviction request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMsClient) SimulateEvictionResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Start starts a virtual machine in a VM scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set.
+// instanceID - the instance ID of the virtual machine.
+func (client VirtualMachineScaleSetVMsClient) Start(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsStartFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Start")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.StartPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Start", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.StartSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Start", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// StartPreparer prepares the Start request.
+func (client VirtualMachineScaleSetVMsClient) StartPreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/start", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// StartSender sends the Start request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMsClient) StartSender(req *http.Request) (future VirtualMachineScaleSetVMsStartFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// StartResponder handles the response to the Start request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMsClient) StartResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Update updates a virtual machine of a VM scale set.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMScaleSetName - the name of the VM scale set where the extension should be create or updated.
+// instanceID - the instance ID of the virtual machine.
+// parameters - parameters supplied to the Update Virtual Machine Scale Sets VM operation.
+func (client VirtualMachineScaleSetVMsClient) Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, parameters VirtualMachineScaleSetVM) (result VirtualMachineScaleSetVMsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Update")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetVMProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile.OsDisk", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile.OsDisk.EncryptionSettings", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey.SecretURL", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile.OsDisk.EncryptionSettings.DiskEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil},
+ }},
+ {Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey.KeyURL", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.VirtualMachineScaleSetVMProperties.StorageProfile.OsDisk.EncryptionSettings.KeyEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil},
+ }},
+ }},
+ }},
+ }},
+ }}}}}); err != nil {
+ return result, validation.NewError("compute.VirtualMachineScaleSetVMsClient", "Update", err.Error())
+ }
+
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Update", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client VirtualMachineScaleSetVMsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, parameters VirtualMachineScaleSetVM) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "instanceId": autorest.Encode("path", instanceID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmScaleSetName": autorest.Encode("path", VMScaleSetName),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ parameters.InstanceID = nil
+ parameters.Sku = nil
+ parameters.Resources = nil
+ parameters.Zones = nil
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineScaleSetVMsClient) UpdateSender(req *http.Request) (future VirtualMachineScaleSetVMsUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineScaleSetVMsClient) UpdateResponder(resp *http.Response) (result VirtualMachineScaleSetVM, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachinesizes.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachinesizes.go
new file mode 100644
index 000000000000..394d659c218c
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute/virtualmachinesizes.go
@@ -0,0 +1,113 @@
+package compute
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// VirtualMachineSizesClient is the compute Client
+type VirtualMachineSizesClient struct {
+ BaseClient
+}
+
+// NewVirtualMachineSizesClient creates an instance of the VirtualMachineSizesClient client.
+func NewVirtualMachineSizesClient(subscriptionID string) VirtualMachineSizesClient {
+ return NewVirtualMachineSizesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewVirtualMachineSizesClientWithBaseURI creates an instance of the VirtualMachineSizesClient client using a custom
+// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
+// stack).
+func NewVirtualMachineSizesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineSizesClient {
+ return VirtualMachineSizesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// List this API is deprecated. Use [Resources Skus](https://docs.microsoft.com/rest/api/compute/resourceskus/list)
+// Parameters:
+// location - the location upon which virtual-machine-sizes is queried.
+func (client VirtualMachineSizesClient) List(ctx context.Context, location string) (result VirtualMachineSizeListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineSizesClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: location,
+ Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("compute.VirtualMachineSizesClient", "List", err.Error())
+ }
+
+ req, err := client.ListPreparer(ctx, location)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineSizesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineSizesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachineSizesClient", "List", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client VirtualMachineSizesClient) ListPreparer(ctx context.Context, location string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-07-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachineSizesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client VirtualMachineSizesClient) ListResponder(resp *http.Response) (result VirtualMachineSizeListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/CHANGELOG.md b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/CHANGELOG.md
index 2ca630d29da8..52911e4cc5e4 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/CHANGELOG.md
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/CHANGELOG.md
@@ -1,9 +1,2 @@
# Change History
-## Additive Changes
-
-### New Funcs
-
-1. ProxyResource.MarshalJSON() ([]byte, error)
-1. ReplicationProperties.MarshalJSON() ([]byte, error)
-1. Status.MarshalJSON() ([]byte, error)
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/_meta.json b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/_meta.json
index 857266b7c56e..6c978b532d82 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/_meta.json
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/_meta.json
@@ -2,10 +2,10 @@
"commit": "3c764635e7d442b3e74caf593029fcd440b3ef82",
"readme": "/_/azure-rest-api-specs/specification/containerregistry/resource-manager/readme.md",
"tag": "package-2019-05",
- "use": "@microsoft.azure/autorest.go@2.1.183",
+ "use": "@microsoft.azure/autorest.go@2.1.187",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
- "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2019-05 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/containerregistry/resource-manager/readme.md",
+ "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2019-05 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/containerregistry/resource-manager/readme.md",
"additional_properties": {
- "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION"
+ "additional_options": "--go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION"
}
}
\ No newline at end of file
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/registries.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/registries.go
index c040c70e07b4..48d1cb5de77e 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/registries.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/registries.go
@@ -158,7 +158,7 @@ func (client RegistriesClient) Create(ctx context.Context, resourceGroupName str
result, err = client.CreateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "Create", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "Create", result.Response(), "Failure sending request")
return
}
@@ -192,6 +192,7 @@ func (client RegistriesClient) CreatePreparer(ctx context.Context, resourceGroup
// http.Response Body if it receives an error.
func (client RegistriesClient) CreateSender(req *http.Request) (future RegistriesCreateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -248,7 +249,7 @@ func (client RegistriesClient) Delete(ctx context.Context, resourceGroupName str
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -280,6 +281,7 @@ func (client RegistriesClient) DeletePreparer(ctx context.Context, resourceGroup
// http.Response Body if it receives an error.
func (client RegistriesClient) DeleteSender(req *http.Request) (future RegistriesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -514,7 +516,7 @@ func (client RegistriesClient) ImportImage(ctx context.Context, resourceGroupNam
result, err = client.ImportImageSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "ImportImage", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "ImportImage", result.Response(), "Failure sending request")
return
}
@@ -548,6 +550,7 @@ func (client RegistriesClient) ImportImagePreparer(ctx context.Context, resource
// http.Response Body if it receives an error.
func (client RegistriesClient) ImportImageSender(req *http.Request) (future RegistriesImportImageFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1101,7 +1104,7 @@ func (client RegistriesClient) ScheduleRun(ctx context.Context, resourceGroupNam
result, err = client.ScheduleRunSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "ScheduleRun", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "ScheduleRun", result.Response(), "Failure sending request")
return
}
@@ -1135,6 +1138,7 @@ func (client RegistriesClient) ScheduleRunPreparer(ctx context.Context, resource
// http.Response Body if it receives an error.
func (client RegistriesClient) ScheduleRunSender(req *http.Request) (future RegistriesScheduleRunFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1192,7 +1196,7 @@ func (client RegistriesClient) Update(ctx context.Context, resourceGroupName str
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -1226,6 +1230,7 @@ func (client RegistriesClient) UpdatePreparer(ctx context.Context, resourceGroup
// http.Response Body if it receives an error.
func (client RegistriesClient) UpdateSender(req *http.Request) (future RegistriesUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/replications.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/replications.go
index aaa51100d8a4..ef41cb806bd0 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/replications.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/replications.go
@@ -70,7 +70,7 @@ func (client ReplicationsClient) Create(ctx context.Context, resourceGroupName s
result, err = client.CreateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Create", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Create", result.Response(), "Failure sending request")
return
}
@@ -105,6 +105,7 @@ func (client ReplicationsClient) CreatePreparer(ctx context.Context, resourceGro
// http.Response Body if it receives an error.
func (client ReplicationsClient) CreateSender(req *http.Request) (future ReplicationsCreateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -166,7 +167,7 @@ func (client ReplicationsClient) Delete(ctx context.Context, resourceGroupName s
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -199,6 +200,7 @@ func (client ReplicationsClient) DeletePreparer(ctx context.Context, resourceGro
// http.Response Body if it receives an error.
func (client ReplicationsClient) DeleteSender(req *http.Request) (future ReplicationsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -480,7 +482,7 @@ func (client ReplicationsClient) Update(ctx context.Context, resourceGroupName s
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -515,6 +517,7 @@ func (client ReplicationsClient) UpdatePreparer(ctx context.Context, resourceGro
// http.Response Body if it receives an error.
func (client ReplicationsClient) UpdateSender(req *http.Request) (future ReplicationsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/runs.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/runs.go
index 8c4cd26ab417..3738750dc5ee 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/runs.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/runs.go
@@ -65,7 +65,7 @@ func (client RunsClient) Cancel(ctx context.Context, resourceGroupName string, r
result, err = client.CancelSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RunsClient", "Cancel", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "containerregistry.RunsClient", "Cancel", result.Response(), "Failure sending request")
return
}
@@ -98,6 +98,7 @@ func (client RunsClient) CancelPreparer(ctx context.Context, resourceGroupName s
// http.Response Body if it receives an error.
func (client RunsClient) CancelSender(req *http.Request) (future RunsCancelFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -468,7 +469,7 @@ func (client RunsClient) Update(ctx context.Context, resourceGroupName string, r
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.RunsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "containerregistry.RunsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -503,6 +504,7 @@ func (client RunsClient) UpdatePreparer(ctx context.Context, resourceGroupName s
// http.Response Body if it receives an error.
func (client RunsClient) UpdateSender(req *http.Request) (future RunsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/tasks.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/tasks.go
index c48959f99727..84ed49bc8f46 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/tasks.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/tasks.go
@@ -82,7 +82,7 @@ func (client TasksClient) Create(ctx context.Context, resourceGroupName string,
result, err = client.CreateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.TasksClient", "Create", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "containerregistry.TasksClient", "Create", result.Response(), "Failure sending request")
return
}
@@ -117,6 +117,7 @@ func (client TasksClient) CreatePreparer(ctx context.Context, resourceGroupName
// http.Response Body if it receives an error.
func (client TasksClient) CreateSender(req *http.Request) (future TasksCreateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -178,7 +179,7 @@ func (client TasksClient) Delete(ctx context.Context, resourceGroupName string,
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.TasksClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "containerregistry.TasksClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -211,6 +212,7 @@ func (client TasksClient) DeletePreparer(ctx context.Context, resourceGroupName
// http.Response Body if it receives an error.
func (client TasksClient) DeleteSender(req *http.Request) (future TasksDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -584,7 +586,7 @@ func (client TasksClient) Update(ctx context.Context, resourceGroupName string,
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.TasksClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "containerregistry.TasksClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -619,6 +621,7 @@ func (client TasksClient) UpdatePreparer(ctx context.Context, resourceGroupName
// http.Response Body if it receives an error.
func (client TasksClient) UpdateSender(req *http.Request) (future TasksUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/webhooks.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/webhooks.go
index 848cdf190133..1c520279eb92 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/webhooks.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry/webhooks.go
@@ -76,7 +76,7 @@ func (client WebhooksClient) Create(ctx context.Context, resourceGroupName strin
result, err = client.CreateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Create", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Create", result.Response(), "Failure sending request")
return
}
@@ -111,6 +111,7 @@ func (client WebhooksClient) CreatePreparer(ctx context.Context, resourceGroupNa
// http.Response Body if it receives an error.
func (client WebhooksClient) CreateSender(req *http.Request) (future WebhooksCreateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -172,7 +173,7 @@ func (client WebhooksClient) Delete(ctx context.Context, resourceGroupName strin
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -205,6 +206,7 @@ func (client WebhooksClient) DeletePreparer(ctx context.Context, resourceGroupNa
// http.Response Body if it receives an error.
func (client WebhooksClient) DeleteSender(req *http.Request) (future WebhooksDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -804,7 +806,7 @@ func (client WebhooksClient) Update(ctx context.Context, resourceGroupName strin
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -839,6 +841,7 @@ func (client WebhooksClient) UpdatePreparer(ctx context.Context, resourceGroupNa
// http.Response Body if it receives an error.
func (client WebhooksClient) UpdateSender(req *http.Request) (future WebhooksUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/CHANGELOG.md b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/CHANGELOG.md
index 5e6d22160d6d..52911e4cc5e4 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/CHANGELOG.md
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/CHANGELOG.md
@@ -1,11 +1,2 @@
# Change History
-## Additive Changes
-
-### New Funcs
-
-1. CredentialResult.MarshalJSON() ([]byte, error)
-1. CredentialResults.MarshalJSON() ([]byte, error)
-1. OperationListResult.MarshalJSON() ([]byte, error)
-1. OperationValueDisplay.MarshalJSON() ([]byte, error)
-1. SubResource.MarshalJSON() ([]byte, error)
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/_meta.json b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/_meta.json
index 091a36e92f59..4c368f7df72e 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/_meta.json
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/_meta.json
@@ -2,10 +2,10 @@
"commit": "3c764635e7d442b3e74caf593029fcd440b3ef82",
"readme": "/_/azure-rest-api-specs/specification/containerservice/resource-manager/readme.md",
"tag": "package-2020-04",
- "use": "@microsoft.azure/autorest.go@2.1.183",
+ "use": "@microsoft.azure/autorest.go@2.1.187",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
- "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2020-04 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/containerservice/resource-manager/readme.md",
+ "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2020-04 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/containerservice/resource-manager/readme.md",
"additional_properties": {
- "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION"
+ "additional_options": "--go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION"
}
}
\ No newline at end of file
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/agentpools.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/agentpools.go
index 941a2edf44ff..67c2249c28f8 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/agentpools.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/agentpools.go
@@ -66,7 +66,7 @@ func (client AgentPoolsClient) CreateOrUpdate(ctx context.Context, resourceGroup
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -101,6 +101,7 @@ func (client AgentPoolsClient) CreateOrUpdatePreparer(ctx context.Context, resou
// http.Response Body if it receives an error.
func (client AgentPoolsClient) CreateOrUpdateSender(req *http.Request) (future AgentPoolsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -158,7 +159,7 @@ func (client AgentPoolsClient) Delete(ctx context.Context, resourceGroupName str
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -191,6 +192,7 @@ func (client AgentPoolsClient) DeletePreparer(ctx context.Context, resourceGroup
// http.Response Body if it receives an error.
func (client AgentPoolsClient) DeleteSender(req *http.Request) (future AgentPoolsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/containerservices.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/containerservices.go
index b0d0759ab9d8..afd3daf68f3e 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/containerservices.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/containerservices.go
@@ -91,7 +91,7 @@ func (client ContainerServicesClient) CreateOrUpdate(ctx context.Context, resour
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -125,6 +125,7 @@ func (client ContainerServicesClient) CreateOrUpdatePreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client ContainerServicesClient) CreateOrUpdateSender(req *http.Request) (future ContainerServicesCreateOrUpdateFutureType, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -174,7 +175,7 @@ func (client ContainerServicesClient) Delete(ctx context.Context, resourceGroupN
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -206,6 +207,7 @@ func (client ContainerServicesClient) DeletePreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client ContainerServicesClient) DeleteSender(req *http.Request) (future ContainerServicesDeleteFutureType, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/managedclusters.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/managedclusters.go
index 28744f538273..947e7db425f7 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/managedclusters.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/managedclusters.go
@@ -105,7 +105,7 @@ func (client ManagedClustersClient) CreateOrUpdate(ctx context.Context, resource
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -139,6 +139,7 @@ func (client ManagedClustersClient) CreateOrUpdatePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client ManagedClustersClient) CreateOrUpdateSender(req *http.Request) (future ManagedClustersCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -195,7 +196,7 @@ func (client ManagedClustersClient) Delete(ctx context.Context, resourceGroupNam
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -227,6 +228,7 @@ func (client ManagedClustersClient) DeletePreparer(ctx context.Context, resource
// http.Response Body if it receives an error.
func (client ManagedClustersClient) DeleteSender(req *http.Request) (future ManagedClustersDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1047,7 +1049,7 @@ func (client ManagedClustersClient) ResetAADProfile(ctx context.Context, resourc
result, err = client.ResetAADProfileSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ResetAADProfile", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ResetAADProfile", result.Response(), "Failure sending request")
return
}
@@ -1081,6 +1083,7 @@ func (client ManagedClustersClient) ResetAADProfilePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client ManagedClustersClient) ResetAADProfileSender(req *http.Request) (future ManagedClustersResetAADProfileFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1139,7 +1142,7 @@ func (client ManagedClustersClient) ResetServicePrincipalProfile(ctx context.Con
result, err = client.ResetServicePrincipalProfileSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ResetServicePrincipalProfile", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ResetServicePrincipalProfile", result.Response(), "Failure sending request")
return
}
@@ -1173,6 +1176,7 @@ func (client ManagedClustersClient) ResetServicePrincipalProfilePreparer(ctx con
// http.Response Body if it receives an error.
func (client ManagedClustersClient) ResetServicePrincipalProfileSender(req *http.Request) (future ManagedClustersResetServicePrincipalProfileFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1228,7 +1232,7 @@ func (client ManagedClustersClient) RotateClusterCertificates(ctx context.Contex
result, err = client.RotateClusterCertificatesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "RotateClusterCertificates", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "RotateClusterCertificates", result.Response(), "Failure sending request")
return
}
@@ -1260,6 +1264,7 @@ func (client ManagedClustersClient) RotateClusterCertificatesPreparer(ctx contex
// http.Response Body if it receives an error.
func (client ManagedClustersClient) RotateClusterCertificatesSender(req *http.Request) (future ManagedClustersRotateClusterCertificatesFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1316,7 +1321,7 @@ func (client ManagedClustersClient) UpdateTags(ctx context.Context, resourceGrou
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -1350,6 +1355,7 @@ func (client ManagedClustersClient) UpdateTagsPreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client ManagedClustersClient) UpdateTagsSender(req *http.Request) (future ManagedClustersUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/openshiftmanagedclusters.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/openshiftmanagedclusters.go
index 074d37d1060a..aad5edd3ba55 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/openshiftmanagedclusters.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice/openshiftmanagedclusters.go
@@ -69,7 +69,7 @@ func (client OpenShiftManagedClustersClient) CreateOrUpdate(ctx context.Context,
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -103,6 +103,7 @@ func (client OpenShiftManagedClustersClient) CreateOrUpdatePreparer(ctx context.
// http.Response Body if it receives an error.
func (client OpenShiftManagedClustersClient) CreateOrUpdateSender(req *http.Request) (future OpenShiftManagedClustersCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -155,7 +156,7 @@ func (client OpenShiftManagedClustersClient) Delete(ctx context.Context, resourc
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -187,6 +188,7 @@ func (client OpenShiftManagedClustersClient) DeletePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client OpenShiftManagedClustersClient) DeleteSender(req *http.Request) (future OpenShiftManagedClustersDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -558,7 +560,7 @@ func (client OpenShiftManagedClustersClient) UpdateTags(ctx context.Context, res
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -592,6 +594,7 @@ func (client OpenShiftManagedClustersClient) UpdateTagsPreparer(ctx context.Cont
// http.Response Body if it receives an error.
func (client OpenShiftManagedClustersClient) UpdateTagsSender(req *http.Request) (future OpenShiftManagedClustersUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/CHANGELOG.md b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/CHANGELOG.md
new file mode 100644
index 000000000000..52911e4cc5e4
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/CHANGELOG.md
@@ -0,0 +1,2 @@
+# Change History
+
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/_meta.json b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/_meta.json
new file mode 100644
index 000000000000..db3833a9811e
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/_meta.json
@@ -0,0 +1,11 @@
+{
+ "commit": "547fc2c120bac50455ab85831747d7041a2cc4ea",
+ "readme": "/_/azure-rest-api-specs/specification/containerservice/resource-manager/readme.md",
+ "tag": "package-2021-10",
+ "use": "@microsoft.azure/autorest.go@2.1.187",
+ "repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
+ "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2021-10 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix /_/azure-rest-api-specs/specification/containerservice/resource-manager/readme.md",
+ "additional_properties": {
+ "additional_options": "--go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix"
+ }
+}
\ No newline at end of file
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/agentpools.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/agentpools.go
new file mode 100644
index 000000000000..17ff02c43203
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/agentpools.go
@@ -0,0 +1,708 @@
+package containerservice
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// AgentPoolsClient is the the Container Service Client.
+type AgentPoolsClient struct {
+ BaseClient
+}
+
+// NewAgentPoolsClient creates an instance of the AgentPoolsClient client.
+func NewAgentPoolsClient(subscriptionID string) AgentPoolsClient {
+ return NewAgentPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewAgentPoolsClientWithBaseURI creates an instance of the AgentPoolsClient client using a custom endpoint. Use this
+// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewAgentPoolsClientWithBaseURI(baseURI string, subscriptionID string) AgentPoolsClient {
+ return AgentPoolsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate sends the create or update request.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// agentPoolName - the name of the agent pool.
+// parameters - the agent pool to create or update.
+func (client AgentPoolsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, parameters AgentPool) (result AgentPoolsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}},
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.ManagedClusterAgentPoolProfileProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterAgentPoolProfileProperties.KubeletConfig", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterAgentPoolProfileProperties.KubeletConfig.ContainerLogMaxFiles", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterAgentPoolProfileProperties.KubeletConfig.ContainerLogMaxFiles", Name: validation.InclusiveMinimum, Rule: int64(2), Chain: nil}}},
+ }},
+ }}}}}); err != nil {
+ return result, validation.NewError("containerservice.AgentPoolsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, resourceName, agentPoolName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client AgentPoolsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string, parameters AgentPool) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "agentPoolName": autorest.Encode("path", agentPoolName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client AgentPoolsClient) CreateOrUpdateSender(req *http.Request) (future AgentPoolsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client AgentPoolsClient) CreateOrUpdateResponder(resp *http.Response) (result AgentPool, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete sends the delete request.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// agentPoolName - the name of the agent pool.
+func (client AgentPoolsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (result AgentPoolsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.AgentPoolsClient", "Delete", err.Error())
+ }
+
+ req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName, agentPoolName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client AgentPoolsClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "agentPoolName": autorest.Encode("path", agentPoolName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client AgentPoolsClient) DeleteSender(req *http.Request) (future AgentPoolsDeleteFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client AgentPoolsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get sends the get request.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// agentPoolName - the name of the agent pool.
+func (client AgentPoolsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (result AgentPool, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.AgentPoolsClient", "Get", err.Error())
+ }
+
+ req, err := client.GetPreparer(ctx, resourceGroupName, resourceName, agentPoolName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client AgentPoolsClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "agentPoolName": autorest.Encode("path", agentPoolName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client AgentPoolsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client AgentPoolsClient) GetResponder(resp *http.Response) (result AgentPool, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetAvailableAgentPoolVersions see [supported Kubernetes
+// versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more details about the version
+// lifecycle.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+func (client AgentPoolsClient) GetAvailableAgentPoolVersions(ctx context.Context, resourceGroupName string, resourceName string) (result AgentPoolAvailableVersions, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.GetAvailableAgentPoolVersions")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.AgentPoolsClient", "GetAvailableAgentPoolVersions", err.Error())
+ }
+
+ req, err := client.GetAvailableAgentPoolVersionsPreparer(ctx, resourceGroupName, resourceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "GetAvailableAgentPoolVersions", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetAvailableAgentPoolVersionsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "GetAvailableAgentPoolVersions", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetAvailableAgentPoolVersionsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "GetAvailableAgentPoolVersions", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetAvailableAgentPoolVersionsPreparer prepares the GetAvailableAgentPoolVersions request.
+func (client AgentPoolsClient) GetAvailableAgentPoolVersionsPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetAvailableAgentPoolVersionsSender sends the GetAvailableAgentPoolVersions request. The method will close the
+// http.Response Body if it receives an error.
+func (client AgentPoolsClient) GetAvailableAgentPoolVersionsSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetAvailableAgentPoolVersionsResponder handles the response to the GetAvailableAgentPoolVersions request. The method always
+// closes the http.Response Body.
+func (client AgentPoolsClient) GetAvailableAgentPoolVersionsResponder(resp *http.Response) (result AgentPoolAvailableVersions, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetUpgradeProfile sends the get upgrade profile request.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// agentPoolName - the name of the agent pool.
+func (client AgentPoolsClient) GetUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (result AgentPoolUpgradeProfile, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.GetUpgradeProfile")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.AgentPoolsClient", "GetUpgradeProfile", err.Error())
+ }
+
+ req, err := client.GetUpgradeProfilePreparer(ctx, resourceGroupName, resourceName, agentPoolName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "GetUpgradeProfile", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetUpgradeProfileSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "GetUpgradeProfile", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetUpgradeProfileResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "GetUpgradeProfile", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetUpgradeProfilePreparer prepares the GetUpgradeProfile request.
+func (client AgentPoolsClient) GetUpgradeProfilePreparer(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "agentPoolName": autorest.Encode("path", agentPoolName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetUpgradeProfileSender sends the GetUpgradeProfile request. The method will close the
+// http.Response Body if it receives an error.
+func (client AgentPoolsClient) GetUpgradeProfileSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetUpgradeProfileResponder handles the response to the GetUpgradeProfile request. The method always
+// closes the http.Response Body.
+func (client AgentPoolsClient) GetUpgradeProfileResponder(resp *http.Response) (result AgentPoolUpgradeProfile, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List sends the list request.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+func (client AgentPoolsClient) List(ctx context.Context, resourceGroupName string, resourceName string) (result AgentPoolListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.List")
+ defer func() {
+ sc := -1
+ if result.aplr.Response.Response != nil {
+ sc = result.aplr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.AgentPoolsClient", "List", err.Error())
+ }
+
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName, resourceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.aplr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.aplr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "List", resp, "Failure responding to request")
+ return
+ }
+ if result.aplr.hasNextLink() && result.aplr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client AgentPoolsClient) ListPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client AgentPoolsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client AgentPoolsClient) ListResponder(resp *http.Response) (result AgentPoolListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client AgentPoolsClient) listNextResults(ctx context.Context, lastResults AgentPoolListResult) (result AgentPoolListResult, err error) {
+ req, err := lastResults.agentPoolListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client AgentPoolsClient) ListComplete(ctx context.Context, resourceGroupName string, resourceName string) (result AgentPoolListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx, resourceGroupName, resourceName)
+ return
+}
+
+// UpgradeNodeImageVersion upgrading the node image version of an agent pool applies the newest OS and runtime updates
+// to the nodes. AKS provides one new image per week with the latest updates. For more details on node image versions,
+// see: https://docs.microsoft.com/azure/aks/node-image-upgrade
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// agentPoolName - the name of the agent pool.
+func (client AgentPoolsClient) UpgradeNodeImageVersion(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (result AgentPoolsUpgradeNodeImageVersionFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolsClient.UpgradeNodeImageVersion")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.AgentPoolsClient", "UpgradeNodeImageVersion", err.Error())
+ }
+
+ req, err := client.UpgradeNodeImageVersionPreparer(ctx, resourceGroupName, resourceName, agentPoolName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "UpgradeNodeImageVersion", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpgradeNodeImageVersionSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsClient", "UpgradeNodeImageVersion", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpgradeNodeImageVersionPreparer prepares the UpgradeNodeImageVersion request.
+func (client AgentPoolsClient) UpgradeNodeImageVersionPreparer(ctx context.Context, resourceGroupName string, resourceName string, agentPoolName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "agentPoolName": autorest.Encode("path", agentPoolName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpgradeNodeImageVersionSender sends the UpgradeNodeImageVersion request. The method will close the
+// http.Response Body if it receives an error.
+func (client AgentPoolsClient) UpgradeNodeImageVersionSender(req *http.Request) (future AgentPoolsUpgradeNodeImageVersionFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// UpgradeNodeImageVersionResponder handles the response to the UpgradeNodeImageVersion request. The method always
+// closes the http.Response Body.
+func (client AgentPoolsClient) UpgradeNodeImageVersionResponder(resp *http.Response) (result AgentPool, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/client.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/client.go
new file mode 100644
index 000000000000..7b32e332fd4c
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/client.go
@@ -0,0 +1,41 @@
+// Package containerservice implements the Azure ARM Containerservice service API version 2021-10-01.
+//
+// The Container Service Client.
+package containerservice
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "github.com/Azure/go-autorest/autorest"
+)
+
+const (
+ // DefaultBaseURI is the default URI used for the service Containerservice
+ DefaultBaseURI = "https://management.azure.com"
+)
+
+// BaseClient is the base client for Containerservice.
+type BaseClient struct {
+ autorest.Client
+ BaseURI string
+ SubscriptionID string
+}
+
+// New creates an instance of the BaseClient client.
+func New(subscriptionID string) BaseClient {
+ return NewWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with
+// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
+ return BaseClient{
+ Client: autorest.NewClientWithUserAgent(UserAgent()),
+ BaseURI: baseURI,
+ SubscriptionID: subscriptionID,
+ }
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/enums.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/enums.go
new file mode 100644
index 000000000000..e57a1a6c30c1
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/enums.go
@@ -0,0 +1,963 @@
+package containerservice
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// AgentPoolMode enumerates the values for agent pool mode.
+type AgentPoolMode string
+
+const (
+ // AgentPoolModeSystem System agent pools are primarily for hosting critical system pods such as CoreDNS
+ // and metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at
+ // least 2vCPUs and 4GB of memory.
+ AgentPoolModeSystem AgentPoolMode = "System"
+ // AgentPoolModeUser User agent pools are primarily for hosting your application pods.
+ AgentPoolModeUser AgentPoolMode = "User"
+)
+
+// PossibleAgentPoolModeValues returns an array of possible values for the AgentPoolMode const type.
+func PossibleAgentPoolModeValues() []AgentPoolMode {
+ return []AgentPoolMode{AgentPoolModeSystem, AgentPoolModeUser}
+}
+
+// AgentPoolType enumerates the values for agent pool type.
+type AgentPoolType string
+
+const (
+ // AgentPoolTypeAvailabilitySet Use of this is strongly discouraged.
+ AgentPoolTypeAvailabilitySet AgentPoolType = "AvailabilitySet"
+ // AgentPoolTypeVirtualMachineScaleSets Create an Agent Pool backed by a Virtual Machine Scale Set.
+ AgentPoolTypeVirtualMachineScaleSets AgentPoolType = "VirtualMachineScaleSets"
+)
+
+// PossibleAgentPoolTypeValues returns an array of possible values for the AgentPoolType const type.
+func PossibleAgentPoolTypeValues() []AgentPoolType {
+ return []AgentPoolType{AgentPoolTypeAvailabilitySet, AgentPoolTypeVirtualMachineScaleSets}
+}
+
+// Code enumerates the values for code.
+type Code string
+
+const (
+ // CodeRunning The cluster is running.
+ CodeRunning Code = "Running"
+ // CodeStopped The cluster is stopped.
+ CodeStopped Code = "Stopped"
+)
+
+// PossibleCodeValues returns an array of possible values for the Code const type.
+func PossibleCodeValues() []Code {
+ return []Code{CodeRunning, CodeStopped}
+}
+
+// ConnectionStatus enumerates the values for connection status.
+type ConnectionStatus string
+
+const (
+ // ConnectionStatusApproved ...
+ ConnectionStatusApproved ConnectionStatus = "Approved"
+ // ConnectionStatusDisconnected ...
+ ConnectionStatusDisconnected ConnectionStatus = "Disconnected"
+ // ConnectionStatusPending ...
+ ConnectionStatusPending ConnectionStatus = "Pending"
+ // ConnectionStatusRejected ...
+ ConnectionStatusRejected ConnectionStatus = "Rejected"
+)
+
+// PossibleConnectionStatusValues returns an array of possible values for the ConnectionStatus const type.
+func PossibleConnectionStatusValues() []ConnectionStatus {
+ return []ConnectionStatus{ConnectionStatusApproved, ConnectionStatusDisconnected, ConnectionStatusPending, ConnectionStatusRejected}
+}
+
+// CreatedByType enumerates the values for created by type.
+type CreatedByType string
+
+const (
+ // CreatedByTypeApplication ...
+ CreatedByTypeApplication CreatedByType = "Application"
+ // CreatedByTypeKey ...
+ CreatedByTypeKey CreatedByType = "Key"
+ // CreatedByTypeManagedIdentity ...
+ CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
+ // CreatedByTypeUser ...
+ CreatedByTypeUser CreatedByType = "User"
+)
+
+// PossibleCreatedByTypeValues returns an array of possible values for the CreatedByType const type.
+func PossibleCreatedByTypeValues() []CreatedByType {
+ return []CreatedByType{CreatedByTypeApplication, CreatedByTypeKey, CreatedByTypeManagedIdentity, CreatedByTypeUser}
+}
+
+// Expander enumerates the values for expander.
+type Expander string
+
+const (
+ // ExpanderLeastWaste Selects the node group that will have the least idle CPU (if tied, unused memory)
+ // after scale-up. This is useful when you have different classes of nodes, for example, high CPU or high
+ // memory nodes, and only want to expand those when there are pending pods that need a lot of those
+ // resources.
+ ExpanderLeastWaste Expander = "least-waste"
+ // ExpanderMostPods Selects the node group that would be able to schedule the most pods when scaling up.
+ // This is useful when you are using nodeSelector to make sure certain pods land on certain nodes. Note
+ // that this won't cause the autoscaler to select bigger nodes vs. smaller, as it can add multiple smaller
+ // nodes at once.
+ ExpanderMostPods Expander = "most-pods"
+ // ExpanderPriority Selects the node group that has the highest priority assigned by the user. It's
+ // configuration is described in more details
+ // [here](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/expander/priority/readme.md).
+ ExpanderPriority Expander = "priority"
+ // ExpanderRandom Used when you don't have a particular need for the node groups to scale differently.
+ ExpanderRandom Expander = "random"
+)
+
+// PossibleExpanderValues returns an array of possible values for the Expander const type.
+func PossibleExpanderValues() []Expander {
+ return []Expander{ExpanderLeastWaste, ExpanderMostPods, ExpanderPriority, ExpanderRandom}
+}
+
+// ExtendedLocationTypes enumerates the values for extended location types.
+type ExtendedLocationTypes string
+
+const (
+ // ExtendedLocationTypesEdgeZone ...
+ ExtendedLocationTypesEdgeZone ExtendedLocationTypes = "EdgeZone"
+)
+
+// PossibleExtendedLocationTypesValues returns an array of possible values for the ExtendedLocationTypes const type.
+func PossibleExtendedLocationTypesValues() []ExtendedLocationTypes {
+ return []ExtendedLocationTypes{ExtendedLocationTypesEdgeZone}
+}
+
+// GPUInstanceProfile enumerates the values for gpu instance profile.
+type GPUInstanceProfile string
+
+const (
+ // GPUInstanceProfileMIG1g ...
+ GPUInstanceProfileMIG1g GPUInstanceProfile = "MIG1g"
+ // GPUInstanceProfileMIG2g ...
+ GPUInstanceProfileMIG2g GPUInstanceProfile = "MIG2g"
+ // GPUInstanceProfileMIG3g ...
+ GPUInstanceProfileMIG3g GPUInstanceProfile = "MIG3g"
+ // GPUInstanceProfileMIG4g ...
+ GPUInstanceProfileMIG4g GPUInstanceProfile = "MIG4g"
+ // GPUInstanceProfileMIG7g ...
+ GPUInstanceProfileMIG7g GPUInstanceProfile = "MIG7g"
+)
+
+// PossibleGPUInstanceProfileValues returns an array of possible values for the GPUInstanceProfile const type.
+func PossibleGPUInstanceProfileValues() []GPUInstanceProfile {
+ return []GPUInstanceProfile{GPUInstanceProfileMIG1g, GPUInstanceProfileMIG2g, GPUInstanceProfileMIG3g, GPUInstanceProfileMIG4g, GPUInstanceProfileMIG7g}
+}
+
+// IPFamily enumerates the values for ip family.
+type IPFamily string
+
+const (
+ // IPFamilyIPv4 ...
+ IPFamilyIPv4 IPFamily = "IPv4"
+ // IPFamilyIPv6 ...
+ IPFamilyIPv6 IPFamily = "IPv6"
+)
+
+// PossibleIPFamilyValues returns an array of possible values for the IPFamily const type.
+func PossibleIPFamilyValues() []IPFamily {
+ return []IPFamily{IPFamilyIPv4, IPFamilyIPv6}
+}
+
+// KubeletDiskType enumerates the values for kubelet disk type.
+type KubeletDiskType string
+
+const (
+ // KubeletDiskTypeOS Kubelet will use the OS disk for its data.
+ KubeletDiskTypeOS KubeletDiskType = "OS"
+ // KubeletDiskTypeTemporary Kubelet will use the temporary disk for its data.
+ KubeletDiskTypeTemporary KubeletDiskType = "Temporary"
+)
+
+// PossibleKubeletDiskTypeValues returns an array of possible values for the KubeletDiskType const type.
+func PossibleKubeletDiskTypeValues() []KubeletDiskType {
+ return []KubeletDiskType{KubeletDiskTypeOS, KubeletDiskTypeTemporary}
+}
+
+// LicenseType enumerates the values for license type.
+type LicenseType string
+
+const (
+ // LicenseTypeNone No additional licensing is applied.
+ LicenseTypeNone LicenseType = "None"
+ // LicenseTypeWindowsServer Enables Azure Hybrid User Benefits for Windows VMs.
+ LicenseTypeWindowsServer LicenseType = "Windows_Server"
+)
+
+// PossibleLicenseTypeValues returns an array of possible values for the LicenseType const type.
+func PossibleLicenseTypeValues() []LicenseType {
+ return []LicenseType{LicenseTypeNone, LicenseTypeWindowsServer}
+}
+
+// LoadBalancerSku enumerates the values for load balancer sku.
+type LoadBalancerSku string
+
+const (
+ // LoadBalancerSkuBasic Use a basic Load Balancer with limited functionality.
+ LoadBalancerSkuBasic LoadBalancerSku = "basic"
+ // LoadBalancerSkuStandard Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For
+ // more information about on working with the load balancer in the managed cluster, see the [standard Load
+ // Balancer](https://docs.microsoft.com/azure/aks/load-balancer-standard) article.
+ LoadBalancerSkuStandard LoadBalancerSku = "standard"
+)
+
+// PossibleLoadBalancerSkuValues returns an array of possible values for the LoadBalancerSku const type.
+func PossibleLoadBalancerSkuValues() []LoadBalancerSku {
+ return []LoadBalancerSku{LoadBalancerSkuBasic, LoadBalancerSkuStandard}
+}
+
+// ManagedClusterPodIdentityProvisioningState enumerates the values for managed cluster pod identity
+// provisioning state.
+type ManagedClusterPodIdentityProvisioningState string
+
+const (
+ // ManagedClusterPodIdentityProvisioningStateAssigned ...
+ ManagedClusterPodIdentityProvisioningStateAssigned ManagedClusterPodIdentityProvisioningState = "Assigned"
+ // ManagedClusterPodIdentityProvisioningStateDeleting ...
+ ManagedClusterPodIdentityProvisioningStateDeleting ManagedClusterPodIdentityProvisioningState = "Deleting"
+ // ManagedClusterPodIdentityProvisioningStateFailed ...
+ ManagedClusterPodIdentityProvisioningStateFailed ManagedClusterPodIdentityProvisioningState = "Failed"
+ // ManagedClusterPodIdentityProvisioningStateUpdating ...
+ ManagedClusterPodIdentityProvisioningStateUpdating ManagedClusterPodIdentityProvisioningState = "Updating"
+)
+
+// PossibleManagedClusterPodIdentityProvisioningStateValues returns an array of possible values for the ManagedClusterPodIdentityProvisioningState const type.
+func PossibleManagedClusterPodIdentityProvisioningStateValues() []ManagedClusterPodIdentityProvisioningState {
+ return []ManagedClusterPodIdentityProvisioningState{ManagedClusterPodIdentityProvisioningStateAssigned, ManagedClusterPodIdentityProvisioningStateDeleting, ManagedClusterPodIdentityProvisioningStateFailed, ManagedClusterPodIdentityProvisioningStateUpdating}
+}
+
+// ManagedClusterSKUName enumerates the values for managed cluster sku name.
+type ManagedClusterSKUName string
+
+const (
+ // ManagedClusterSKUNameBasic ...
+ ManagedClusterSKUNameBasic ManagedClusterSKUName = "Basic"
+)
+
+// PossibleManagedClusterSKUNameValues returns an array of possible values for the ManagedClusterSKUName const type.
+func PossibleManagedClusterSKUNameValues() []ManagedClusterSKUName {
+ return []ManagedClusterSKUName{ManagedClusterSKUNameBasic}
+}
+
+// ManagedClusterSKUTier enumerates the values for managed cluster sku tier.
+type ManagedClusterSKUTier string
+
+const (
+ // ManagedClusterSKUTierFree No guaranteed SLA, no additional charges. Free tier clusters have an SLO of
+ // 99.5%.
+ ManagedClusterSKUTierFree ManagedClusterSKUTier = "Free"
+ // ManagedClusterSKUTierPaid Guarantees 99.95% availability of the Kubernetes API server endpoint for
+ // clusters that use Availability Zones and 99.9% of availability for clusters that don't use Availability
+ // Zones.
+ ManagedClusterSKUTierPaid ManagedClusterSKUTier = "Paid"
+)
+
+// PossibleManagedClusterSKUTierValues returns an array of possible values for the ManagedClusterSKUTier const type.
+func PossibleManagedClusterSKUTierValues() []ManagedClusterSKUTier {
+ return []ManagedClusterSKUTier{ManagedClusterSKUTierFree, ManagedClusterSKUTierPaid}
+}
+
+// NetworkMode enumerates the values for network mode.
+type NetworkMode string
+
+const (
+ // NetworkModeBridge This is no longer supported
+ NetworkModeBridge NetworkMode = "bridge"
+ // NetworkModeTransparent No bridge is created. Intra-VM Pod to Pod communication is through IP routes
+ // created by Azure CNI. See [Transparent Mode](https://docs.microsoft.com/azure/aks/faq#transparent-mode)
+ // for more information.
+ NetworkModeTransparent NetworkMode = "transparent"
+)
+
+// PossibleNetworkModeValues returns an array of possible values for the NetworkMode const type.
+func PossibleNetworkModeValues() []NetworkMode {
+ return []NetworkMode{NetworkModeBridge, NetworkModeTransparent}
+}
+
+// NetworkPlugin enumerates the values for network plugin.
+type NetworkPlugin string
+
+const (
+ // NetworkPluginAzure Use the Azure CNI network plugin. See [Azure CNI (advanced)
+ // networking](https://docs.microsoft.com/azure/aks/concepts-network#azure-cni-advanced-networking) for
+ // more information.
+ NetworkPluginAzure NetworkPlugin = "azure"
+ // NetworkPluginKubenet Use the Kubenet network plugin. See [Kubenet (basic)
+ // networking](https://docs.microsoft.com/azure/aks/concepts-network#kubenet-basic-networking) for more
+ // information.
+ NetworkPluginKubenet NetworkPlugin = "kubenet"
+)
+
+// PossibleNetworkPluginValues returns an array of possible values for the NetworkPlugin const type.
+func PossibleNetworkPluginValues() []NetworkPlugin {
+ return []NetworkPlugin{NetworkPluginAzure, NetworkPluginKubenet}
+}
+
+// NetworkPolicy enumerates the values for network policy.
+type NetworkPolicy string
+
+const (
+ // NetworkPolicyAzure Use Azure network policies. See [differences between Azure and Calico
+ // policies](https://docs.microsoft.com/azure/aks/use-network-policies#differences-between-azure-and-calico-policies-and-their-capabilities)
+ // for more information.
+ NetworkPolicyAzure NetworkPolicy = "azure"
+ // NetworkPolicyCalico Use Calico network policies. See [differences between Azure and Calico
+ // policies](https://docs.microsoft.com/azure/aks/use-network-policies#differences-between-azure-and-calico-policies-and-their-capabilities)
+ // for more information.
+ NetworkPolicyCalico NetworkPolicy = "calico"
+)
+
+// PossibleNetworkPolicyValues returns an array of possible values for the NetworkPolicy const type.
+func PossibleNetworkPolicyValues() []NetworkPolicy {
+ return []NetworkPolicy{NetworkPolicyAzure, NetworkPolicyCalico}
+}
+
+// OSDiskType enumerates the values for os disk type.
+type OSDiskType string
+
+const (
+ // OSDiskTypeEphemeral Ephemeral OS disks are stored only on the host machine, just like a temporary disk.
+ // This provides lower read/write latency, along with faster node scaling and cluster upgrades.
+ OSDiskTypeEphemeral OSDiskType = "Ephemeral"
+ // OSDiskTypeManaged Azure replicates the operating system disk for a virtual machine to Azure storage to
+ // avoid data loss should the VM need to be relocated to another host. Since containers aren't designed to
+ // have local state persisted, this behavior offers limited value while providing some drawbacks, including
+ // slower node provisioning and higher read/write latency.
+ OSDiskTypeManaged OSDiskType = "Managed"
+)
+
+// PossibleOSDiskTypeValues returns an array of possible values for the OSDiskType const type.
+func PossibleOSDiskTypeValues() []OSDiskType {
+ return []OSDiskType{OSDiskTypeEphemeral, OSDiskTypeManaged}
+}
+
+// OSSKU enumerates the values for ossku.
+type OSSKU string
+
+const (
+ // OSSKUCBLMariner ...
+ OSSKUCBLMariner OSSKU = "CBLMariner"
+ // OSSKUUbuntu ...
+ OSSKUUbuntu OSSKU = "Ubuntu"
+)
+
+// PossibleOSSKUValues returns an array of possible values for the OSSKU const type.
+func PossibleOSSKUValues() []OSSKU {
+ return []OSSKU{OSSKUCBLMariner, OSSKUUbuntu}
+}
+
+// OSType enumerates the values for os type.
+type OSType string
+
+const (
+ // OSTypeLinux Use Linux.
+ OSTypeLinux OSType = "Linux"
+ // OSTypeWindows Use Windows.
+ OSTypeWindows OSType = "Windows"
+)
+
+// PossibleOSTypeValues returns an array of possible values for the OSType const type.
+func PossibleOSTypeValues() []OSType {
+ return []OSType{OSTypeLinux, OSTypeWindows}
+}
+
+// OutboundType enumerates the values for outbound type.
+type OutboundType string
+
+const (
+ // OutboundTypeLoadBalancer The load balancer is used for egress through an AKS assigned public IP. This
+ // supports Kubernetes services of type 'loadBalancer'. For more information see [outbound type
+ // loadbalancer](https://docs.microsoft.com/azure/aks/egress-outboundtype#outbound-type-of-loadbalancer).
+ OutboundTypeLoadBalancer OutboundType = "loadBalancer"
+ // OutboundTypeManagedNATGateway The AKS-managed NAT gateway is used for egress.
+ OutboundTypeManagedNATGateway OutboundType = "managedNATGateway"
+ // OutboundTypeUserAssignedNATGateway The user-assigned NAT gateway associated to the cluster subnet is
+ // used for egress. This is an advanced scenario and requires proper network configuration.
+ OutboundTypeUserAssignedNATGateway OutboundType = "userAssignedNATGateway"
+ // OutboundTypeUserDefinedRouting Egress paths must be defined by the user. This is an advanced scenario
+ // and requires proper network configuration. For more information see [outbound type
+ // userDefinedRouting](https://docs.microsoft.com/azure/aks/egress-outboundtype#outbound-type-of-userdefinedrouting).
+ OutboundTypeUserDefinedRouting OutboundType = "userDefinedRouting"
+)
+
+// PossibleOutboundTypeValues returns an array of possible values for the OutboundType const type.
+func PossibleOutboundTypeValues() []OutboundType {
+ return []OutboundType{OutboundTypeLoadBalancer, OutboundTypeManagedNATGateway, OutboundTypeUserAssignedNATGateway, OutboundTypeUserDefinedRouting}
+}
+
+// PrivateEndpointConnectionProvisioningState enumerates the values for private endpoint connection
+// provisioning state.
+type PrivateEndpointConnectionProvisioningState string
+
+const (
+ // PrivateEndpointConnectionProvisioningStateCreating ...
+ PrivateEndpointConnectionProvisioningStateCreating PrivateEndpointConnectionProvisioningState = "Creating"
+ // PrivateEndpointConnectionProvisioningStateDeleting ...
+ PrivateEndpointConnectionProvisioningStateDeleting PrivateEndpointConnectionProvisioningState = "Deleting"
+ // PrivateEndpointConnectionProvisioningStateFailed ...
+ PrivateEndpointConnectionProvisioningStateFailed PrivateEndpointConnectionProvisioningState = "Failed"
+ // PrivateEndpointConnectionProvisioningStateSucceeded ...
+ PrivateEndpointConnectionProvisioningStateSucceeded PrivateEndpointConnectionProvisioningState = "Succeeded"
+)
+
+// PossiblePrivateEndpointConnectionProvisioningStateValues returns an array of possible values for the PrivateEndpointConnectionProvisioningState const type.
+func PossiblePrivateEndpointConnectionProvisioningStateValues() []PrivateEndpointConnectionProvisioningState {
+ return []PrivateEndpointConnectionProvisioningState{PrivateEndpointConnectionProvisioningStateCreating, PrivateEndpointConnectionProvisioningStateDeleting, PrivateEndpointConnectionProvisioningStateFailed, PrivateEndpointConnectionProvisioningStateSucceeded}
+}
+
+// PublicNetworkAccess enumerates the values for public network access.
+type PublicNetworkAccess string
+
+const (
+ // PublicNetworkAccessDisabled ...
+ PublicNetworkAccessDisabled PublicNetworkAccess = "Disabled"
+ // PublicNetworkAccessEnabled ...
+ PublicNetworkAccessEnabled PublicNetworkAccess = "Enabled"
+)
+
+// PossiblePublicNetworkAccessValues returns an array of possible values for the PublicNetworkAccess const type.
+func PossiblePublicNetworkAccessValues() []PublicNetworkAccess {
+ return []PublicNetworkAccess{PublicNetworkAccessDisabled, PublicNetworkAccessEnabled}
+}
+
+// ResourceIdentityType enumerates the values for resource identity type.
+type ResourceIdentityType string
+
+const (
+ // ResourceIdentityTypeNone Do not use a managed identity for the Managed Cluster, service principal will
+ // be used instead.
+ ResourceIdentityTypeNone ResourceIdentityType = "None"
+ // ResourceIdentityTypeSystemAssigned Use an implicitly created system assigned managed identity to manage
+ // cluster resources. Master components in the control plane such as kube-controller-manager will use the
+ // system assigned managed identity to manipulate Azure resources.
+ ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned"
+ // ResourceIdentityTypeUserAssigned Use a user-specified identity to manage cluster resources. Master
+ // components in the control plane such as kube-controller-manager will use the specified user assigned
+ // managed identity to manipulate Azure resources.
+ ResourceIdentityTypeUserAssigned ResourceIdentityType = "UserAssigned"
+)
+
+// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type.
+func PossibleResourceIdentityTypeValues() []ResourceIdentityType {
+ return []ResourceIdentityType{ResourceIdentityTypeNone, ResourceIdentityTypeSystemAssigned, ResourceIdentityTypeUserAssigned}
+}
+
+// ScaleDownMode enumerates the values for scale down mode.
+type ScaleDownMode string
+
+const (
+ // ScaleDownModeDeallocate Attempt to start deallocated instances (if they exist) during scale up and
+ // deallocate instances during scale down.
+ ScaleDownModeDeallocate ScaleDownMode = "Deallocate"
+ // ScaleDownModeDelete Create new instances during scale up and remove instances during scale down.
+ ScaleDownModeDelete ScaleDownMode = "Delete"
+)
+
+// PossibleScaleDownModeValues returns an array of possible values for the ScaleDownMode const type.
+func PossibleScaleDownModeValues() []ScaleDownMode {
+ return []ScaleDownMode{ScaleDownModeDeallocate, ScaleDownModeDelete}
+}
+
+// ScaleSetEvictionPolicy enumerates the values for scale set eviction policy.
+type ScaleSetEvictionPolicy string
+
+const (
+ // ScaleSetEvictionPolicyDeallocate Nodes in the underlying Scale Set of the node pool are set to the
+ // stopped-deallocated state upon eviction. Nodes in the stopped-deallocated state count against your
+ // compute quota and can cause issues with cluster scaling or upgrading.
+ ScaleSetEvictionPolicyDeallocate ScaleSetEvictionPolicy = "Deallocate"
+ // ScaleSetEvictionPolicyDelete Nodes in the underlying Scale Set of the node pool are deleted when they're
+ // evicted.
+ ScaleSetEvictionPolicyDelete ScaleSetEvictionPolicy = "Delete"
+)
+
+// PossibleScaleSetEvictionPolicyValues returns an array of possible values for the ScaleSetEvictionPolicy const type.
+func PossibleScaleSetEvictionPolicyValues() []ScaleSetEvictionPolicy {
+ return []ScaleSetEvictionPolicy{ScaleSetEvictionPolicyDeallocate, ScaleSetEvictionPolicyDelete}
+}
+
+// ScaleSetPriority enumerates the values for scale set priority.
+type ScaleSetPriority string
+
+const (
+ // ScaleSetPriorityRegular Regular VMs will be used.
+ ScaleSetPriorityRegular ScaleSetPriority = "Regular"
+ // ScaleSetPrioritySpot Spot priority VMs will be used. There is no SLA for spot nodes. See [spot on
+ // AKS](https://docs.microsoft.com/azure/aks/spot-node-pool) for more information.
+ ScaleSetPrioritySpot ScaleSetPriority = "Spot"
+)
+
+// PossibleScaleSetPriorityValues returns an array of possible values for the ScaleSetPriority const type.
+func PossibleScaleSetPriorityValues() []ScaleSetPriority {
+ return []ScaleSetPriority{ScaleSetPriorityRegular, ScaleSetPrioritySpot}
+}
+
+// SnapshotType enumerates the values for snapshot type.
+type SnapshotType string
+
+const (
+ // SnapshotTypeNodePool The snapshot is a snapshot of a node pool.
+ SnapshotTypeNodePool SnapshotType = "NodePool"
+)
+
+// PossibleSnapshotTypeValues returns an array of possible values for the SnapshotType const type.
+func PossibleSnapshotTypeValues() []SnapshotType {
+ return []SnapshotType{SnapshotTypeNodePool}
+}
+
+// StorageProfileTypes enumerates the values for storage profile types.
+type StorageProfileTypes string
+
+const (
+ // StorageProfileTypesManagedDisks ...
+ StorageProfileTypesManagedDisks StorageProfileTypes = "ManagedDisks"
+ // StorageProfileTypesStorageAccount ...
+ StorageProfileTypesStorageAccount StorageProfileTypes = "StorageAccount"
+)
+
+// PossibleStorageProfileTypesValues returns an array of possible values for the StorageProfileTypes const type.
+func PossibleStorageProfileTypesValues() []StorageProfileTypes {
+ return []StorageProfileTypes{StorageProfileTypesManagedDisks, StorageProfileTypesStorageAccount}
+}
+
+// UpgradeChannel enumerates the values for upgrade channel.
+type UpgradeChannel string
+
+const (
+ // UpgradeChannelNodeImage Automatically upgrade the node image to the latest version available. Microsoft
+ // provides patches and new images for image nodes frequently (usually weekly), but your running nodes
+ // won't get the new images unless you do a node image upgrade. Turning on the node-image channel will
+ // automatically update your node images whenever a new version is available.
+ UpgradeChannelNodeImage UpgradeChannel = "node-image"
+ // UpgradeChannelNone Disables auto-upgrades and keeps the cluster at its current version of Kubernetes.
+ UpgradeChannelNone UpgradeChannel = "none"
+ // UpgradeChannelPatch Automatically upgrade the cluster to the latest supported patch version when it
+ // becomes available while keeping the minor version the same. For example, if a cluster is running version
+ // 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is upgraded to
+ // 1.17.9.
+ UpgradeChannelPatch UpgradeChannel = "patch"
+ // UpgradeChannelRapid Automatically upgrade the cluster to the latest supported patch release on the
+ // latest supported minor version. In cases where the cluster is at a version of Kubernetes that is at an
+ // N-2 minor version where N is the latest supported minor version, the cluster first upgrades to the
+ // latest supported patch version on N-1 minor version. For example, if a cluster is running version 1.17.7
+ // and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is upgraded to 1.18.6,
+ // then is upgraded to 1.19.1.
+ UpgradeChannelRapid UpgradeChannel = "rapid"
+ // UpgradeChannelStable Automatically upgrade the cluster to the latest supported patch release on minor
+ // version N-1, where N is the latest supported minor version. For example, if a cluster is running version
+ // 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is upgraded to
+ // 1.18.6.
+ UpgradeChannelStable UpgradeChannel = "stable"
+)
+
+// PossibleUpgradeChannelValues returns an array of possible values for the UpgradeChannel const type.
+func PossibleUpgradeChannelValues() []UpgradeChannel {
+ return []UpgradeChannel{UpgradeChannelNodeImage, UpgradeChannelNone, UpgradeChannelPatch, UpgradeChannelRapid, UpgradeChannelStable}
+}
+
+// VMSizeTypes enumerates the values for vm size types.
+type VMSizeTypes string
+
+const (
+ // VMSizeTypesStandardA1 ...
+ VMSizeTypesStandardA1 VMSizeTypes = "Standard_A1"
+ // VMSizeTypesStandardA10 ...
+ VMSizeTypesStandardA10 VMSizeTypes = "Standard_A10"
+ // VMSizeTypesStandardA11 ...
+ VMSizeTypesStandardA11 VMSizeTypes = "Standard_A11"
+ // VMSizeTypesStandardA1V2 ...
+ VMSizeTypesStandardA1V2 VMSizeTypes = "Standard_A1_v2"
+ // VMSizeTypesStandardA2 ...
+ VMSizeTypesStandardA2 VMSizeTypes = "Standard_A2"
+ // VMSizeTypesStandardA2mV2 ...
+ VMSizeTypesStandardA2mV2 VMSizeTypes = "Standard_A2m_v2"
+ // VMSizeTypesStandardA2V2 ...
+ VMSizeTypesStandardA2V2 VMSizeTypes = "Standard_A2_v2"
+ // VMSizeTypesStandardA3 ...
+ VMSizeTypesStandardA3 VMSizeTypes = "Standard_A3"
+ // VMSizeTypesStandardA4 ...
+ VMSizeTypesStandardA4 VMSizeTypes = "Standard_A4"
+ // VMSizeTypesStandardA4mV2 ...
+ VMSizeTypesStandardA4mV2 VMSizeTypes = "Standard_A4m_v2"
+ // VMSizeTypesStandardA4V2 ...
+ VMSizeTypesStandardA4V2 VMSizeTypes = "Standard_A4_v2"
+ // VMSizeTypesStandardA5 ...
+ VMSizeTypesStandardA5 VMSizeTypes = "Standard_A5"
+ // VMSizeTypesStandardA6 ...
+ VMSizeTypesStandardA6 VMSizeTypes = "Standard_A6"
+ // VMSizeTypesStandardA7 ...
+ VMSizeTypesStandardA7 VMSizeTypes = "Standard_A7"
+ // VMSizeTypesStandardA8 ...
+ VMSizeTypesStandardA8 VMSizeTypes = "Standard_A8"
+ // VMSizeTypesStandardA8mV2 ...
+ VMSizeTypesStandardA8mV2 VMSizeTypes = "Standard_A8m_v2"
+ // VMSizeTypesStandardA8V2 ...
+ VMSizeTypesStandardA8V2 VMSizeTypes = "Standard_A8_v2"
+ // VMSizeTypesStandardA9 ...
+ VMSizeTypesStandardA9 VMSizeTypes = "Standard_A9"
+ // VMSizeTypesStandardB2ms ...
+ VMSizeTypesStandardB2ms VMSizeTypes = "Standard_B2ms"
+ // VMSizeTypesStandardB2s ...
+ VMSizeTypesStandardB2s VMSizeTypes = "Standard_B2s"
+ // VMSizeTypesStandardB4ms ...
+ VMSizeTypesStandardB4ms VMSizeTypes = "Standard_B4ms"
+ // VMSizeTypesStandardB8ms ...
+ VMSizeTypesStandardB8ms VMSizeTypes = "Standard_B8ms"
+ // VMSizeTypesStandardD1 ...
+ VMSizeTypesStandardD1 VMSizeTypes = "Standard_D1"
+ // VMSizeTypesStandardD11 ...
+ VMSizeTypesStandardD11 VMSizeTypes = "Standard_D11"
+ // VMSizeTypesStandardD11V2 ...
+ VMSizeTypesStandardD11V2 VMSizeTypes = "Standard_D11_v2"
+ // VMSizeTypesStandardD11V2Promo ...
+ VMSizeTypesStandardD11V2Promo VMSizeTypes = "Standard_D11_v2_Promo"
+ // VMSizeTypesStandardD12 ...
+ VMSizeTypesStandardD12 VMSizeTypes = "Standard_D12"
+ // VMSizeTypesStandardD12V2 ...
+ VMSizeTypesStandardD12V2 VMSizeTypes = "Standard_D12_v2"
+ // VMSizeTypesStandardD12V2Promo ...
+ VMSizeTypesStandardD12V2Promo VMSizeTypes = "Standard_D12_v2_Promo"
+ // VMSizeTypesStandardD13 ...
+ VMSizeTypesStandardD13 VMSizeTypes = "Standard_D13"
+ // VMSizeTypesStandardD13V2 ...
+ VMSizeTypesStandardD13V2 VMSizeTypes = "Standard_D13_v2"
+ // VMSizeTypesStandardD13V2Promo ...
+ VMSizeTypesStandardD13V2Promo VMSizeTypes = "Standard_D13_v2_Promo"
+ // VMSizeTypesStandardD14 ...
+ VMSizeTypesStandardD14 VMSizeTypes = "Standard_D14"
+ // VMSizeTypesStandardD14V2 ...
+ VMSizeTypesStandardD14V2 VMSizeTypes = "Standard_D14_v2"
+ // VMSizeTypesStandardD14V2Promo ...
+ VMSizeTypesStandardD14V2Promo VMSizeTypes = "Standard_D14_v2_Promo"
+ // VMSizeTypesStandardD15V2 ...
+ VMSizeTypesStandardD15V2 VMSizeTypes = "Standard_D15_v2"
+ // VMSizeTypesStandardD16sV3 ...
+ VMSizeTypesStandardD16sV3 VMSizeTypes = "Standard_D16s_v3"
+ // VMSizeTypesStandardD16V3 ...
+ VMSizeTypesStandardD16V3 VMSizeTypes = "Standard_D16_v3"
+ // VMSizeTypesStandardD1V2 ...
+ VMSizeTypesStandardD1V2 VMSizeTypes = "Standard_D1_v2"
+ // VMSizeTypesStandardD2 ...
+ VMSizeTypesStandardD2 VMSizeTypes = "Standard_D2"
+ // VMSizeTypesStandardD2sV3 ...
+ VMSizeTypesStandardD2sV3 VMSizeTypes = "Standard_D2s_v3"
+ // VMSizeTypesStandardD2V2 ...
+ VMSizeTypesStandardD2V2 VMSizeTypes = "Standard_D2_v2"
+ // VMSizeTypesStandardD2V2Promo ...
+ VMSizeTypesStandardD2V2Promo VMSizeTypes = "Standard_D2_v2_Promo"
+ // VMSizeTypesStandardD2V3 ...
+ VMSizeTypesStandardD2V3 VMSizeTypes = "Standard_D2_v3"
+ // VMSizeTypesStandardD3 ...
+ VMSizeTypesStandardD3 VMSizeTypes = "Standard_D3"
+ // VMSizeTypesStandardD32sV3 ...
+ VMSizeTypesStandardD32sV3 VMSizeTypes = "Standard_D32s_v3"
+ // VMSizeTypesStandardD32V3 ...
+ VMSizeTypesStandardD32V3 VMSizeTypes = "Standard_D32_v3"
+ // VMSizeTypesStandardD3V2 ...
+ VMSizeTypesStandardD3V2 VMSizeTypes = "Standard_D3_v2"
+ // VMSizeTypesStandardD3V2Promo ...
+ VMSizeTypesStandardD3V2Promo VMSizeTypes = "Standard_D3_v2_Promo"
+ // VMSizeTypesStandardD4 ...
+ VMSizeTypesStandardD4 VMSizeTypes = "Standard_D4"
+ // VMSizeTypesStandardD4sV3 ...
+ VMSizeTypesStandardD4sV3 VMSizeTypes = "Standard_D4s_v3"
+ // VMSizeTypesStandardD4V2 ...
+ VMSizeTypesStandardD4V2 VMSizeTypes = "Standard_D4_v2"
+ // VMSizeTypesStandardD4V2Promo ...
+ VMSizeTypesStandardD4V2Promo VMSizeTypes = "Standard_D4_v2_Promo"
+ // VMSizeTypesStandardD4V3 ...
+ VMSizeTypesStandardD4V3 VMSizeTypes = "Standard_D4_v3"
+ // VMSizeTypesStandardD5V2 ...
+ VMSizeTypesStandardD5V2 VMSizeTypes = "Standard_D5_v2"
+ // VMSizeTypesStandardD5V2Promo ...
+ VMSizeTypesStandardD5V2Promo VMSizeTypes = "Standard_D5_v2_Promo"
+ // VMSizeTypesStandardD64sV3 ...
+ VMSizeTypesStandardD64sV3 VMSizeTypes = "Standard_D64s_v3"
+ // VMSizeTypesStandardD64V3 ...
+ VMSizeTypesStandardD64V3 VMSizeTypes = "Standard_D64_v3"
+ // VMSizeTypesStandardD8sV3 ...
+ VMSizeTypesStandardD8sV3 VMSizeTypes = "Standard_D8s_v3"
+ // VMSizeTypesStandardD8V3 ...
+ VMSizeTypesStandardD8V3 VMSizeTypes = "Standard_D8_v3"
+ // VMSizeTypesStandardDS1 ...
+ VMSizeTypesStandardDS1 VMSizeTypes = "Standard_DS1"
+ // VMSizeTypesStandardDS11 ...
+ VMSizeTypesStandardDS11 VMSizeTypes = "Standard_DS11"
+ // VMSizeTypesStandardDS11V2 ...
+ VMSizeTypesStandardDS11V2 VMSizeTypes = "Standard_DS11_v2"
+ // VMSizeTypesStandardDS11V2Promo ...
+ VMSizeTypesStandardDS11V2Promo VMSizeTypes = "Standard_DS11_v2_Promo"
+ // VMSizeTypesStandardDS12 ...
+ VMSizeTypesStandardDS12 VMSizeTypes = "Standard_DS12"
+ // VMSizeTypesStandardDS12V2 ...
+ VMSizeTypesStandardDS12V2 VMSizeTypes = "Standard_DS12_v2"
+ // VMSizeTypesStandardDS12V2Promo ...
+ VMSizeTypesStandardDS12V2Promo VMSizeTypes = "Standard_DS12_v2_Promo"
+ // VMSizeTypesStandardDS13 ...
+ VMSizeTypesStandardDS13 VMSizeTypes = "Standard_DS13"
+ // VMSizeTypesStandardDS132V2 ...
+ VMSizeTypesStandardDS132V2 VMSizeTypes = "Standard_DS13-2_v2"
+ // VMSizeTypesStandardDS134V2 ...
+ VMSizeTypesStandardDS134V2 VMSizeTypes = "Standard_DS13-4_v2"
+ // VMSizeTypesStandardDS13V2 ...
+ VMSizeTypesStandardDS13V2 VMSizeTypes = "Standard_DS13_v2"
+ // VMSizeTypesStandardDS13V2Promo ...
+ VMSizeTypesStandardDS13V2Promo VMSizeTypes = "Standard_DS13_v2_Promo"
+ // VMSizeTypesStandardDS14 ...
+ VMSizeTypesStandardDS14 VMSizeTypes = "Standard_DS14"
+ // VMSizeTypesStandardDS144V2 ...
+ VMSizeTypesStandardDS144V2 VMSizeTypes = "Standard_DS14-4_v2"
+ // VMSizeTypesStandardDS148V2 ...
+ VMSizeTypesStandardDS148V2 VMSizeTypes = "Standard_DS14-8_v2"
+ // VMSizeTypesStandardDS14V2 ...
+ VMSizeTypesStandardDS14V2 VMSizeTypes = "Standard_DS14_v2"
+ // VMSizeTypesStandardDS14V2Promo ...
+ VMSizeTypesStandardDS14V2Promo VMSizeTypes = "Standard_DS14_v2_Promo"
+ // VMSizeTypesStandardDS15V2 ...
+ VMSizeTypesStandardDS15V2 VMSizeTypes = "Standard_DS15_v2"
+ // VMSizeTypesStandardDS1V2 ...
+ VMSizeTypesStandardDS1V2 VMSizeTypes = "Standard_DS1_v2"
+ // VMSizeTypesStandardDS2 ...
+ VMSizeTypesStandardDS2 VMSizeTypes = "Standard_DS2"
+ // VMSizeTypesStandardDS2V2 ...
+ VMSizeTypesStandardDS2V2 VMSizeTypes = "Standard_DS2_v2"
+ // VMSizeTypesStandardDS2V2Promo ...
+ VMSizeTypesStandardDS2V2Promo VMSizeTypes = "Standard_DS2_v2_Promo"
+ // VMSizeTypesStandardDS3 ...
+ VMSizeTypesStandardDS3 VMSizeTypes = "Standard_DS3"
+ // VMSizeTypesStandardDS3V2 ...
+ VMSizeTypesStandardDS3V2 VMSizeTypes = "Standard_DS3_v2"
+ // VMSizeTypesStandardDS3V2Promo ...
+ VMSizeTypesStandardDS3V2Promo VMSizeTypes = "Standard_DS3_v2_Promo"
+ // VMSizeTypesStandardDS4 ...
+ VMSizeTypesStandardDS4 VMSizeTypes = "Standard_DS4"
+ // VMSizeTypesStandardDS4V2 ...
+ VMSizeTypesStandardDS4V2 VMSizeTypes = "Standard_DS4_v2"
+ // VMSizeTypesStandardDS4V2Promo ...
+ VMSizeTypesStandardDS4V2Promo VMSizeTypes = "Standard_DS4_v2_Promo"
+ // VMSizeTypesStandardDS5V2 ...
+ VMSizeTypesStandardDS5V2 VMSizeTypes = "Standard_DS5_v2"
+ // VMSizeTypesStandardDS5V2Promo ...
+ VMSizeTypesStandardDS5V2Promo VMSizeTypes = "Standard_DS5_v2_Promo"
+ // VMSizeTypesStandardE16sV3 ...
+ VMSizeTypesStandardE16sV3 VMSizeTypes = "Standard_E16s_v3"
+ // VMSizeTypesStandardE16V3 ...
+ VMSizeTypesStandardE16V3 VMSizeTypes = "Standard_E16_v3"
+ // VMSizeTypesStandardE2sV3 ...
+ VMSizeTypesStandardE2sV3 VMSizeTypes = "Standard_E2s_v3"
+ // VMSizeTypesStandardE2V3 ...
+ VMSizeTypesStandardE2V3 VMSizeTypes = "Standard_E2_v3"
+ // VMSizeTypesStandardE3216sV3 ...
+ VMSizeTypesStandardE3216sV3 VMSizeTypes = "Standard_E32-16s_v3"
+ // VMSizeTypesStandardE328sV3 ...
+ VMSizeTypesStandardE328sV3 VMSizeTypes = "Standard_E32-8s_v3"
+ // VMSizeTypesStandardE32sV3 ...
+ VMSizeTypesStandardE32sV3 VMSizeTypes = "Standard_E32s_v3"
+ // VMSizeTypesStandardE32V3 ...
+ VMSizeTypesStandardE32V3 VMSizeTypes = "Standard_E32_v3"
+ // VMSizeTypesStandardE4sV3 ...
+ VMSizeTypesStandardE4sV3 VMSizeTypes = "Standard_E4s_v3"
+ // VMSizeTypesStandardE4V3 ...
+ VMSizeTypesStandardE4V3 VMSizeTypes = "Standard_E4_v3"
+ // VMSizeTypesStandardE6416sV3 ...
+ VMSizeTypesStandardE6416sV3 VMSizeTypes = "Standard_E64-16s_v3"
+ // VMSizeTypesStandardE6432sV3 ...
+ VMSizeTypesStandardE6432sV3 VMSizeTypes = "Standard_E64-32s_v3"
+ // VMSizeTypesStandardE64sV3 ...
+ VMSizeTypesStandardE64sV3 VMSizeTypes = "Standard_E64s_v3"
+ // VMSizeTypesStandardE64V3 ...
+ VMSizeTypesStandardE64V3 VMSizeTypes = "Standard_E64_v3"
+ // VMSizeTypesStandardE8sV3 ...
+ VMSizeTypesStandardE8sV3 VMSizeTypes = "Standard_E8s_v3"
+ // VMSizeTypesStandardE8V3 ...
+ VMSizeTypesStandardE8V3 VMSizeTypes = "Standard_E8_v3"
+ // VMSizeTypesStandardF1 ...
+ VMSizeTypesStandardF1 VMSizeTypes = "Standard_F1"
+ // VMSizeTypesStandardF16 ...
+ VMSizeTypesStandardF16 VMSizeTypes = "Standard_F16"
+ // VMSizeTypesStandardF16s ...
+ VMSizeTypesStandardF16s VMSizeTypes = "Standard_F16s"
+ // VMSizeTypesStandardF16sV2 ...
+ VMSizeTypesStandardF16sV2 VMSizeTypes = "Standard_F16s_v2"
+ // VMSizeTypesStandardF1s ...
+ VMSizeTypesStandardF1s VMSizeTypes = "Standard_F1s"
+ // VMSizeTypesStandardF2 ...
+ VMSizeTypesStandardF2 VMSizeTypes = "Standard_F2"
+ // VMSizeTypesStandardF2s ...
+ VMSizeTypesStandardF2s VMSizeTypes = "Standard_F2s"
+ // VMSizeTypesStandardF2sV2 ...
+ VMSizeTypesStandardF2sV2 VMSizeTypes = "Standard_F2s_v2"
+ // VMSizeTypesStandardF32sV2 ...
+ VMSizeTypesStandardF32sV2 VMSizeTypes = "Standard_F32s_v2"
+ // VMSizeTypesStandardF4 ...
+ VMSizeTypesStandardF4 VMSizeTypes = "Standard_F4"
+ // VMSizeTypesStandardF4s ...
+ VMSizeTypesStandardF4s VMSizeTypes = "Standard_F4s"
+ // VMSizeTypesStandardF4sV2 ...
+ VMSizeTypesStandardF4sV2 VMSizeTypes = "Standard_F4s_v2"
+ // VMSizeTypesStandardF64sV2 ...
+ VMSizeTypesStandardF64sV2 VMSizeTypes = "Standard_F64s_v2"
+ // VMSizeTypesStandardF72sV2 ...
+ VMSizeTypesStandardF72sV2 VMSizeTypes = "Standard_F72s_v2"
+ // VMSizeTypesStandardF8 ...
+ VMSizeTypesStandardF8 VMSizeTypes = "Standard_F8"
+ // VMSizeTypesStandardF8s ...
+ VMSizeTypesStandardF8s VMSizeTypes = "Standard_F8s"
+ // VMSizeTypesStandardF8sV2 ...
+ VMSizeTypesStandardF8sV2 VMSizeTypes = "Standard_F8s_v2"
+ // VMSizeTypesStandardG1 ...
+ VMSizeTypesStandardG1 VMSizeTypes = "Standard_G1"
+ // VMSizeTypesStandardG2 ...
+ VMSizeTypesStandardG2 VMSizeTypes = "Standard_G2"
+ // VMSizeTypesStandardG3 ...
+ VMSizeTypesStandardG3 VMSizeTypes = "Standard_G3"
+ // VMSizeTypesStandardG4 ...
+ VMSizeTypesStandardG4 VMSizeTypes = "Standard_G4"
+ // VMSizeTypesStandardG5 ...
+ VMSizeTypesStandardG5 VMSizeTypes = "Standard_G5"
+ // VMSizeTypesStandardGS1 ...
+ VMSizeTypesStandardGS1 VMSizeTypes = "Standard_GS1"
+ // VMSizeTypesStandardGS2 ...
+ VMSizeTypesStandardGS2 VMSizeTypes = "Standard_GS2"
+ // VMSizeTypesStandardGS3 ...
+ VMSizeTypesStandardGS3 VMSizeTypes = "Standard_GS3"
+ // VMSizeTypesStandardGS4 ...
+ VMSizeTypesStandardGS4 VMSizeTypes = "Standard_GS4"
+ // VMSizeTypesStandardGS44 ...
+ VMSizeTypesStandardGS44 VMSizeTypes = "Standard_GS4-4"
+ // VMSizeTypesStandardGS48 ...
+ VMSizeTypesStandardGS48 VMSizeTypes = "Standard_GS4-8"
+ // VMSizeTypesStandardGS5 ...
+ VMSizeTypesStandardGS5 VMSizeTypes = "Standard_GS5"
+ // VMSizeTypesStandardGS516 ...
+ VMSizeTypesStandardGS516 VMSizeTypes = "Standard_GS5-16"
+ // VMSizeTypesStandardGS58 ...
+ VMSizeTypesStandardGS58 VMSizeTypes = "Standard_GS5-8"
+ // VMSizeTypesStandardH16 ...
+ VMSizeTypesStandardH16 VMSizeTypes = "Standard_H16"
+ // VMSizeTypesStandardH16m ...
+ VMSizeTypesStandardH16m VMSizeTypes = "Standard_H16m"
+ // VMSizeTypesStandardH16mr ...
+ VMSizeTypesStandardH16mr VMSizeTypes = "Standard_H16mr"
+ // VMSizeTypesStandardH16r ...
+ VMSizeTypesStandardH16r VMSizeTypes = "Standard_H16r"
+ // VMSizeTypesStandardH8 ...
+ VMSizeTypesStandardH8 VMSizeTypes = "Standard_H8"
+ // VMSizeTypesStandardH8m ...
+ VMSizeTypesStandardH8m VMSizeTypes = "Standard_H8m"
+ // VMSizeTypesStandardL16s ...
+ VMSizeTypesStandardL16s VMSizeTypes = "Standard_L16s"
+ // VMSizeTypesStandardL32s ...
+ VMSizeTypesStandardL32s VMSizeTypes = "Standard_L32s"
+ // VMSizeTypesStandardL4s ...
+ VMSizeTypesStandardL4s VMSizeTypes = "Standard_L4s"
+ // VMSizeTypesStandardL8s ...
+ VMSizeTypesStandardL8s VMSizeTypes = "Standard_L8s"
+ // VMSizeTypesStandardM12832ms ...
+ VMSizeTypesStandardM12832ms VMSizeTypes = "Standard_M128-32ms"
+ // VMSizeTypesStandardM12864ms ...
+ VMSizeTypesStandardM12864ms VMSizeTypes = "Standard_M128-64ms"
+ // VMSizeTypesStandardM128ms ...
+ VMSizeTypesStandardM128ms VMSizeTypes = "Standard_M128ms"
+ // VMSizeTypesStandardM128s ...
+ VMSizeTypesStandardM128s VMSizeTypes = "Standard_M128s"
+ // VMSizeTypesStandardM6416ms ...
+ VMSizeTypesStandardM6416ms VMSizeTypes = "Standard_M64-16ms"
+ // VMSizeTypesStandardM6432ms ...
+ VMSizeTypesStandardM6432ms VMSizeTypes = "Standard_M64-32ms"
+ // VMSizeTypesStandardM64ms ...
+ VMSizeTypesStandardM64ms VMSizeTypes = "Standard_M64ms"
+ // VMSizeTypesStandardM64s ...
+ VMSizeTypesStandardM64s VMSizeTypes = "Standard_M64s"
+ // VMSizeTypesStandardNC12 ...
+ VMSizeTypesStandardNC12 VMSizeTypes = "Standard_NC12"
+ // VMSizeTypesStandardNC12sV2 ...
+ VMSizeTypesStandardNC12sV2 VMSizeTypes = "Standard_NC12s_v2"
+ // VMSizeTypesStandardNC12sV3 ...
+ VMSizeTypesStandardNC12sV3 VMSizeTypes = "Standard_NC12s_v3"
+ // VMSizeTypesStandardNC24 ...
+ VMSizeTypesStandardNC24 VMSizeTypes = "Standard_NC24"
+ // VMSizeTypesStandardNC24r ...
+ VMSizeTypesStandardNC24r VMSizeTypes = "Standard_NC24r"
+ // VMSizeTypesStandardNC24rsV2 ...
+ VMSizeTypesStandardNC24rsV2 VMSizeTypes = "Standard_NC24rs_v2"
+ // VMSizeTypesStandardNC24rsV3 ...
+ VMSizeTypesStandardNC24rsV3 VMSizeTypes = "Standard_NC24rs_v3"
+ // VMSizeTypesStandardNC24sV2 ...
+ VMSizeTypesStandardNC24sV2 VMSizeTypes = "Standard_NC24s_v2"
+ // VMSizeTypesStandardNC24sV3 ...
+ VMSizeTypesStandardNC24sV3 VMSizeTypes = "Standard_NC24s_v3"
+ // VMSizeTypesStandardNC6 ...
+ VMSizeTypesStandardNC6 VMSizeTypes = "Standard_NC6"
+ // VMSizeTypesStandardNC6sV2 ...
+ VMSizeTypesStandardNC6sV2 VMSizeTypes = "Standard_NC6s_v2"
+ // VMSizeTypesStandardNC6sV3 ...
+ VMSizeTypesStandardNC6sV3 VMSizeTypes = "Standard_NC6s_v3"
+ // VMSizeTypesStandardND12s ...
+ VMSizeTypesStandardND12s VMSizeTypes = "Standard_ND12s"
+ // VMSizeTypesStandardND24rs ...
+ VMSizeTypesStandardND24rs VMSizeTypes = "Standard_ND24rs"
+ // VMSizeTypesStandardND24s ...
+ VMSizeTypesStandardND24s VMSizeTypes = "Standard_ND24s"
+ // VMSizeTypesStandardND6s ...
+ VMSizeTypesStandardND6s VMSizeTypes = "Standard_ND6s"
+ // VMSizeTypesStandardNV12 ...
+ VMSizeTypesStandardNV12 VMSizeTypes = "Standard_NV12"
+ // VMSizeTypesStandardNV24 ...
+ VMSizeTypesStandardNV24 VMSizeTypes = "Standard_NV24"
+ // VMSizeTypesStandardNV6 ...
+ VMSizeTypesStandardNV6 VMSizeTypes = "Standard_NV6"
+)
+
+// PossibleVMSizeTypesValues returns an array of possible values for the VMSizeTypes const type.
+func PossibleVMSizeTypesValues() []VMSizeTypes {
+ return []VMSizeTypes{VMSizeTypesStandardA1, VMSizeTypesStandardA10, VMSizeTypesStandardA11, VMSizeTypesStandardA1V2, VMSizeTypesStandardA2, VMSizeTypesStandardA2mV2, VMSizeTypesStandardA2V2, VMSizeTypesStandardA3, VMSizeTypesStandardA4, VMSizeTypesStandardA4mV2, VMSizeTypesStandardA4V2, VMSizeTypesStandardA5, VMSizeTypesStandardA6, VMSizeTypesStandardA7, VMSizeTypesStandardA8, VMSizeTypesStandardA8mV2, VMSizeTypesStandardA8V2, VMSizeTypesStandardA9, VMSizeTypesStandardB2ms, VMSizeTypesStandardB2s, VMSizeTypesStandardB4ms, VMSizeTypesStandardB8ms, VMSizeTypesStandardD1, VMSizeTypesStandardD11, VMSizeTypesStandardD11V2, VMSizeTypesStandardD11V2Promo, VMSizeTypesStandardD12, VMSizeTypesStandardD12V2, VMSizeTypesStandardD12V2Promo, VMSizeTypesStandardD13, VMSizeTypesStandardD13V2, VMSizeTypesStandardD13V2Promo, VMSizeTypesStandardD14, VMSizeTypesStandardD14V2, VMSizeTypesStandardD14V2Promo, VMSizeTypesStandardD15V2, VMSizeTypesStandardD16sV3, VMSizeTypesStandardD16V3, VMSizeTypesStandardD1V2, VMSizeTypesStandardD2, VMSizeTypesStandardD2sV3, VMSizeTypesStandardD2V2, VMSizeTypesStandardD2V2Promo, VMSizeTypesStandardD2V3, VMSizeTypesStandardD3, VMSizeTypesStandardD32sV3, VMSizeTypesStandardD32V3, VMSizeTypesStandardD3V2, VMSizeTypesStandardD3V2Promo, VMSizeTypesStandardD4, VMSizeTypesStandardD4sV3, VMSizeTypesStandardD4V2, VMSizeTypesStandardD4V2Promo, VMSizeTypesStandardD4V3, VMSizeTypesStandardD5V2, VMSizeTypesStandardD5V2Promo, VMSizeTypesStandardD64sV3, VMSizeTypesStandardD64V3, VMSizeTypesStandardD8sV3, VMSizeTypesStandardD8V3, VMSizeTypesStandardDS1, VMSizeTypesStandardDS11, VMSizeTypesStandardDS11V2, VMSizeTypesStandardDS11V2Promo, VMSizeTypesStandardDS12, VMSizeTypesStandardDS12V2, VMSizeTypesStandardDS12V2Promo, VMSizeTypesStandardDS13, VMSizeTypesStandardDS132V2, VMSizeTypesStandardDS134V2, VMSizeTypesStandardDS13V2, VMSizeTypesStandardDS13V2Promo, VMSizeTypesStandardDS14, VMSizeTypesStandardDS144V2, VMSizeTypesStandardDS148V2, VMSizeTypesStandardDS14V2, VMSizeTypesStandardDS14V2Promo, VMSizeTypesStandardDS15V2, VMSizeTypesStandardDS1V2, VMSizeTypesStandardDS2, VMSizeTypesStandardDS2V2, VMSizeTypesStandardDS2V2Promo, VMSizeTypesStandardDS3, VMSizeTypesStandardDS3V2, VMSizeTypesStandardDS3V2Promo, VMSizeTypesStandardDS4, VMSizeTypesStandardDS4V2, VMSizeTypesStandardDS4V2Promo, VMSizeTypesStandardDS5V2, VMSizeTypesStandardDS5V2Promo, VMSizeTypesStandardE16sV3, VMSizeTypesStandardE16V3, VMSizeTypesStandardE2sV3, VMSizeTypesStandardE2V3, VMSizeTypesStandardE3216sV3, VMSizeTypesStandardE328sV3, VMSizeTypesStandardE32sV3, VMSizeTypesStandardE32V3, VMSizeTypesStandardE4sV3, VMSizeTypesStandardE4V3, VMSizeTypesStandardE6416sV3, VMSizeTypesStandardE6432sV3, VMSizeTypesStandardE64sV3, VMSizeTypesStandardE64V3, VMSizeTypesStandardE8sV3, VMSizeTypesStandardE8V3, VMSizeTypesStandardF1, VMSizeTypesStandardF16, VMSizeTypesStandardF16s, VMSizeTypesStandardF16sV2, VMSizeTypesStandardF1s, VMSizeTypesStandardF2, VMSizeTypesStandardF2s, VMSizeTypesStandardF2sV2, VMSizeTypesStandardF32sV2, VMSizeTypesStandardF4, VMSizeTypesStandardF4s, VMSizeTypesStandardF4sV2, VMSizeTypesStandardF64sV2, VMSizeTypesStandardF72sV2, VMSizeTypesStandardF8, VMSizeTypesStandardF8s, VMSizeTypesStandardF8sV2, VMSizeTypesStandardG1, VMSizeTypesStandardG2, VMSizeTypesStandardG3, VMSizeTypesStandardG4, VMSizeTypesStandardG5, VMSizeTypesStandardGS1, VMSizeTypesStandardGS2, VMSizeTypesStandardGS3, VMSizeTypesStandardGS4, VMSizeTypesStandardGS44, VMSizeTypesStandardGS48, VMSizeTypesStandardGS5, VMSizeTypesStandardGS516, VMSizeTypesStandardGS58, VMSizeTypesStandardH16, VMSizeTypesStandardH16m, VMSizeTypesStandardH16mr, VMSizeTypesStandardH16r, VMSizeTypesStandardH8, VMSizeTypesStandardH8m, VMSizeTypesStandardL16s, VMSizeTypesStandardL32s, VMSizeTypesStandardL4s, VMSizeTypesStandardL8s, VMSizeTypesStandardM12832ms, VMSizeTypesStandardM12864ms, VMSizeTypesStandardM128ms, VMSizeTypesStandardM128s, VMSizeTypesStandardM6416ms, VMSizeTypesStandardM6432ms, VMSizeTypesStandardM64ms, VMSizeTypesStandardM64s, VMSizeTypesStandardNC12, VMSizeTypesStandardNC12sV2, VMSizeTypesStandardNC12sV3, VMSizeTypesStandardNC24, VMSizeTypesStandardNC24r, VMSizeTypesStandardNC24rsV2, VMSizeTypesStandardNC24rsV3, VMSizeTypesStandardNC24sV2, VMSizeTypesStandardNC24sV3, VMSizeTypesStandardNC6, VMSizeTypesStandardNC6sV2, VMSizeTypesStandardNC6sV3, VMSizeTypesStandardND12s, VMSizeTypesStandardND24rs, VMSizeTypesStandardND24s, VMSizeTypesStandardND6s, VMSizeTypesStandardNV12, VMSizeTypesStandardNV24, VMSizeTypesStandardNV6}
+}
+
+// WeekDay enumerates the values for week day.
+type WeekDay string
+
+const (
+ // WeekDayFriday ...
+ WeekDayFriday WeekDay = "Friday"
+ // WeekDayMonday ...
+ WeekDayMonday WeekDay = "Monday"
+ // WeekDaySaturday ...
+ WeekDaySaturday WeekDay = "Saturday"
+ // WeekDaySunday ...
+ WeekDaySunday WeekDay = "Sunday"
+ // WeekDayThursday ...
+ WeekDayThursday WeekDay = "Thursday"
+ // WeekDayTuesday ...
+ WeekDayTuesday WeekDay = "Tuesday"
+ // WeekDayWednesday ...
+ WeekDayWednesday WeekDay = "Wednesday"
+)
+
+// PossibleWeekDayValues returns an array of possible values for the WeekDay const type.
+func PossibleWeekDayValues() []WeekDay {
+ return []WeekDay{WeekDayFriday, WeekDayMonday, WeekDaySaturday, WeekDaySunday, WeekDayThursday, WeekDayTuesday, WeekDayWednesday}
+}
+
+// WorkloadRuntime enumerates the values for workload runtime.
+type WorkloadRuntime string
+
+const (
+ // WorkloadRuntimeOCIContainer Nodes will use Kubelet to run standard OCI container workloads.
+ WorkloadRuntimeOCIContainer WorkloadRuntime = "OCIContainer"
+ // WorkloadRuntimeWasmWasi Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview).
+ WorkloadRuntimeWasmWasi WorkloadRuntime = "WasmWasi"
+)
+
+// PossibleWorkloadRuntimeValues returns an array of possible values for the WorkloadRuntime const type.
+func PossibleWorkloadRuntimeValues() []WorkloadRuntime {
+ return []WorkloadRuntime{WorkloadRuntimeOCIContainer, WorkloadRuntimeWasmWasi}
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/maintenanceconfigurations.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/maintenanceconfigurations.go
new file mode 100644
index 000000000000..a9d72a0b9ec5
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/maintenanceconfigurations.go
@@ -0,0 +1,428 @@
+package containerservice
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// MaintenanceConfigurationsClient is the the Container Service Client.
+type MaintenanceConfigurationsClient struct {
+ BaseClient
+}
+
+// NewMaintenanceConfigurationsClient creates an instance of the MaintenanceConfigurationsClient client.
+func NewMaintenanceConfigurationsClient(subscriptionID string) MaintenanceConfigurationsClient {
+ return NewMaintenanceConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewMaintenanceConfigurationsClientWithBaseURI creates an instance of the MaintenanceConfigurationsClient client
+// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign
+// clouds, Azure stack).
+func NewMaintenanceConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) MaintenanceConfigurationsClient {
+ return MaintenanceConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate sends the create or update request.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// configName - the name of the maintenance configuration.
+// parameters - the maintenance configuration to create or update.
+func (client MaintenanceConfigurationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, configName string, parameters MaintenanceConfiguration) (result MaintenanceConfiguration, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MaintenanceConfigurationsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.MaintenanceConfigurationsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, resourceName, configName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.MaintenanceConfigurationsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.MaintenanceConfigurationsClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.MaintenanceConfigurationsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client MaintenanceConfigurationsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, configName string, parameters MaintenanceConfiguration) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "configName": autorest.Encode("path", configName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ parameters.SystemData = nil
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client MaintenanceConfigurationsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client MaintenanceConfigurationsClient) CreateOrUpdateResponder(resp *http.Response) (result MaintenanceConfiguration, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete sends the delete request.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// configName - the name of the maintenance configuration.
+func (client MaintenanceConfigurationsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, configName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MaintenanceConfigurationsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.MaintenanceConfigurationsClient", "Delete", err.Error())
+ }
+
+ req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName, configName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.MaintenanceConfigurationsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "containerservice.MaintenanceConfigurationsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.MaintenanceConfigurationsClient", "Delete", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client MaintenanceConfigurationsClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string, configName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "configName": autorest.Encode("path", configName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client MaintenanceConfigurationsClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client MaintenanceConfigurationsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get sends the get request.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// configName - the name of the maintenance configuration.
+func (client MaintenanceConfigurationsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, configName string) (result MaintenanceConfiguration, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MaintenanceConfigurationsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.MaintenanceConfigurationsClient", "Get", err.Error())
+ }
+
+ req, err := client.GetPreparer(ctx, resourceGroupName, resourceName, configName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.MaintenanceConfigurationsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.MaintenanceConfigurationsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.MaintenanceConfigurationsClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client MaintenanceConfigurationsClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string, configName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "configName": autorest.Encode("path", configName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client MaintenanceConfigurationsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client MaintenanceConfigurationsClient) GetResponder(resp *http.Response) (result MaintenanceConfiguration, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByManagedCluster sends the list by managed cluster request.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+func (client MaintenanceConfigurationsClient) ListByManagedCluster(ctx context.Context, resourceGroupName string, resourceName string) (result MaintenanceConfigurationListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MaintenanceConfigurationsClient.ListByManagedCluster")
+ defer func() {
+ sc := -1
+ if result.mclr.Response.Response != nil {
+ sc = result.mclr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.MaintenanceConfigurationsClient", "ListByManagedCluster", err.Error())
+ }
+
+ result.fn = client.listByManagedClusterNextResults
+ req, err := client.ListByManagedClusterPreparer(ctx, resourceGroupName, resourceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.MaintenanceConfigurationsClient", "ListByManagedCluster", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByManagedClusterSender(req)
+ if err != nil {
+ result.mclr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.MaintenanceConfigurationsClient", "ListByManagedCluster", resp, "Failure sending request")
+ return
+ }
+
+ result.mclr, err = client.ListByManagedClusterResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.MaintenanceConfigurationsClient", "ListByManagedCluster", resp, "Failure responding to request")
+ return
+ }
+ if result.mclr.hasNextLink() && result.mclr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListByManagedClusterPreparer prepares the ListByManagedCluster request.
+func (client MaintenanceConfigurationsClient) ListByManagedClusterPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByManagedClusterSender sends the ListByManagedCluster request. The method will close the
+// http.Response Body if it receives an error.
+func (client MaintenanceConfigurationsClient) ListByManagedClusterSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByManagedClusterResponder handles the response to the ListByManagedCluster request. The method always
+// closes the http.Response Body.
+func (client MaintenanceConfigurationsClient) ListByManagedClusterResponder(resp *http.Response) (result MaintenanceConfigurationListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByManagedClusterNextResults retrieves the next set of results, if any.
+func (client MaintenanceConfigurationsClient) listByManagedClusterNextResults(ctx context.Context, lastResults MaintenanceConfigurationListResult) (result MaintenanceConfigurationListResult, err error) {
+ req, err := lastResults.maintenanceConfigurationListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "containerservice.MaintenanceConfigurationsClient", "listByManagedClusterNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByManagedClusterSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "containerservice.MaintenanceConfigurationsClient", "listByManagedClusterNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByManagedClusterResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.MaintenanceConfigurationsClient", "listByManagedClusterNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByManagedClusterComplete enumerates all values, automatically crossing page boundaries as required.
+func (client MaintenanceConfigurationsClient) ListByManagedClusterComplete(ctx context.Context, resourceGroupName string, resourceName string) (result MaintenanceConfigurationListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MaintenanceConfigurationsClient.ListByManagedCluster")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByManagedCluster(ctx, resourceGroupName, resourceName)
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/managedclusters.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/managedclusters.go
new file mode 100644
index 000000000000..ccc735ae5548
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/managedclusters.go
@@ -0,0 +1,1969 @@
+package containerservice
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// ManagedClustersClient is the the Container Service Client.
+type ManagedClustersClient struct {
+ BaseClient
+}
+
+// NewManagedClustersClient creates an instance of the ManagedClustersClient client.
+func NewManagedClustersClient(subscriptionID string) ManagedClustersClient {
+ return NewManagedClustersClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewManagedClustersClientWithBaseURI creates an instance of the ManagedClustersClient client using a custom endpoint.
+// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewManagedClustersClientWithBaseURI(baseURI string, subscriptionID string) ManagedClustersClient {
+ return ManagedClustersClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate sends the create or update request.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// parameters - the managed cluster to create or update.
+func (client ManagedClustersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedCluster) (result ManagedClustersCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}},
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.ManagedClusterProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile.AdminUsername", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile.AdminUsername", Name: validation.Pattern, Rule: `^[A-Za-z][-A-Za-z0-9_]*$`, Chain: nil}}},
+ {Target: "parameters.ManagedClusterProperties.LinuxProfile.SSH", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.LinuxProfile.SSH.PublicKeys", Name: validation.Null, Rule: true, Chain: nil}}},
+ }},
+ {Target: "parameters.ManagedClusterProperties.WindowsProfile", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.WindowsProfile.AdminUsername", Name: validation.Null, Rule: true, Chain: nil}}},
+ {Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.ServicePrincipalProfile.ClientID", Name: validation.Null, Rule: true, Chain: nil}}},
+ {Target: "parameters.ManagedClusterProperties.NetworkProfile", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.PodCidr", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.PodCidr", Name: validation.Pattern, Rule: `^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$`, Chain: nil}}},
+ {Target: "parameters.ManagedClusterProperties.NetworkProfile.ServiceCidr", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.ServiceCidr", Name: validation.Pattern, Rule: `^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$`, Chain: nil}}},
+ {Target: "parameters.ManagedClusterProperties.NetworkProfile.DNSServiceIP", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.DNSServiceIP", Name: validation.Pattern, Rule: `^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$`, Chain: nil}}},
+ {Target: "parameters.ManagedClusterProperties.NetworkProfile.DockerBridgeCidr", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.DockerBridgeCidr", Name: validation.Pattern, Rule: `^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$`, Chain: nil}}},
+ {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs.Count", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs.Count", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil},
+ {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs.Count", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil},
+ }},
+ {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs.CountIPv6", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs.CountIPv6", Name: validation.InclusiveMaximum, Rule: int64(100), Chain: nil},
+ {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.ManagedOutboundIPs.CountIPv6", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
+ }},
+ }},
+ {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.AllocatedOutboundPorts", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.AllocatedOutboundPorts", Name: validation.InclusiveMaximum, Rule: int64(64000), Chain: nil},
+ {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.AllocatedOutboundPorts", Name: validation.InclusiveMinimum, Rule: int64(0), Chain: nil},
+ }},
+ {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.IdleTimeoutInMinutes", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.IdleTimeoutInMinutes", Name: validation.InclusiveMaximum, Rule: int64(120), Chain: nil},
+ {Target: "parameters.ManagedClusterProperties.NetworkProfile.LoadBalancerProfile.IdleTimeoutInMinutes", Name: validation.InclusiveMinimum, Rule: int64(4), Chain: nil},
+ }},
+ }},
+ {Target: "parameters.ManagedClusterProperties.NetworkProfile.NatGatewayProfile", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.NatGatewayProfile.ManagedOutboundIPProfile", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.NatGatewayProfile.ManagedOutboundIPProfile.Count", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.NatGatewayProfile.ManagedOutboundIPProfile.Count", Name: validation.InclusiveMaximum, Rule: int64(16), Chain: nil},
+ {Target: "parameters.ManagedClusterProperties.NetworkProfile.NatGatewayProfile.ManagedOutboundIPProfile.Count", Name: validation.InclusiveMinimum, Rule: int64(1), Chain: nil},
+ }},
+ }},
+ {Target: "parameters.ManagedClusterProperties.NetworkProfile.NatGatewayProfile.IdleTimeoutInMinutes", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ManagedClusterProperties.NetworkProfile.NatGatewayProfile.IdleTimeoutInMinutes", Name: validation.InclusiveMaximum, Rule: int64(120), Chain: nil},
+ {Target: "parameters.ManagedClusterProperties.NetworkProfile.NatGatewayProfile.IdleTimeoutInMinutes", Name: validation.InclusiveMinimum, Rule: int64(4), Chain: nil},
+ }},
+ }},
+ }},
+ }}}}}); err != nil {
+ return result, validation.NewError("containerservice.ManagedClustersClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, resourceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client ManagedClustersClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedCluster) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) CreateOrUpdateSender(req *http.Request) (future ManagedClustersCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client ManagedClustersClient) CreateOrUpdateResponder(resp *http.Response) (result ManagedCluster, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete sends the delete request.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+func (client ManagedClustersClient) Delete(ctx context.Context, resourceGroupName string, resourceName string) (result ManagedClustersDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.Delete")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.ManagedClustersClient", "Delete", err.Error())
+ }
+
+ req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client ManagedClustersClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) DeleteSender(req *http.Request) (future ManagedClustersDeleteFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client ManagedClustersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get sends the get request.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+func (client ManagedClustersClient) Get(ctx context.Context, resourceGroupName string, resourceName string) (result ManagedCluster, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.ManagedClustersClient", "Get", err.Error())
+ }
+
+ req, err := client.GetPreparer(ctx, resourceGroupName, resourceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ManagedClustersClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client ManagedClustersClient) GetResponder(resp *http.Response) (result ManagedCluster, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetAccessProfile **WARNING**: This API will be deprecated. Instead use
+// [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) or
+// [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) .
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// roleName - the name of the role for managed cluster accessProfile resource.
+func (client ManagedClustersClient) GetAccessProfile(ctx context.Context, resourceGroupName string, resourceName string, roleName string) (result ManagedClusterAccessProfile, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.GetAccessProfile")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.ManagedClustersClient", "GetAccessProfile", err.Error())
+ }
+
+ req, err := client.GetAccessProfilePreparer(ctx, resourceGroupName, resourceName, roleName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetAccessProfile", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetAccessProfileSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetAccessProfile", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetAccessProfileResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetAccessProfile", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetAccessProfilePreparer prepares the GetAccessProfile request.
+func (client ManagedClustersClient) GetAccessProfilePreparer(ctx context.Context, resourceGroupName string, resourceName string, roleName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "roleName": autorest.Encode("path", roleName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetAccessProfileSender sends the GetAccessProfile request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) GetAccessProfileSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetAccessProfileResponder handles the response to the GetAccessProfile request. The method always
+// closes the http.Response Body.
+func (client ManagedClustersClient) GetAccessProfileResponder(resp *http.Response) (result ManagedClusterAccessProfile, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetCommandResult sends the get command result request.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// commandID - id of the command.
+func (client ManagedClustersClient) GetCommandResult(ctx context.Context, resourceGroupName string, resourceName string, commandID string) (result RunCommandResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.GetCommandResult")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.ManagedClustersClient", "GetCommandResult", err.Error())
+ }
+
+ req, err := client.GetCommandResultPreparer(ctx, resourceGroupName, resourceName, commandID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetCommandResult", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetCommandResultSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetCommandResult", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetCommandResultResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetCommandResult", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetCommandResultPreparer prepares the GetCommandResult request.
+func (client ManagedClustersClient) GetCommandResultPreparer(ctx context.Context, resourceGroupName string, resourceName string, commandID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "commandId": autorest.Encode("path", commandID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetCommandResultSender sends the GetCommandResult request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) GetCommandResultSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetCommandResultResponder handles the response to the GetCommandResult request. The method always
+// closes the http.Response Body.
+func (client ManagedClustersClient) GetCommandResultResponder(resp *http.Response) (result RunCommandResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetOSOptions sends the get os options request.
+// Parameters:
+// location - the name of a supported Azure region.
+// resourceType - the resource type for which the OS options needs to be returned
+func (client ManagedClustersClient) GetOSOptions(ctx context.Context, location string, resourceType string) (result OSOptionProfile, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.GetOSOptions")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetOSOptionsPreparer(ctx, location, resourceType)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetOSOptions", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetOSOptionsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetOSOptions", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetOSOptionsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetOSOptions", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetOSOptionsPreparer prepares the GetOSOptions request.
+func (client ManagedClustersClient) GetOSOptionsPreparer(ctx context.Context, location string, resourceType string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(resourceType) > 0 {
+ queryParameters["resource-type"] = autorest.Encode("query", resourceType)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/osOptions/default", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetOSOptionsSender sends the GetOSOptions request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) GetOSOptionsSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetOSOptionsResponder handles the response to the GetOSOptions request. The method always
+// closes the http.Response Body.
+func (client ManagedClustersClient) GetOSOptionsResponder(resp *http.Response) (result OSOptionProfile, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// GetUpgradeProfile sends the get upgrade profile request.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+func (client ManagedClustersClient) GetUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string) (result ManagedClusterUpgradeProfile, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.GetUpgradeProfile")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.ManagedClustersClient", "GetUpgradeProfile", err.Error())
+ }
+
+ req, err := client.GetUpgradeProfilePreparer(ctx, resourceGroupName, resourceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetUpgradeProfile", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetUpgradeProfileSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetUpgradeProfile", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetUpgradeProfileResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetUpgradeProfile", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetUpgradeProfilePreparer prepares the GetUpgradeProfile request.
+func (client ManagedClustersClient) GetUpgradeProfilePreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetUpgradeProfileSender sends the GetUpgradeProfile request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) GetUpgradeProfileSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetUpgradeProfileResponder handles the response to the GetUpgradeProfile request. The method always
+// closes the http.Response Body.
+func (client ManagedClustersClient) GetUpgradeProfileResponder(resp *http.Response) (result ManagedClusterUpgradeProfile, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List sends the list request.
+func (client ManagedClustersClient) List(ctx context.Context) (result ManagedClusterListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.List")
+ defer func() {
+ sc := -1
+ if result.mclr.Response.Response != nil {
+ sc = result.mclr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.mclr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.mclr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "List", resp, "Failure responding to request")
+ return
+ }
+ if result.mclr.hasNextLink() && result.mclr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ManagedClustersClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client ManagedClustersClient) ListResponder(resp *http.Response) (result ManagedClusterListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client ManagedClustersClient) listNextResults(ctx context.Context, lastResults ManagedClusterListResult) (result ManagedClusterListResult, err error) {
+ req, err := lastResults.managedClusterListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ManagedClustersClient) ListComplete(ctx context.Context) (result ManagedClusterListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx)
+ return
+}
+
+// ListByResourceGroup sends the list by resource group request.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client ManagedClustersClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ManagedClusterListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.mclr.Response.Response != nil {
+ sc = result.mclr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.ManagedClustersClient", "ListByResourceGroup", err.Error())
+ }
+
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.mclr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.mclr, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListByResourceGroup", resp, "Failure responding to request")
+ return
+ }
+ if result.mclr.hasNextLink() && result.mclr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client ManagedClustersClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client ManagedClustersClient) ListByResourceGroupResponder(resp *http.Response) (result ManagedClusterListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByResourceGroupNextResults retrieves the next set of results, if any.
+func (client ManagedClustersClient) listByResourceGroupNextResults(ctx context.Context, lastResults ManagedClusterListResult) (result ManagedClusterListResult, err error) {
+ req, err := lastResults.managedClusterListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ManagedClustersClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ManagedClusterListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByResourceGroup(ctx, resourceGroupName)
+ return
+}
+
+// ListClusterAdminCredentials sends the list cluster admin credentials request.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// serverFqdn - server fqdn type for credentials to be returned
+func (client ManagedClustersClient) ListClusterAdminCredentials(ctx context.Context, resourceGroupName string, resourceName string, serverFqdn string) (result CredentialResults, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ListClusterAdminCredentials")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.ManagedClustersClient", "ListClusterAdminCredentials", err.Error())
+ }
+
+ req, err := client.ListClusterAdminCredentialsPreparer(ctx, resourceGroupName, resourceName, serverFqdn)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterAdminCredentials", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListClusterAdminCredentialsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterAdminCredentials", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListClusterAdminCredentialsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterAdminCredentials", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// ListClusterAdminCredentialsPreparer prepares the ListClusterAdminCredentials request.
+func (client ManagedClustersClient) ListClusterAdminCredentialsPreparer(ctx context.Context, resourceGroupName string, resourceName string, serverFqdn string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(serverFqdn) > 0 {
+ queryParameters["server-fqdn"] = autorest.Encode("query", serverFqdn)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListClusterAdminCredentialsSender sends the ListClusterAdminCredentials request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) ListClusterAdminCredentialsSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListClusterAdminCredentialsResponder handles the response to the ListClusterAdminCredentials request. The method always
+// closes the http.Response Body.
+func (client ManagedClustersClient) ListClusterAdminCredentialsResponder(resp *http.Response) (result CredentialResults, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListClusterMonitoringUserCredentials sends the list cluster monitoring user credentials request.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// serverFqdn - server fqdn type for credentials to be returned
+func (client ManagedClustersClient) ListClusterMonitoringUserCredentials(ctx context.Context, resourceGroupName string, resourceName string, serverFqdn string) (result CredentialResults, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ListClusterMonitoringUserCredentials")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.ManagedClustersClient", "ListClusterMonitoringUserCredentials", err.Error())
+ }
+
+ req, err := client.ListClusterMonitoringUserCredentialsPreparer(ctx, resourceGroupName, resourceName, serverFqdn)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterMonitoringUserCredentials", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListClusterMonitoringUserCredentialsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterMonitoringUserCredentials", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListClusterMonitoringUserCredentialsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterMonitoringUserCredentials", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// ListClusterMonitoringUserCredentialsPreparer prepares the ListClusterMonitoringUserCredentials request.
+func (client ManagedClustersClient) ListClusterMonitoringUserCredentialsPreparer(ctx context.Context, resourceGroupName string, resourceName string, serverFqdn string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(serverFqdn) > 0 {
+ queryParameters["server-fqdn"] = autorest.Encode("query", serverFqdn)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListClusterMonitoringUserCredentialsSender sends the ListClusterMonitoringUserCredentials request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) ListClusterMonitoringUserCredentialsSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListClusterMonitoringUserCredentialsResponder handles the response to the ListClusterMonitoringUserCredentials request. The method always
+// closes the http.Response Body.
+func (client ManagedClustersClient) ListClusterMonitoringUserCredentialsResponder(resp *http.Response) (result CredentialResults, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListClusterUserCredentials sends the list cluster user credentials request.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// serverFqdn - server fqdn type for credentials to be returned
+func (client ManagedClustersClient) ListClusterUserCredentials(ctx context.Context, resourceGroupName string, resourceName string, serverFqdn string) (result CredentialResults, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ListClusterUserCredentials")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.ManagedClustersClient", "ListClusterUserCredentials", err.Error())
+ }
+
+ req, err := client.ListClusterUserCredentialsPreparer(ctx, resourceGroupName, resourceName, serverFqdn)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterUserCredentials", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListClusterUserCredentialsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterUserCredentials", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListClusterUserCredentialsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterUserCredentials", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// ListClusterUserCredentialsPreparer prepares the ListClusterUserCredentials request.
+func (client ManagedClustersClient) ListClusterUserCredentialsPreparer(ctx context.Context, resourceGroupName string, resourceName string, serverFqdn string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(serverFqdn) > 0 {
+ queryParameters["server-fqdn"] = autorest.Encode("query", serverFqdn)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListClusterUserCredentialsSender sends the ListClusterUserCredentials request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) ListClusterUserCredentialsSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListClusterUserCredentialsResponder handles the response to the ListClusterUserCredentials request. The method always
+// closes the http.Response Body.
+func (client ManagedClustersClient) ListClusterUserCredentialsResponder(resp *http.Response) (result CredentialResults, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListOutboundNetworkDependenciesEndpoints gets a list of egress endpoints (network endpoints of all outbound
+// dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+func (client ManagedClustersClient) ListOutboundNetworkDependenciesEndpoints(ctx context.Context, resourceGroupName string, resourceName string) (result OutboundEnvironmentEndpointCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ListOutboundNetworkDependenciesEndpoints")
+ defer func() {
+ sc := -1
+ if result.oeec.Response.Response != nil {
+ sc = result.oeec.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.ManagedClustersClient", "ListOutboundNetworkDependenciesEndpoints", err.Error())
+ }
+
+ result.fn = client.listOutboundNetworkDependenciesEndpointsNextResults
+ req, err := client.ListOutboundNetworkDependenciesEndpointsPreparer(ctx, resourceGroupName, resourceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListOutboundNetworkDependenciesEndpoints", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListOutboundNetworkDependenciesEndpointsSender(req)
+ if err != nil {
+ result.oeec.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListOutboundNetworkDependenciesEndpoints", resp, "Failure sending request")
+ return
+ }
+
+ result.oeec, err = client.ListOutboundNetworkDependenciesEndpointsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListOutboundNetworkDependenciesEndpoints", resp, "Failure responding to request")
+ return
+ }
+ if result.oeec.hasNextLink() && result.oeec.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListOutboundNetworkDependenciesEndpointsPreparer prepares the ListOutboundNetworkDependenciesEndpoints request.
+func (client ManagedClustersClient) ListOutboundNetworkDependenciesEndpointsPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListOutboundNetworkDependenciesEndpointsSender sends the ListOutboundNetworkDependenciesEndpoints request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) ListOutboundNetworkDependenciesEndpointsSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListOutboundNetworkDependenciesEndpointsResponder handles the response to the ListOutboundNetworkDependenciesEndpoints request. The method always
+// closes the http.Response Body.
+func (client ManagedClustersClient) ListOutboundNetworkDependenciesEndpointsResponder(resp *http.Response) (result OutboundEnvironmentEndpointCollection, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listOutboundNetworkDependenciesEndpointsNextResults retrieves the next set of results, if any.
+func (client ManagedClustersClient) listOutboundNetworkDependenciesEndpointsNextResults(ctx context.Context, lastResults OutboundEnvironmentEndpointCollection) (result OutboundEnvironmentEndpointCollection, err error) {
+ req, err := lastResults.outboundEnvironmentEndpointCollectionPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listOutboundNetworkDependenciesEndpointsNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListOutboundNetworkDependenciesEndpointsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listOutboundNetworkDependenciesEndpointsNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListOutboundNetworkDependenciesEndpointsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listOutboundNetworkDependenciesEndpointsNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListOutboundNetworkDependenciesEndpointsComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ManagedClustersClient) ListOutboundNetworkDependenciesEndpointsComplete(ctx context.Context, resourceGroupName string, resourceName string) (result OutboundEnvironmentEndpointCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ListOutboundNetworkDependenciesEndpoints")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListOutboundNetworkDependenciesEndpoints(ctx, resourceGroupName, resourceName)
+ return
+}
+
+// ResetAADProfile sends the reset aad profile request.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// parameters - the AAD profile to set on the Managed Cluster
+func (client ManagedClustersClient) ResetAADProfile(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedClusterAADProfile) (result ManagedClustersResetAADProfileFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ResetAADProfile")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.ManagedClustersClient", "ResetAADProfile", err.Error())
+ }
+
+ req, err := client.ResetAADProfilePreparer(ctx, resourceGroupName, resourceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ResetAADProfile", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ResetAADProfileSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ResetAADProfile", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ResetAADProfilePreparer prepares the ResetAADProfile request.
+func (client ManagedClustersClient) ResetAADProfilePreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedClusterAADProfile) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ResetAADProfileSender sends the ResetAADProfile request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) ResetAADProfileSender(req *http.Request) (future ManagedClustersResetAADProfileFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// ResetAADProfileResponder handles the response to the ResetAADProfile request. The method always
+// closes the http.Response Body.
+func (client ManagedClustersClient) ResetAADProfileResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// ResetServicePrincipalProfile this action cannot be performed on a cluster that is not using a service principal
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// parameters - the service principal profile to set on the managed cluster.
+func (client ManagedClustersClient) ResetServicePrincipalProfile(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedClusterServicePrincipalProfile) (result ManagedClustersResetServicePrincipalProfileFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ResetServicePrincipalProfile")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}},
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.ClientID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.ManagedClustersClient", "ResetServicePrincipalProfile", err.Error())
+ }
+
+ req, err := client.ResetServicePrincipalProfilePreparer(ctx, resourceGroupName, resourceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ResetServicePrincipalProfile", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ResetServicePrincipalProfileSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ResetServicePrincipalProfile", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ResetServicePrincipalProfilePreparer prepares the ResetServicePrincipalProfile request.
+func (client ManagedClustersClient) ResetServicePrincipalProfilePreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedClusterServicePrincipalProfile) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ResetServicePrincipalProfileSender sends the ResetServicePrincipalProfile request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) ResetServicePrincipalProfileSender(req *http.Request) (future ManagedClustersResetServicePrincipalProfileFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// ResetServicePrincipalProfileResponder handles the response to the ResetServicePrincipalProfile request. The method always
+// closes the http.Response Body.
+func (client ManagedClustersClient) ResetServicePrincipalProfileResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// RotateClusterCertificates see [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for
+// more details about rotating managed cluster certificates.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+func (client ManagedClustersClient) RotateClusterCertificates(ctx context.Context, resourceGroupName string, resourceName string) (result ManagedClustersRotateClusterCertificatesFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.RotateClusterCertificates")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.ManagedClustersClient", "RotateClusterCertificates", err.Error())
+ }
+
+ req, err := client.RotateClusterCertificatesPreparer(ctx, resourceGroupName, resourceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "RotateClusterCertificates", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.RotateClusterCertificatesSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "RotateClusterCertificates", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// RotateClusterCertificatesPreparer prepares the RotateClusterCertificates request.
+func (client ManagedClustersClient) RotateClusterCertificatesPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RotateClusterCertificatesSender sends the RotateClusterCertificates request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) RotateClusterCertificatesSender(req *http.Request) (future ManagedClustersRotateClusterCertificatesFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// RotateClusterCertificatesResponder handles the response to the RotateClusterCertificates request. The method always
+// closes the http.Response Body.
+func (client ManagedClustersClient) RotateClusterCertificatesResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// RunCommand AKS will create a pod to run the command. This is primarily useful for private clusters. For more
+// information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview).
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// requestPayload - the run command request
+func (client ManagedClustersClient) RunCommand(ctx context.Context, resourceGroupName string, resourceName string, requestPayload RunCommandRequest) (result ManagedClustersRunCommandFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.RunCommand")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}},
+ {TargetValue: requestPayload,
+ Constraints: []validation.Constraint{{Target: "requestPayload.Command", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.ManagedClustersClient", "RunCommand", err.Error())
+ }
+
+ req, err := client.RunCommandPreparer(ctx, resourceGroupName, resourceName, requestPayload)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "RunCommand", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.RunCommandSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "RunCommand", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// RunCommandPreparer prepares the RunCommand request.
+func (client ManagedClustersClient) RunCommandPreparer(ctx context.Context, resourceGroupName string, resourceName string, requestPayload RunCommandRequest) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand", pathParameters),
+ autorest.WithJSON(requestPayload),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RunCommandSender sends the RunCommand request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) RunCommandSender(req *http.Request) (future ManagedClustersRunCommandFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// RunCommandResponder handles the response to the RunCommand request. The method always
+// closes the http.Response Body.
+func (client ManagedClustersClient) RunCommandResponder(resp *http.Response) (result RunCommandResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Start see [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about
+// starting a cluster.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+func (client ManagedClustersClient) Start(ctx context.Context, resourceGroupName string, resourceName string) (result ManagedClustersStartFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.Start")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.ManagedClustersClient", "Start", err.Error())
+ }
+
+ req, err := client.StartPreparer(ctx, resourceGroupName, resourceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Start", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.StartSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Start", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// StartPreparer prepares the Start request.
+func (client ManagedClustersClient) StartPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// StartSender sends the Start request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) StartSender(req *http.Request) (future ManagedClustersStartFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// StartResponder handles the response to the Start request. The method always
+// closes the http.Response Body.
+func (client ManagedClustersClient) StartResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Stop this can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the
+// control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue
+// charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for
+// more details about stopping a cluster.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+func (client ManagedClustersClient) Stop(ctx context.Context, resourceGroupName string, resourceName string) (result ManagedClustersStopFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.Stop")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.ManagedClustersClient", "Stop", err.Error())
+ }
+
+ req, err := client.StopPreparer(ctx, resourceGroupName, resourceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Stop", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.StopSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Stop", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// StopPreparer prepares the Stop request.
+func (client ManagedClustersClient) StopPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// StopSender sends the Stop request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) StopSender(req *http.Request) (future ManagedClustersStopFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// StopResponder handles the response to the Stop request. The method always
+// closes the http.Response Body.
+func (client ManagedClustersClient) StopResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// UpdateTags sends the update tags request.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// parameters - parameters supplied to the Update Managed Cluster Tags operation.
+func (client ManagedClustersClient) UpdateTags(ctx context.Context, resourceGroupName string, resourceName string, parameters TagsObject) (result ManagedClustersUpdateTagsFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.UpdateTags")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.ManagedClustersClient", "UpdateTags", err.Error())
+ }
+
+ req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, resourceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "UpdateTags", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateTagsSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "UpdateTags", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdateTagsPreparer prepares the UpdateTags request.
+func (client ManagedClustersClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters TagsObject) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateTagsSender sends the UpdateTags request. The method will close the
+// http.Response Body if it receives an error.
+func (client ManagedClustersClient) UpdateTagsSender(req *http.Request) (future ManagedClustersUpdateTagsFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// UpdateTagsResponder handles the response to the UpdateTags request. The method always
+// closes the http.Response Body.
+func (client ManagedClustersClient) UpdateTagsResponder(resp *http.Response) (result ManagedCluster, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/models.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/models.go
new file mode 100644
index 000000000000..8e5a692d9d8c
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/models.go
@@ -0,0 +1,3983 @@
+package containerservice
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "encoding/json"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/date"
+ "github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice"
+
+// AccessProfile profile for enabling a user to access a managed cluster.
+type AccessProfile struct {
+ // KubeConfig - Base64-encoded Kubernetes configuration file.
+ KubeConfig *[]byte `json:"kubeConfig,omitempty"`
+}
+
+// AgentPool agent Pool.
+type AgentPool struct {
+ autorest.Response `json:"-"`
+ // ManagedClusterAgentPoolProfileProperties - Properties of an agent pool.
+ *ManagedClusterAgentPoolProfileProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for AgentPool.
+func (ap AgentPool) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ap.ManagedClusterAgentPoolProfileProperties != nil {
+ objectMap["properties"] = ap.ManagedClusterAgentPoolProfileProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for AgentPool struct.
+func (ap *AgentPool) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var managedClusterAgentPoolProfileProperties ManagedClusterAgentPoolProfileProperties
+ err = json.Unmarshal(*v, &managedClusterAgentPoolProfileProperties)
+ if err != nil {
+ return err
+ }
+ ap.ManagedClusterAgentPoolProfileProperties = &managedClusterAgentPoolProfileProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ ap.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ap.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ ap.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// AgentPoolAvailableVersions the list of available versions for an agent pool.
+type AgentPoolAvailableVersions struct {
+ autorest.Response `json:"-"`
+ // ID - READ-ONLY; The ID of the agent pool version list.
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; The name of the agent pool version list.
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Type of the agent pool version list.
+ Type *string `json:"type,omitempty"`
+ // AgentPoolAvailableVersionsProperties - Properties of agent pool available versions.
+ *AgentPoolAvailableVersionsProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for AgentPoolAvailableVersions.
+func (apav AgentPoolAvailableVersions) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if apav.AgentPoolAvailableVersionsProperties != nil {
+ objectMap["properties"] = apav.AgentPoolAvailableVersionsProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for AgentPoolAvailableVersions struct.
+func (apav *AgentPoolAvailableVersions) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ apav.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ apav.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ apav.Type = &typeVar
+ }
+ case "properties":
+ if v != nil {
+ var agentPoolAvailableVersionsProperties AgentPoolAvailableVersionsProperties
+ err = json.Unmarshal(*v, &agentPoolAvailableVersionsProperties)
+ if err != nil {
+ return err
+ }
+ apav.AgentPoolAvailableVersionsProperties = &agentPoolAvailableVersionsProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// AgentPoolAvailableVersionsProperties the list of available agent pool versions.
+type AgentPoolAvailableVersionsProperties struct {
+ // AgentPoolVersions - List of versions available for agent pool.
+ AgentPoolVersions *[]AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem `json:"agentPoolVersions,omitempty"`
+}
+
+// AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem ...
+type AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem struct {
+ // Default - Whether this version is the default agent pool version.
+ Default *bool `json:"default,omitempty"`
+ // KubernetesVersion - The Kubernetes version (major.minor.patch).
+ KubernetesVersion *string `json:"kubernetesVersion,omitempty"`
+ // IsPreview - Whether Kubernetes version is currently in preview.
+ IsPreview *bool `json:"isPreview,omitempty"`
+}
+
+// AgentPoolListResult the response from the List Agent Pools operation.
+type AgentPoolListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of agent pools.
+ Value *[]AgentPool `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URL to get the next set of agent pool results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for AgentPoolListResult.
+func (aplr AgentPoolListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if aplr.Value != nil {
+ objectMap["value"] = aplr.Value
+ }
+ return json.Marshal(objectMap)
+}
+
+// AgentPoolListResultIterator provides access to a complete listing of AgentPool values.
+type AgentPoolListResultIterator struct {
+ i int
+ page AgentPoolListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *AgentPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *AgentPoolListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter AgentPoolListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter AgentPoolListResultIterator) Response() AgentPoolListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter AgentPoolListResultIterator) Value() AgentPool {
+ if !iter.page.NotDone() {
+ return AgentPool{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the AgentPoolListResultIterator type.
+func NewAgentPoolListResultIterator(page AgentPoolListResultPage) AgentPoolListResultIterator {
+ return AgentPoolListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (aplr AgentPoolListResult) IsEmpty() bool {
+ return aplr.Value == nil || len(*aplr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (aplr AgentPoolListResult) hasNextLink() bool {
+ return aplr.NextLink != nil && len(*aplr.NextLink) != 0
+}
+
+// agentPoolListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (aplr AgentPoolListResult) agentPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !aplr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(aplr.NextLink)))
+}
+
+// AgentPoolListResultPage contains a page of AgentPool values.
+type AgentPoolListResultPage struct {
+ fn func(context.Context, AgentPoolListResult) (AgentPoolListResult, error)
+ aplr AgentPoolListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *AgentPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AgentPoolListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.aplr)
+ if err != nil {
+ return err
+ }
+ page.aplr = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *AgentPoolListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page AgentPoolListResultPage) NotDone() bool {
+ return !page.aplr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page AgentPoolListResultPage) Response() AgentPoolListResult {
+ return page.aplr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page AgentPoolListResultPage) Values() []AgentPool {
+ if page.aplr.IsEmpty() {
+ return nil
+ }
+ return *page.aplr.Value
+}
+
+// Creates a new instance of the AgentPoolListResultPage type.
+func NewAgentPoolListResultPage(cur AgentPoolListResult, getNextPage func(context.Context, AgentPoolListResult) (AgentPoolListResult, error)) AgentPoolListResultPage {
+ return AgentPoolListResultPage{
+ fn: getNextPage,
+ aplr: cur,
+ }
+}
+
+// AgentPoolsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type AgentPoolsCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(AgentPoolsClient) (AgentPool, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *AgentPoolsCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for AgentPoolsCreateOrUpdateFuture.Result.
+func (future *AgentPoolsCreateOrUpdateFuture) result(client AgentPoolsClient) (ap AgentPool, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ap.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("containerservice.AgentPoolsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ap.Response.Response, err = future.GetResult(sender); err == nil && ap.Response.Response.StatusCode != http.StatusNoContent {
+ ap, err = client.CreateOrUpdateResponder(ap.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsCreateOrUpdateFuture", "Result", ap.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// AgentPoolsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type AgentPoolsDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(AgentPoolsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *AgentPoolsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for AgentPoolsDeleteFuture.Result.
+func (future *AgentPoolsDeleteFuture) result(client AgentPoolsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("containerservice.AgentPoolsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// AgentPoolsUpgradeNodeImageVersionFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type AgentPoolsUpgradeNodeImageVersionFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(AgentPoolsClient) (AgentPool, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *AgentPoolsUpgradeNodeImageVersionFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for AgentPoolsUpgradeNodeImageVersionFuture.Result.
+func (future *AgentPoolsUpgradeNodeImageVersionFuture) result(client AgentPoolsClient) (ap AgentPool, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsUpgradeNodeImageVersionFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ap.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("containerservice.AgentPoolsUpgradeNodeImageVersionFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if ap.Response.Response, err = future.GetResult(sender); err == nil && ap.Response.Response.StatusCode != http.StatusNoContent {
+ ap, err = client.UpgradeNodeImageVersionResponder(ap.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.AgentPoolsUpgradeNodeImageVersionFuture", "Result", ap.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// AgentPoolUpgradeProfile the list of available upgrades for an agent pool.
+type AgentPoolUpgradeProfile struct {
+ autorest.Response `json:"-"`
+ // ID - READ-ONLY; The ID of the agent pool upgrade profile.
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; The name of the agent pool upgrade profile.
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; The type of the agent pool upgrade profile.
+ Type *string `json:"type,omitempty"`
+ // AgentPoolUpgradeProfileProperties - The properties of the agent pool upgrade profile.
+ *AgentPoolUpgradeProfileProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for AgentPoolUpgradeProfile.
+func (apup AgentPoolUpgradeProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if apup.AgentPoolUpgradeProfileProperties != nil {
+ objectMap["properties"] = apup.AgentPoolUpgradeProfileProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for AgentPoolUpgradeProfile struct.
+func (apup *AgentPoolUpgradeProfile) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ apup.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ apup.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ apup.Type = &typeVar
+ }
+ case "properties":
+ if v != nil {
+ var agentPoolUpgradeProfileProperties AgentPoolUpgradeProfileProperties
+ err = json.Unmarshal(*v, &agentPoolUpgradeProfileProperties)
+ if err != nil {
+ return err
+ }
+ apup.AgentPoolUpgradeProfileProperties = &agentPoolUpgradeProfileProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// AgentPoolUpgradeProfileProperties the list of available upgrade versions.
+type AgentPoolUpgradeProfileProperties struct {
+ // KubernetesVersion - The Kubernetes version (major.minor.patch).
+ KubernetesVersion *string `json:"kubernetesVersion,omitempty"`
+ // OsType - Possible values include: 'OSTypeLinux', 'OSTypeWindows'
+ OsType OSType `json:"osType,omitempty"`
+ // Upgrades - List of orchestrator types and versions available for upgrade.
+ Upgrades *[]AgentPoolUpgradeProfilePropertiesUpgradesItem `json:"upgrades,omitempty"`
+ // LatestNodeImageVersion - The latest AKS supported node image version.
+ LatestNodeImageVersion *string `json:"latestNodeImageVersion,omitempty"`
+}
+
+// AgentPoolUpgradeProfilePropertiesUpgradesItem ...
+type AgentPoolUpgradeProfilePropertiesUpgradesItem struct {
+ // KubernetesVersion - The Kubernetes version (major.minor.patch).
+ KubernetesVersion *string `json:"kubernetesVersion,omitempty"`
+ // IsPreview - Whether the Kubernetes version is currently in preview.
+ IsPreview *bool `json:"isPreview,omitempty"`
+}
+
+// AgentPoolUpgradeSettings settings for upgrading an agentpool
+type AgentPoolUpgradeSettings struct {
+ // MaxSurge - This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). If a percentage is specified, it is the percentage of the total agent pool size at the time of the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is 1. For more information, including best practices, see: https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade
+ MaxSurge *string `json:"maxSurge,omitempty"`
+}
+
+// CloudError an error response from the Container service.
+type CloudError struct {
+ // Error - Details about the error.
+ Error *CloudErrorBody `json:"error,omitempty"`
+}
+
+// CloudErrorBody an error response from the Container service.
+type CloudErrorBody struct {
+ // Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
+ Code *string `json:"code,omitempty"`
+ // Message - A message describing the error, intended to be suitable for display in a user interface.
+ Message *string `json:"message,omitempty"`
+ // Target - The target of the particular error. For example, the name of the property in error.
+ Target *string `json:"target,omitempty"`
+ // Details - A list of additional details about the error.
+ Details *[]CloudErrorBody `json:"details,omitempty"`
+}
+
+// CommandResultProperties the results of a run command
+type CommandResultProperties struct {
+ // ProvisioningState - READ-ONLY; provisioning State
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // ExitCode - READ-ONLY; The exit code of the command
+ ExitCode *int32 `json:"exitCode,omitempty"`
+ // StartedAt - READ-ONLY; The time when the command started.
+ StartedAt *date.Time `json:"startedAt,omitempty"`
+ // FinishedAt - READ-ONLY; The time when the command finished.
+ FinishedAt *date.Time `json:"finishedAt,omitempty"`
+ // Logs - READ-ONLY; The command output.
+ Logs *string `json:"logs,omitempty"`
+ // Reason - READ-ONLY; An explanation of why provisioningState is set to failed (if so).
+ Reason *string `json:"reason,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for CommandResultProperties.
+func (crp CommandResultProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// CreationData data used when creating a target resource from a source resource.
+type CreationData struct {
+ // SourceResourceID - This is the ARM ID of the source object to be used to create the target object.
+ SourceResourceID *string `json:"sourceResourceId,omitempty"`
+}
+
+// CredentialResult the credential result response.
+type CredentialResult struct {
+ // Name - READ-ONLY; The name of the credential.
+ Name *string `json:"name,omitempty"`
+ // Value - READ-ONLY; Base64-encoded Kubernetes configuration file.
+ Value *[]byte `json:"value,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for CredentialResult.
+func (cr CredentialResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// CredentialResults the list credential result response.
+type CredentialResults struct {
+ autorest.Response `json:"-"`
+ // Kubeconfigs - READ-ONLY; Base64-encoded Kubernetes configuration file.
+ Kubeconfigs *[]CredentialResult `json:"kubeconfigs,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for CredentialResults.
+func (cr CredentialResults) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// DiagnosticsProfile profile for diagnostics on the container service cluster.
+type DiagnosticsProfile struct {
+ // VMDiagnostics - Profile for diagnostics on the container service VMs.
+ VMDiagnostics *VMDiagnostics `json:"vmDiagnostics,omitempty"`
+}
+
+// EndpointDependency a domain name that AKS agent nodes are reaching at.
+type EndpointDependency struct {
+ // DomainName - The domain name of the dependency.
+ DomainName *string `json:"domainName,omitempty"`
+ // EndpointDetails - The Ports and Protocols used when connecting to domainName.
+ EndpointDetails *[]EndpointDetail `json:"endpointDetails,omitempty"`
+}
+
+// EndpointDetail connect information from the AKS agent nodes to a single endpoint.
+type EndpointDetail struct {
+ // IPAddress - An IP Address that Domain Name currently resolves to.
+ IPAddress *string `json:"ipAddress,omitempty"`
+ // Port - The port an endpoint is connected to.
+ Port *int32 `json:"port,omitempty"`
+ // Protocol - The protocol used for connection
+ Protocol *string `json:"protocol,omitempty"`
+ // Description - Description of the detail
+ Description *string `json:"description,omitempty"`
+}
+
+// ExtendedLocation the complex type of the extended location.
+type ExtendedLocation struct {
+ // Name - The name of the extended location.
+ Name *string `json:"name,omitempty"`
+ // Type - The type of the extended location. Possible values include: 'ExtendedLocationTypesEdgeZone'
+ Type ExtendedLocationTypes `json:"type,omitempty"`
+}
+
+// KubeletConfig see [AKS custom node
+// configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details.
+type KubeletConfig struct {
+ // CPUManagerPolicy - The default is 'none'. See [Kubernetes CPU management policies](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies) for more information. Allowed values are 'none' and 'static'.
+ CPUManagerPolicy *string `json:"cpuManagerPolicy,omitempty"`
+ // CPUCfsQuota - The default is true.
+ CPUCfsQuota *bool `json:"cpuCfsQuota,omitempty"`
+ // CPUCfsQuotaPeriod - The default is '100ms.' Valid values are a sequence of decimal numbers with an optional fraction and a unit suffix. For example: '300ms', '2h45m'. Supported units are 'ns', 'us', 'ms', 's', 'm', and 'h'.
+ CPUCfsQuotaPeriod *string `json:"cpuCfsQuotaPeriod,omitempty"`
+ // ImageGcHighThreshold - To disable image garbage collection, set to 100. The default is 85%
+ ImageGcHighThreshold *int32 `json:"imageGcHighThreshold,omitempty"`
+ // ImageGcLowThreshold - This cannot be set higher than imageGcHighThreshold. The default is 80%
+ ImageGcLowThreshold *int32 `json:"imageGcLowThreshold,omitempty"`
+ // TopologyManagerPolicy - For more information see [Kubernetes Topology Manager](https://kubernetes.io/docs/tasks/administer-cluster/topology-manager). The default is 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'.
+ TopologyManagerPolicy *string `json:"topologyManagerPolicy,omitempty"`
+ // AllowedUnsafeSysctls - Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`).
+ AllowedUnsafeSysctls *[]string `json:"allowedUnsafeSysctls,omitempty"`
+ // FailSwapOn - If set to true it will make the Kubelet fail to start if swap is enabled on the node.
+ FailSwapOn *bool `json:"failSwapOn,omitempty"`
+ // ContainerLogMaxSizeMB - The maximum size (e.g. 10Mi) of container log file before it is rotated.
+ ContainerLogMaxSizeMB *int32 `json:"containerLogMaxSizeMB,omitempty"`
+ // ContainerLogMaxFiles - The maximum number of container log files that can be present for a container. The number must be ≥ 2.
+ ContainerLogMaxFiles *int32 `json:"containerLogMaxFiles,omitempty"`
+ // PodMaxPids - The maximum number of processes per pod.
+ PodMaxPids *int32 `json:"podMaxPids,omitempty"`
+}
+
+// LinuxOSConfig see [AKS custom node
+// configuration](https://docs.microsoft.com/azure/aks/custom-node-configuration) for more details.
+type LinuxOSConfig struct {
+ // Sysctls - Sysctl settings for Linux agent nodes.
+ Sysctls *SysctlConfig `json:"sysctls,omitempty"`
+ // TransparentHugePageEnabled - Valid values are 'always', 'madvise', and 'never'. The default is 'always'. For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge).
+ TransparentHugePageEnabled *string `json:"transparentHugePageEnabled,omitempty"`
+ // TransparentHugePageDefrag - Valid values are 'always', 'defer', 'defer+madvise', 'madvise' and 'never'. The default is 'madvise'. For more information see [Transparent Hugepages](https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge).
+ TransparentHugePageDefrag *string `json:"transparentHugePageDefrag,omitempty"`
+ // SwapFileSizeMB - The size in MB of a swap file that will be created on each node.
+ SwapFileSizeMB *int32 `json:"swapFileSizeMB,omitempty"`
+}
+
+// LinuxProfile profile for Linux VMs in the container service cluster.
+type LinuxProfile struct {
+ // AdminUsername - The administrator username to use for Linux VMs.
+ AdminUsername *string `json:"adminUsername,omitempty"`
+ // SSH - The SSH configuration for Linux-based VMs running on Azure.
+ SSH *SSHConfiguration `json:"ssh,omitempty"`
+}
+
+// MaintenanceConfiguration see [planned
+// maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) for more information about
+// planned maintenance.
+type MaintenanceConfiguration struct {
+ autorest.Response `json:"-"`
+ // SystemData - READ-ONLY; The system metadata relating to this resource.
+ SystemData *SystemData `json:"systemData,omitempty"`
+ // MaintenanceConfigurationProperties - Properties of a default maintenance configuration.
+ *MaintenanceConfigurationProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for MaintenanceConfiguration.
+func (mc MaintenanceConfiguration) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if mc.MaintenanceConfigurationProperties != nil {
+ objectMap["properties"] = mc.MaintenanceConfigurationProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for MaintenanceConfiguration struct.
+func (mc *MaintenanceConfiguration) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "systemData":
+ if v != nil {
+ var systemData SystemData
+ err = json.Unmarshal(*v, &systemData)
+ if err != nil {
+ return err
+ }
+ mc.SystemData = &systemData
+ }
+ case "properties":
+ if v != nil {
+ var maintenanceConfigurationProperties MaintenanceConfigurationProperties
+ err = json.Unmarshal(*v, &maintenanceConfigurationProperties)
+ if err != nil {
+ return err
+ }
+ mc.MaintenanceConfigurationProperties = &maintenanceConfigurationProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ mc.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ mc.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ mc.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// MaintenanceConfigurationListResult the response from the List maintenance configurations operation.
+type MaintenanceConfigurationListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of maintenance configurations.
+ Value *[]MaintenanceConfiguration `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URL to get the next set of maintenance configuration results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for MaintenanceConfigurationListResult.
+func (mclr MaintenanceConfigurationListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if mclr.Value != nil {
+ objectMap["value"] = mclr.Value
+ }
+ return json.Marshal(objectMap)
+}
+
+// MaintenanceConfigurationListResultIterator provides access to a complete listing of
+// MaintenanceConfiguration values.
+type MaintenanceConfigurationListResultIterator struct {
+ i int
+ page MaintenanceConfigurationListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *MaintenanceConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MaintenanceConfigurationListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *MaintenanceConfigurationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter MaintenanceConfigurationListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter MaintenanceConfigurationListResultIterator) Response() MaintenanceConfigurationListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter MaintenanceConfigurationListResultIterator) Value() MaintenanceConfiguration {
+ if !iter.page.NotDone() {
+ return MaintenanceConfiguration{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the MaintenanceConfigurationListResultIterator type.
+func NewMaintenanceConfigurationListResultIterator(page MaintenanceConfigurationListResultPage) MaintenanceConfigurationListResultIterator {
+ return MaintenanceConfigurationListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (mclr MaintenanceConfigurationListResult) IsEmpty() bool {
+ return mclr.Value == nil || len(*mclr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (mclr MaintenanceConfigurationListResult) hasNextLink() bool {
+ return mclr.NextLink != nil && len(*mclr.NextLink) != 0
+}
+
+// maintenanceConfigurationListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (mclr MaintenanceConfigurationListResult) maintenanceConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !mclr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(mclr.NextLink)))
+}
+
+// MaintenanceConfigurationListResultPage contains a page of MaintenanceConfiguration values.
+type MaintenanceConfigurationListResultPage struct {
+ fn func(context.Context, MaintenanceConfigurationListResult) (MaintenanceConfigurationListResult, error)
+ mclr MaintenanceConfigurationListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *MaintenanceConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MaintenanceConfigurationListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.mclr)
+ if err != nil {
+ return err
+ }
+ page.mclr = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *MaintenanceConfigurationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page MaintenanceConfigurationListResultPage) NotDone() bool {
+ return !page.mclr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page MaintenanceConfigurationListResultPage) Response() MaintenanceConfigurationListResult {
+ return page.mclr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page MaintenanceConfigurationListResultPage) Values() []MaintenanceConfiguration {
+ if page.mclr.IsEmpty() {
+ return nil
+ }
+ return *page.mclr.Value
+}
+
+// Creates a new instance of the MaintenanceConfigurationListResultPage type.
+func NewMaintenanceConfigurationListResultPage(cur MaintenanceConfigurationListResult, getNextPage func(context.Context, MaintenanceConfigurationListResult) (MaintenanceConfigurationListResult, error)) MaintenanceConfigurationListResultPage {
+ return MaintenanceConfigurationListResultPage{
+ fn: getNextPage,
+ mclr: cur,
+ }
+}
+
+// MaintenanceConfigurationProperties properties used to configure planned maintenance for a Managed
+// Cluster.
+type MaintenanceConfigurationProperties struct {
+ // TimeInWeek - If two array entries specify the same day of the week, the applied configuration is the union of times in both entries.
+ TimeInWeek *[]TimeInWeek `json:"timeInWeek,omitempty"`
+ // NotAllowedTime - Time slots on which upgrade is not allowed.
+ NotAllowedTime *[]TimeSpan `json:"notAllowedTime,omitempty"`
+}
+
+// ManagedCluster managed cluster.
+type ManagedCluster struct {
+ autorest.Response `json:"-"`
+ // Sku - The managed cluster SKU.
+ Sku *ManagedClusterSKU `json:"sku,omitempty"`
+ // ExtendedLocation - The extended location of the Virtual Machine.
+ ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"`
+ // Identity - The identity of the managed cluster, if configured.
+ Identity *ManagedClusterIdentity `json:"identity,omitempty"`
+ // ManagedClusterProperties - Properties of a managed cluster.
+ *ManagedClusterProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for ManagedCluster.
+func (mc ManagedCluster) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if mc.Sku != nil {
+ objectMap["sku"] = mc.Sku
+ }
+ if mc.ExtendedLocation != nil {
+ objectMap["extendedLocation"] = mc.ExtendedLocation
+ }
+ if mc.Identity != nil {
+ objectMap["identity"] = mc.Identity
+ }
+ if mc.ManagedClusterProperties != nil {
+ objectMap["properties"] = mc.ManagedClusterProperties
+ }
+ if mc.Location != nil {
+ objectMap["location"] = mc.Location
+ }
+ if mc.Tags != nil {
+ objectMap["tags"] = mc.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ManagedCluster struct.
+func (mc *ManagedCluster) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "sku":
+ if v != nil {
+ var sku ManagedClusterSKU
+ err = json.Unmarshal(*v, &sku)
+ if err != nil {
+ return err
+ }
+ mc.Sku = &sku
+ }
+ case "extendedLocation":
+ if v != nil {
+ var extendedLocation ExtendedLocation
+ err = json.Unmarshal(*v, &extendedLocation)
+ if err != nil {
+ return err
+ }
+ mc.ExtendedLocation = &extendedLocation
+ }
+ case "identity":
+ if v != nil {
+ var identity ManagedClusterIdentity
+ err = json.Unmarshal(*v, &identity)
+ if err != nil {
+ return err
+ }
+ mc.Identity = &identity
+ }
+ case "properties":
+ if v != nil {
+ var managedClusterProperties ManagedClusterProperties
+ err = json.Unmarshal(*v, &managedClusterProperties)
+ if err != nil {
+ return err
+ }
+ mc.ManagedClusterProperties = &managedClusterProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ mc.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ mc.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ mc.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ mc.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ mc.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// ManagedClusterAADProfile for more details see [managed AAD on
+// AKS](https://docs.microsoft.com/azure/aks/managed-aad).
+type ManagedClusterAADProfile struct {
+ // Managed - Whether to enable managed AAD.
+ Managed *bool `json:"managed,omitempty"`
+ // EnableAzureRBAC - Whether to enable Azure RBAC for Kubernetes authorization.
+ EnableAzureRBAC *bool `json:"enableAzureRBAC,omitempty"`
+ // AdminGroupObjectIDs - The list of AAD group object IDs that will have admin role of the cluster.
+ AdminGroupObjectIDs *[]string `json:"adminGroupObjectIDs,omitempty"`
+ // ClientAppID - The client AAD application ID.
+ ClientAppID *string `json:"clientAppID,omitempty"`
+ // ServerAppID - The server AAD application ID.
+ ServerAppID *string `json:"serverAppID,omitempty"`
+ // ServerAppSecret - The server AAD application secret.
+ ServerAppSecret *string `json:"serverAppSecret,omitempty"`
+ // TenantID - The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription.
+ TenantID *string `json:"tenantID,omitempty"`
+}
+
+// ManagedClusterAccessProfile managed cluster Access Profile.
+type ManagedClusterAccessProfile struct {
+ autorest.Response `json:"-"`
+ // AccessProfile - AccessProfile of a managed cluster.
+ *AccessProfile `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for ManagedClusterAccessProfile.
+func (mcap ManagedClusterAccessProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if mcap.AccessProfile != nil {
+ objectMap["properties"] = mcap.AccessProfile
+ }
+ if mcap.Location != nil {
+ objectMap["location"] = mcap.Location
+ }
+ if mcap.Tags != nil {
+ objectMap["tags"] = mcap.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ManagedClusterAccessProfile struct.
+func (mcap *ManagedClusterAccessProfile) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var accessProfile AccessProfile
+ err = json.Unmarshal(*v, &accessProfile)
+ if err != nil {
+ return err
+ }
+ mcap.AccessProfile = &accessProfile
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ mcap.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ mcap.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ mcap.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ mcap.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ mcap.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// ManagedClusterAddonProfile a Kubernetes add-on profile for a managed cluster.
+type ManagedClusterAddonProfile struct {
+ // Enabled - Whether the add-on is enabled or not.
+ Enabled *bool `json:"enabled,omitempty"`
+ // Config - Key-value pairs for configuring an add-on.
+ Config map[string]*string `json:"config"`
+ // Identity - READ-ONLY; Information of user assigned identity used by this add-on.
+ Identity *ManagedClusterAddonProfileIdentity `json:"identity,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ManagedClusterAddonProfile.
+func (mcap ManagedClusterAddonProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if mcap.Enabled != nil {
+ objectMap["enabled"] = mcap.Enabled
+ }
+ if mcap.Config != nil {
+ objectMap["config"] = mcap.Config
+ }
+ return json.Marshal(objectMap)
+}
+
+// ManagedClusterAddonProfileIdentity information of user assigned identity used by this add-on.
+type ManagedClusterAddonProfileIdentity struct {
+ // ResourceID - The resource ID of the user assigned identity.
+ ResourceID *string `json:"resourceId,omitempty"`
+ // ClientID - The client ID of the user assigned identity.
+ ClientID *string `json:"clientId,omitempty"`
+ // ObjectID - The object ID of the user assigned identity.
+ ObjectID *string `json:"objectId,omitempty"`
+}
+
+// ManagedClusterAgentPoolProfile profile for the container service agent pool.
+type ManagedClusterAgentPoolProfile struct {
+ // Name - Windows agent pool names must be 6 characters or less.
+ Name *string `json:"name,omitempty"`
+ // Count - Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default value is 1.
+ Count *int32 `json:"count,omitempty"`
+ // VMSize - VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions
+ VMSize *string `json:"vmSize,omitempty"`
+ OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"`
+ // OsDiskType - Possible values include: 'OSDiskTypeManaged', 'OSDiskTypeEphemeral'
+ OsDiskType OSDiskType `json:"osDiskType,omitempty"`
+ // KubeletDiskType - Possible values include: 'KubeletDiskTypeOS', 'KubeletDiskTypeTemporary'
+ KubeletDiskType KubeletDiskType `json:"kubeletDiskType,omitempty"`
+ // WorkloadRuntime - Possible values include: 'WorkloadRuntimeOCIContainer', 'WorkloadRuntimeWasmWasi'
+ WorkloadRuntime WorkloadRuntime `json:"workloadRuntime,omitempty"`
+ // VnetSubnetID - If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}
+ VnetSubnetID *string `json:"vnetSubnetID,omitempty"`
+ // PodSubnetID - If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}
+ PodSubnetID *string `json:"podSubnetID,omitempty"`
+ // MaxPods - The maximum number of pods that can run on a node.
+ MaxPods *int32 `json:"maxPods,omitempty"`
+ // OsType - Possible values include: 'OSTypeLinux', 'OSTypeWindows'
+ OsType OSType `json:"osType,omitempty"`
+ // OsSKU - Possible values include: 'OSSKUUbuntu', 'OSSKUCBLMariner'
+ OsSKU OSSKU `json:"osSKU,omitempty"`
+ // MaxCount - The maximum number of nodes for auto-scaling
+ MaxCount *int32 `json:"maxCount,omitempty"`
+ // MinCount - The minimum number of nodes for auto-scaling
+ MinCount *int32 `json:"minCount,omitempty"`
+ // EnableAutoScaling - Whether to enable auto-scaler
+ EnableAutoScaling *bool `json:"enableAutoScaling,omitempty"`
+ // ScaleDownMode - This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete. Possible values include: 'ScaleDownModeDelete', 'ScaleDownModeDeallocate'
+ ScaleDownMode ScaleDownMode `json:"scaleDownMode,omitempty"`
+ // Type - Possible values include: 'AgentPoolTypeVirtualMachineScaleSets', 'AgentPoolTypeAvailabilitySet'
+ Type AgentPoolType `json:"type,omitempty"`
+ // Mode - Possible values include: 'AgentPoolModeSystem', 'AgentPoolModeUser'
+ Mode AgentPoolMode `json:"mode,omitempty"`
+ // OrchestratorVersion - As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool minor version must be within two minor versions of the control plane version. The node pool version cannot be greater than the control plane version. For more information see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool).
+ OrchestratorVersion *string `json:"orchestratorVersion,omitempty"`
+ // NodeImageVersion - READ-ONLY; The version of node image
+ NodeImageVersion *string `json:"nodeImageVersion,omitempty"`
+ // UpgradeSettings - Settings for upgrading the agentpool
+ UpgradeSettings *AgentPoolUpgradeSettings `json:"upgradeSettings,omitempty"`
+ // ProvisioningState - READ-ONLY; The current deployment or provisioning state.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // PowerState - When an Agent Pool is first created it is initially Running. The Agent Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and does not accrue billing charges. An Agent Pool can only be stopped if it is Running and provisioning state is Succeeded
+ PowerState *PowerState `json:"powerState,omitempty"`
+ // AvailabilityZones - The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'.
+ AvailabilityZones *[]string `json:"availabilityZones,omitempty"`
+ // EnableNodePublicIP - Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For more information see [assigning a public IP per node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). The default is false.
+ EnableNodePublicIP *bool `json:"enableNodePublicIP,omitempty"`
+ // NodePublicIPPrefixID - This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}
+ NodePublicIPPrefixID *string `json:"nodePublicIPPrefixID,omitempty"`
+ // ScaleSetPriority - The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. Possible values include: 'ScaleSetPrioritySpot', 'ScaleSetPriorityRegular'
+ ScaleSetPriority ScaleSetPriority `json:"scaleSetPriority,omitempty"`
+ // ScaleSetEvictionPolicy - This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. Possible values include: 'ScaleSetEvictionPolicyDelete', 'ScaleSetEvictionPolicyDeallocate'
+ ScaleSetEvictionPolicy ScaleSetEvictionPolicy `json:"scaleSetEvictionPolicy,omitempty"`
+ // SpotMaxPrice - Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. For more details on spot pricing, see [spot VMs pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing)
+ SpotMaxPrice *float64 `json:"spotMaxPrice,omitempty"`
+ // Tags - The tags to be persisted on the agent pool virtual machine scale set.
+ Tags map[string]*string `json:"tags"`
+ // NodeLabels - The node labels to be persisted across all nodes in agent pool.
+ NodeLabels map[string]*string `json:"nodeLabels"`
+ // NodeTaints - The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.
+ NodeTaints *[]string `json:"nodeTaints,omitempty"`
+ // ProximityPlacementGroupID - The ID for Proximity Placement Group.
+ ProximityPlacementGroupID *string `json:"proximityPlacementGroupID,omitempty"`
+ // KubeletConfig - The Kubelet configuration on the agent pool nodes.
+ KubeletConfig *KubeletConfig `json:"kubeletConfig,omitempty"`
+ // LinuxOSConfig - The OS configuration of Linux agent nodes.
+ LinuxOSConfig *LinuxOSConfig `json:"linuxOSConfig,omitempty"`
+ // EnableEncryptionAtHost - This is only supported on certain VM sizes and in certain Azure regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption
+ EnableEncryptionAtHost *bool `json:"enableEncryptionAtHost,omitempty"`
+ // EnableUltraSSD - Whether to enable UltraSSD
+ EnableUltraSSD *bool `json:"enableUltraSSD,omitempty"`
+ // EnableFIPS - See [Add a FIPS-enabled node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more details.
+ EnableFIPS *bool `json:"enableFIPS,omitempty"`
+ // GpuInstanceProfile - GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. Possible values include: 'GPUInstanceProfileMIG1g', 'GPUInstanceProfileMIG2g', 'GPUInstanceProfileMIG3g', 'GPUInstanceProfileMIG4g', 'GPUInstanceProfileMIG7g'
+ GpuInstanceProfile GPUInstanceProfile `json:"gpuInstanceProfile,omitempty"`
+ // CreationData - CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot.
+ CreationData *CreationData `json:"creationData,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ManagedClusterAgentPoolProfile.
+func (mcapp ManagedClusterAgentPoolProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if mcapp.Name != nil {
+ objectMap["name"] = mcapp.Name
+ }
+ if mcapp.Count != nil {
+ objectMap["count"] = mcapp.Count
+ }
+ if mcapp.VMSize != nil {
+ objectMap["vmSize"] = mcapp.VMSize
+ }
+ if mcapp.OsDiskSizeGB != nil {
+ objectMap["osDiskSizeGB"] = mcapp.OsDiskSizeGB
+ }
+ if mcapp.OsDiskType != "" {
+ objectMap["osDiskType"] = mcapp.OsDiskType
+ }
+ if mcapp.KubeletDiskType != "" {
+ objectMap["kubeletDiskType"] = mcapp.KubeletDiskType
+ }
+ if mcapp.WorkloadRuntime != "" {
+ objectMap["workloadRuntime"] = mcapp.WorkloadRuntime
+ }
+ if mcapp.VnetSubnetID != nil {
+ objectMap["vnetSubnetID"] = mcapp.VnetSubnetID
+ }
+ if mcapp.PodSubnetID != nil {
+ objectMap["podSubnetID"] = mcapp.PodSubnetID
+ }
+ if mcapp.MaxPods != nil {
+ objectMap["maxPods"] = mcapp.MaxPods
+ }
+ if mcapp.OsType != "" {
+ objectMap["osType"] = mcapp.OsType
+ }
+ if mcapp.OsSKU != "" {
+ objectMap["osSKU"] = mcapp.OsSKU
+ }
+ if mcapp.MaxCount != nil {
+ objectMap["maxCount"] = mcapp.MaxCount
+ }
+ if mcapp.MinCount != nil {
+ objectMap["minCount"] = mcapp.MinCount
+ }
+ if mcapp.EnableAutoScaling != nil {
+ objectMap["enableAutoScaling"] = mcapp.EnableAutoScaling
+ }
+ if mcapp.ScaleDownMode != "" {
+ objectMap["scaleDownMode"] = mcapp.ScaleDownMode
+ }
+ if mcapp.Type != "" {
+ objectMap["type"] = mcapp.Type
+ }
+ if mcapp.Mode != "" {
+ objectMap["mode"] = mcapp.Mode
+ }
+ if mcapp.OrchestratorVersion != nil {
+ objectMap["orchestratorVersion"] = mcapp.OrchestratorVersion
+ }
+ if mcapp.UpgradeSettings != nil {
+ objectMap["upgradeSettings"] = mcapp.UpgradeSettings
+ }
+ if mcapp.PowerState != nil {
+ objectMap["powerState"] = mcapp.PowerState
+ }
+ if mcapp.AvailabilityZones != nil {
+ objectMap["availabilityZones"] = mcapp.AvailabilityZones
+ }
+ if mcapp.EnableNodePublicIP != nil {
+ objectMap["enableNodePublicIP"] = mcapp.EnableNodePublicIP
+ }
+ if mcapp.NodePublicIPPrefixID != nil {
+ objectMap["nodePublicIPPrefixID"] = mcapp.NodePublicIPPrefixID
+ }
+ if mcapp.ScaleSetPriority != "" {
+ objectMap["scaleSetPriority"] = mcapp.ScaleSetPriority
+ }
+ if mcapp.ScaleSetEvictionPolicy != "" {
+ objectMap["scaleSetEvictionPolicy"] = mcapp.ScaleSetEvictionPolicy
+ }
+ if mcapp.SpotMaxPrice != nil {
+ objectMap["spotMaxPrice"] = mcapp.SpotMaxPrice
+ }
+ if mcapp.Tags != nil {
+ objectMap["tags"] = mcapp.Tags
+ }
+ if mcapp.NodeLabels != nil {
+ objectMap["nodeLabels"] = mcapp.NodeLabels
+ }
+ if mcapp.NodeTaints != nil {
+ objectMap["nodeTaints"] = mcapp.NodeTaints
+ }
+ if mcapp.ProximityPlacementGroupID != nil {
+ objectMap["proximityPlacementGroupID"] = mcapp.ProximityPlacementGroupID
+ }
+ if mcapp.KubeletConfig != nil {
+ objectMap["kubeletConfig"] = mcapp.KubeletConfig
+ }
+ if mcapp.LinuxOSConfig != nil {
+ objectMap["linuxOSConfig"] = mcapp.LinuxOSConfig
+ }
+ if mcapp.EnableEncryptionAtHost != nil {
+ objectMap["enableEncryptionAtHost"] = mcapp.EnableEncryptionAtHost
+ }
+ if mcapp.EnableUltraSSD != nil {
+ objectMap["enableUltraSSD"] = mcapp.EnableUltraSSD
+ }
+ if mcapp.EnableFIPS != nil {
+ objectMap["enableFIPS"] = mcapp.EnableFIPS
+ }
+ if mcapp.GpuInstanceProfile != "" {
+ objectMap["gpuInstanceProfile"] = mcapp.GpuInstanceProfile
+ }
+ if mcapp.CreationData != nil {
+ objectMap["creationData"] = mcapp.CreationData
+ }
+ return json.Marshal(objectMap)
+}
+
+// ManagedClusterAgentPoolProfileProperties properties for the container service agent pool profile.
+type ManagedClusterAgentPoolProfileProperties struct {
+ // Count - Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default value is 1.
+ Count *int32 `json:"count,omitempty"`
+ // VMSize - VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions
+ VMSize *string `json:"vmSize,omitempty"`
+ OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"`
+ // OsDiskType - Possible values include: 'OSDiskTypeManaged', 'OSDiskTypeEphemeral'
+ OsDiskType OSDiskType `json:"osDiskType,omitempty"`
+ // KubeletDiskType - Possible values include: 'KubeletDiskTypeOS', 'KubeletDiskTypeTemporary'
+ KubeletDiskType KubeletDiskType `json:"kubeletDiskType,omitempty"`
+ // WorkloadRuntime - Possible values include: 'WorkloadRuntimeOCIContainer', 'WorkloadRuntimeWasmWasi'
+ WorkloadRuntime WorkloadRuntime `json:"workloadRuntime,omitempty"`
+ // VnetSubnetID - If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}
+ VnetSubnetID *string `json:"vnetSubnetID,omitempty"`
+ // PodSubnetID - If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}
+ PodSubnetID *string `json:"podSubnetID,omitempty"`
+ // MaxPods - The maximum number of pods that can run on a node.
+ MaxPods *int32 `json:"maxPods,omitempty"`
+ // OsType - Possible values include: 'OSTypeLinux', 'OSTypeWindows'
+ OsType OSType `json:"osType,omitempty"`
+ // OsSKU - Possible values include: 'OSSKUUbuntu', 'OSSKUCBLMariner'
+ OsSKU OSSKU `json:"osSKU,omitempty"`
+ // MaxCount - The maximum number of nodes for auto-scaling
+ MaxCount *int32 `json:"maxCount,omitempty"`
+ // MinCount - The minimum number of nodes for auto-scaling
+ MinCount *int32 `json:"minCount,omitempty"`
+ // EnableAutoScaling - Whether to enable auto-scaler
+ EnableAutoScaling *bool `json:"enableAutoScaling,omitempty"`
+ // ScaleDownMode - This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete. Possible values include: 'ScaleDownModeDelete', 'ScaleDownModeDeallocate'
+ ScaleDownMode ScaleDownMode `json:"scaleDownMode,omitempty"`
+ // Type - Possible values include: 'AgentPoolTypeVirtualMachineScaleSets', 'AgentPoolTypeAvailabilitySet'
+ Type AgentPoolType `json:"type,omitempty"`
+ // Mode - Possible values include: 'AgentPoolModeSystem', 'AgentPoolModeUser'
+ Mode AgentPoolMode `json:"mode,omitempty"`
+ // OrchestratorVersion - As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool minor version must be within two minor versions of the control plane version. The node pool version cannot be greater than the control plane version. For more information see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool).
+ OrchestratorVersion *string `json:"orchestratorVersion,omitempty"`
+ // NodeImageVersion - READ-ONLY; The version of node image
+ NodeImageVersion *string `json:"nodeImageVersion,omitempty"`
+ // UpgradeSettings - Settings for upgrading the agentpool
+ UpgradeSettings *AgentPoolUpgradeSettings `json:"upgradeSettings,omitempty"`
+ // ProvisioningState - READ-ONLY; The current deployment or provisioning state.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // PowerState - When an Agent Pool is first created it is initially Running. The Agent Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and does not accrue billing charges. An Agent Pool can only be stopped if it is Running and provisioning state is Succeeded
+ PowerState *PowerState `json:"powerState,omitempty"`
+ // AvailabilityZones - The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'.
+ AvailabilityZones *[]string `json:"availabilityZones,omitempty"`
+ // EnableNodePublicIP - Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For more information see [assigning a public IP per node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). The default is false.
+ EnableNodePublicIP *bool `json:"enableNodePublicIP,omitempty"`
+ // NodePublicIPPrefixID - This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}
+ NodePublicIPPrefixID *string `json:"nodePublicIPPrefixID,omitempty"`
+ // ScaleSetPriority - The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. Possible values include: 'ScaleSetPrioritySpot', 'ScaleSetPriorityRegular'
+ ScaleSetPriority ScaleSetPriority `json:"scaleSetPriority,omitempty"`
+ // ScaleSetEvictionPolicy - This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. Possible values include: 'ScaleSetEvictionPolicyDelete', 'ScaleSetEvictionPolicyDeallocate'
+ ScaleSetEvictionPolicy ScaleSetEvictionPolicy `json:"scaleSetEvictionPolicy,omitempty"`
+ // SpotMaxPrice - Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. For more details on spot pricing, see [spot VMs pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing)
+ SpotMaxPrice *float64 `json:"spotMaxPrice,omitempty"`
+ // Tags - The tags to be persisted on the agent pool virtual machine scale set.
+ Tags map[string]*string `json:"tags"`
+ // NodeLabels - The node labels to be persisted across all nodes in agent pool.
+ NodeLabels map[string]*string `json:"nodeLabels"`
+ // NodeTaints - The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.
+ NodeTaints *[]string `json:"nodeTaints,omitempty"`
+ // ProximityPlacementGroupID - The ID for Proximity Placement Group.
+ ProximityPlacementGroupID *string `json:"proximityPlacementGroupID,omitempty"`
+ // KubeletConfig - The Kubelet configuration on the agent pool nodes.
+ KubeletConfig *KubeletConfig `json:"kubeletConfig,omitempty"`
+ // LinuxOSConfig - The OS configuration of Linux agent nodes.
+ LinuxOSConfig *LinuxOSConfig `json:"linuxOSConfig,omitempty"`
+ // EnableEncryptionAtHost - This is only supported on certain VM sizes and in certain Azure regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption
+ EnableEncryptionAtHost *bool `json:"enableEncryptionAtHost,omitempty"`
+ // EnableUltraSSD - Whether to enable UltraSSD
+ EnableUltraSSD *bool `json:"enableUltraSSD,omitempty"`
+ // EnableFIPS - See [Add a FIPS-enabled node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more details.
+ EnableFIPS *bool `json:"enableFIPS,omitempty"`
+ // GpuInstanceProfile - GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. Possible values include: 'GPUInstanceProfileMIG1g', 'GPUInstanceProfileMIG2g', 'GPUInstanceProfileMIG3g', 'GPUInstanceProfileMIG4g', 'GPUInstanceProfileMIG7g'
+ GpuInstanceProfile GPUInstanceProfile `json:"gpuInstanceProfile,omitempty"`
+ // CreationData - CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot.
+ CreationData *CreationData `json:"creationData,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ManagedClusterAgentPoolProfileProperties.
+func (mcappp ManagedClusterAgentPoolProfileProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if mcappp.Count != nil {
+ objectMap["count"] = mcappp.Count
+ }
+ if mcappp.VMSize != nil {
+ objectMap["vmSize"] = mcappp.VMSize
+ }
+ if mcappp.OsDiskSizeGB != nil {
+ objectMap["osDiskSizeGB"] = mcappp.OsDiskSizeGB
+ }
+ if mcappp.OsDiskType != "" {
+ objectMap["osDiskType"] = mcappp.OsDiskType
+ }
+ if mcappp.KubeletDiskType != "" {
+ objectMap["kubeletDiskType"] = mcappp.KubeletDiskType
+ }
+ if mcappp.WorkloadRuntime != "" {
+ objectMap["workloadRuntime"] = mcappp.WorkloadRuntime
+ }
+ if mcappp.VnetSubnetID != nil {
+ objectMap["vnetSubnetID"] = mcappp.VnetSubnetID
+ }
+ if mcappp.PodSubnetID != nil {
+ objectMap["podSubnetID"] = mcappp.PodSubnetID
+ }
+ if mcappp.MaxPods != nil {
+ objectMap["maxPods"] = mcappp.MaxPods
+ }
+ if mcappp.OsType != "" {
+ objectMap["osType"] = mcappp.OsType
+ }
+ if mcappp.OsSKU != "" {
+ objectMap["osSKU"] = mcappp.OsSKU
+ }
+ if mcappp.MaxCount != nil {
+ objectMap["maxCount"] = mcappp.MaxCount
+ }
+ if mcappp.MinCount != nil {
+ objectMap["minCount"] = mcappp.MinCount
+ }
+ if mcappp.EnableAutoScaling != nil {
+ objectMap["enableAutoScaling"] = mcappp.EnableAutoScaling
+ }
+ if mcappp.ScaleDownMode != "" {
+ objectMap["scaleDownMode"] = mcappp.ScaleDownMode
+ }
+ if mcappp.Type != "" {
+ objectMap["type"] = mcappp.Type
+ }
+ if mcappp.Mode != "" {
+ objectMap["mode"] = mcappp.Mode
+ }
+ if mcappp.OrchestratorVersion != nil {
+ objectMap["orchestratorVersion"] = mcappp.OrchestratorVersion
+ }
+ if mcappp.UpgradeSettings != nil {
+ objectMap["upgradeSettings"] = mcappp.UpgradeSettings
+ }
+ if mcappp.PowerState != nil {
+ objectMap["powerState"] = mcappp.PowerState
+ }
+ if mcappp.AvailabilityZones != nil {
+ objectMap["availabilityZones"] = mcappp.AvailabilityZones
+ }
+ if mcappp.EnableNodePublicIP != nil {
+ objectMap["enableNodePublicIP"] = mcappp.EnableNodePublicIP
+ }
+ if mcappp.NodePublicIPPrefixID != nil {
+ objectMap["nodePublicIPPrefixID"] = mcappp.NodePublicIPPrefixID
+ }
+ if mcappp.ScaleSetPriority != "" {
+ objectMap["scaleSetPriority"] = mcappp.ScaleSetPriority
+ }
+ if mcappp.ScaleSetEvictionPolicy != "" {
+ objectMap["scaleSetEvictionPolicy"] = mcappp.ScaleSetEvictionPolicy
+ }
+ if mcappp.SpotMaxPrice != nil {
+ objectMap["spotMaxPrice"] = mcappp.SpotMaxPrice
+ }
+ if mcappp.Tags != nil {
+ objectMap["tags"] = mcappp.Tags
+ }
+ if mcappp.NodeLabels != nil {
+ objectMap["nodeLabels"] = mcappp.NodeLabels
+ }
+ if mcappp.NodeTaints != nil {
+ objectMap["nodeTaints"] = mcappp.NodeTaints
+ }
+ if mcappp.ProximityPlacementGroupID != nil {
+ objectMap["proximityPlacementGroupID"] = mcappp.ProximityPlacementGroupID
+ }
+ if mcappp.KubeletConfig != nil {
+ objectMap["kubeletConfig"] = mcappp.KubeletConfig
+ }
+ if mcappp.LinuxOSConfig != nil {
+ objectMap["linuxOSConfig"] = mcappp.LinuxOSConfig
+ }
+ if mcappp.EnableEncryptionAtHost != nil {
+ objectMap["enableEncryptionAtHost"] = mcappp.EnableEncryptionAtHost
+ }
+ if mcappp.EnableUltraSSD != nil {
+ objectMap["enableUltraSSD"] = mcappp.EnableUltraSSD
+ }
+ if mcappp.EnableFIPS != nil {
+ objectMap["enableFIPS"] = mcappp.EnableFIPS
+ }
+ if mcappp.GpuInstanceProfile != "" {
+ objectMap["gpuInstanceProfile"] = mcappp.GpuInstanceProfile
+ }
+ if mcappp.CreationData != nil {
+ objectMap["creationData"] = mcappp.CreationData
+ }
+ return json.Marshal(objectMap)
+}
+
+// ManagedClusterAPIServerAccessProfile access profile for managed cluster API server.
+type ManagedClusterAPIServerAccessProfile struct {
+ // AuthorizedIPRanges - IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with clusters that use Public IP Per Node, or clusters that are using a Basic Load Balancer. For more information see [API server authorized IP ranges](https://docs.microsoft.com/azure/aks/api-server-authorized-ip-ranges).
+ AuthorizedIPRanges *[]string `json:"authorizedIPRanges,omitempty"`
+ // EnablePrivateCluster - For more details, see [Creating a private AKS cluster](https://docs.microsoft.com/azure/aks/private-clusters).
+ EnablePrivateCluster *bool `json:"enablePrivateCluster,omitempty"`
+ // PrivateDNSZone - The default is System. For more details see [configure private DNS zone](https://docs.microsoft.com/azure/aks/private-clusters#configure-private-dns-zone). Allowed values are 'system' and 'none'.
+ PrivateDNSZone *string `json:"privateDNSZone,omitempty"`
+ // EnablePrivateClusterPublicFQDN - Whether to create additional public FQDN for private cluster or not.
+ EnablePrivateClusterPublicFQDN *bool `json:"enablePrivateClusterPublicFQDN,omitempty"`
+ // DisableRunCommand - Whether to disable run command for the cluster or not.
+ DisableRunCommand *bool `json:"disableRunCommand,omitempty"`
+}
+
+// ManagedClusterAutoUpgradeProfile auto upgrade profile for a managed cluster.
+type ManagedClusterAutoUpgradeProfile struct {
+ // UpgradeChannel - For more information see [setting the AKS cluster auto-upgrade channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). Possible values include: 'UpgradeChannelRapid', 'UpgradeChannelStable', 'UpgradeChannelPatch', 'UpgradeChannelNodeImage', 'UpgradeChannelNone'
+ UpgradeChannel UpgradeChannel `json:"upgradeChannel,omitempty"`
+}
+
+// ManagedClusterHTTPProxyConfig cluster HTTP proxy configuration.
+type ManagedClusterHTTPProxyConfig struct {
+ // HTTPProxy - The HTTP proxy server endpoint to use.
+ HTTPProxy *string `json:"httpProxy,omitempty"`
+ // HTTPSProxy - The HTTPS proxy server endpoint to use.
+ HTTPSProxy *string `json:"httpsProxy,omitempty"`
+ // NoProxy - The endpoints that should not go through proxy.
+ NoProxy *[]string `json:"noProxy,omitempty"`
+ // TrustedCa - Alternative CA cert to use for connecting to proxy servers.
+ TrustedCa *string `json:"trustedCa,omitempty"`
+}
+
+// ManagedClusterIdentity identity for the managed cluster.
+type ManagedClusterIdentity struct {
+ // PrincipalID - READ-ONLY; The principal id of the system assigned identity which is used by master components.
+ PrincipalID *string `json:"principalId,omitempty"`
+ // TenantID - READ-ONLY; The tenant id of the system assigned identity which is used by master components.
+ TenantID *string `json:"tenantId,omitempty"`
+ // Type - For more information see [use managed identities in AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). Possible values include: 'ResourceIdentityTypeSystemAssigned', 'ResourceIdentityTypeUserAssigned', 'ResourceIdentityTypeNone'
+ Type ResourceIdentityType `json:"type,omitempty"`
+ // UserAssignedIdentities - The keys must be ARM resource IDs in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
+ UserAssignedIdentities map[string]*ManagedClusterIdentityUserAssignedIdentitiesValue `json:"userAssignedIdentities"`
+}
+
+// MarshalJSON is the custom marshaler for ManagedClusterIdentity.
+func (mci ManagedClusterIdentity) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if mci.Type != "" {
+ objectMap["type"] = mci.Type
+ }
+ if mci.UserAssignedIdentities != nil {
+ objectMap["userAssignedIdentities"] = mci.UserAssignedIdentities
+ }
+ return json.Marshal(objectMap)
+}
+
+// ManagedClusterIdentityUserAssignedIdentitiesValue ...
+type ManagedClusterIdentityUserAssignedIdentitiesValue struct {
+ // PrincipalID - READ-ONLY; The principal id of user assigned identity.
+ PrincipalID *string `json:"principalId,omitempty"`
+ // ClientID - READ-ONLY; The client id of user assigned identity.
+ ClientID *string `json:"clientId,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ManagedClusterIdentityUserAssignedIdentitiesValue.
+func (mciAiv ManagedClusterIdentityUserAssignedIdentitiesValue) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// ManagedClusterListResult the response from the List Managed Clusters operation.
+type ManagedClusterListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of managed clusters.
+ Value *[]ManagedCluster `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URL to get the next set of managed cluster results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ManagedClusterListResult.
+func (mclr ManagedClusterListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if mclr.Value != nil {
+ objectMap["value"] = mclr.Value
+ }
+ return json.Marshal(objectMap)
+}
+
+// ManagedClusterListResultIterator provides access to a complete listing of ManagedCluster values.
+type ManagedClusterListResultIterator struct {
+ i int
+ page ManagedClusterListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ManagedClusterListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClusterListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ManagedClusterListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ManagedClusterListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ManagedClusterListResultIterator) Response() ManagedClusterListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ManagedClusterListResultIterator) Value() ManagedCluster {
+ if !iter.page.NotDone() {
+ return ManagedCluster{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the ManagedClusterListResultIterator type.
+func NewManagedClusterListResultIterator(page ManagedClusterListResultPage) ManagedClusterListResultIterator {
+ return ManagedClusterListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (mclr ManagedClusterListResult) IsEmpty() bool {
+ return mclr.Value == nil || len(*mclr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (mclr ManagedClusterListResult) hasNextLink() bool {
+ return mclr.NextLink != nil && len(*mclr.NextLink) != 0
+}
+
+// managedClusterListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (mclr ManagedClusterListResult) managedClusterListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !mclr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(mclr.NextLink)))
+}
+
+// ManagedClusterListResultPage contains a page of ManagedCluster values.
+type ManagedClusterListResultPage struct {
+ fn func(context.Context, ManagedClusterListResult) (ManagedClusterListResult, error)
+ mclr ManagedClusterListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ManagedClusterListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClusterListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.mclr)
+ if err != nil {
+ return err
+ }
+ page.mclr = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ManagedClusterListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ManagedClusterListResultPage) NotDone() bool {
+ return !page.mclr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ManagedClusterListResultPage) Response() ManagedClusterListResult {
+ return page.mclr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ManagedClusterListResultPage) Values() []ManagedCluster {
+ if page.mclr.IsEmpty() {
+ return nil
+ }
+ return *page.mclr.Value
+}
+
+// Creates a new instance of the ManagedClusterListResultPage type.
+func NewManagedClusterListResultPage(cur ManagedClusterListResult, getNextPage func(context.Context, ManagedClusterListResult) (ManagedClusterListResult, error)) ManagedClusterListResultPage {
+ return ManagedClusterListResultPage{
+ fn: getNextPage,
+ mclr: cur,
+ }
+}
+
+// ManagedClusterLoadBalancerProfile profile of the managed cluster load balancer.
+type ManagedClusterLoadBalancerProfile struct {
+ // ManagedOutboundIPs - Desired managed outbound IPs for the cluster load balancer.
+ ManagedOutboundIPs *ManagedClusterLoadBalancerProfileManagedOutboundIPs `json:"managedOutboundIPs,omitempty"`
+ // OutboundIPPrefixes - Desired outbound IP Prefix resources for the cluster load balancer.
+ OutboundIPPrefixes *ManagedClusterLoadBalancerProfileOutboundIPPrefixes `json:"outboundIPPrefixes,omitempty"`
+ // OutboundIPs - Desired outbound IP resources for the cluster load balancer.
+ OutboundIPs *ManagedClusterLoadBalancerProfileOutboundIPs `json:"outboundIPs,omitempty"`
+ // EffectiveOutboundIPs - The effective outbound IP resources of the cluster load balancer.
+ EffectiveOutboundIPs *[]ResourceReference `json:"effectiveOutboundIPs,omitempty"`
+ // AllocatedOutboundPorts - The desired number of allocated SNAT ports per VM. Allowed values are in the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure dynamically allocating ports.
+ AllocatedOutboundPorts *int32 `json:"allocatedOutboundPorts,omitempty"`
+ // IdleTimeoutInMinutes - Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120 (inclusive). The default value is 30 minutes.
+ IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
+ // EnableMultipleStandardLoadBalancers - Enable multiple standard load balancers per AKS cluster or not.
+ EnableMultipleStandardLoadBalancers *bool `json:"enableMultipleStandardLoadBalancers,omitempty"`
+}
+
+// ManagedClusterLoadBalancerProfileManagedOutboundIPs desired managed outbound IPs for the cluster load
+// balancer.
+type ManagedClusterLoadBalancerProfileManagedOutboundIPs struct {
+ // Count - The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1.
+ Count *int32 `json:"count,omitempty"`
+ // CountIPv6 - The desired number of IPv6 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 0 for single-stack and 1 for dual-stack.
+ CountIPv6 *int32 `json:"countIPv6,omitempty"`
+}
+
+// ManagedClusterLoadBalancerProfileOutboundIPPrefixes desired outbound IP Prefix resources for the cluster
+// load balancer.
+type ManagedClusterLoadBalancerProfileOutboundIPPrefixes struct {
+ // PublicIPPrefixes - A list of public IP prefix resources.
+ PublicIPPrefixes *[]ResourceReference `json:"publicIPPrefixes,omitempty"`
+}
+
+// ManagedClusterLoadBalancerProfileOutboundIPs desired outbound IP resources for the cluster load
+// balancer.
+type ManagedClusterLoadBalancerProfileOutboundIPs struct {
+ // PublicIPs - A list of public IP resources.
+ PublicIPs *[]ResourceReference `json:"publicIPs,omitempty"`
+}
+
+// ManagedClusterManagedOutboundIPProfile profile of the managed outbound IP resources of the managed
+// cluster.
+type ManagedClusterManagedOutboundIPProfile struct {
+ // Count - The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). The default value is 1.
+ Count *int32 `json:"count,omitempty"`
+}
+
+// ManagedClusterNATGatewayProfile profile of the managed cluster NAT gateway.
+type ManagedClusterNATGatewayProfile struct {
+ // ManagedOutboundIPProfile - Profile of the managed outbound IP resources of the cluster NAT gateway.
+ ManagedOutboundIPProfile *ManagedClusterManagedOutboundIPProfile `json:"managedOutboundIPProfile,omitempty"`
+ // EffectiveOutboundIPs - The effective outbound IP resources of the cluster NAT gateway.
+ EffectiveOutboundIPs *[]ResourceReference `json:"effectiveOutboundIPs,omitempty"`
+ // IdleTimeoutInMinutes - Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120 (inclusive). The default value is 4 minutes.
+ IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
+}
+
+// ManagedClusterPodIdentity details about the pod identity assigned to the Managed Cluster.
+type ManagedClusterPodIdentity struct {
+ // Name - The name of the pod identity.
+ Name *string `json:"name,omitempty"`
+ // Namespace - The namespace of the pod identity.
+ Namespace *string `json:"namespace,omitempty"`
+ // BindingSelector - The binding selector to use for the AzureIdentityBinding resource.
+ BindingSelector *string `json:"bindingSelector,omitempty"`
+ // Identity - The user assigned identity details.
+ Identity *UserAssignedIdentity `json:"identity,omitempty"`
+ // ProvisioningState - READ-ONLY; The current provisioning state of the pod identity. Possible values include: 'ManagedClusterPodIdentityProvisioningStateAssigned', 'ManagedClusterPodIdentityProvisioningStateUpdating', 'ManagedClusterPodIdentityProvisioningStateDeleting', 'ManagedClusterPodIdentityProvisioningStateFailed'
+ ProvisioningState ManagedClusterPodIdentityProvisioningState `json:"provisioningState,omitempty"`
+ // ProvisioningInfo - READ-ONLY
+ ProvisioningInfo *ManagedClusterPodIdentityProvisioningInfo `json:"provisioningInfo,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ManagedClusterPodIdentity.
+func (mcpi ManagedClusterPodIdentity) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if mcpi.Name != nil {
+ objectMap["name"] = mcpi.Name
+ }
+ if mcpi.Namespace != nil {
+ objectMap["namespace"] = mcpi.Namespace
+ }
+ if mcpi.BindingSelector != nil {
+ objectMap["bindingSelector"] = mcpi.BindingSelector
+ }
+ if mcpi.Identity != nil {
+ objectMap["identity"] = mcpi.Identity
+ }
+ return json.Marshal(objectMap)
+}
+
+// ManagedClusterPodIdentityException see [disable AAD Pod Identity for a specific
+// Pod/Application](https://azure.github.io/aad-pod-identity/docs/configure/application_exception/) for
+// more details.
+type ManagedClusterPodIdentityException struct {
+ // Name - The name of the pod identity exception.
+ Name *string `json:"name,omitempty"`
+ // Namespace - The namespace of the pod identity exception.
+ Namespace *string `json:"namespace,omitempty"`
+ // PodLabels - The pod labels to match.
+ PodLabels map[string]*string `json:"podLabels"`
+}
+
+// MarshalJSON is the custom marshaler for ManagedClusterPodIdentityException.
+func (mcpie ManagedClusterPodIdentityException) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if mcpie.Name != nil {
+ objectMap["name"] = mcpie.Name
+ }
+ if mcpie.Namespace != nil {
+ objectMap["namespace"] = mcpie.Namespace
+ }
+ if mcpie.PodLabels != nil {
+ objectMap["podLabels"] = mcpie.PodLabels
+ }
+ return json.Marshal(objectMap)
+}
+
+// ManagedClusterPodIdentityProfile see [use AAD pod
+// identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on pod
+// identity integration.
+type ManagedClusterPodIdentityProfile struct {
+ // Enabled - Whether the pod identity addon is enabled.
+ Enabled *bool `json:"enabled,omitempty"`
+ // AllowNetworkPluginKubenet - Running in Kubenet is disabled by default due to the security related nature of AAD Pod Identity and the risks of IP spoofing. See [using Kubenet network plugin with AAD Pod Identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity#using-kubenet-network-plugin-with-azure-active-directory-pod-managed-identities) for more information.
+ AllowNetworkPluginKubenet *bool `json:"allowNetworkPluginKubenet,omitempty"`
+ // UserAssignedIdentities - The pod identities to use in the cluster.
+ UserAssignedIdentities *[]ManagedClusterPodIdentity `json:"userAssignedIdentities,omitempty"`
+ // UserAssignedIdentityExceptions - The pod identity exceptions to allow.
+ UserAssignedIdentityExceptions *[]ManagedClusterPodIdentityException `json:"userAssignedIdentityExceptions,omitempty"`
+}
+
+// ManagedClusterPodIdentityProvisioningError an error response from the pod identity provisioning.
+type ManagedClusterPodIdentityProvisioningError struct {
+ // Error - Details about the error.
+ Error *ManagedClusterPodIdentityProvisioningErrorBody `json:"error,omitempty"`
+}
+
+// ManagedClusterPodIdentityProvisioningErrorBody an error response from the pod identity provisioning.
+type ManagedClusterPodIdentityProvisioningErrorBody struct {
+ // Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
+ Code *string `json:"code,omitempty"`
+ // Message - A message describing the error, intended to be suitable for display in a user interface.
+ Message *string `json:"message,omitempty"`
+ // Target - The target of the particular error. For example, the name of the property in error.
+ Target *string `json:"target,omitempty"`
+ // Details - A list of additional details about the error.
+ Details *[]ManagedClusterPodIdentityProvisioningErrorBody `json:"details,omitempty"`
+}
+
+// ManagedClusterPodIdentityProvisioningInfo ...
+type ManagedClusterPodIdentityProvisioningInfo struct {
+ // Error - Pod identity assignment error (if any).
+ Error *ManagedClusterPodIdentityProvisioningError `json:"error,omitempty"`
+}
+
+// ManagedClusterPoolUpgradeProfile the list of available upgrade versions.
+type ManagedClusterPoolUpgradeProfile struct {
+ // KubernetesVersion - The Kubernetes version (major.minor.patch).
+ KubernetesVersion *string `json:"kubernetesVersion,omitempty"`
+ // Name - The Agent Pool name.
+ Name *string `json:"name,omitempty"`
+ // OsType - Possible values include: 'OSTypeLinux', 'OSTypeWindows'
+ OsType OSType `json:"osType,omitempty"`
+ // Upgrades - List of orchestrator types and versions available for upgrade.
+ Upgrades *[]ManagedClusterPoolUpgradeProfileUpgradesItem `json:"upgrades,omitempty"`
+}
+
+// ManagedClusterPoolUpgradeProfileUpgradesItem ...
+type ManagedClusterPoolUpgradeProfileUpgradesItem struct {
+ // KubernetesVersion - The Kubernetes version (major.minor.patch).
+ KubernetesVersion *string `json:"kubernetesVersion,omitempty"`
+ // IsPreview - Whether the Kubernetes version is currently in preview.
+ IsPreview *bool `json:"isPreview,omitempty"`
+}
+
+// ManagedClusterProperties properties of the managed cluster.
+type ManagedClusterProperties struct {
+ // ProvisioningState - READ-ONLY; The current provisioning state.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // PowerState - READ-ONLY; The Power State of the cluster.
+ PowerState *PowerState `json:"powerState,omitempty"`
+ // MaxAgentPools - READ-ONLY; The max number of agent pools for the managed cluster.
+ MaxAgentPools *int32 `json:"maxAgentPools,omitempty"`
+ // KubernetesVersion - When you upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be performed sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details.
+ KubernetesVersion *string `json:"kubernetesVersion,omitempty"`
+ // DNSPrefix - This cannot be updated once the Managed Cluster has been created.
+ DNSPrefix *string `json:"dnsPrefix,omitempty"`
+ // FqdnSubdomain - This cannot be updated once the Managed Cluster has been created.
+ FqdnSubdomain *string `json:"fqdnSubdomain,omitempty"`
+ // Fqdn - READ-ONLY; The FQDN of the master pool.
+ Fqdn *string `json:"fqdn,omitempty"`
+ // PrivateFQDN - READ-ONLY; The FQDN of private cluster.
+ PrivateFQDN *string `json:"privateFQDN,omitempty"`
+ // AzurePortalFQDN - READ-ONLY; The Azure Portal requires certain Cross-Origin Resource Sharing (CORS) headers to be sent in some responses, which Kubernetes APIServer doesn't handle by default. This special FQDN supports CORS, allowing the Azure Portal to function properly.
+ AzurePortalFQDN *string `json:"azurePortalFQDN,omitempty"`
+ // AgentPoolProfiles - The agent pool properties.
+ AgentPoolProfiles *[]ManagedClusterAgentPoolProfile `json:"agentPoolProfiles,omitempty"`
+ // LinuxProfile - The profile for Linux VMs in the Managed Cluster.
+ LinuxProfile *LinuxProfile `json:"linuxProfile,omitempty"`
+ // WindowsProfile - The profile for Windows VMs in the Managed Cluster.
+ WindowsProfile *ManagedClusterWindowsProfile `json:"windowsProfile,omitempty"`
+ // ServicePrincipalProfile - Information about a service principal identity for the cluster to use for manipulating Azure APIs.
+ ServicePrincipalProfile *ManagedClusterServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"`
+ // AddonProfiles - The profile of managed cluster add-on.
+ AddonProfiles map[string]*ManagedClusterAddonProfile `json:"addonProfiles"`
+ // PodIdentityProfile - See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on AAD pod identity integration.
+ PodIdentityProfile *ManagedClusterPodIdentityProfile `json:"podIdentityProfile,omitempty"`
+ // NodeResourceGroup - The name of the resource group containing agent pool nodes.
+ NodeResourceGroup *string `json:"nodeResourceGroup,omitempty"`
+ // EnableRBAC - Whether to enable Kubernetes Role-Based Access Control.
+ EnableRBAC *bool `json:"enableRBAC,omitempty"`
+ // EnablePodSecurityPolicy - (DEPRECATING) Whether to enable Kubernetes pod security policy (preview). This feature is set for removal on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy.
+ EnablePodSecurityPolicy *bool `json:"enablePodSecurityPolicy,omitempty"`
+ // NetworkProfile - The network configuration profile.
+ NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"`
+ // AadProfile - The Azure Active Directory configuration.
+ AadProfile *ManagedClusterAADProfile `json:"aadProfile,omitempty"`
+ // AutoUpgradeProfile - The auto upgrade configuration.
+ AutoUpgradeProfile *ManagedClusterAutoUpgradeProfile `json:"autoUpgradeProfile,omitempty"`
+ // AutoScalerProfile - Parameters to be applied to the cluster-autoscaler when enabled
+ AutoScalerProfile *ManagedClusterPropertiesAutoScalerProfile `json:"autoScalerProfile,omitempty"`
+ // APIServerAccessProfile - The access profile for managed cluster API server.
+ APIServerAccessProfile *ManagedClusterAPIServerAccessProfile `json:"apiServerAccessProfile,omitempty"`
+ // DiskEncryptionSetID - This is of the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'
+ DiskEncryptionSetID *string `json:"diskEncryptionSetID,omitempty"`
+ // IdentityProfile - Identities associated with the cluster.
+ IdentityProfile map[string]*UserAssignedIdentity `json:"identityProfile"`
+ // PrivateLinkResources - Private link resources associated with the cluster.
+ PrivateLinkResources *[]PrivateLinkResource `json:"privateLinkResources,omitempty"`
+ // DisableLocalAccounts - If set to true, getting static credentials will be disabled for this cluster. This must only be used on Managed Clusters that are AAD enabled. For more details see [disable local accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview).
+ DisableLocalAccounts *bool `json:"disableLocalAccounts,omitempty"`
+ // HTTPProxyConfig - Configurations for provisioning the cluster with HTTP proxy servers.
+ HTTPProxyConfig *ManagedClusterHTTPProxyConfig `json:"httpProxyConfig,omitempty"`
+ // SecurityProfile - Security profile for the managed cluster.
+ SecurityProfile *ManagedClusterSecurityProfile `json:"securityProfile,omitempty"`
+ // PublicNetworkAccess - Allow or deny public network access for AKS. Possible values include: 'PublicNetworkAccessEnabled', 'PublicNetworkAccessDisabled'
+ PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ManagedClusterProperties.
+func (mcp ManagedClusterProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if mcp.KubernetesVersion != nil {
+ objectMap["kubernetesVersion"] = mcp.KubernetesVersion
+ }
+ if mcp.DNSPrefix != nil {
+ objectMap["dnsPrefix"] = mcp.DNSPrefix
+ }
+ if mcp.FqdnSubdomain != nil {
+ objectMap["fqdnSubdomain"] = mcp.FqdnSubdomain
+ }
+ if mcp.AgentPoolProfiles != nil {
+ objectMap["agentPoolProfiles"] = mcp.AgentPoolProfiles
+ }
+ if mcp.LinuxProfile != nil {
+ objectMap["linuxProfile"] = mcp.LinuxProfile
+ }
+ if mcp.WindowsProfile != nil {
+ objectMap["windowsProfile"] = mcp.WindowsProfile
+ }
+ if mcp.ServicePrincipalProfile != nil {
+ objectMap["servicePrincipalProfile"] = mcp.ServicePrincipalProfile
+ }
+ if mcp.AddonProfiles != nil {
+ objectMap["addonProfiles"] = mcp.AddonProfiles
+ }
+ if mcp.PodIdentityProfile != nil {
+ objectMap["podIdentityProfile"] = mcp.PodIdentityProfile
+ }
+ if mcp.NodeResourceGroup != nil {
+ objectMap["nodeResourceGroup"] = mcp.NodeResourceGroup
+ }
+ if mcp.EnableRBAC != nil {
+ objectMap["enableRBAC"] = mcp.EnableRBAC
+ }
+ if mcp.EnablePodSecurityPolicy != nil {
+ objectMap["enablePodSecurityPolicy"] = mcp.EnablePodSecurityPolicy
+ }
+ if mcp.NetworkProfile != nil {
+ objectMap["networkProfile"] = mcp.NetworkProfile
+ }
+ if mcp.AadProfile != nil {
+ objectMap["aadProfile"] = mcp.AadProfile
+ }
+ if mcp.AutoUpgradeProfile != nil {
+ objectMap["autoUpgradeProfile"] = mcp.AutoUpgradeProfile
+ }
+ if mcp.AutoScalerProfile != nil {
+ objectMap["autoScalerProfile"] = mcp.AutoScalerProfile
+ }
+ if mcp.APIServerAccessProfile != nil {
+ objectMap["apiServerAccessProfile"] = mcp.APIServerAccessProfile
+ }
+ if mcp.DiskEncryptionSetID != nil {
+ objectMap["diskEncryptionSetID"] = mcp.DiskEncryptionSetID
+ }
+ if mcp.IdentityProfile != nil {
+ objectMap["identityProfile"] = mcp.IdentityProfile
+ }
+ if mcp.PrivateLinkResources != nil {
+ objectMap["privateLinkResources"] = mcp.PrivateLinkResources
+ }
+ if mcp.DisableLocalAccounts != nil {
+ objectMap["disableLocalAccounts"] = mcp.DisableLocalAccounts
+ }
+ if mcp.HTTPProxyConfig != nil {
+ objectMap["httpProxyConfig"] = mcp.HTTPProxyConfig
+ }
+ if mcp.SecurityProfile != nil {
+ objectMap["securityProfile"] = mcp.SecurityProfile
+ }
+ if mcp.PublicNetworkAccess != "" {
+ objectMap["publicNetworkAccess"] = mcp.PublicNetworkAccess
+ }
+ return json.Marshal(objectMap)
+}
+
+// ManagedClusterPropertiesAutoScalerProfile parameters to be applied to the cluster-autoscaler when
+// enabled
+type ManagedClusterPropertiesAutoScalerProfile struct {
+ // BalanceSimilarNodeGroups - Valid values are 'true' and 'false'
+ BalanceSimilarNodeGroups *string `json:"balance-similar-node-groups,omitempty"`
+ // Expander - If not specified, the default is 'random'. See [expanders](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-expanders) for more information. Possible values include: 'ExpanderLeastWaste', 'ExpanderMostPods', 'ExpanderPriority', 'ExpanderRandom'
+ Expander Expander `json:"expander,omitempty"`
+ // MaxEmptyBulkDelete - The default is 10.
+ MaxEmptyBulkDelete *string `json:"max-empty-bulk-delete,omitempty"`
+ // MaxGracefulTerminationSec - The default is 600.
+ MaxGracefulTerminationSec *string `json:"max-graceful-termination-sec,omitempty"`
+ // MaxNodeProvisionTime - The default is '15m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.
+ MaxNodeProvisionTime *string `json:"max-node-provision-time,omitempty"`
+ // MaxTotalUnreadyPercentage - The default is 45. The maximum is 100 and the minimum is 0.
+ MaxTotalUnreadyPercentage *string `json:"max-total-unready-percentage,omitempty"`
+ // NewPodScaleUpDelay - For scenarios like burst/batch scale where you don't want CA to act before the kubernetes scheduler could schedule all the pods, you can tell CA to ignore unscheduled pods before they're a certain age. The default is '0s'. Values must be an integer followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc).
+ NewPodScaleUpDelay *string `json:"new-pod-scale-up-delay,omitempty"`
+ // OkTotalUnreadyCount - This must be an integer. The default is 3.
+ OkTotalUnreadyCount *string `json:"ok-total-unready-count,omitempty"`
+ // ScanInterval - The default is '10'. Values must be an integer number of seconds.
+ ScanInterval *string `json:"scan-interval,omitempty"`
+ // ScaleDownDelayAfterAdd - The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.
+ ScaleDownDelayAfterAdd *string `json:"scale-down-delay-after-add,omitempty"`
+ // ScaleDownDelayAfterDelete - The default is the scan-interval. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.
+ ScaleDownDelayAfterDelete *string `json:"scale-down-delay-after-delete,omitempty"`
+ // ScaleDownDelayAfterFailure - The default is '3m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.
+ ScaleDownDelayAfterFailure *string `json:"scale-down-delay-after-failure,omitempty"`
+ // ScaleDownUnneededTime - The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.
+ ScaleDownUnneededTime *string `json:"scale-down-unneeded-time,omitempty"`
+ // ScaleDownUnreadyTime - The default is '20m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported.
+ ScaleDownUnreadyTime *string `json:"scale-down-unready-time,omitempty"`
+ // ScaleDownUtilizationThreshold - The default is '0.5'.
+ ScaleDownUtilizationThreshold *string `json:"scale-down-utilization-threshold,omitempty"`
+ // SkipNodesWithLocalStorage - The default is true.
+ SkipNodesWithLocalStorage *string `json:"skip-nodes-with-local-storage,omitempty"`
+ // SkipNodesWithSystemPods - The default is true.
+ SkipNodesWithSystemPods *string `json:"skip-nodes-with-system-pods,omitempty"`
+}
+
+// ManagedClustersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ManagedClustersCreateOrUpdateFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ManagedClustersClient) (ManagedCluster, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ManagedClustersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ManagedClustersCreateOrUpdateFuture.Result.
+func (future *ManagedClustersCreateOrUpdateFuture) result(client ManagedClustersClient) (mc ManagedCluster, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ mc.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if mc.Response.Response, err = future.GetResult(sender); err == nil && mc.Response.Response.StatusCode != http.StatusNoContent {
+ mc, err = client.CreateOrUpdateResponder(mc.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersCreateOrUpdateFuture", "Result", mc.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ManagedClustersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type ManagedClustersDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ManagedClustersClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ManagedClustersDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ManagedClustersDeleteFuture.Result.
+func (future *ManagedClustersDeleteFuture) result(client ManagedClustersClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// ManagedClusterSecurityProfile security profile for the container service cluster.
+type ManagedClusterSecurityProfile struct {
+ // AzureDefender - Azure Defender settings for the security profile.
+ AzureDefender *ManagedClusterSecurityProfileAzureDefender `json:"azureDefender,omitempty"`
+}
+
+// ManagedClusterSecurityProfileAzureDefender azure Defender settings for the security profile.
+type ManagedClusterSecurityProfileAzureDefender struct {
+ // Enabled - Whether to enable Azure Defender
+ Enabled *bool `json:"enabled,omitempty"`
+ // LogAnalyticsWorkspaceResourceID - Resource ID of the Log Analytics workspace to be associated with Azure Defender. When Azure Defender is enabled, this field is required and must be a valid workspace resource ID. When Azure Defender is disabled, leave the field empty.
+ LogAnalyticsWorkspaceResourceID *string `json:"logAnalyticsWorkspaceResourceId,omitempty"`
+}
+
+// ManagedClusterServicePrincipalProfile information about a service principal identity for the cluster to
+// use for manipulating Azure APIs.
+type ManagedClusterServicePrincipalProfile struct {
+ // ClientID - The ID for the service principal.
+ ClientID *string `json:"clientId,omitempty"`
+ // Secret - The secret password associated with the service principal in plain text.
+ Secret *string `json:"secret,omitempty"`
+}
+
+// ManagedClusterSKU the SKU of a Managed Cluster.
+type ManagedClusterSKU struct {
+ // Name - The name of a managed cluster SKU. Possible values include: 'ManagedClusterSKUNameBasic'
+ Name ManagedClusterSKUName `json:"name,omitempty"`
+ // Tier - If not specified, the default is 'Free'. See [uptime SLA](https://docs.microsoft.com/azure/aks/uptime-sla) for more details. Possible values include: 'ManagedClusterSKUTierPaid', 'ManagedClusterSKUTierFree'
+ Tier ManagedClusterSKUTier `json:"tier,omitempty"`
+}
+
+// ManagedClustersResetAADProfileFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ManagedClustersResetAADProfileFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ManagedClustersClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ManagedClustersResetAADProfileFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ManagedClustersResetAADProfileFuture.Result.
+func (future *ManagedClustersResetAADProfileFuture) result(client ManagedClustersClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersResetAADProfileFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersResetAADProfileFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// ManagedClustersResetServicePrincipalProfileFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
+type ManagedClustersResetServicePrincipalProfileFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ManagedClustersClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ManagedClustersResetServicePrincipalProfileFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ManagedClustersResetServicePrincipalProfileFuture.Result.
+func (future *ManagedClustersResetServicePrincipalProfileFuture) result(client ManagedClustersClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersResetServicePrincipalProfileFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersResetServicePrincipalProfileFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// ManagedClustersRotateClusterCertificatesFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
+type ManagedClustersRotateClusterCertificatesFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ManagedClustersClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ManagedClustersRotateClusterCertificatesFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ManagedClustersRotateClusterCertificatesFuture.Result.
+func (future *ManagedClustersRotateClusterCertificatesFuture) result(client ManagedClustersClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersRotateClusterCertificatesFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersRotateClusterCertificatesFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// ManagedClustersRunCommandFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ManagedClustersRunCommandFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ManagedClustersClient) (RunCommandResult, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ManagedClustersRunCommandFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ManagedClustersRunCommandFuture.Result.
+func (future *ManagedClustersRunCommandFuture) result(client ManagedClustersClient) (rcr RunCommandResult, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersRunCommandFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ rcr.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersRunCommandFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if rcr.Response.Response, err = future.GetResult(sender); err == nil && rcr.Response.Response.StatusCode != http.StatusNoContent {
+ rcr, err = client.RunCommandResponder(rcr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersRunCommandFuture", "Result", rcr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ManagedClustersStartFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type ManagedClustersStartFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ManagedClustersClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ManagedClustersStartFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ManagedClustersStartFuture.Result.
+func (future *ManagedClustersStartFuture) result(client ManagedClustersClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersStartFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersStartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// ManagedClustersStopFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type ManagedClustersStopFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ManagedClustersClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ManagedClustersStopFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ManagedClustersStopFuture.Result.
+func (future *ManagedClustersStopFuture) result(client ManagedClustersClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersStopFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersStopFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// ManagedClustersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ManagedClustersUpdateTagsFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(ManagedClustersClient) (ManagedCluster, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *ManagedClustersUpdateTagsFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for ManagedClustersUpdateTagsFuture.Result.
+func (future *ManagedClustersUpdateTagsFuture) result(client ManagedClustersClient) (mc ManagedCluster, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersUpdateTagsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ mc.Response.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersUpdateTagsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if mc.Response.Response, err = future.GetResult(sender); err == nil && mc.Response.Response.StatusCode != http.StatusNoContent {
+ mc, err = client.UpdateTagsResponder(mc.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersUpdateTagsFuture", "Result", mc.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ManagedClusterUpgradeProfile the list of available upgrades for compute pools.
+type ManagedClusterUpgradeProfile struct {
+ autorest.Response `json:"-"`
+ // ID - READ-ONLY; The ID of the upgrade profile.
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; The name of the upgrade profile.
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; The type of the upgrade profile.
+ Type *string `json:"type,omitempty"`
+ // ManagedClusterUpgradeProfileProperties - The properties of the upgrade profile.
+ *ManagedClusterUpgradeProfileProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ManagedClusterUpgradeProfile.
+func (mcup ManagedClusterUpgradeProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if mcup.ManagedClusterUpgradeProfileProperties != nil {
+ objectMap["properties"] = mcup.ManagedClusterUpgradeProfileProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ManagedClusterUpgradeProfile struct.
+func (mcup *ManagedClusterUpgradeProfile) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ mcup.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ mcup.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ mcup.Type = &typeVar
+ }
+ case "properties":
+ if v != nil {
+ var managedClusterUpgradeProfileProperties ManagedClusterUpgradeProfileProperties
+ err = json.Unmarshal(*v, &managedClusterUpgradeProfileProperties)
+ if err != nil {
+ return err
+ }
+ mcup.ManagedClusterUpgradeProfileProperties = &managedClusterUpgradeProfileProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// ManagedClusterUpgradeProfileProperties control plane and agent pool upgrade profiles.
+type ManagedClusterUpgradeProfileProperties struct {
+ // ControlPlaneProfile - The list of available upgrade versions for the control plane.
+ ControlPlaneProfile *ManagedClusterPoolUpgradeProfile `json:"controlPlaneProfile,omitempty"`
+ // AgentPoolProfiles - The list of available upgrade versions for agent pools.
+ AgentPoolProfiles *[]ManagedClusterPoolUpgradeProfile `json:"agentPoolProfiles,omitempty"`
+}
+
+// ManagedClusterWindowsProfile profile for Windows VMs in the managed cluster.
+type ManagedClusterWindowsProfile struct {
+ // AdminUsername - Specifies the name of the administrator account.
**Restriction:** Cannot end in "."
**Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5".
**Minimum-length:** 1 character
**Max-length:** 20 characters
+ AdminUsername *string `json:"adminUsername,omitempty"`
+ // AdminPassword - Specifies the password of the administrator account.
**Minimum-length:** 8 characters
**Max-length:** 123 characters
**Complexity requirements:** 3 out of 4 conditions below need to be fulfilled
Has lower characters
Has upper characters
Has a digit
Has a special character (Regex match [\W_])
**Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!"
+ AdminPassword *string `json:"adminPassword,omitempty"`
+ // LicenseType - The license type to use for Windows VMs. See [Azure Hybrid User Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) for more details. Possible values include: 'LicenseTypeNone', 'LicenseTypeWindowsServer'
+ LicenseType LicenseType `json:"licenseType,omitempty"`
+ // EnableCSIProxy - For more details on CSI proxy, see the [CSI proxy GitHub repo](https://github.com/kubernetes-csi/csi-proxy).
+ EnableCSIProxy *bool `json:"enableCSIProxy,omitempty"`
+ // GmsaProfile - The Windows gMSA Profile in the Managed Cluster.
+ GmsaProfile *WindowsGmsaProfile `json:"gmsaProfile,omitempty"`
+}
+
+// MasterProfile profile for the container service master.
+type MasterProfile struct {
+ // Count - Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1.
+ Count *int32 `json:"count,omitempty"`
+ // DNSPrefix - DNS prefix to be used to create the FQDN for the master pool.
+ DNSPrefix *string `json:"dnsPrefix,omitempty"`
+ // VMSize - Size of agent VMs. Possible values include: 'VMSizeTypesStandardA1', 'VMSizeTypesStandardA10', 'VMSizeTypesStandardA11', 'VMSizeTypesStandardA1V2', 'VMSizeTypesStandardA2', 'VMSizeTypesStandardA2V2', 'VMSizeTypesStandardA2mV2', 'VMSizeTypesStandardA3', 'VMSizeTypesStandardA4', 'VMSizeTypesStandardA4V2', 'VMSizeTypesStandardA4mV2', 'VMSizeTypesStandardA5', 'VMSizeTypesStandardA6', 'VMSizeTypesStandardA7', 'VMSizeTypesStandardA8', 'VMSizeTypesStandardA8V2', 'VMSizeTypesStandardA8mV2', 'VMSizeTypesStandardA9', 'VMSizeTypesStandardB2ms', 'VMSizeTypesStandardB2s', 'VMSizeTypesStandardB4ms', 'VMSizeTypesStandardB8ms', 'VMSizeTypesStandardD1', 'VMSizeTypesStandardD11', 'VMSizeTypesStandardD11V2', 'VMSizeTypesStandardD11V2Promo', 'VMSizeTypesStandardD12', 'VMSizeTypesStandardD12V2', 'VMSizeTypesStandardD12V2Promo', 'VMSizeTypesStandardD13', 'VMSizeTypesStandardD13V2', 'VMSizeTypesStandardD13V2Promo', 'VMSizeTypesStandardD14', 'VMSizeTypesStandardD14V2', 'VMSizeTypesStandardD14V2Promo', 'VMSizeTypesStandardD15V2', 'VMSizeTypesStandardD16V3', 'VMSizeTypesStandardD16sV3', 'VMSizeTypesStandardD1V2', 'VMSizeTypesStandardD2', 'VMSizeTypesStandardD2V2', 'VMSizeTypesStandardD2V2Promo', 'VMSizeTypesStandardD2V3', 'VMSizeTypesStandardD2sV3', 'VMSizeTypesStandardD3', 'VMSizeTypesStandardD32V3', 'VMSizeTypesStandardD32sV3', 'VMSizeTypesStandardD3V2', 'VMSizeTypesStandardD3V2Promo', 'VMSizeTypesStandardD4', 'VMSizeTypesStandardD4V2', 'VMSizeTypesStandardD4V2Promo', 'VMSizeTypesStandardD4V3', 'VMSizeTypesStandardD4sV3', 'VMSizeTypesStandardD5V2', 'VMSizeTypesStandardD5V2Promo', 'VMSizeTypesStandardD64V3', 'VMSizeTypesStandardD64sV3', 'VMSizeTypesStandardD8V3', 'VMSizeTypesStandardD8sV3', 'VMSizeTypesStandardDS1', 'VMSizeTypesStandardDS11', 'VMSizeTypesStandardDS11V2', 'VMSizeTypesStandardDS11V2Promo', 'VMSizeTypesStandardDS12', 'VMSizeTypesStandardDS12V2', 'VMSizeTypesStandardDS12V2Promo', 'VMSizeTypesStandardDS13', 'VMSizeTypesStandardDS132V2', 'VMSizeTypesStandardDS134V2', 'VMSizeTypesStandardDS13V2', 'VMSizeTypesStandardDS13V2Promo', 'VMSizeTypesStandardDS14', 'VMSizeTypesStandardDS144V2', 'VMSizeTypesStandardDS148V2', 'VMSizeTypesStandardDS14V2', 'VMSizeTypesStandardDS14V2Promo', 'VMSizeTypesStandardDS15V2', 'VMSizeTypesStandardDS1V2', 'VMSizeTypesStandardDS2', 'VMSizeTypesStandardDS2V2', 'VMSizeTypesStandardDS2V2Promo', 'VMSizeTypesStandardDS3', 'VMSizeTypesStandardDS3V2', 'VMSizeTypesStandardDS3V2Promo', 'VMSizeTypesStandardDS4', 'VMSizeTypesStandardDS4V2', 'VMSizeTypesStandardDS4V2Promo', 'VMSizeTypesStandardDS5V2', 'VMSizeTypesStandardDS5V2Promo', 'VMSizeTypesStandardE16V3', 'VMSizeTypesStandardE16sV3', 'VMSizeTypesStandardE2V3', 'VMSizeTypesStandardE2sV3', 'VMSizeTypesStandardE3216sV3', 'VMSizeTypesStandardE328sV3', 'VMSizeTypesStandardE32V3', 'VMSizeTypesStandardE32sV3', 'VMSizeTypesStandardE4V3', 'VMSizeTypesStandardE4sV3', 'VMSizeTypesStandardE6416sV3', 'VMSizeTypesStandardE6432sV3', 'VMSizeTypesStandardE64V3', 'VMSizeTypesStandardE64sV3', 'VMSizeTypesStandardE8V3', 'VMSizeTypesStandardE8sV3', 'VMSizeTypesStandardF1', 'VMSizeTypesStandardF16', 'VMSizeTypesStandardF16s', 'VMSizeTypesStandardF16sV2', 'VMSizeTypesStandardF1s', 'VMSizeTypesStandardF2', 'VMSizeTypesStandardF2s', 'VMSizeTypesStandardF2sV2', 'VMSizeTypesStandardF32sV2', 'VMSizeTypesStandardF4', 'VMSizeTypesStandardF4s', 'VMSizeTypesStandardF4sV2', 'VMSizeTypesStandardF64sV2', 'VMSizeTypesStandardF72sV2', 'VMSizeTypesStandardF8', 'VMSizeTypesStandardF8s', 'VMSizeTypesStandardF8sV2', 'VMSizeTypesStandardG1', 'VMSizeTypesStandardG2', 'VMSizeTypesStandardG3', 'VMSizeTypesStandardG4', 'VMSizeTypesStandardG5', 'VMSizeTypesStandardGS1', 'VMSizeTypesStandardGS2', 'VMSizeTypesStandardGS3', 'VMSizeTypesStandardGS4', 'VMSizeTypesStandardGS44', 'VMSizeTypesStandardGS48', 'VMSizeTypesStandardGS5', 'VMSizeTypesStandardGS516', 'VMSizeTypesStandardGS58', 'VMSizeTypesStandardH16', 'VMSizeTypesStandardH16m', 'VMSizeTypesStandardH16mr', 'VMSizeTypesStandardH16r', 'VMSizeTypesStandardH8', 'VMSizeTypesStandardH8m', 'VMSizeTypesStandardL16s', 'VMSizeTypesStandardL32s', 'VMSizeTypesStandardL4s', 'VMSizeTypesStandardL8s', 'VMSizeTypesStandardM12832ms', 'VMSizeTypesStandardM12864ms', 'VMSizeTypesStandardM128ms', 'VMSizeTypesStandardM128s', 'VMSizeTypesStandardM6416ms', 'VMSizeTypesStandardM6432ms', 'VMSizeTypesStandardM64ms', 'VMSizeTypesStandardM64s', 'VMSizeTypesStandardNC12', 'VMSizeTypesStandardNC12sV2', 'VMSizeTypesStandardNC12sV3', 'VMSizeTypesStandardNC24', 'VMSizeTypesStandardNC24r', 'VMSizeTypesStandardNC24rsV2', 'VMSizeTypesStandardNC24rsV3', 'VMSizeTypesStandardNC24sV2', 'VMSizeTypesStandardNC24sV3', 'VMSizeTypesStandardNC6', 'VMSizeTypesStandardNC6sV2', 'VMSizeTypesStandardNC6sV3', 'VMSizeTypesStandardND12s', 'VMSizeTypesStandardND24rs', 'VMSizeTypesStandardND24s', 'VMSizeTypesStandardND6s', 'VMSizeTypesStandardNV12', 'VMSizeTypesStandardNV24', 'VMSizeTypesStandardNV6'
+ VMSize VMSizeTypes `json:"vmSize,omitempty"`
+ // OsDiskSizeGB - OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified.
+ OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"`
+ // VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier.
+ VnetSubnetID *string `json:"vnetSubnetID,omitempty"`
+ // FirstConsecutiveStaticIP - FirstConsecutiveStaticIP used to specify the first static ip of masters.
+ FirstConsecutiveStaticIP *string `json:"firstConsecutiveStaticIP,omitempty"`
+ // StorageProfile - Storage profile specifies what kind of storage used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the orchestrator choice. Possible values include: 'StorageProfileTypesStorageAccount', 'StorageProfileTypesManagedDisks'
+ StorageProfile StorageProfileTypes `json:"storageProfile,omitempty"`
+ // Fqdn - READ-ONLY; FQDN for the master pool.
+ Fqdn *string `json:"fqdn,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for MasterProfile.
+func (mp MasterProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if mp.Count != nil {
+ objectMap["count"] = mp.Count
+ }
+ if mp.DNSPrefix != nil {
+ objectMap["dnsPrefix"] = mp.DNSPrefix
+ }
+ if mp.VMSize != "" {
+ objectMap["vmSize"] = mp.VMSize
+ }
+ if mp.OsDiskSizeGB != nil {
+ objectMap["osDiskSizeGB"] = mp.OsDiskSizeGB
+ }
+ if mp.VnetSubnetID != nil {
+ objectMap["vnetSubnetID"] = mp.VnetSubnetID
+ }
+ if mp.FirstConsecutiveStaticIP != nil {
+ objectMap["firstConsecutiveStaticIP"] = mp.FirstConsecutiveStaticIP
+ }
+ if mp.StorageProfile != "" {
+ objectMap["storageProfile"] = mp.StorageProfile
+ }
+ return json.Marshal(objectMap)
+}
+
+// NetworkProfile profile of network configuration.
+type NetworkProfile struct {
+ // NetworkPlugin - Network plugin used for building the Kubernetes network. Possible values include: 'NetworkPluginAzure', 'NetworkPluginKubenet'
+ NetworkPlugin NetworkPlugin `json:"networkPlugin,omitempty"`
+ // NetworkPolicy - Network policy used for building the Kubernetes network. Possible values include: 'NetworkPolicyCalico', 'NetworkPolicyAzure'
+ NetworkPolicy NetworkPolicy `json:"networkPolicy,omitempty"`
+ // NetworkMode - This cannot be specified if networkPlugin is anything other than 'azure'. Possible values include: 'NetworkModeTransparent', 'NetworkModeBridge'
+ NetworkMode NetworkMode `json:"networkMode,omitempty"`
+ // PodCidr - A CIDR notation IP range from which to assign pod IPs when kubenet is used.
+ PodCidr *string `json:"podCidr,omitempty"`
+ // ServiceCidr - A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges.
+ ServiceCidr *string `json:"serviceCidr,omitempty"`
+ // DNSServiceIP - An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr.
+ DNSServiceIP *string `json:"dnsServiceIP,omitempty"`
+ // DockerBridgeCidr - A CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the Kubernetes service address range.
+ DockerBridgeCidr *string `json:"dockerBridgeCidr,omitempty"`
+ // OutboundType - This can only be set at cluster creation time and cannot be changed later. For more information see [egress outbound type](https://docs.microsoft.com/azure/aks/egress-outboundtype). Possible values include: 'OutboundTypeLoadBalancer', 'OutboundTypeUserDefinedRouting', 'OutboundTypeManagedNATGateway', 'OutboundTypeUserAssignedNATGateway'
+ OutboundType OutboundType `json:"outboundType,omitempty"`
+ // LoadBalancerSku - The default is 'standard'. See [Azure Load Balancer SKUs](https://docs.microsoft.com/azure/load-balancer/skus) for more information about the differences between load balancer SKUs. Possible values include: 'LoadBalancerSkuStandard', 'LoadBalancerSkuBasic'
+ LoadBalancerSku LoadBalancerSku `json:"loadBalancerSku,omitempty"`
+ // LoadBalancerProfile - Profile of the cluster load balancer.
+ LoadBalancerProfile *ManagedClusterLoadBalancerProfile `json:"loadBalancerProfile,omitempty"`
+ // NatGatewayProfile - Profile of the cluster NAT gateway.
+ NatGatewayProfile *ManagedClusterNATGatewayProfile `json:"natGatewayProfile,omitempty"`
+ // PodCidrs - One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for dual-stack networking.
+ PodCidrs *[]string `json:"podCidrs,omitempty"`
+ // ServiceCidrs - One IPv4 CIDR is expected for single-stack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for dual-stack networking. They must not overlap with any Subnet IP ranges.
+ ServiceCidrs *[]string `json:"serviceCidrs,omitempty"`
+ // IPFamilies - IP families are used to determine single-stack or dual-stack clusters. For single-stack, the expected value is IPv4. For dual-stack, the expected values are IPv4 and IPv6.
+ IPFamilies *[]IPFamily `json:"ipFamilies,omitempty"`
+}
+
+// OperationListResult the List Operation response.
+type OperationListResult struct {
+ autorest.Response `json:"-"`
+ // Value - READ-ONLY; The list of operations
+ Value *[]OperationValue `json:"value,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for OperationListResult.
+func (olr OperationListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// OperationValue describes the properties of a Operation value.
+type OperationValue struct {
+ // Origin - READ-ONLY; The origin of the operation.
+ Origin *string `json:"origin,omitempty"`
+ // Name - READ-ONLY; The name of the operation.
+ Name *string `json:"name,omitempty"`
+ // OperationValueDisplay - Describes the properties of a Operation Value Display.
+ *OperationValueDisplay `json:"display,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for OperationValue.
+func (ov OperationValue) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ov.OperationValueDisplay != nil {
+ objectMap["display"] = ov.OperationValueDisplay
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for OperationValue struct.
+func (ov *OperationValue) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "origin":
+ if v != nil {
+ var origin string
+ err = json.Unmarshal(*v, &origin)
+ if err != nil {
+ return err
+ }
+ ov.Origin = &origin
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ov.Name = &name
+ }
+ case "display":
+ if v != nil {
+ var operationValueDisplay OperationValueDisplay
+ err = json.Unmarshal(*v, &operationValueDisplay)
+ if err != nil {
+ return err
+ }
+ ov.OperationValueDisplay = &operationValueDisplay
+ }
+ }
+ }
+
+ return nil
+}
+
+// OperationValueDisplay describes the properties of a Operation Value Display.
+type OperationValueDisplay struct {
+ // Operation - READ-ONLY; The display name of the operation.
+ Operation *string `json:"operation,omitempty"`
+ // Resource - READ-ONLY; The display name of the resource the operation applies to.
+ Resource *string `json:"resource,omitempty"`
+ // Description - READ-ONLY; The description of the operation.
+ Description *string `json:"description,omitempty"`
+ // Provider - READ-ONLY; The resource provider for the operation.
+ Provider *string `json:"provider,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for OperationValueDisplay.
+func (ovd OperationValueDisplay) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// OSOptionProfile the OS option profile.
+type OSOptionProfile struct {
+ autorest.Response `json:"-"`
+ // ID - READ-ONLY; The ID of the OS option resource.
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; The name of the OS option resource.
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; The type of the OS option resource.
+ Type *string `json:"type,omitempty"`
+ // OSOptionPropertyList - The list of OS options.
+ *OSOptionPropertyList `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for OSOptionProfile.
+func (oop OSOptionProfile) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if oop.OSOptionPropertyList != nil {
+ objectMap["properties"] = oop.OSOptionPropertyList
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for OSOptionProfile struct.
+func (oop *OSOptionProfile) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ oop.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ oop.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ oop.Type = &typeVar
+ }
+ case "properties":
+ if v != nil {
+ var oSOptionPropertyList OSOptionPropertyList
+ err = json.Unmarshal(*v, &oSOptionPropertyList)
+ if err != nil {
+ return err
+ }
+ oop.OSOptionPropertyList = &oSOptionPropertyList
+ }
+ }
+ }
+
+ return nil
+}
+
+// OSOptionProperty OS option property.
+type OSOptionProperty struct {
+ // OsType - The OS type.
+ OsType *string `json:"os-type,omitempty"`
+ // EnableFipsImage - Whether the image is FIPS-enabled.
+ EnableFipsImage *bool `json:"enable-fips-image,omitempty"`
+}
+
+// OSOptionPropertyList the list of OS option properties.
+type OSOptionPropertyList struct {
+ // OsOptionPropertyList - The list of OS options.
+ OsOptionPropertyList *[]OSOptionProperty `json:"osOptionPropertyList,omitempty"`
+}
+
+// OutboundEnvironmentEndpoint egress endpoints which AKS agent nodes connect to for common purpose.
+type OutboundEnvironmentEndpoint struct {
+ // Category - The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc.
+ Category *string `json:"category,omitempty"`
+ // Endpoints - The endpoints that AKS agent nodes connect to
+ Endpoints *[]EndpointDependency `json:"endpoints,omitempty"`
+}
+
+// OutboundEnvironmentEndpointCollection collection of OutboundEnvironmentEndpoint
+type OutboundEnvironmentEndpointCollection struct {
+ autorest.Response `json:"-"`
+ // Value - Collection of resources.
+ Value *[]OutboundEnvironmentEndpoint `json:"value,omitempty"`
+ // NextLink - READ-ONLY; Link to next page of resources.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for OutboundEnvironmentEndpointCollection.
+func (oeec OutboundEnvironmentEndpointCollection) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if oeec.Value != nil {
+ objectMap["value"] = oeec.Value
+ }
+ return json.Marshal(objectMap)
+}
+
+// OutboundEnvironmentEndpointCollectionIterator provides access to a complete listing of
+// OutboundEnvironmentEndpoint values.
+type OutboundEnvironmentEndpointCollectionIterator struct {
+ i int
+ page OutboundEnvironmentEndpointCollectionPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *OutboundEnvironmentEndpointCollectionIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OutboundEnvironmentEndpointCollectionIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *OutboundEnvironmentEndpointCollectionIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter OutboundEnvironmentEndpointCollectionIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter OutboundEnvironmentEndpointCollectionIterator) Response() OutboundEnvironmentEndpointCollection {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter OutboundEnvironmentEndpointCollectionIterator) Value() OutboundEnvironmentEndpoint {
+ if !iter.page.NotDone() {
+ return OutboundEnvironmentEndpoint{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the OutboundEnvironmentEndpointCollectionIterator type.
+func NewOutboundEnvironmentEndpointCollectionIterator(page OutboundEnvironmentEndpointCollectionPage) OutboundEnvironmentEndpointCollectionIterator {
+ return OutboundEnvironmentEndpointCollectionIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (oeec OutboundEnvironmentEndpointCollection) IsEmpty() bool {
+ return oeec.Value == nil || len(*oeec.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (oeec OutboundEnvironmentEndpointCollection) hasNextLink() bool {
+ return oeec.NextLink != nil && len(*oeec.NextLink) != 0
+}
+
+// outboundEnvironmentEndpointCollectionPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (oeec OutboundEnvironmentEndpointCollection) outboundEnvironmentEndpointCollectionPreparer(ctx context.Context) (*http.Request, error) {
+ if !oeec.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(oeec.NextLink)))
+}
+
+// OutboundEnvironmentEndpointCollectionPage contains a page of OutboundEnvironmentEndpoint values.
+type OutboundEnvironmentEndpointCollectionPage struct {
+ fn func(context.Context, OutboundEnvironmentEndpointCollection) (OutboundEnvironmentEndpointCollection, error)
+ oeec OutboundEnvironmentEndpointCollection
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *OutboundEnvironmentEndpointCollectionPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OutboundEnvironmentEndpointCollectionPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.oeec)
+ if err != nil {
+ return err
+ }
+ page.oeec = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *OutboundEnvironmentEndpointCollectionPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page OutboundEnvironmentEndpointCollectionPage) NotDone() bool {
+ return !page.oeec.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page OutboundEnvironmentEndpointCollectionPage) Response() OutboundEnvironmentEndpointCollection {
+ return page.oeec
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page OutboundEnvironmentEndpointCollectionPage) Values() []OutboundEnvironmentEndpoint {
+ if page.oeec.IsEmpty() {
+ return nil
+ }
+ return *page.oeec.Value
+}
+
+// Creates a new instance of the OutboundEnvironmentEndpointCollectionPage type.
+func NewOutboundEnvironmentEndpointCollectionPage(cur OutboundEnvironmentEndpointCollection, getNextPage func(context.Context, OutboundEnvironmentEndpointCollection) (OutboundEnvironmentEndpointCollection, error)) OutboundEnvironmentEndpointCollectionPage {
+ return OutboundEnvironmentEndpointCollectionPage{
+ fn: getNextPage,
+ oeec: cur,
+ }
+}
+
+// PowerState describes the Power State of the cluster
+type PowerState struct {
+ // Code - Tells whether the cluster is Running or Stopped. Possible values include: 'CodeRunning', 'CodeStopped'
+ Code Code `json:"code,omitempty"`
+}
+
+// PrivateEndpoint private endpoint which a connection belongs to.
+type PrivateEndpoint struct {
+ // ID - The resource ID of the private endpoint
+ ID *string `json:"id,omitempty"`
+}
+
+// PrivateEndpointConnection a private endpoint connection
+type PrivateEndpointConnection struct {
+ autorest.Response `json:"-"`
+ // ID - READ-ONLY; The ID of the private endpoint connection.
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; The name of the private endpoint connection.
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; The resource type.
+ Type *string `json:"type,omitempty"`
+ // PrivateEndpointConnectionProperties - The properties of a private endpoint connection.
+ *PrivateEndpointConnectionProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for PrivateEndpointConnection.
+func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if pec.PrivateEndpointConnectionProperties != nil {
+ objectMap["properties"] = pec.PrivateEndpointConnectionProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct.
+func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ pec.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ pec.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ pec.Type = &typeVar
+ }
+ case "properties":
+ if v != nil {
+ var privateEndpointConnectionProperties PrivateEndpointConnectionProperties
+ err = json.Unmarshal(*v, &privateEndpointConnectionProperties)
+ if err != nil {
+ return err
+ }
+ pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// PrivateEndpointConnectionListResult a list of private endpoint connections
+type PrivateEndpointConnectionListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The collection value.
+ Value *[]PrivateEndpointConnection `json:"value,omitempty"`
+}
+
+// PrivateEndpointConnectionProperties properties of a private endpoint connection.
+type PrivateEndpointConnectionProperties struct {
+ // ProvisioningState - READ-ONLY; The current provisioning state. Possible values include: 'PrivateEndpointConnectionProvisioningStateSucceeded', 'PrivateEndpointConnectionProvisioningStateCreating', 'PrivateEndpointConnectionProvisioningStateDeleting', 'PrivateEndpointConnectionProvisioningStateFailed'
+ ProvisioningState PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"`
+ // PrivateEndpoint - The resource of private endpoint.
+ PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
+ // PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.
+ PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for PrivateEndpointConnectionProperties.
+func (pecp PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if pecp.PrivateEndpoint != nil {
+ objectMap["privateEndpoint"] = pecp.PrivateEndpoint
+ }
+ if pecp.PrivateLinkServiceConnectionState != nil {
+ objectMap["privateLinkServiceConnectionState"] = pecp.PrivateLinkServiceConnectionState
+ }
+ return json.Marshal(objectMap)
+}
+
+// PrivateEndpointConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type PrivateEndpointConnectionsDeleteFuture struct {
+ azure.FutureAPI
+ // Result returns the result of the asynchronous operation.
+ // If the operation has not completed it will return an error.
+ Result func(PrivateEndpointConnectionsClient) (autorest.Response, error)
+}
+
+// UnmarshalJSON is the custom unmarshaller for CreateFuture.
+func (future *PrivateEndpointConnectionsDeleteFuture) UnmarshalJSON(body []byte) error {
+ var azFuture azure.Future
+ if err := json.Unmarshal(body, &azFuture); err != nil {
+ return err
+ }
+ future.FutureAPI = &azFuture
+ future.Result = future.result
+ return nil
+}
+
+// result is the default implementation for PrivateEndpointConnectionsDeleteFuture.Result.
+func (future *PrivateEndpointConnectionsDeleteFuture) result(client PrivateEndpointConnectionsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.DoneWithContext(context.Background(), client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.PrivateEndpointConnectionsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ ar.Response = future.Response()
+ err = azure.NewAsyncOpIncompleteError("containerservice.PrivateEndpointConnectionsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// PrivateLinkResource a private link resource
+type PrivateLinkResource struct {
+ autorest.Response `json:"-"`
+ // ID - The ID of the private link resource.
+ ID *string `json:"id,omitempty"`
+ // Name - The name of the private link resource.
+ Name *string `json:"name,omitempty"`
+ // Type - The resource type.
+ Type *string `json:"type,omitempty"`
+ // GroupID - The group ID of the resource.
+ GroupID *string `json:"groupId,omitempty"`
+ // RequiredMembers - The RequiredMembers of the resource
+ RequiredMembers *[]string `json:"requiredMembers,omitempty"`
+ // PrivateLinkServiceID - READ-ONLY; The private link service ID of the resource, this field is exposed only to NRP internally.
+ PrivateLinkServiceID *string `json:"privateLinkServiceID,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for PrivateLinkResource.
+func (plr PrivateLinkResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if plr.ID != nil {
+ objectMap["id"] = plr.ID
+ }
+ if plr.Name != nil {
+ objectMap["name"] = plr.Name
+ }
+ if plr.Type != nil {
+ objectMap["type"] = plr.Type
+ }
+ if plr.GroupID != nil {
+ objectMap["groupId"] = plr.GroupID
+ }
+ if plr.RequiredMembers != nil {
+ objectMap["requiredMembers"] = plr.RequiredMembers
+ }
+ return json.Marshal(objectMap)
+}
+
+// PrivateLinkResourcesListResult a list of private link resources
+type PrivateLinkResourcesListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The collection value.
+ Value *[]PrivateLinkResource `json:"value,omitempty"`
+}
+
+// PrivateLinkServiceConnectionState the state of a private link service connection.
+type PrivateLinkServiceConnectionState struct {
+ // Status - The private link service connection status. Possible values include: 'ConnectionStatusPending', 'ConnectionStatusApproved', 'ConnectionStatusRejected', 'ConnectionStatusDisconnected'
+ Status ConnectionStatus `json:"status,omitempty"`
+ // Description - The private link service connection description.
+ Description *string `json:"description,omitempty"`
+}
+
+// Resource the Resource model definition.
+type Resource struct {
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for Resource.
+func (r Resource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if r.Location != nil {
+ objectMap["location"] = r.Location
+ }
+ if r.Tags != nil {
+ objectMap["tags"] = r.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// ResourceReference a reference to an Azure resource.
+type ResourceReference struct {
+ // ID - The fully qualified Azure resource id.
+ ID *string `json:"id,omitempty"`
+}
+
+// RunCommandRequest a run command request
+type RunCommandRequest struct {
+ // Command - The command to run.
+ Command *string `json:"command,omitempty"`
+ // Context - A base64 encoded zip file containing the files required by the command.
+ Context *string `json:"context,omitempty"`
+ // ClusterToken - AuthToken issued for AKS AAD Server App.
+ ClusterToken *string `json:"clusterToken,omitempty"`
+}
+
+// RunCommandResult run command result.
+type RunCommandResult struct {
+ autorest.Response `json:"-"`
+ // ID - READ-ONLY; The command id.
+ ID *string `json:"id,omitempty"`
+ // CommandResultProperties - Properties of command result.
+ *CommandResultProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for RunCommandResult.
+func (rcr RunCommandResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if rcr.CommandResultProperties != nil {
+ objectMap["properties"] = rcr.CommandResultProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for RunCommandResult struct.
+func (rcr *RunCommandResult) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ rcr.ID = &ID
+ }
+ case "properties":
+ if v != nil {
+ var commandResultProperties CommandResultProperties
+ err = json.Unmarshal(*v, &commandResultProperties)
+ if err != nil {
+ return err
+ }
+ rcr.CommandResultProperties = &commandResultProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// Snapshot a node pool snapshot resource.
+type Snapshot struct {
+ autorest.Response `json:"-"`
+ // SystemData - READ-ONLY; The system metadata relating to this snapshot.
+ SystemData *SystemData `json:"systemData,omitempty"`
+ // SnapshotProperties - Properties of a snapshot.
+ *SnapshotProperties `json:"properties,omitempty"`
+ // ID - READ-ONLY; Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for Snapshot.
+func (s Snapshot) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if s.SnapshotProperties != nil {
+ objectMap["properties"] = s.SnapshotProperties
+ }
+ if s.Location != nil {
+ objectMap["location"] = s.Location
+ }
+ if s.Tags != nil {
+ objectMap["tags"] = s.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for Snapshot struct.
+func (s *Snapshot) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "systemData":
+ if v != nil {
+ var systemData SystemData
+ err = json.Unmarshal(*v, &systemData)
+ if err != nil {
+ return err
+ }
+ s.SystemData = &systemData
+ }
+ case "properties":
+ if v != nil {
+ var snapshotProperties SnapshotProperties
+ err = json.Unmarshal(*v, &snapshotProperties)
+ if err != nil {
+ return err
+ }
+ s.SnapshotProperties = &snapshotProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ s.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ s.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ s.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ s.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ s.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// SnapshotListResult the response from the List Snapshots operation.
+type SnapshotListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of snapshots.
+ Value *[]Snapshot `json:"value,omitempty"`
+ // NextLink - READ-ONLY; The URL to get the next set of snapshot results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for SnapshotListResult.
+func (slr SnapshotListResult) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if slr.Value != nil {
+ objectMap["value"] = slr.Value
+ }
+ return json.Marshal(objectMap)
+}
+
+// SnapshotListResultIterator provides access to a complete listing of Snapshot values.
+type SnapshotListResultIterator struct {
+ i int
+ page SnapshotListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *SnapshotListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *SnapshotListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter SnapshotListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter SnapshotListResultIterator) Response() SnapshotListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter SnapshotListResultIterator) Value() Snapshot {
+ if !iter.page.NotDone() {
+ return Snapshot{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the SnapshotListResultIterator type.
+func NewSnapshotListResultIterator(page SnapshotListResultPage) SnapshotListResultIterator {
+ return SnapshotListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (slr SnapshotListResult) IsEmpty() bool {
+ return slr.Value == nil || len(*slr.Value) == 0
+}
+
+// hasNextLink returns true if the NextLink is not empty.
+func (slr SnapshotListResult) hasNextLink() bool {
+ return slr.NextLink != nil && len(*slr.NextLink) != 0
+}
+
+// snapshotListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (slr SnapshotListResult) snapshotListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if !slr.hasNextLink() {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(slr.NextLink)))
+}
+
+// SnapshotListResultPage contains a page of Snapshot values.
+type SnapshotListResultPage struct {
+ fn func(context.Context, SnapshotListResult) (SnapshotListResult, error)
+ slr SnapshotListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *SnapshotListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ for {
+ next, err := page.fn(ctx, page.slr)
+ if err != nil {
+ return err
+ }
+ page.slr = next
+ if !next.hasNextLink() || !next.IsEmpty() {
+ break
+ }
+ }
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *SnapshotListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page SnapshotListResultPage) NotDone() bool {
+ return !page.slr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page SnapshotListResultPage) Response() SnapshotListResult {
+ return page.slr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page SnapshotListResultPage) Values() []Snapshot {
+ if page.slr.IsEmpty() {
+ return nil
+ }
+ return *page.slr.Value
+}
+
+// Creates a new instance of the SnapshotListResultPage type.
+func NewSnapshotListResultPage(cur SnapshotListResult, getNextPage func(context.Context, SnapshotListResult) (SnapshotListResult, error)) SnapshotListResultPage {
+ return SnapshotListResultPage{
+ fn: getNextPage,
+ slr: cur,
+ }
+}
+
+// SnapshotProperties properties used to configure a node pool snapshot.
+type SnapshotProperties struct {
+ // CreationData - CreationData to be used to specify the source agent pool resource ID to create this snapshot.
+ CreationData *CreationData `json:"creationData,omitempty"`
+ // SnapshotType - Possible values include: 'SnapshotTypeNodePool'
+ SnapshotType SnapshotType `json:"snapshotType,omitempty"`
+ // KubernetesVersion - READ-ONLY; The version of Kubernetes.
+ KubernetesVersion *string `json:"kubernetesVersion,omitempty"`
+ // NodeImageVersion - READ-ONLY; The version of node image.
+ NodeImageVersion *string `json:"nodeImageVersion,omitempty"`
+ // OsType - READ-ONLY; Possible values include: 'OSTypeLinux', 'OSTypeWindows'
+ OsType OSType `json:"osType,omitempty"`
+ // OsSku - READ-ONLY; Possible values include: 'OSSKUUbuntu', 'OSSKUCBLMariner'
+ OsSku OSSKU `json:"osSku,omitempty"`
+ // VMSize - READ-ONLY; The size of the VM.
+ VMSize *string `json:"vmSize,omitempty"`
+ // EnableFIPS - READ-ONLY; Whether to use a FIPS-enabled OS.
+ EnableFIPS *bool `json:"enableFIPS,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for SnapshotProperties.
+func (sp SnapshotProperties) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if sp.CreationData != nil {
+ objectMap["creationData"] = sp.CreationData
+ }
+ if sp.SnapshotType != "" {
+ objectMap["snapshotType"] = sp.SnapshotType
+ }
+ return json.Marshal(objectMap)
+}
+
+// SSHConfiguration SSH configuration for Linux-based VMs running on Azure.
+type SSHConfiguration struct {
+ // PublicKeys - The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified.
+ PublicKeys *[]SSHPublicKey `json:"publicKeys,omitempty"`
+}
+
+// SSHPublicKey contains information about SSH certificate public key data.
+type SSHPublicKey struct {
+ // KeyData - Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers.
+ KeyData *string `json:"keyData,omitempty"`
+}
+
+// SubResource reference to another subresource.
+type SubResource struct {
+ // ID - READ-ONLY; Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - READ-ONLY; The name of the resource that is unique within a resource group. This name can be used to access the resource.
+ Name *string `json:"name,omitempty"`
+ // Type - READ-ONLY; Resource type
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for SubResource.
+func (sr SubResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ return json.Marshal(objectMap)
+}
+
+// SysctlConfig sysctl settings for Linux agent nodes.
+type SysctlConfig struct {
+ // NetCoreSomaxconn - Sysctl setting net.core.somaxconn.
+ NetCoreSomaxconn *int32 `json:"netCoreSomaxconn,omitempty"`
+ // NetCoreNetdevMaxBacklog - Sysctl setting net.core.netdev_max_backlog.
+ NetCoreNetdevMaxBacklog *int32 `json:"netCoreNetdevMaxBacklog,omitempty"`
+ // NetCoreRmemDefault - Sysctl setting net.core.rmem_default.
+ NetCoreRmemDefault *int32 `json:"netCoreRmemDefault,omitempty"`
+ // NetCoreRmemMax - Sysctl setting net.core.rmem_max.
+ NetCoreRmemMax *int32 `json:"netCoreRmemMax,omitempty"`
+ // NetCoreWmemDefault - Sysctl setting net.core.wmem_default.
+ NetCoreWmemDefault *int32 `json:"netCoreWmemDefault,omitempty"`
+ // NetCoreWmemMax - Sysctl setting net.core.wmem_max.
+ NetCoreWmemMax *int32 `json:"netCoreWmemMax,omitempty"`
+ // NetCoreOptmemMax - Sysctl setting net.core.optmem_max.
+ NetCoreOptmemMax *int32 `json:"netCoreOptmemMax,omitempty"`
+ // NetIpv4TCPMaxSynBacklog - Sysctl setting net.ipv4.tcp_max_syn_backlog.
+ NetIpv4TCPMaxSynBacklog *int32 `json:"netIpv4TcpMaxSynBacklog,omitempty"`
+ // NetIpv4TCPMaxTwBuckets - Sysctl setting net.ipv4.tcp_max_tw_buckets.
+ NetIpv4TCPMaxTwBuckets *int32 `json:"netIpv4TcpMaxTwBuckets,omitempty"`
+ // NetIpv4TCPFinTimeout - Sysctl setting net.ipv4.tcp_fin_timeout.
+ NetIpv4TCPFinTimeout *int32 `json:"netIpv4TcpFinTimeout,omitempty"`
+ // NetIpv4TCPKeepaliveTime - Sysctl setting net.ipv4.tcp_keepalive_time.
+ NetIpv4TCPKeepaliveTime *int32 `json:"netIpv4TcpKeepaliveTime,omitempty"`
+ // NetIpv4TCPKeepaliveProbes - Sysctl setting net.ipv4.tcp_keepalive_probes.
+ NetIpv4TCPKeepaliveProbes *int32 `json:"netIpv4TcpKeepaliveProbes,omitempty"`
+ // NetIpv4TcpkeepaliveIntvl - Sysctl setting net.ipv4.tcp_keepalive_intvl.
+ NetIpv4TcpkeepaliveIntvl *int32 `json:"netIpv4TcpkeepaliveIntvl,omitempty"`
+ // NetIpv4TCPTwReuse - Sysctl setting net.ipv4.tcp_tw_reuse.
+ NetIpv4TCPTwReuse *bool `json:"netIpv4TcpTwReuse,omitempty"`
+ // NetIpv4IPLocalPortRange - Sysctl setting net.ipv4.ip_local_port_range.
+ NetIpv4IPLocalPortRange *string `json:"netIpv4IpLocalPortRange,omitempty"`
+ // NetIpv4NeighDefaultGcThresh1 - Sysctl setting net.ipv4.neigh.default.gc_thresh1.
+ NetIpv4NeighDefaultGcThresh1 *int32 `json:"netIpv4NeighDefaultGcThresh1,omitempty"`
+ // NetIpv4NeighDefaultGcThresh2 - Sysctl setting net.ipv4.neigh.default.gc_thresh2.
+ NetIpv4NeighDefaultGcThresh2 *int32 `json:"netIpv4NeighDefaultGcThresh2,omitempty"`
+ // NetIpv4NeighDefaultGcThresh3 - Sysctl setting net.ipv4.neigh.default.gc_thresh3.
+ NetIpv4NeighDefaultGcThresh3 *int32 `json:"netIpv4NeighDefaultGcThresh3,omitempty"`
+ // NetNetfilterNfConntrackMax - Sysctl setting net.netfilter.nf_conntrack_max.
+ NetNetfilterNfConntrackMax *int32 `json:"netNetfilterNfConntrackMax,omitempty"`
+ // NetNetfilterNfConntrackBuckets - Sysctl setting net.netfilter.nf_conntrack_buckets.
+ NetNetfilterNfConntrackBuckets *int32 `json:"netNetfilterNfConntrackBuckets,omitempty"`
+ // FsInotifyMaxUserWatches - Sysctl setting fs.inotify.max_user_watches.
+ FsInotifyMaxUserWatches *int32 `json:"fsInotifyMaxUserWatches,omitempty"`
+ // FsFileMax - Sysctl setting fs.file-max.
+ FsFileMax *int32 `json:"fsFileMax,omitempty"`
+ // FsAioMaxNr - Sysctl setting fs.aio-max-nr.
+ FsAioMaxNr *int32 `json:"fsAioMaxNr,omitempty"`
+ // FsNrOpen - Sysctl setting fs.nr_open.
+ FsNrOpen *int32 `json:"fsNrOpen,omitempty"`
+ // KernelThreadsMax - Sysctl setting kernel.threads-max.
+ KernelThreadsMax *int32 `json:"kernelThreadsMax,omitempty"`
+ // VMMaxMapCount - Sysctl setting vm.max_map_count.
+ VMMaxMapCount *int32 `json:"vmMaxMapCount,omitempty"`
+ // VMSwappiness - Sysctl setting vm.swappiness.
+ VMSwappiness *int32 `json:"vmSwappiness,omitempty"`
+ // VMVfsCachePressure - Sysctl setting vm.vfs_cache_pressure.
+ VMVfsCachePressure *int32 `json:"vmVfsCachePressure,omitempty"`
+}
+
+// SystemData metadata pertaining to creation and last modification of the resource.
+type SystemData struct {
+ // CreatedBy - The identity that created the resource.
+ CreatedBy *string `json:"createdBy,omitempty"`
+ // CreatedByType - The type of identity that created the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey'
+ CreatedByType CreatedByType `json:"createdByType,omitempty"`
+ // CreatedAt - The UTC timestamp of resource creation.
+ CreatedAt *date.Time `json:"createdAt,omitempty"`
+ // LastModifiedBy - The identity that last modified the resource.
+ LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
+ // LastModifiedByType - The type of identity that last modified the resource. Possible values include: 'CreatedByTypeUser', 'CreatedByTypeApplication', 'CreatedByTypeManagedIdentity', 'CreatedByTypeKey'
+ LastModifiedByType CreatedByType `json:"lastModifiedByType,omitempty"`
+ // LastModifiedAt - The type of identity that last modified the resource.
+ LastModifiedAt *date.Time `json:"lastModifiedAt,omitempty"`
+}
+
+// TagsObject tags object for patch operations.
+type TagsObject struct {
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for TagsObject.
+func (toVar TagsObject) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if toVar.Tags != nil {
+ objectMap["tags"] = toVar.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// TimeInWeek time in a week.
+type TimeInWeek struct {
+ // Day - The day of the week. Possible values include: 'WeekDaySunday', 'WeekDayMonday', 'WeekDayTuesday', 'WeekDayWednesday', 'WeekDayThursday', 'WeekDayFriday', 'WeekDaySaturday'
+ Day WeekDay `json:"day,omitempty"`
+ // HourSlots - Each integer hour represents a time range beginning at 0m after the hour ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range.
+ HourSlots *[]int32 `json:"hourSlots,omitempty"`
+}
+
+// TimeSpan for example, between 2021-05-25T13:00:00Z and 2021-05-25T14:00:00Z.
+type TimeSpan struct {
+ // Start - The start of a time span
+ Start *date.Time `json:"start,omitempty"`
+ // End - The end of a time span
+ End *date.Time `json:"end,omitempty"`
+}
+
+// UserAssignedIdentity details about a user assigned identity.
+type UserAssignedIdentity struct {
+ // ResourceID - The resource ID of the user assigned identity.
+ ResourceID *string `json:"resourceId,omitempty"`
+ // ClientID - The client ID of the user assigned identity.
+ ClientID *string `json:"clientId,omitempty"`
+ // ObjectID - The object ID of the user assigned identity.
+ ObjectID *string `json:"objectId,omitempty"`
+}
+
+// VMDiagnostics profile for diagnostics on the container service VMs.
+type VMDiagnostics struct {
+ // Enabled - Whether the VM diagnostic agent is provisioned on the VM.
+ Enabled *bool `json:"enabled,omitempty"`
+ // StorageURI - READ-ONLY; The URI of the storage account where diagnostics are stored.
+ StorageURI *string `json:"storageUri,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VMDiagnostics.
+func (vd VMDiagnostics) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vd.Enabled != nil {
+ objectMap["enabled"] = vd.Enabled
+ }
+ return json.Marshal(objectMap)
+}
+
+// WindowsGmsaProfile windows gMSA Profile in the managed cluster.
+type WindowsGmsaProfile struct {
+ // Enabled - Specifies whether to enable Windows gMSA in the managed cluster.
+ Enabled *bool `json:"enabled,omitempty"`
+ // DNSServer - Specifies the DNS server for Windows gMSA.
Set it to empty if you have configured the DNS server in the vnet which is used to create the managed cluster.
+ DNSServer *string `json:"dnsServer,omitempty"`
+ // RootDomainName - Specifies the root domain name for Windows gMSA.
Set it to empty if you have configured the DNS server in the vnet which is used to create the managed cluster.
+ RootDomainName *string `json:"rootDomainName,omitempty"`
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/operations.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/operations.go
new file mode 100644
index 000000000000..0464ecb6a862
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/operations.go
@@ -0,0 +1,98 @@
+package containerservice
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// OperationsClient is the the Container Service Client.
+type OperationsClient struct {
+ BaseClient
+}
+
+// NewOperationsClient creates an instance of the OperationsClient client.
+func NewOperationsClient(subscriptionID string) OperationsClient {
+ return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client using a custom endpoint. Use this
+// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient {
+ return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// List sends the list request.
+func (client OperationsClient) List(ctx context.Context) (result OperationListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.OperationsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.OperationsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.OperationsClient", "List", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPath("/providers/Microsoft.ContainerService/operations"),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/privateendpointconnections.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/privateendpointconnections.go
new file mode 100644
index 000000000000..35f588b58495
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/privateendpointconnections.go
@@ -0,0 +1,394 @@
+package containerservice
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// PrivateEndpointConnectionsClient is the the Container Service Client.
+type PrivateEndpointConnectionsClient struct {
+ BaseClient
+}
+
+// NewPrivateEndpointConnectionsClient creates an instance of the PrivateEndpointConnectionsClient client.
+func NewPrivateEndpointConnectionsClient(subscriptionID string) PrivateEndpointConnectionsClient {
+ return NewPrivateEndpointConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewPrivateEndpointConnectionsClientWithBaseURI creates an instance of the PrivateEndpointConnectionsClient client
+// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign
+// clouds, Azure stack).
+func NewPrivateEndpointConnectionsClientWithBaseURI(baseURI string, subscriptionID string) PrivateEndpointConnectionsClient {
+ return PrivateEndpointConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Delete sends the delete request.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// privateEndpointConnectionName - the name of the private endpoint connection.
+func (client PrivateEndpointConnectionsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, privateEndpointConnectionName string) (result PrivateEndpointConnectionsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
+ sc = result.FutureAPI.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.PrivateEndpointConnectionsClient", "Delete", err.Error())
+ }
+
+ req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName, privateEndpointConnectionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.PrivateEndpointConnectionsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.PrivateEndpointConnectionsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client PrivateEndpointConnectionsClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string, privateEndpointConnectionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client PrivateEndpointConnectionsClient) DeleteSender(req *http.Request) (future PrivateEndpointConnectionsDeleteFuture, err error) {
+ var resp *http.Response
+ future.FutureAPI = &azure.Future{}
+ resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ var azf azure.Future
+ azf, err = azure.NewFutureFromResponse(resp)
+ future.FutureAPI = &azf
+ future.Result = future.result
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client PrivateEndpointConnectionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get to learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// privateEndpointConnectionName - the name of the private endpoint connection.
+func (client PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, privateEndpointConnectionName string) (result PrivateEndpointConnection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.PrivateEndpointConnectionsClient", "Get", err.Error())
+ }
+
+ req, err := client.GetPreparer(ctx, resourceGroupName, resourceName, privateEndpointConnectionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.PrivateEndpointConnectionsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.PrivateEndpointConnectionsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.PrivateEndpointConnectionsClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client PrivateEndpointConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string, privateEndpointConnectionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client PrivateEndpointConnectionsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client PrivateEndpointConnectionsClient) GetResponder(resp *http.Response) (result PrivateEndpointConnection, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List to learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+func (client PrivateEndpointConnectionsClient) List(ctx context.Context, resourceGroupName string, resourceName string) (result PrivateEndpointConnectionListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.PrivateEndpointConnectionsClient", "List", err.Error())
+ }
+
+ req, err := client.ListPreparer(ctx, resourceGroupName, resourceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.PrivateEndpointConnectionsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.PrivateEndpointConnectionsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.PrivateEndpointConnectionsClient", "List", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client PrivateEndpointConnectionsClient) ListPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client PrivateEndpointConnectionsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client PrivateEndpointConnectionsClient) ListResponder(resp *http.Response) (result PrivateEndpointConnectionListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Update sends the update request.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// privateEndpointConnectionName - the name of the private endpoint connection.
+// parameters - the updated private endpoint connection.
+func (client PrivateEndpointConnectionsClient) Update(ctx context.Context, resourceGroupName string, resourceName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection) (result PrivateEndpointConnection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PrivateEndpointConnectionsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}},
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.PrivateEndpointConnectionProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.PrivateEndpointConnectionProperties.PrivateLinkServiceConnectionState", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("containerservice.PrivateEndpointConnectionsClient", "Update", err.Error())
+ }
+
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, resourceName, privateEndpointConnectionName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.PrivateEndpointConnectionsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.PrivateEndpointConnectionsClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.PrivateEndpointConnectionsClient", "Update", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client PrivateEndpointConnectionsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, privateEndpointConnectionName string, parameters PrivateEndpointConnection) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "privateEndpointConnectionName": autorest.Encode("path", privateEndpointConnectionName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ parameters.ID = nil
+ parameters.Name = nil
+ parameters.Type = nil
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client PrivateEndpointConnectionsClient) UpdateSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client PrivateEndpointConnectionsClient) UpdateResponder(resp *http.Response) (result PrivateEndpointConnection, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/privatelinkresources.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/privatelinkresources.go
new file mode 100644
index 000000000000..4b9029ca58f5
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/privatelinkresources.go
@@ -0,0 +1,119 @@
+package containerservice
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// PrivateLinkResourcesClient is the the Container Service Client.
+type PrivateLinkResourcesClient struct {
+ BaseClient
+}
+
+// NewPrivateLinkResourcesClient creates an instance of the PrivateLinkResourcesClient client.
+func NewPrivateLinkResourcesClient(subscriptionID string) PrivateLinkResourcesClient {
+ return NewPrivateLinkResourcesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewPrivateLinkResourcesClientWithBaseURI creates an instance of the PrivateLinkResourcesClient client using a custom
+// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
+// stack).
+func NewPrivateLinkResourcesClientWithBaseURI(baseURI string, subscriptionID string) PrivateLinkResourcesClient {
+ return PrivateLinkResourcesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// List to learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+func (client PrivateLinkResourcesClient) List(ctx context.Context, resourceGroupName string, resourceName string) (result PrivateLinkResourcesListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PrivateLinkResourcesClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.PrivateLinkResourcesClient", "List", err.Error())
+ }
+
+ req, err := client.ListPreparer(ctx, resourceGroupName, resourceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.PrivateLinkResourcesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.PrivateLinkResourcesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.PrivateLinkResourcesClient", "List", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client PrivateLinkResourcesClient) ListPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client PrivateLinkResourcesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client PrivateLinkResourcesClient) ListResponder(resp *http.Response) (result PrivateLinkResourcesListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/resolveprivatelinkserviceid.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/resolveprivatelinkserviceid.go
new file mode 100644
index 000000000000..c106e74b7a98
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/resolveprivatelinkserviceid.go
@@ -0,0 +1,123 @@
+package containerservice
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// ResolvePrivateLinkServiceIDClient is the the Container Service Client.
+type ResolvePrivateLinkServiceIDClient struct {
+ BaseClient
+}
+
+// NewResolvePrivateLinkServiceIDClient creates an instance of the ResolvePrivateLinkServiceIDClient client.
+func NewResolvePrivateLinkServiceIDClient(subscriptionID string) ResolvePrivateLinkServiceIDClient {
+ return NewResolvePrivateLinkServiceIDClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewResolvePrivateLinkServiceIDClientWithBaseURI creates an instance of the ResolvePrivateLinkServiceIDClient client
+// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign
+// clouds, Azure stack).
+func NewResolvePrivateLinkServiceIDClientWithBaseURI(baseURI string, subscriptionID string) ResolvePrivateLinkServiceIDClient {
+ return ResolvePrivateLinkServiceIDClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// POST sends the post request.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// parameters - parameters required in order to resolve a private link service ID.
+func (client ResolvePrivateLinkServiceIDClient) POST(ctx context.Context, resourceGroupName string, resourceName string, parameters PrivateLinkResource) (result PrivateLinkResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResolvePrivateLinkServiceIDClient.POST")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.ResolvePrivateLinkServiceIDClient", "POST", err.Error())
+ }
+
+ req, err := client.POSTPreparer(ctx, resourceGroupName, resourceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ResolvePrivateLinkServiceIDClient", "POST", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.POSTSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.ResolvePrivateLinkServiceIDClient", "POST", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.POSTResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.ResolvePrivateLinkServiceIDClient", "POST", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// POSTPreparer prepares the POST request.
+func (client ResolvePrivateLinkServiceIDClient) POSTPreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters PrivateLinkResource) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ parameters.PrivateLinkServiceID = nil
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// POSTSender sends the POST request. The method will close the
+// http.Response Body if it receives an error.
+func (client ResolvePrivateLinkServiceIDClient) POSTSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// POSTResponder handles the response to the POST request. The method always
+// closes the http.Response Body.
+func (client ResolvePrivateLinkServiceIDClient) POSTResponder(resp *http.Response) (result PrivateLinkResource, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/snapshots.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/snapshots.go
new file mode 100644
index 000000000000..9223a86d65ae
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/snapshots.go
@@ -0,0 +1,617 @@
+package containerservice
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// SnapshotsClient is the the Container Service Client.
+type SnapshotsClient struct {
+ BaseClient
+}
+
+// NewSnapshotsClient creates an instance of the SnapshotsClient client.
+func NewSnapshotsClient(subscriptionID string) SnapshotsClient {
+ return NewSnapshotsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewSnapshotsClientWithBaseURI creates an instance of the SnapshotsClient client using a custom endpoint. Use this
+// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
+func NewSnapshotsClientWithBaseURI(baseURI string, subscriptionID string) SnapshotsClient {
+ return SnapshotsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate sends the create or update request.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// parameters - the snapshot to create or update.
+func (client SnapshotsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, parameters Snapshot) (result Snapshot, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.SnapshotsClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, resourceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.SnapshotsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.CreateOrUpdateSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.SnapshotsClient", "CreateOrUpdate", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.SnapshotsClient", "CreateOrUpdate", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client SnapshotsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters Snapshot) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ parameters.SystemData = nil
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client SnapshotsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client SnapshotsClient) CreateOrUpdateResponder(resp *http.Response) (result Snapshot, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete sends the delete request.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+func (client SnapshotsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.SnapshotsClient", "Delete", err.Error())
+ }
+
+ req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.SnapshotsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.DeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "containerservice.SnapshotsClient", "Delete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.DeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.SnapshotsClient", "Delete", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client SnapshotsClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client SnapshotsClient) DeleteSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client SnapshotsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get sends the get request.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+func (client SnapshotsClient) Get(ctx context.Context, resourceGroupName string, resourceName string) (result Snapshot, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.SnapshotsClient", "Get", err.Error())
+ }
+
+ req, err := client.GetPreparer(ctx, resourceGroupName, resourceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.SnapshotsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.SnapshotsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.SnapshotsClient", "Get", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client SnapshotsClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client SnapshotsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client SnapshotsClient) GetResponder(resp *http.Response) (result Snapshot, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// List sends the list request.
+func (client SnapshotsClient) List(ctx context.Context) (result SnapshotListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.List")
+ defer func() {
+ sc := -1
+ if result.slr.Response.Response != nil {
+ sc = result.slr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.SnapshotsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.slr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.SnapshotsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.slr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.SnapshotsClient", "List", resp, "Failure responding to request")
+ return
+ }
+ if result.slr.hasNextLink() && result.slr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client SnapshotsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/snapshots", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListSender sends the List request. The method will close the
+// http.Response Body if it receives an error.
+func (client SnapshotsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client SnapshotsClient) ListResponder(resp *http.Response) (result SnapshotListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listNextResults retrieves the next set of results, if any.
+func (client SnapshotsClient) listNextResults(ctx context.Context, lastResults SnapshotListResult) (result SnapshotListResult, err error) {
+ req, err := lastResults.snapshotListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "containerservice.SnapshotsClient", "listNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "containerservice.SnapshotsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.SnapshotsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client SnapshotsClient) ListComplete(ctx context.Context) (result SnapshotListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.List(ctx)
+ return
+}
+
+// ListByResourceGroup sends the list by resource group request.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client SnapshotsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result SnapshotListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.slr.Response.Response != nil {
+ sc = result.slr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.SnapshotsClient", "ListByResourceGroup", err.Error())
+ }
+
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.SnapshotsClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.slr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.SnapshotsClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.slr, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.SnapshotsClient", "ListByResourceGroup", resp, "Failure responding to request")
+ return
+ }
+ if result.slr.hasNextLink() && result.slr.IsEmpty() {
+ err = result.NextWithContext(ctx)
+ return
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client SnapshotsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client SnapshotsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client SnapshotsClient) ListByResourceGroupResponder(resp *http.Response) (result SnapshotListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByResourceGroupNextResults retrieves the next set of results, if any.
+func (client SnapshotsClient) listByResourceGroupNextResults(ctx context.Context, lastResults SnapshotListResult) (result SnapshotListResult, err error) {
+ req, err := lastResults.snapshotListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "containerservice.SnapshotsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "containerservice.SnapshotsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.SnapshotsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client SnapshotsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result SnapshotListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response().Response.Response != nil {
+ sc = result.page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.page, err = client.ListByResourceGroup(ctx, resourceGroupName)
+ return
+}
+
+// UpdateTags sends the update tags request.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// resourceName - the name of the managed cluster resource.
+// parameters - parameters supplied to the Update snapshot Tags operation.
+func (client SnapshotsClient) UpdateTags(ctx context.Context, resourceGroupName string, resourceName string, parameters TagsObject) (result Snapshot, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.UpdateTags")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
+ {TargetValue: resourceName,
+ Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
+ {Target: "resourceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerservice.SnapshotsClient", "UpdateTags", err.Error())
+ }
+
+ req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, resourceName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.SnapshotsClient", "UpdateTags", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateTagsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerservice.SnapshotsClient", "UpdateTags", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateTagsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerservice.SnapshotsClient", "UpdateTags", resp, "Failure responding to request")
+ return
+ }
+
+ return
+}
+
+// UpdateTagsPreparer prepares the UpdateTags request.
+func (client SnapshotsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters TagsObject) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "resourceName": autorest.Encode("path", resourceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2021-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateTagsSender sends the UpdateTags request. The method will close the
+// http.Response Body if it receives an error.
+func (client SnapshotsClient) UpdateTagsSender(req *http.Request) (*http.Response, error) {
+ return client.Send(req, azure.DoRetryWithRegistration(client.Client))
+}
+
+// UpdateTagsResponder handles the response to the UpdateTags request. The method always
+// closes the http.Response Body.
+func (client SnapshotsClient) UpdateTagsResponder(resp *http.Response) (result Snapshot, err error) {
+ err = autorest.Respond(
+ resp,
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/version.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/version.go
new file mode 100644
index 000000000000..a853dbd638d3
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice/version.go
@@ -0,0 +1,19 @@
+package containerservice
+
+import "github.com/Azure/azure-sdk-for-go/version"
+
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+// UserAgent returns the UserAgent string to use when sending http.Requests.
+func UserAgent() string {
+ return "Azure-SDK-For-Go/" + Version() + " containerservice/2021-10-01"
+}
+
+// Version returns the semantic version (see http://semver.org) of the client.
+func Version() string {
+ return version.Number
+}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/CHANGELOG.md b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/CHANGELOG.md
index e842382779a5..52911e4cc5e4 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/CHANGELOG.md
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/CHANGELOG.md
@@ -1,28 +1,2 @@
# Change History
-## Additive Changes
-
-### New Funcs
-
-1. ApplicationSecurityGroupPropertiesFormat.MarshalJSON() ([]byte, error)
-1. AzureFirewallFqdnTagPropertiesFormat.MarshalJSON() ([]byte, error)
-1. BgpPeerStatus.MarshalJSON() ([]byte, error)
-1. ConfigurationDiagnosticResponse.MarshalJSON() ([]byte, error)
-1. ConnectivityHop.MarshalJSON() ([]byte, error)
-1. ConnectivityInformation.MarshalJSON() ([]byte, error)
-1. ConnectivityIssue.MarshalJSON() ([]byte, error)
-1. ContainerNetworkInterfaceIPConfigurationPropertiesFormat.MarshalJSON() ([]byte, error)
-1. DdosProtectionPlanPropertiesFormat.MarshalJSON() ([]byte, error)
-1. ExpressRouteConnectionID.MarshalJSON() ([]byte, error)
-1. ExpressRoutePortsLocationBandwidths.MarshalJSON() ([]byte, error)
-1. GatewayRoute.MarshalJSON() ([]byte, error)
-1. ManagedServiceIdentityUserAssignedIdentitiesValue.MarshalJSON() ([]byte, error)
-1. ServiceTagInformation.MarshalJSON() ([]byte, error)
-1. ServiceTagInformationPropertiesFormat.MarshalJSON() ([]byte, error)
-1. ServiceTagsListResult.MarshalJSON() ([]byte, error)
-1. TunnelConnectionHealth.MarshalJSON() ([]byte, error)
-1. VirtualNetworkUsage.MarshalJSON() ([]byte, error)
-1. VirtualNetworkUsageName.MarshalJSON() ([]byte, error)
-1. VpnClientConnectionHealthDetail.MarshalJSON() ([]byte, error)
-1. VpnSiteID.MarshalJSON() ([]byte, error)
-1. WebApplicationFirewallPolicyListResult.MarshalJSON() ([]byte, error)
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/_meta.json b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/_meta.json
index 0a8c4c4c8d40..a4996566876b 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/_meta.json
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/_meta.json
@@ -2,10 +2,10 @@
"commit": "3c764635e7d442b3e74caf593029fcd440b3ef82",
"readme": "/_/azure-rest-api-specs/specification/network/resource-manager/readme.md",
"tag": "package-2019-06",
- "use": "@microsoft.azure/autorest.go@2.1.183",
+ "use": "@microsoft.azure/autorest.go@2.1.187",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
- "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2019-06 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/network/resource-manager/readme.md",
+ "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2019-06 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/network/resource-manager/readme.md",
"additional_properties": {
- "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION"
+ "additional_options": "--go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION"
}
}
\ No newline at end of file
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationgateways.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationgateways.go
index cc4c614064aa..453710e76658 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationgateways.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationgateways.go
@@ -56,7 +56,7 @@ func (client ApplicationGatewaysClient) BackendHealth(ctx context.Context, resou
result, err = client.BackendHealthSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "BackendHealth", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "BackendHealth", result.Response(), "Failure sending request")
return
}
@@ -91,6 +91,7 @@ func (client ApplicationGatewaysClient) BackendHealthPreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) BackendHealthSender(req *http.Request) (future ApplicationGatewaysBackendHealthFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -140,7 +141,7 @@ func (client ApplicationGatewaysClient) BackendHealthOnDemand(ctx context.Contex
result, err = client.BackendHealthOnDemandSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "BackendHealthOnDemand", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "BackendHealthOnDemand", result.Response(), "Failure sending request")
return
}
@@ -177,6 +178,7 @@ func (client ApplicationGatewaysClient) BackendHealthOnDemandPreparer(ctx contex
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) BackendHealthOnDemandSender(req *http.Request) (future ApplicationGatewaysBackendHealthOnDemandFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -252,7 +254,7 @@ func (client ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, reso
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -286,6 +288,7 @@ func (client ApplicationGatewaysClient) CreateOrUpdatePreparer(ctx context.Conte
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) CreateOrUpdateSender(req *http.Request) (future ApplicationGatewaysCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -332,7 +335,7 @@ func (client ApplicationGatewaysClient) Delete(ctx context.Context, resourceGrou
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -364,6 +367,7 @@ func (client ApplicationGatewaysClient) DeletePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) DeleteSender(req *http.Request) (future ApplicationGatewaysDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1256,7 +1260,7 @@ func (client ApplicationGatewaysClient) Start(ctx context.Context, resourceGroup
result, err = client.StartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Start", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Start", result.Response(), "Failure sending request")
return
}
@@ -1288,6 +1292,7 @@ func (client ApplicationGatewaysClient) StartPreparer(ctx context.Context, resou
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StartSender(req *http.Request) (future ApplicationGatewaysStartFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1333,7 +1338,7 @@ func (client ApplicationGatewaysClient) Stop(ctx context.Context, resourceGroupN
result, err = client.StopSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Stop", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Stop", result.Response(), "Failure sending request")
return
}
@@ -1365,6 +1370,7 @@ func (client ApplicationGatewaysClient) StopPreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StopSender(req *http.Request) (future ApplicationGatewaysStopFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1411,7 +1417,7 @@ func (client ApplicationGatewaysClient) UpdateTags(ctx context.Context, resource
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -1445,6 +1451,7 @@ func (client ApplicationGatewaysClient) UpdateTagsPreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) UpdateTagsSender(req *http.Request) (future ApplicationGatewaysUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationsecuritygroups.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationsecuritygroups.go
index 5abea7e7a2ae..bd60a5a9225d 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationsecuritygroups.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/applicationsecuritygroups.go
@@ -55,7 +55,7 @@ func (client ApplicationSecurityGroupsClient) CreateOrUpdate(ctx context.Context
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -90,6 +90,7 @@ func (client ApplicationSecurityGroupsClient) CreateOrUpdatePreparer(ctx context
// http.Response Body if it receives an error.
func (client ApplicationSecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future ApplicationSecurityGroupsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -136,7 +137,7 @@ func (client ApplicationSecurityGroupsClient) Delete(ctx context.Context, resour
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -168,6 +169,7 @@ func (client ApplicationSecurityGroupsClient) DeletePreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client ApplicationSecurityGroupsClient) DeleteSender(req *http.Request) (future ApplicationSecurityGroupsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -519,7 +521,7 @@ func (client ApplicationSecurityGroupsClient) UpdateTags(ctx context.Context, re
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -553,6 +555,7 @@ func (client ApplicationSecurityGroupsClient) UpdateTagsPreparer(ctx context.Con
// http.Response Body if it receives an error.
func (client ApplicationSecurityGroupsClient) UpdateTagsSender(req *http.Request) (future ApplicationSecurityGroupsUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewalls.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewalls.go
index d9f29e4a2393..db5f80e9b7e7 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewalls.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/azurefirewalls.go
@@ -54,7 +54,7 @@ func (client AzureFirewallsClient) CreateOrUpdate(ctx context.Context, resourceG
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -89,6 +89,7 @@ func (client AzureFirewallsClient) CreateOrUpdatePreparer(ctx context.Context, r
// http.Response Body if it receives an error.
func (client AzureFirewallsClient) CreateOrUpdateSender(req *http.Request) (future AzureFirewallsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -135,7 +136,7 @@ func (client AzureFirewallsClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -167,6 +168,7 @@ func (client AzureFirewallsClient) DeletePreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client AzureFirewallsClient) DeleteSender(req *http.Request) (future AzureFirewallsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/bastionhosts.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/bastionhosts.go
index f738a0220358..e265ef25b986 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/bastionhosts.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/bastionhosts.go
@@ -54,7 +54,7 @@ func (client BastionHostsClient) CreateOrUpdate(ctx context.Context, resourceGro
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -89,6 +89,7 @@ func (client BastionHostsClient) CreateOrUpdatePreparer(ctx context.Context, res
// http.Response Body if it receives an error.
func (client BastionHostsClient) CreateOrUpdateSender(req *http.Request) (future BastionHostsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -135,7 +136,7 @@ func (client BastionHostsClient) Delete(ctx context.Context, resourceGroupName s
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -167,6 +168,7 @@ func (client BastionHostsClient) DeletePreparer(ctx context.Context, resourceGro
// http.Response Body if it receives an error.
func (client BastionHostsClient) DeleteSender(req *http.Request) (future BastionHostsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -518,7 +520,7 @@ func (client BastionHostsClient) UpdateTags(ctx context.Context, resourceGroupNa
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -552,6 +554,7 @@ func (client BastionHostsClient) UpdateTagsPreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client BastionHostsClient) UpdateTagsSender(req *http.Request) (future BastionHostsUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/connectionmonitors.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/connectionmonitors.go
index c1f278cc48ea..50abbc6dc6a4 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/connectionmonitors.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/connectionmonitors.go
@@ -67,7 +67,7 @@ func (client ConnectionMonitorsClient) CreateOrUpdate(ctx context.Context, resou
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -102,6 +102,7 @@ func (client ConnectionMonitorsClient) CreateOrUpdatePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) CreateOrUpdateSender(req *http.Request) (future ConnectionMonitorsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -149,7 +150,7 @@ func (client ConnectionMonitorsClient) Delete(ctx context.Context, resourceGroup
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -182,6 +183,7 @@ func (client ConnectionMonitorsClient) DeletePreparer(ctx context.Context, resou
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) DeleteSender(req *http.Request) (future ConnectionMonitorsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -382,7 +384,7 @@ func (client ConnectionMonitorsClient) Query(ctx context.Context, resourceGroupN
result, err = client.QuerySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Query", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Query", result.Response(), "Failure sending request")
return
}
@@ -415,6 +417,7 @@ func (client ConnectionMonitorsClient) QueryPreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) QuerySender(req *http.Request) (future ConnectionMonitorsQueryFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -462,7 +465,7 @@ func (client ConnectionMonitorsClient) Start(ctx context.Context, resourceGroupN
result, err = client.StartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Start", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Start", result.Response(), "Failure sending request")
return
}
@@ -495,6 +498,7 @@ func (client ConnectionMonitorsClient) StartPreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) StartSender(req *http.Request) (future ConnectionMonitorsStartFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -541,7 +545,7 @@ func (client ConnectionMonitorsClient) Stop(ctx context.Context, resourceGroupNa
result, err = client.StopSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Stop", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Stop", result.Response(), "Failure sending request")
return
}
@@ -574,6 +578,7 @@ func (client ConnectionMonitorsClient) StopPreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) StopSender(req *http.Request) (future ConnectionMonitorsStopFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddoscustompolicies.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddoscustompolicies.go
index 3d6b2c3de8de..9273b4c785c0 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddoscustompolicies.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddoscustompolicies.go
@@ -55,7 +55,7 @@ func (client DdosCustomPoliciesClient) CreateOrUpdate(ctx context.Context, resou
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -90,6 +90,7 @@ func (client DdosCustomPoliciesClient) CreateOrUpdatePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client DdosCustomPoliciesClient) CreateOrUpdateSender(req *http.Request) (future DdosCustomPoliciesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -136,7 +137,7 @@ func (client DdosCustomPoliciesClient) Delete(ctx context.Context, resourceGroup
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -168,6 +169,7 @@ func (client DdosCustomPoliciesClient) DeletePreparer(ctx context.Context, resou
// http.Response Body if it receives an error.
func (client DdosCustomPoliciesClient) DeleteSender(req *http.Request) (future DdosCustomPoliciesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -290,7 +292,7 @@ func (client DdosCustomPoliciesClient) UpdateTags(ctx context.Context, resourceG
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -324,6 +326,7 @@ func (client DdosCustomPoliciesClient) UpdateTagsPreparer(ctx context.Context, r
// http.Response Body if it receives an error.
func (client DdosCustomPoliciesClient) UpdateTagsSender(req *http.Request) (future DdosCustomPoliciesUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddosprotectionplans.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddosprotectionplans.go
index 0bdab4eae4d3..0db4e0df31f8 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddosprotectionplans.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/ddosprotectionplans.go
@@ -55,7 +55,7 @@ func (client DdosProtectionPlansClient) CreateOrUpdate(ctx context.Context, reso
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -93,6 +93,7 @@ func (client DdosProtectionPlansClient) CreateOrUpdatePreparer(ctx context.Conte
// http.Response Body if it receives an error.
func (client DdosProtectionPlansClient) CreateOrUpdateSender(req *http.Request) (future DdosProtectionPlansCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -139,7 +140,7 @@ func (client DdosProtectionPlansClient) Delete(ctx context.Context, resourceGrou
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -171,6 +172,7 @@ func (client DdosProtectionPlansClient) DeletePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client DdosProtectionPlansClient) DeleteSender(req *http.Request) (future DdosProtectionPlansDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -522,7 +524,7 @@ func (client DdosProtectionPlansClient) UpdateTags(ctx context.Context, resource
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -556,6 +558,7 @@ func (client DdosProtectionPlansClient) UpdateTagsPreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client DdosProtectionPlansClient) UpdateTagsSender(req *http.Request) (future DdosProtectionPlansUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitauthorizations.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitauthorizations.go
index ee8fcdbc54e8..4c5a781af4ad 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitauthorizations.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitauthorizations.go
@@ -58,7 +58,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdate(ctx context
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -95,6 +95,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdatePreparer(ctx
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -142,7 +143,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) Delete(ctx context.Context
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -175,6 +176,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeletePreparer(ctx context
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitconnections.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitconnections.go
index 6aceab107c89..332c19378b64 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitconnections.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitconnections.go
@@ -58,7 +58,7 @@ func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdate(ctx context.Co
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -96,6 +96,7 @@ func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdatePreparer(ctx co
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitConnectionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -144,7 +145,7 @@ func (client ExpressRouteCircuitConnectionsClient) Delete(ctx context.Context, r
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -178,6 +179,7 @@ func (client ExpressRouteCircuitConnectionsClient) DeletePreparer(ctx context.Co
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitConnectionsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitConnectionsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitpeerings.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitpeerings.go
index 890b81bd3add..d7cca0ab5511 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitpeerings.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuitpeerings.go
@@ -68,7 +68,7 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdate(ctx context.Conte
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -105,6 +105,7 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdatePreparer(ctx conte
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -152,7 +153,7 @@ func (client ExpressRouteCircuitPeeringsClient) Delete(ctx context.Context, reso
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -185,6 +186,7 @@ func (client ExpressRouteCircuitPeeringsClient) DeletePreparer(ctx context.Conte
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitPeeringsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuits.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuits.go
index ea3943a0d8ad..84ab9257df68 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuits.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecircuits.go
@@ -55,7 +55,7 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdate(ctx context.Context, res
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -90,6 +90,7 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdatePreparer(ctx context.Cont
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -136,7 +137,7 @@ func (client ExpressRouteCircuitsClient) Delete(ctx context.Context, resourceGro
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -168,6 +169,7 @@ func (client ExpressRouteCircuitsClient) DeletePreparer(ctx context.Context, res
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -674,7 +676,7 @@ func (client ExpressRouteCircuitsClient) ListArpTable(ctx context.Context, resou
result, err = client.ListArpTableSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListArpTable", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListArpTable", result.Response(), "Failure sending request")
return
}
@@ -708,6 +710,7 @@ func (client ExpressRouteCircuitsClient) ListArpTablePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListArpTableSender(req *http.Request) (future ExpressRouteCircuitsListArpTableFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -757,7 +760,7 @@ func (client ExpressRouteCircuitsClient) ListRoutesTable(ctx context.Context, re
result, err = client.ListRoutesTableSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListRoutesTable", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListRoutesTable", result.Response(), "Failure sending request")
return
}
@@ -791,6 +794,7 @@ func (client ExpressRouteCircuitsClient) ListRoutesTablePreparer(ctx context.Con
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -840,7 +844,7 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummary(ctx context.Cont
result, err = client.ListRoutesTableSummarySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListRoutesTableSummary", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListRoutesTableSummary", result.Response(), "Failure sending request")
return
}
@@ -874,6 +878,7 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummaryPreparer(ctx cont
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSummarySender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableSummaryFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -921,7 +926,7 @@ func (client ExpressRouteCircuitsClient) UpdateTags(ctx context.Context, resourc
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -955,6 +960,7 @@ func (client ExpressRouteCircuitsClient) UpdateTagsPreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) UpdateTagsSender(req *http.Request) (future ExpressRouteCircuitsUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteconnections.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteconnections.go
index 21109eab6f5b..23f4bce4148d 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteconnections.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteconnections.go
@@ -65,7 +65,7 @@ func (client ExpressRouteConnectionsClient) CreateOrUpdate(ctx context.Context,
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -100,6 +100,7 @@ func (client ExpressRouteConnectionsClient) CreateOrUpdatePreparer(ctx context.C
// http.Response Body if it receives an error.
func (client ExpressRouteConnectionsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteConnectionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -147,7 +148,7 @@ func (client ExpressRouteConnectionsClient) Delete(ctx context.Context, resource
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -180,6 +181,7 @@ func (client ExpressRouteConnectionsClient) DeletePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client ExpressRouteConnectionsClient) DeleteSender(req *http.Request) (future ExpressRouteConnectionsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnectionpeerings.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnectionpeerings.go
index 4485554186f7..6b2206e1c925 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnectionpeerings.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnectionpeerings.go
@@ -70,7 +70,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdate(ctx conte
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -106,6 +106,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdatePreparer(c
// http.Response Body if it receives an error.
func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -153,7 +154,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) Delete(ctx context.Conte
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -186,6 +187,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) DeletePreparer(ctx conte
// http.Response Body if it receives an error.
func (client ExpressRouteCrossConnectionPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCrossConnectionPeeringsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnections.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnections.go
index ff5cddfef4be..8919b2b019dc 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnections.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutecrossconnections.go
@@ -55,7 +55,7 @@ func (client ExpressRouteCrossConnectionsClient) CreateOrUpdate(ctx context.Cont
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -90,6 +90,7 @@ func (client ExpressRouteCrossConnectionsClient) CreateOrUpdatePreparer(ctx cont
// http.Response Body if it receives an error.
func (client ExpressRouteCrossConnectionsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCrossConnectionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -328,7 +329,7 @@ func (client ExpressRouteCrossConnectionsClient) ListArpTable(ctx context.Contex
result, err = client.ListArpTableSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListArpTable", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListArpTable", result.Response(), "Failure sending request")
return
}
@@ -362,6 +363,7 @@ func (client ExpressRouteCrossConnectionsClient) ListArpTablePreparer(ctx contex
// http.Response Body if it receives an error.
func (client ExpressRouteCrossConnectionsClient) ListArpTableSender(req *http.Request) (future ExpressRouteCrossConnectionsListArpTableFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -527,7 +529,7 @@ func (client ExpressRouteCrossConnectionsClient) ListRoutesTable(ctx context.Con
result, err = client.ListRoutesTableSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListRoutesTable", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListRoutesTable", result.Response(), "Failure sending request")
return
}
@@ -561,6 +563,7 @@ func (client ExpressRouteCrossConnectionsClient) ListRoutesTablePreparer(ctx con
// http.Response Body if it receives an error.
func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSender(req *http.Request) (future ExpressRouteCrossConnectionsListRoutesTableFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -610,7 +613,7 @@ func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummary(ctx cont
result, err = client.ListRoutesTableSummarySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListRoutesTableSummary", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListRoutesTableSummary", result.Response(), "Failure sending request")
return
}
@@ -644,6 +647,7 @@ func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummaryPreparer(
// http.Response Body if it receives an error.
func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummarySender(req *http.Request) (future ExpressRouteCrossConnectionsListRoutesTableSummaryFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -691,7 +695,7 @@ func (client ExpressRouteCrossConnectionsClient) UpdateTags(ctx context.Context,
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -725,6 +729,7 @@ func (client ExpressRouteCrossConnectionsClient) UpdateTagsPreparer(ctx context.
// http.Response Body if it receives an error.
func (client ExpressRouteCrossConnectionsClient) UpdateTagsSender(req *http.Request) (future ExpressRouteCrossConnectionsUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutegateways.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutegateways.go
index 82748fc21997..437ac66c23e4 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutegateways.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressroutegateways.go
@@ -63,7 +63,7 @@ func (client ExpressRouteGatewaysClient) CreateOrUpdate(ctx context.Context, res
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -98,6 +98,7 @@ func (client ExpressRouteGatewaysClient) CreateOrUpdatePreparer(ctx context.Cont
// http.Response Body if it receives an error.
func (client ExpressRouteGatewaysClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteGatewaysCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -145,7 +146,7 @@ func (client ExpressRouteGatewaysClient) Delete(ctx context.Context, resourceGro
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -177,6 +178,7 @@ func (client ExpressRouteGatewaysClient) DeletePreparer(ctx context.Context, res
// http.Response Body if it receives an error.
func (client ExpressRouteGatewaysClient) DeleteSender(req *http.Request) (future ExpressRouteGatewaysDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteports.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteports.go
index 6a78ebe811b0..c26246c17b9a 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteports.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/expressrouteports.go
@@ -55,7 +55,7 @@ func (client ExpressRoutePortsClient) CreateOrUpdate(ctx context.Context, resour
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -90,6 +90,7 @@ func (client ExpressRoutePortsClient) CreateOrUpdatePreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client ExpressRoutePortsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRoutePortsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -136,7 +137,7 @@ func (client ExpressRoutePortsClient) Delete(ctx context.Context, resourceGroupN
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -168,6 +169,7 @@ func (client ExpressRoutePortsClient) DeletePreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client ExpressRoutePortsClient) DeleteSender(req *http.Request) (future ExpressRoutePortsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -519,7 +521,7 @@ func (client ExpressRoutePortsClient) UpdateTags(ctx context.Context, resourceGr
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -553,6 +555,7 @@ func (client ExpressRoutePortsClient) UpdateTagsPreparer(ctx context.Context, re
// http.Response Body if it receives an error.
func (client ExpressRoutePortsClient) UpdateTagsSender(req *http.Request) (future ExpressRoutePortsUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/firewallpolicies.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/firewallpolicies.go
index 7c7c3ef5e2b7..7882d96a38dd 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/firewallpolicies.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/firewallpolicies.go
@@ -55,7 +55,7 @@ func (client FirewallPoliciesClient) CreateOrUpdate(ctx context.Context, resourc
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -90,6 +90,7 @@ func (client FirewallPoliciesClient) CreateOrUpdatePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client FirewallPoliciesClient) CreateOrUpdateSender(req *http.Request) (future FirewallPoliciesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -136,7 +137,7 @@ func (client FirewallPoliciesClient) Delete(ctx context.Context, resourceGroupNa
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -168,6 +169,7 @@ func (client FirewallPoliciesClient) DeletePreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client FirewallPoliciesClient) DeleteSender(req *http.Request) (future FirewallPoliciesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/firewallpolicyrulegroups.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/firewallpolicyrulegroups.go
index 6a0db209c780..aaff9901b7e5 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/firewallpolicyrulegroups.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/firewallpolicyrulegroups.go
@@ -68,7 +68,7 @@ func (client FirewallPolicyRuleGroupsClient) CreateOrUpdate(ctx context.Context,
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -105,6 +105,7 @@ func (client FirewallPolicyRuleGroupsClient) CreateOrUpdatePreparer(ctx context.
// http.Response Body if it receives an error.
func (client FirewallPolicyRuleGroupsClient) CreateOrUpdateSender(req *http.Request) (future FirewallPolicyRuleGroupsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -152,7 +153,7 @@ func (client FirewallPolicyRuleGroupsClient) Delete(ctx context.Context, resourc
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleGroupsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -185,6 +186,7 @@ func (client FirewallPolicyRuleGroupsClient) DeletePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client FirewallPolicyRuleGroupsClient) DeleteSender(req *http.Request) (future FirewallPolicyRuleGroupsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/inboundnatrules.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/inboundnatrules.go
index 50baf1506bee..2bab55601f34 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/inboundnatrules.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/inboundnatrules.go
@@ -75,7 +75,7 @@ func (client InboundNatRulesClient) CreateOrUpdate(ctx context.Context, resource
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -111,6 +111,7 @@ func (client InboundNatRulesClient) CreateOrUpdatePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client InboundNatRulesClient) CreateOrUpdateSender(req *http.Request) (future InboundNatRulesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -158,7 +159,7 @@ func (client InboundNatRulesClient) Delete(ctx context.Context, resourceGroupNam
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -191,6 +192,7 @@ func (client InboundNatRulesClient) DeletePreparer(ctx context.Context, resource
// http.Response Body if it receives an error.
func (client InboundNatRulesClient) DeleteSender(req *http.Request) (future InboundNatRulesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacesgroup.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacesgroup.go
index 4008cb289654..ed9d30d6a5d1 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacesgroup.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacesgroup.go
@@ -54,7 +54,7 @@ func (client InterfacesClient) CreateOrUpdate(ctx context.Context, resourceGroup
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -88,6 +88,7 @@ func (client InterfacesClient) CreateOrUpdatePreparer(ctx context.Context, resou
// http.Response Body if it receives an error.
func (client InterfacesClient) CreateOrUpdateSender(req *http.Request) (future InterfacesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -134,7 +135,7 @@ func (client InterfacesClient) Delete(ctx context.Context, resourceGroupName str
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -166,6 +167,7 @@ func (client InterfacesClient) DeletePreparer(ctx context.Context, resourceGroup
// http.Response Body if it receives an error.
func (client InterfacesClient) DeleteSender(req *http.Request) (future InterfacesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -291,7 +293,7 @@ func (client InterfacesClient) GetEffectiveRouteTable(ctx context.Context, resou
result, err = client.GetEffectiveRouteTableSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetEffectiveRouteTable", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetEffectiveRouteTable", result.Response(), "Failure sending request")
return
}
@@ -323,6 +325,7 @@ func (client InterfacesClient) GetEffectiveRouteTablePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client InterfacesClient) GetEffectiveRouteTableSender(req *http.Request) (future InterfacesGetEffectiveRouteTableFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -769,7 +772,7 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroups(ctx context.Co
result, err = client.ListEffectiveNetworkSecurityGroupsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListEffectiveNetworkSecurityGroups", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListEffectiveNetworkSecurityGroups", result.Response(), "Failure sending request")
return
}
@@ -801,6 +804,7 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsPreparer(ctx co
// http.Response Body if it receives an error.
func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsSender(req *http.Request) (future InterfacesListEffectiveNetworkSecurityGroupsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1214,7 +1218,7 @@ func (client InterfacesClient) UpdateTags(ctx context.Context, resourceGroupName
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -1248,6 +1252,7 @@ func (client InterfacesClient) UpdateTagsPreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client InterfacesClient) UpdateTagsSender(req *http.Request) (future InterfacesUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacetapconfigurations.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacetapconfigurations.go
index 549e232d7ba2..aaae85a89427 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacetapconfigurations.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/interfacetapconfigurations.go
@@ -92,7 +92,7 @@ func (client InterfaceTapConfigurationsClient) CreateOrUpdate(ctx context.Contex
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -128,6 +128,7 @@ func (client InterfaceTapConfigurationsClient) CreateOrUpdatePreparer(ctx contex
// http.Response Body if it receives an error.
func (client InterfaceTapConfigurationsClient) CreateOrUpdateSender(req *http.Request) (future InterfaceTapConfigurationsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -175,7 +176,7 @@ func (client InterfaceTapConfigurationsClient) Delete(ctx context.Context, resou
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -208,6 +209,7 @@ func (client InterfaceTapConfigurationsClient) DeletePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client InterfaceTapConfigurationsClient) DeleteSender(req *http.Request) (future InterfaceTapConfigurationsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancers.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancers.go
index 4b42e6e3a60b..d2b371402105 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancers.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/loadbalancers.go
@@ -54,7 +54,7 @@ func (client LoadBalancersClient) CreateOrUpdate(ctx context.Context, resourceGr
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -88,6 +88,7 @@ func (client LoadBalancersClient) CreateOrUpdatePreparer(ctx context.Context, re
// http.Response Body if it receives an error.
func (client LoadBalancersClient) CreateOrUpdateSender(req *http.Request) (future LoadBalancersCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -134,7 +135,7 @@ func (client LoadBalancersClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -166,6 +167,7 @@ func (client LoadBalancersClient) DeletePreparer(ctx context.Context, resourceGr
// http.Response Body if it receives an error.
func (client LoadBalancersClient) DeleteSender(req *http.Request) (future LoadBalancersDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -521,7 +523,7 @@ func (client LoadBalancersClient) UpdateTags(ctx context.Context, resourceGroupN
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -555,6 +557,7 @@ func (client LoadBalancersClient) UpdateTagsPreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client LoadBalancersClient) UpdateTagsSender(req *http.Request) (future LoadBalancersUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/localnetworkgateways.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/localnetworkgateways.go
index 75a5fc5bdd22..19ea2a301354 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/localnetworkgateways.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/localnetworkgateways.go
@@ -64,7 +64,7 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdate(ctx context.Context, res
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -98,6 +98,7 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Cont
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future LocalNetworkGatewaysCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -150,7 +151,7 @@ func (client LocalNetworkGatewaysClient) Delete(ctx context.Context, resourceGro
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -182,6 +183,7 @@ func (client LocalNetworkGatewaysClient) DeletePreparer(ctx context.Context, res
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) DeleteSender(req *http.Request) (future LocalNetworkGatewaysDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -432,7 +434,7 @@ func (client LocalNetworkGatewaysClient) UpdateTags(ctx context.Context, resourc
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -466,6 +468,7 @@ func (client LocalNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (future LocalNetworkGatewaysUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/natgateways.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/natgateways.go
index 77c91c5608bf..cbfcdd135b0b 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/natgateways.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/natgateways.go
@@ -54,7 +54,7 @@ func (client NatGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGrou
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -88,6 +88,7 @@ func (client NatGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client NatGatewaysClient) CreateOrUpdateSender(req *http.Request) (future NatGatewaysCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -134,7 +135,7 @@ func (client NatGatewaysClient) Delete(ctx context.Context, resourceGroupName st
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -166,6 +167,7 @@ func (client NatGatewaysClient) DeletePreparer(ctx context.Context, resourceGrou
// http.Response Body if it receives an error.
func (client NatGatewaysClient) DeleteSender(req *http.Request) (future NatGatewaysDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpngateways.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpngateways.go
index e2b08fed3490..a08948c60de5 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpngateways.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpngateways.go
@@ -54,7 +54,7 @@ func (client P2sVpnGatewaysClient) CreateOrUpdate(ctx context.Context, resourceG
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -89,6 +89,7 @@ func (client P2sVpnGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, r
// http.Response Body if it receives an error.
func (client P2sVpnGatewaysClient) CreateOrUpdateSender(req *http.Request) (future P2sVpnGatewaysCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -135,7 +136,7 @@ func (client P2sVpnGatewaysClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -167,6 +168,7 @@ func (client P2sVpnGatewaysClient) DeletePreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client P2sVpnGatewaysClient) DeleteSender(req *http.Request) (future P2sVpnGatewaysDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -213,7 +215,7 @@ func (client P2sVpnGatewaysClient) GenerateVpnProfile(ctx context.Context, resou
result, err = client.GenerateVpnProfileSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "GenerateVpnProfile", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "GenerateVpnProfile", result.Response(), "Failure sending request")
return
}
@@ -247,6 +249,7 @@ func (client P2sVpnGatewaysClient) GenerateVpnProfilePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client P2sVpnGatewaysClient) GenerateVpnProfileSender(req *http.Request) (future P2sVpnGatewaysGenerateVpnProfileFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -370,7 +373,7 @@ func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealth(ctx context.Context
result, err = client.GetP2sVpnConnectionHealthSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "GetP2sVpnConnectionHealth", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "GetP2sVpnConnectionHealth", result.Response(), "Failure sending request")
return
}
@@ -402,6 +405,7 @@ func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthPreparer(ctx context
// http.Response Body if it receives an error.
func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthSender(req *http.Request) (future P2sVpnGatewaysGetP2sVpnConnectionHealthFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -678,7 +682,7 @@ func (client P2sVpnGatewaysClient) UpdateTags(ctx context.Context, resourceGroup
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -712,6 +716,7 @@ func (client P2sVpnGatewaysClient) UpdateTagsPreparer(ctx context.Context, resou
// http.Response Body if it receives an error.
func (client P2sVpnGatewaysClient) UpdateTagsSender(req *http.Request) (future P2sVpnGatewaysUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpnserverconfigurations.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpnserverconfigurations.go
index 40262e72be59..be2255e7a86a 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpnserverconfigurations.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/p2svpnserverconfigurations.go
@@ -57,7 +57,7 @@ func (client P2sVpnServerConfigurationsClient) CreateOrUpdate(ctx context.Contex
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -93,6 +93,7 @@ func (client P2sVpnServerConfigurationsClient) CreateOrUpdatePreparer(ctx contex
// http.Response Body if it receives an error.
func (client P2sVpnServerConfigurationsClient) CreateOrUpdateSender(req *http.Request) (future P2sVpnServerConfigurationsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -140,7 +141,7 @@ func (client P2sVpnServerConfigurationsClient) Delete(ctx context.Context, resou
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -173,6 +174,7 @@ func (client P2sVpnServerConfigurationsClient) DeletePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client P2sVpnServerConfigurationsClient) DeleteSender(req *http.Request) (future P2sVpnServerConfigurationsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/packetcaptures.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/packetcaptures.go
index 80ab73eb3164..637c8e00969b 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/packetcaptures.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/packetcaptures.go
@@ -65,7 +65,7 @@ func (client PacketCapturesClient) Create(ctx context.Context, resourceGroupName
result, err = client.CreateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Create", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Create", result.Response(), "Failure sending request")
return
}
@@ -100,6 +100,7 @@ func (client PacketCapturesClient) CreatePreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client PacketCapturesClient) CreateSender(req *http.Request) (future PacketCapturesCreateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -147,7 +148,7 @@ func (client PacketCapturesClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -180,6 +181,7 @@ func (client PacketCapturesClient) DeletePreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client PacketCapturesClient) DeleteSender(req *http.Request) (future PacketCapturesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -304,7 +306,7 @@ func (client PacketCapturesClient) GetStatus(ctx context.Context, resourceGroupN
result, err = client.GetStatusSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "GetStatus", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "GetStatus", result.Response(), "Failure sending request")
return
}
@@ -337,6 +339,7 @@ func (client PacketCapturesClient) GetStatusPreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client PacketCapturesClient) GetStatusSender(req *http.Request) (future PacketCapturesGetStatusFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -460,7 +463,7 @@ func (client PacketCapturesClient) Stop(ctx context.Context, resourceGroupName s
result, err = client.StopSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Stop", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Stop", result.Response(), "Failure sending request")
return
}
@@ -493,6 +496,7 @@ func (client PacketCapturesClient) StopPreparer(ctx context.Context, resourceGro
// http.Response Body if it receives an error.
func (client PacketCapturesClient) StopSender(req *http.Request) (future PacketCapturesStopFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privateendpoints.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privateendpoints.go
index 14ba5e54ab73..23805df50eda 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privateendpoints.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privateendpoints.go
@@ -55,7 +55,7 @@ func (client PrivateEndpointsClient) CreateOrUpdate(ctx context.Context, resourc
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -89,6 +89,7 @@ func (client PrivateEndpointsClient) CreateOrUpdatePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client PrivateEndpointsClient) CreateOrUpdateSender(req *http.Request) (future PrivateEndpointsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -135,7 +136,7 @@ func (client PrivateEndpointsClient) Delete(ctx context.Context, resourceGroupNa
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -167,6 +168,7 @@ func (client PrivateEndpointsClient) DeletePreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client PrivateEndpointsClient) DeleteSender(req *http.Request) (future PrivateEndpointsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privatelinkservices.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privatelinkservices.go
index 325abb8f441b..5876672c0cea 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privatelinkservices.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/privatelinkservices.go
@@ -54,7 +54,7 @@ func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibility(ctx co
result, err = client.CheckPrivateLinkServiceVisibilitySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CheckPrivateLinkServiceVisibility", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CheckPrivateLinkServiceVisibility", result.Response(), "Failure sending request")
return
}
@@ -87,6 +87,7 @@ func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityPrepare
// http.Response Body if it receives an error.
func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilitySender(req *http.Request) (future PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -134,7 +135,7 @@ func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityByResou
result, err = client.CheckPrivateLinkServiceVisibilityByResourceGroupSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CheckPrivateLinkServiceVisibilityByResourceGroup", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CheckPrivateLinkServiceVisibilityByResourceGroup", result.Response(), "Failure sending request")
return
}
@@ -168,6 +169,7 @@ func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityByResou
// http.Response Body if it receives an error.
func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityByResourceGroupSender(req *http.Request) (future PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -215,7 +217,7 @@ func (client PrivateLinkServicesClient) CreateOrUpdate(ctx context.Context, reso
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -249,6 +251,7 @@ func (client PrivateLinkServicesClient) CreateOrUpdatePreparer(ctx context.Conte
// http.Response Body if it receives an error.
func (client PrivateLinkServicesClient) CreateOrUpdateSender(req *http.Request) (future PrivateLinkServicesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -295,7 +298,7 @@ func (client PrivateLinkServicesClient) Delete(ctx context.Context, resourceGrou
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -327,6 +330,7 @@ func (client PrivateLinkServicesClient) DeletePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client PrivateLinkServicesClient) DeleteSender(req *http.Request) (future PrivateLinkServicesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -373,7 +377,7 @@ func (client PrivateLinkServicesClient) DeletePrivateEndpointConnection(ctx cont
result, err = client.DeletePrivateEndpointConnectionSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "DeletePrivateEndpointConnection", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "DeletePrivateEndpointConnection", result.Response(), "Failure sending request")
return
}
@@ -406,6 +410,7 @@ func (client PrivateLinkServicesClient) DeletePrivateEndpointConnectionPreparer(
// http.Response Body if it receives an error.
func (client PrivateLinkServicesClient) DeletePrivateEndpointConnectionSender(req *http.Request) (future PrivateLinkServicesDeletePrivateEndpointConnectionFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/profiles.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/profiles.go
index 139030f8044b..6e09f6b50d45 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/profiles.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/profiles.go
@@ -132,7 +132,7 @@ func (client ProfilesClient) Delete(ctx context.Context, resourceGroupName strin
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ProfilesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ProfilesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -164,6 +164,7 @@ func (client ProfilesClient) DeletePreparer(ctx context.Context, resourceGroupNa
// http.Response Body if it receives an error.
func (client ProfilesClient) DeleteSender(req *http.Request) (future ProfilesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipaddresses.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipaddresses.go
index 6d39bdfd630f..2b7b3196b92c 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipaddresses.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipaddresses.go
@@ -67,7 +67,7 @@ func (client PublicIPAddressesClient) CreateOrUpdate(ctx context.Context, resour
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -101,6 +101,7 @@ func (client PublicIPAddressesClient) CreateOrUpdatePreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) CreateOrUpdateSender(req *http.Request) (future PublicIPAddressesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -147,7 +148,7 @@ func (client PublicIPAddressesClient) Delete(ctx context.Context, resourceGroupN
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -179,6 +180,7 @@ func (client PublicIPAddressesClient) DeletePreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) DeleteSender(req *http.Request) (future PublicIPAddressesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -866,7 +868,7 @@ func (client PublicIPAddressesClient) UpdateTags(ctx context.Context, resourceGr
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -900,6 +902,7 @@ func (client PublicIPAddressesClient) UpdateTagsPreparer(ctx context.Context, re
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) UpdateTagsSender(req *http.Request) (future PublicIPAddressesUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipprefixes.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipprefixes.go
index 8c82696945c2..d3fe16f4deab 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipprefixes.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/publicipprefixes.go
@@ -55,7 +55,7 @@ func (client PublicIPPrefixesClient) CreateOrUpdate(ctx context.Context, resourc
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -89,6 +89,7 @@ func (client PublicIPPrefixesClient) CreateOrUpdatePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client PublicIPPrefixesClient) CreateOrUpdateSender(req *http.Request) (future PublicIPPrefixesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -135,7 +136,7 @@ func (client PublicIPPrefixesClient) Delete(ctx context.Context, resourceGroupNa
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -167,6 +168,7 @@ func (client PublicIPPrefixesClient) DeletePreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client PublicIPPrefixesClient) DeleteSender(req *http.Request) (future PublicIPPrefixesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -522,7 +524,7 @@ func (client PublicIPPrefixesClient) UpdateTags(ctx context.Context, resourceGro
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -556,6 +558,7 @@ func (client PublicIPPrefixesClient) UpdateTagsPreparer(ctx context.Context, res
// http.Response Body if it receives an error.
func (client PublicIPPrefixesClient) UpdateTagsSender(req *http.Request) (future PublicIPPrefixesUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilterrules.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilterrules.go
index 7f9110bb552f..40d635dde38c 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilterrules.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilterrules.go
@@ -66,7 +66,7 @@ func (client RouteFilterRulesClient) CreateOrUpdate(ctx context.Context, resourc
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -102,6 +102,7 @@ func (client RouteFilterRulesClient) CreateOrUpdatePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) CreateOrUpdateSender(req *http.Request) (future RouteFilterRulesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -149,7 +150,7 @@ func (client RouteFilterRulesClient) Delete(ctx context.Context, resourceGroupNa
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -182,6 +183,7 @@ func (client RouteFilterRulesClient) DeletePreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) DeleteSender(req *http.Request) (future RouteFilterRulesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -425,7 +427,7 @@ func (client RouteFilterRulesClient) Update(ctx context.Context, resourceGroupNa
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -462,6 +464,7 @@ func (client RouteFilterRulesClient) UpdatePreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) UpdateSender(req *http.Request) (future RouteFilterRulesUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilters.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilters.go
index c8409ea83470..54dac3e88c08 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilters.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routefilters.go
@@ -54,7 +54,7 @@ func (client RouteFiltersClient) CreateOrUpdate(ctx context.Context, resourceGro
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -89,6 +89,7 @@ func (client RouteFiltersClient) CreateOrUpdatePreparer(ctx context.Context, res
// http.Response Body if it receives an error.
func (client RouteFiltersClient) CreateOrUpdateSender(req *http.Request) (future RouteFiltersCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -135,7 +136,7 @@ func (client RouteFiltersClient) Delete(ctx context.Context, resourceGroupName s
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -167,6 +168,7 @@ func (client RouteFiltersClient) DeletePreparer(ctx context.Context, resourceGro
// http.Response Body if it receives an error.
func (client RouteFiltersClient) DeleteSender(req *http.Request) (future RouteFiltersDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -522,7 +524,7 @@ func (client RouteFiltersClient) Update(ctx context.Context, resourceGroupName s
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -559,6 +561,7 @@ func (client RouteFiltersClient) UpdatePreparer(ctx context.Context, resourceGro
// http.Response Body if it receives an error.
func (client RouteFiltersClient) UpdateSender(req *http.Request) (future RouteFiltersUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routes.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routes.go
index 67ee31c58474..cbe677dba1cd 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routes.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routes.go
@@ -55,7 +55,7 @@ func (client RoutesClient) CreateOrUpdate(ctx context.Context, resourceGroupName
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RoutesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -90,6 +90,7 @@ func (client RoutesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client RoutesClient) CreateOrUpdateSender(req *http.Request) (future RoutesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -137,7 +138,7 @@ func (client RoutesClient) Delete(ctx context.Context, resourceGroupName string,
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RoutesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -170,6 +171,7 @@ func (client RoutesClient) DeletePreparer(ctx context.Context, resourceGroupName
// http.Response Body if it receives an error.
func (client RoutesClient) DeleteSender(req *http.Request) (future RoutesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routetables.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routetables.go
index 20919bc8593a..6aeb093717ef 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routetables.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/routetables.go
@@ -54,7 +54,7 @@ func (client RouteTablesClient) CreateOrUpdate(ctx context.Context, resourceGrou
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -88,6 +88,7 @@ func (client RouteTablesClient) CreateOrUpdatePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client RouteTablesClient) CreateOrUpdateSender(req *http.Request) (future RouteTablesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -134,7 +135,7 @@ func (client RouteTablesClient) Delete(ctx context.Context, resourceGroupName st
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -166,6 +167,7 @@ func (client RouteTablesClient) DeletePreparer(ctx context.Context, resourceGrou
// http.Response Body if it receives an error.
func (client RouteTablesClient) DeleteSender(req *http.Request) (future RouteTablesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -521,7 +523,7 @@ func (client RouteTablesClient) UpdateTags(ctx context.Context, resourceGroupNam
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -555,6 +557,7 @@ func (client RouteTablesClient) UpdateTagsPreparer(ctx context.Context, resource
// http.Response Body if it receives an error.
func (client RouteTablesClient) UpdateTagsSender(req *http.Request) (future RouteTablesUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securitygroups.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securitygroups.go
index 19e52dbe79d1..c8e650af094f 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securitygroups.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securitygroups.go
@@ -54,7 +54,7 @@ func (client SecurityGroupsClient) CreateOrUpdate(ctx context.Context, resourceG
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -88,6 +88,7 @@ func (client SecurityGroupsClient) CreateOrUpdatePreparer(ctx context.Context, r
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future SecurityGroupsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -134,7 +135,7 @@ func (client SecurityGroupsClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -166,6 +167,7 @@ func (client SecurityGroupsClient) DeletePreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) DeleteSender(req *http.Request) (future SecurityGroupsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -521,7 +523,7 @@ func (client SecurityGroupsClient) UpdateTags(ctx context.Context, resourceGroup
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -555,6 +557,7 @@ func (client SecurityGroupsClient) UpdateTagsPreparer(ctx context.Context, resou
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) UpdateTagsSender(req *http.Request) (future SecurityGroupsUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securityrules.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securityrules.go
index 1c081bf3f6f7..98b411ff8d77 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securityrules.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/securityrules.go
@@ -55,7 +55,7 @@ func (client SecurityRulesClient) CreateOrUpdate(ctx context.Context, resourceGr
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -90,6 +90,7 @@ func (client SecurityRulesClient) CreateOrUpdatePreparer(ctx context.Context, re
// http.Response Body if it receives an error.
func (client SecurityRulesClient) CreateOrUpdateSender(req *http.Request) (future SecurityRulesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -137,7 +138,7 @@ func (client SecurityRulesClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -170,6 +171,7 @@ func (client SecurityRulesClient) DeletePreparer(ctx context.Context, resourceGr
// http.Response Body if it receives an error.
func (client SecurityRulesClient) DeleteSender(req *http.Request) (future SecurityRulesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicies.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicies.go
index 0a4865111515..5c72d4d12ce0 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicies.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicies.go
@@ -55,7 +55,7 @@ func (client ServiceEndpointPoliciesClient) CreateOrUpdate(ctx context.Context,
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -89,6 +89,7 @@ func (client ServiceEndpointPoliciesClient) CreateOrUpdatePreparer(ctx context.C
// http.Response Body if it receives an error.
func (client ServiceEndpointPoliciesClient) CreateOrUpdateSender(req *http.Request) (future ServiceEndpointPoliciesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -135,7 +136,7 @@ func (client ServiceEndpointPoliciesClient) Delete(ctx context.Context, resource
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -167,6 +168,7 @@ func (client ServiceEndpointPoliciesClient) DeletePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client ServiceEndpointPoliciesClient) DeleteSender(req *http.Request) (future ServiceEndpointPoliciesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -522,7 +524,7 @@ func (client ServiceEndpointPoliciesClient) Update(ctx context.Context, resource
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -556,6 +558,7 @@ func (client ServiceEndpointPoliciesClient) UpdatePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client ServiceEndpointPoliciesClient) UpdateSender(req *http.Request) (future ServiceEndpointPoliciesUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicydefinitions.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicydefinitions.go
index b5edd5f52cdd..0a9760b35207 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicydefinitions.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/serviceendpointpolicydefinitions.go
@@ -57,7 +57,7 @@ func (client ServiceEndpointPolicyDefinitionsClient) CreateOrUpdate(ctx context.
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -92,6 +92,7 @@ func (client ServiceEndpointPolicyDefinitionsClient) CreateOrUpdatePreparer(ctx
// http.Response Body if it receives an error.
func (client ServiceEndpointPolicyDefinitionsClient) CreateOrUpdateSender(req *http.Request) (future ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -139,7 +140,7 @@ func (client ServiceEndpointPolicyDefinitionsClient) Delete(ctx context.Context,
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -172,6 +173,7 @@ func (client ServiceEndpointPolicyDefinitionsClient) DeletePreparer(ctx context.
// http.Response Body if it receives an error.
func (client ServiceEndpointPolicyDefinitionsClient) DeleteSender(req *http.Request) (future ServiceEndpointPolicyDefinitionsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/subnets.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/subnets.go
index acd0f116c835..d89d324c9479 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/subnets.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/subnets.go
@@ -55,7 +55,7 @@ func (client SubnetsClient) CreateOrUpdate(ctx context.Context, resourceGroupNam
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SubnetsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -90,6 +90,7 @@ func (client SubnetsClient) CreateOrUpdatePreparer(ctx context.Context, resource
// http.Response Body if it receives an error.
func (client SubnetsClient) CreateOrUpdateSender(req *http.Request) (future SubnetsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -137,7 +138,7 @@ func (client SubnetsClient) Delete(ctx context.Context, resourceGroupName string
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SubnetsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -170,6 +171,7 @@ func (client SubnetsClient) DeletePreparer(ctx context.Context, resourceGroupNam
// http.Response Body if it receives an error.
func (client SubnetsClient) DeleteSender(req *http.Request) (future SubnetsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -418,7 +420,7 @@ func (client SubnetsClient) PrepareNetworkPolicies(ctx context.Context, resource
result, err = client.PrepareNetworkPoliciesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsClient", "PrepareNetworkPolicies", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SubnetsClient", "PrepareNetworkPolicies", result.Response(), "Failure sending request")
return
}
@@ -453,6 +455,7 @@ func (client SubnetsClient) PrepareNetworkPoliciesPreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client SubnetsClient) PrepareNetworkPoliciesSender(req *http.Request) (future SubnetsPrepareNetworkPoliciesFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -501,7 +504,7 @@ func (client SubnetsClient) UnprepareNetworkPolicies(ctx context.Context, resour
result, err = client.UnprepareNetworkPoliciesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsClient", "UnprepareNetworkPolicies", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SubnetsClient", "UnprepareNetworkPolicies", result.Response(), "Failure sending request")
return
}
@@ -536,6 +539,7 @@ func (client SubnetsClient) UnprepareNetworkPoliciesPreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client SubnetsClient) UnprepareNetworkPoliciesSender(req *http.Request) (future SubnetsUnprepareNetworkPoliciesFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualhubs.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualhubs.go
index 0aceb756531d..d59e60d6b44c 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualhubs.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualhubs.go
@@ -54,7 +54,7 @@ func (client VirtualHubsClient) CreateOrUpdate(ctx context.Context, resourceGrou
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -89,6 +89,7 @@ func (client VirtualHubsClient) CreateOrUpdatePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client VirtualHubsClient) CreateOrUpdateSender(req *http.Request) (future VirtualHubsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -135,7 +136,7 @@ func (client VirtualHubsClient) Delete(ctx context.Context, resourceGroupName st
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -167,6 +168,7 @@ func (client VirtualHubsClient) DeletePreparer(ctx context.Context, resourceGrou
// http.Response Body if it receives an error.
func (client VirtualHubsClient) DeleteSender(req *http.Request) (future VirtualHubsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -518,7 +520,7 @@ func (client VirtualHubsClient) UpdateTags(ctx context.Context, resourceGroupNam
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -552,6 +554,7 @@ func (client VirtualHubsClient) UpdateTagsPreparer(ctx context.Context, resource
// http.Response Body if it receives an error.
func (client VirtualHubsClient) UpdateTagsSender(req *http.Request) (future VirtualHubsUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgatewayconnections.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgatewayconnections.go
index 9ee758bd48ec..c95aa636214e 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgatewayconnections.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgatewayconnections.go
@@ -69,7 +69,7 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdate(ctx context.
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -103,6 +103,7 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdatePreparer(ctx
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -149,7 +150,7 @@ func (client VirtualNetworkGatewayConnectionsClient) Delete(ctx context.Context,
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -181,6 +182,7 @@ func (client VirtualNetworkGatewayConnectionsClient) DeletePreparer(ctx context.
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewayConnectionsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -509,7 +511,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context.
result, err = client.ResetSharedKeySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", result.Response(), "Failure sending request")
return
}
@@ -543,6 +545,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyPreparer(ctx
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -599,7 +602,7 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKey(ctx context.Co
result, err = client.SetSharedKeySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "SetSharedKey", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "SetSharedKey", result.Response(), "Failure sending request")
return
}
@@ -633,6 +636,7 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeyPreparer(ctx co
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -680,7 +684,7 @@ func (client VirtualNetworkGatewayConnectionsClient) UpdateTags(ctx context.Cont
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -714,6 +718,7 @@ func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsPreparer(ctx cont
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsSender(req *http.Request) (future VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgateways.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgateways.go
index 021c6c043303..b7e626efb48d 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgateways.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkgateways.go
@@ -62,7 +62,7 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdate(ctx context.Context, r
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -96,6 +96,7 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Co
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewaysCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -142,7 +143,7 @@ func (client VirtualNetworkGatewaysClient) Delete(ctx context.Context, resourceG
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -174,6 +175,7 @@ func (client VirtualNetworkGatewaysClient) DeletePreparer(ctx context.Context, r
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewaysDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -221,7 +223,7 @@ func (client VirtualNetworkGatewaysClient) Generatevpnclientpackage(ctx context.
result, err = client.GeneratevpnclientpackageSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Generatevpnclientpackage", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Generatevpnclientpackage", result.Response(), "Failure sending request")
return
}
@@ -255,6 +257,7 @@ func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackagePreparer(ctx
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackageSender(req *http.Request) (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -272,7 +275,7 @@ func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackageResponder(res
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
- autorest.ByUnmarshallingJSON(&result),
+ autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
@@ -303,7 +306,7 @@ func (client VirtualNetworkGatewaysClient) GenerateVpnProfile(ctx context.Contex
result, err = client.GenerateVpnProfileSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GenerateVpnProfile", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GenerateVpnProfile", result.Response(), "Failure sending request")
return
}
@@ -337,6 +340,7 @@ func (client VirtualNetworkGatewaysClient) GenerateVpnProfilePreparer(ctx contex
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GenerateVpnProfileSender(req *http.Request) (future VirtualNetworkGatewaysGenerateVpnProfileFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -354,7 +358,7 @@ func (client VirtualNetworkGatewaysClient) GenerateVpnProfileResponder(resp *htt
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
- autorest.ByUnmarshallingJSON(&result),
+ autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
@@ -461,7 +465,7 @@ func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutes(ctx context.Conte
result, err = client.GetAdvertisedRoutesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetAdvertisedRoutes", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetAdvertisedRoutes", result.Response(), "Failure sending request")
return
}
@@ -494,6 +498,7 @@ func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesPreparer(ctx conte
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -541,7 +546,7 @@ func (client VirtualNetworkGatewaysClient) GetBgpPeerStatus(ctx context.Context,
result, err = client.GetBgpPeerStatusSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetBgpPeerStatus", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetBgpPeerStatus", result.Response(), "Failure sending request")
return
}
@@ -576,6 +581,7 @@ func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusPreparer(ctx context.
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusSender(req *http.Request) (future VirtualNetworkGatewaysGetBgpPeerStatusFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -623,7 +629,7 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutes(ctx context.Context,
result, err = client.GetLearnedRoutesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetLearnedRoutes", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetLearnedRoutes", result.Response(), "Failure sending request")
return
}
@@ -655,6 +661,7 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutesPreparer(ctx context.
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetLearnedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetLearnedRoutesFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -702,7 +709,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnclientConnectionHealth(ctx cont
result, err = client.GetVpnclientConnectionHealthSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnclientConnectionHealth", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnclientConnectionHealth", result.Response(), "Failure sending request")
return
}
@@ -734,6 +741,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnclientConnectionHealthPreparer(
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetVpnclientConnectionHealthSender(req *http.Request) (future VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -782,7 +790,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParameters(ctx conte
result, err = client.GetVpnclientIpsecParametersSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnclientIpsecParameters", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnclientIpsecParameters", result.Response(), "Failure sending request")
return
}
@@ -814,6 +822,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParametersPreparer(c
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParametersSender(req *http.Request) (future VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -861,7 +870,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURL(ctx context.C
result, err = client.GetVpnProfilePackageURLSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnProfilePackageURL", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnProfilePackageURL", result.Response(), "Failure sending request")
return
}
@@ -893,6 +902,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLPreparer(ctx c
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLSender(req *http.Request) (future VirtualNetworkGatewaysGetVpnProfilePackageURLFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -910,7 +920,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLResponder(resp
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
- autorest.ByUnmarshallingJSON(&result),
+ autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
@@ -1175,7 +1185,7 @@ func (client VirtualNetworkGatewaysClient) Reset(ctx context.Context, resourceGr
result, err = client.ResetSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Reset", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Reset", result.Response(), "Failure sending request")
return
}
@@ -1210,6 +1220,7 @@ func (client VirtualNetworkGatewaysClient) ResetPreparer(ctx context.Context, re
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) ResetSender(req *http.Request) (future VirtualNetworkGatewaysResetFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1257,7 +1268,7 @@ func (client VirtualNetworkGatewaysClient) ResetVpnClientSharedKey(ctx context.C
result, err = client.ResetVpnClientSharedKeySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "ResetVpnClientSharedKey", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "ResetVpnClientSharedKey", result.Response(), "Failure sending request")
return
}
@@ -1289,6 +1300,7 @@ func (client VirtualNetworkGatewaysClient) ResetVpnClientSharedKeyPreparer(ctx c
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) ResetVpnClientSharedKeySender(req *http.Request) (future VirtualNetworkGatewaysResetVpnClientSharedKeyFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1344,7 +1356,7 @@ func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParameters(ctx conte
result, err = client.SetVpnclientIpsecParametersSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "SetVpnclientIpsecParameters", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "SetVpnclientIpsecParameters", result.Response(), "Failure sending request")
return
}
@@ -1378,6 +1390,7 @@ func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParametersPreparer(c
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParametersSender(req *http.Request) (future VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1501,7 +1514,7 @@ func (client VirtualNetworkGatewaysClient) UpdateTags(ctx context.Context, resou
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -1535,6 +1548,7 @@ func (client VirtualNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (future VirtualNetworkGatewaysUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkpeerings.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkpeerings.go
index 4f88aa1ca042..65f80190b8fd 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkpeerings.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworkpeerings.go
@@ -57,7 +57,7 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdate(ctx context.Context, r
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -92,6 +92,7 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdatePreparer(ctx context.Co
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkPeeringsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -139,7 +140,7 @@ func (client VirtualNetworkPeeringsClient) Delete(ctx context.Context, resourceG
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -172,6 +173,7 @@ func (client VirtualNetworkPeeringsClient) DeletePreparer(ctx context.Context, r
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) DeleteSender(req *http.Request) (future VirtualNetworkPeeringsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworks.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworks.go
index 0760bc1a23ae..ff9a5b57d3b2 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworks.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworks.go
@@ -132,7 +132,7 @@ func (client VirtualNetworksClient) CreateOrUpdate(ctx context.Context, resource
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -166,6 +166,7 @@ func (client VirtualNetworksClient) CreateOrUpdatePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworksCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -212,7 +213,7 @@ func (client VirtualNetworksClient) Delete(ctx context.Context, resourceGroupNam
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -244,6 +245,7 @@ func (client VirtualNetworksClient) DeletePreparer(ctx context.Context, resource
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) DeleteSender(req *http.Request) (future VirtualNetworksDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -717,7 +719,7 @@ func (client VirtualNetworksClient) UpdateTags(ctx context.Context, resourceGrou
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -751,6 +753,7 @@ func (client VirtualNetworksClient) UpdateTagsPreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) UpdateTagsSender(req *http.Request) (future VirtualNetworksUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworktaps.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworktaps.go
index a70474f5dcbe..d78ef5234b8a 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworktaps.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualnetworktaps.go
@@ -87,7 +87,7 @@ func (client VirtualNetworkTapsClient) CreateOrUpdate(ctx context.Context, resou
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -121,6 +121,7 @@ func (client VirtualNetworkTapsClient) CreateOrUpdatePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client VirtualNetworkTapsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkTapsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -167,7 +168,7 @@ func (client VirtualNetworkTapsClient) Delete(ctx context.Context, resourceGroup
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -199,6 +200,7 @@ func (client VirtualNetworkTapsClient) DeletePreparer(ctx context.Context, resou
// http.Response Body if it receives an error.
func (client VirtualNetworkTapsClient) DeleteSender(req *http.Request) (future VirtualNetworkTapsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -550,7 +552,7 @@ func (client VirtualNetworkTapsClient) UpdateTags(ctx context.Context, resourceG
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -584,6 +586,7 @@ func (client VirtualNetworkTapsClient) UpdateTagsPreparer(ctx context.Context, r
// http.Response Body if it receives an error.
func (client VirtualNetworkTapsClient) UpdateTagsSender(req *http.Request) (future VirtualNetworkTapsUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualwans.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualwans.go
index ed22b5d5280e..4d32ab9862ce 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualwans.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/virtualwans.go
@@ -54,7 +54,7 @@ func (client VirtualWansClient) CreateOrUpdate(ctx context.Context, resourceGrou
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -89,6 +89,7 @@ func (client VirtualWansClient) CreateOrUpdatePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client VirtualWansClient) CreateOrUpdateSender(req *http.Request) (future VirtualWansCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -135,7 +136,7 @@ func (client VirtualWansClient) Delete(ctx context.Context, resourceGroupName st
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -167,6 +168,7 @@ func (client VirtualWansClient) DeletePreparer(ctx context.Context, resourceGrou
// http.Response Body if it receives an error.
func (client VirtualWansClient) DeleteSender(req *http.Request) (future VirtualWansDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -518,7 +520,7 @@ func (client VirtualWansClient) UpdateTags(ctx context.Context, resourceGroupNam
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -552,6 +554,7 @@ func (client VirtualWansClient) UpdateTagsPreparer(ctx context.Context, resource
// http.Response Body if it receives an error.
func (client VirtualWansClient) UpdateTagsSender(req *http.Request) (future VirtualWansUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnconnections.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnconnections.go
index a64a828bb3f6..e6f0f2e8459d 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnconnections.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnconnections.go
@@ -56,7 +56,7 @@ func (client VpnConnectionsClient) CreateOrUpdate(ctx context.Context, resourceG
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -92,6 +92,7 @@ func (client VpnConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, r
// http.Response Body if it receives an error.
func (client VpnConnectionsClient) CreateOrUpdateSender(req *http.Request) (future VpnConnectionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -139,7 +140,7 @@ func (client VpnConnectionsClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -172,6 +173,7 @@ func (client VpnConnectionsClient) DeletePreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client VpnConnectionsClient) DeleteSender(req *http.Request) (future VpnConnectionsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpngateways.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpngateways.go
index 675507453e06..f0e7324e227d 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpngateways.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpngateways.go
@@ -54,7 +54,7 @@ func (client VpnGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGrou
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -89,6 +89,7 @@ func (client VpnGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client VpnGatewaysClient) CreateOrUpdateSender(req *http.Request) (future VpnGatewaysCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -135,7 +136,7 @@ func (client VpnGatewaysClient) Delete(ctx context.Context, resourceGroupName st
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -167,6 +168,7 @@ func (client VpnGatewaysClient) DeletePreparer(ctx context.Context, resourceGrou
// http.Response Body if it receives an error.
func (client VpnGatewaysClient) DeleteSender(req *http.Request) (future VpnGatewaysDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -517,7 +519,7 @@ func (client VpnGatewaysClient) Reset(ctx context.Context, resourceGroupName str
result, err = client.ResetSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Reset", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Reset", result.Response(), "Failure sending request")
return
}
@@ -549,6 +551,7 @@ func (client VpnGatewaysClient) ResetPreparer(ctx context.Context, resourceGroup
// http.Response Body if it receives an error.
func (client VpnGatewaysClient) ResetSender(req *http.Request) (future VpnGatewaysResetFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -596,7 +599,7 @@ func (client VpnGatewaysClient) UpdateTags(ctx context.Context, resourceGroupNam
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -630,6 +633,7 @@ func (client VpnGatewaysClient) UpdateTagsPreparer(ctx context.Context, resource
// http.Response Body if it receives an error.
func (client VpnGatewaysClient) UpdateTagsSender(req *http.Request) (future VpnGatewaysUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsites.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsites.go
index 28dd97d4db09..e1c0000be515 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsites.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsites.go
@@ -54,7 +54,7 @@ func (client VpnSitesClient) CreateOrUpdate(ctx context.Context, resourceGroupNa
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -89,6 +89,7 @@ func (client VpnSitesClient) CreateOrUpdatePreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client VpnSitesClient) CreateOrUpdateSender(req *http.Request) (future VpnSitesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -135,7 +136,7 @@ func (client VpnSitesClient) Delete(ctx context.Context, resourceGroupName strin
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -167,6 +168,7 @@ func (client VpnSitesClient) DeletePreparer(ctx context.Context, resourceGroupNa
// http.Response Body if it receives an error.
func (client VpnSitesClient) DeleteSender(req *http.Request) (future VpnSitesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -518,7 +520,7 @@ func (client VpnSitesClient) UpdateTags(ctx context.Context, resourceGroupName s
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -552,6 +554,7 @@ func (client VpnSitesClient) UpdateTagsPreparer(ctx context.Context, resourceGro
// http.Response Body if it receives an error.
func (client VpnSitesClient) UpdateTagsSender(req *http.Request) (future VpnSitesUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitesconfiguration.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitesconfiguration.go
index c797858acda2..9fa306ac60d9 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitesconfiguration.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/vpnsitesconfiguration.go
@@ -62,7 +62,7 @@ func (client VpnSitesConfigurationClient) Download(ctx context.Context, resource
result, err = client.DownloadSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationClient", "Download", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationClient", "Download", result.Response(), "Failure sending request")
return
}
@@ -96,6 +96,7 @@ func (client VpnSitesConfigurationClient) DownloadPreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VpnSitesConfigurationClient) DownloadSender(req *http.Request) (future VpnSitesConfigurationDownloadFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/watchers.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/watchers.go
index 43a9eed3b9dd..5bb9e39d4eb7 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/watchers.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/watchers.go
@@ -64,7 +64,7 @@ func (client WatchersClient) CheckConnectivity(ctx context.Context, resourceGrou
result, err = client.CheckConnectivitySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "CheckConnectivity", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "CheckConnectivity", result.Response(), "Failure sending request")
return
}
@@ -98,6 +98,7 @@ func (client WatchersClient) CheckConnectivityPreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client WatchersClient) CheckConnectivitySender(req *http.Request) (future WatchersCheckConnectivityFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -223,7 +224,7 @@ func (client WatchersClient) Delete(ctx context.Context, resourceGroupName strin
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -255,6 +256,7 @@ func (client WatchersClient) DeletePreparer(ctx context.Context, resourceGroupNa
// http.Response Body if it receives an error.
func (client WatchersClient) DeleteSender(req *http.Request) (future WatchersDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -387,7 +389,7 @@ func (client WatchersClient) GetAzureReachabilityReport(ctx context.Context, res
result, err = client.GetAzureReachabilityReportSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetAzureReachabilityReport", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetAzureReachabilityReport", result.Response(), "Failure sending request")
return
}
@@ -421,6 +423,7 @@ func (client WatchersClient) GetAzureReachabilityReportPreparer(ctx context.Cont
// http.Response Body if it receives an error.
func (client WatchersClient) GetAzureReachabilityReportSender(req *http.Request) (future WatchersGetAzureReachabilityReportFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -474,7 +477,7 @@ func (client WatchersClient) GetFlowLogStatus(ctx context.Context, resourceGroup
result, err = client.GetFlowLogStatusSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetFlowLogStatus", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetFlowLogStatus", result.Response(), "Failure sending request")
return
}
@@ -508,6 +511,7 @@ func (client WatchersClient) GetFlowLogStatusPreparer(ctx context.Context, resou
// http.Response Body if it receives an error.
func (client WatchersClient) GetFlowLogStatusSender(req *http.Request) (future WatchersGetFlowLogStatusFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -562,7 +566,7 @@ func (client WatchersClient) GetNetworkConfigurationDiagnostic(ctx context.Conte
result, err = client.GetNetworkConfigurationDiagnosticSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetNetworkConfigurationDiagnostic", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetNetworkConfigurationDiagnostic", result.Response(), "Failure sending request")
return
}
@@ -596,6 +600,7 @@ func (client WatchersClient) GetNetworkConfigurationDiagnosticPreparer(ctx conte
// http.Response Body if it receives an error.
func (client WatchersClient) GetNetworkConfigurationDiagnosticSender(req *http.Request) (future WatchersGetNetworkConfigurationDiagnosticFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -651,7 +656,7 @@ func (client WatchersClient) GetNextHop(ctx context.Context, resourceGroupName s
result, err = client.GetNextHopSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetNextHop", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetNextHop", result.Response(), "Failure sending request")
return
}
@@ -685,6 +690,7 @@ func (client WatchersClient) GetNextHopPreparer(ctx context.Context, resourceGro
// http.Response Body if it receives an error.
func (client WatchersClient) GetNextHopSender(req *http.Request) (future WatchersGetNextHopFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -821,7 +827,7 @@ func (client WatchersClient) GetTroubleshooting(ctx context.Context, resourceGro
result, err = client.GetTroubleshootingSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTroubleshooting", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTroubleshooting", result.Response(), "Failure sending request")
return
}
@@ -855,6 +861,7 @@ func (client WatchersClient) GetTroubleshootingPreparer(ctx context.Context, res
// http.Response Body if it receives an error.
func (client WatchersClient) GetTroubleshootingSender(req *http.Request) (future WatchersGetTroubleshootingFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -908,7 +915,7 @@ func (client WatchersClient) GetTroubleshootingResult(ctx context.Context, resou
result, err = client.GetTroubleshootingResultSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTroubleshootingResult", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTroubleshootingResult", result.Response(), "Failure sending request")
return
}
@@ -942,6 +949,7 @@ func (client WatchersClient) GetTroubleshootingResultPreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client WatchersClient) GetTroubleshootingResultSender(req *http.Request) (future WatchersGetTroubleshootingResultFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -995,7 +1003,7 @@ func (client WatchersClient) GetVMSecurityRules(ctx context.Context, resourceGro
result, err = client.GetVMSecurityRulesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetVMSecurityRules", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetVMSecurityRules", result.Response(), "Failure sending request")
return
}
@@ -1029,6 +1037,7 @@ func (client WatchersClient) GetVMSecurityRulesPreparer(ctx context.Context, res
// http.Response Body if it receives an error.
func (client WatchersClient) GetVMSecurityRulesSender(req *http.Request) (future WatchersGetVMSecurityRulesFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1221,7 +1230,7 @@ func (client WatchersClient) ListAvailableProviders(ctx context.Context, resourc
result, err = client.ListAvailableProvidersSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "ListAvailableProviders", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "ListAvailableProviders", result.Response(), "Failure sending request")
return
}
@@ -1255,6 +1264,7 @@ func (client WatchersClient) ListAvailableProvidersPreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client WatchersClient) ListAvailableProvidersSender(req *http.Request) (future WatchersListAvailableProvidersFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1320,7 +1330,7 @@ func (client WatchersClient) SetFlowLogConfiguration(ctx context.Context, resour
result, err = client.SetFlowLogConfigurationSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "SetFlowLogConfiguration", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "SetFlowLogConfiguration", result.Response(), "Failure sending request")
return
}
@@ -1354,6 +1364,7 @@ func (client WatchersClient) SetFlowLogConfigurationPreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client WatchersClient) SetFlowLogConfigurationSender(req *http.Request) (future WatchersSetFlowLogConfigurationFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1490,7 +1501,7 @@ func (client WatchersClient) VerifyIPFlow(ctx context.Context, resourceGroupName
result, err = client.VerifyIPFlowSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "VerifyIPFlow", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "VerifyIPFlow", result.Response(), "Failure sending request")
return
}
@@ -1524,6 +1535,7 @@ func (client WatchersClient) VerifyIPFlowPreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client WatchersClient) VerifyIPFlowSender(req *http.Request) (future WatchersVerifyIPFlowFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/webapplicationfirewallpolicies.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/webapplicationfirewallpolicies.go
index 36ffcde1dab8..12419a5a84a5 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/webapplicationfirewallpolicies.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network/webapplicationfirewallpolicies.go
@@ -146,7 +146,7 @@ func (client WebApplicationFirewallPoliciesClient) Delete(ctx context.Context, r
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -178,6 +178,7 @@ func (client WebApplicationFirewallPoliciesClient) DeletePreparer(ctx context.Co
// http.Response Body if it receives an error.
func (client WebApplicationFirewallPoliciesClient) DeleteSender(req *http.Request) (future WebApplicationFirewallPoliciesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/_meta.json b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/_meta.json
index dc19a944fdfd..3da7957dccb8 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/_meta.json
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/_meta.json
@@ -1,11 +1,11 @@
{
- "commit": "5fcc6854765009e891052653b304cfe80353430a",
+ "commit": "47545c5f0842f5be29529674a4609d75a973d783",
"readme": "/_/azure-rest-api-specs/specification/network/resource-manager/readme.md",
"tag": "package-2021-02",
- "use": "@microsoft.azure/autorest.go@2.1.183",
+ "use": "@microsoft.azure/autorest.go@2.1.187",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
- "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2021-02 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix /_/azure-rest-api-specs/specification/network/resource-manager/readme.md",
+ "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2021-02 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix /_/azure-rest-api-specs/specification/network/resource-manager/readme.md",
"additional_properties": {
- "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix"
+ "additional_options": "--go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix"
}
}
\ No newline at end of file
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/applicationgatewayprivateendpointconnections.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/applicationgatewayprivateendpointconnections.go
index 6c2c8e308648..f310ef63b189 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/applicationgatewayprivateendpointconnections.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/applicationgatewayprivateendpointconnections.go
@@ -56,7 +56,7 @@ func (client ApplicationGatewayPrivateEndpointConnectionsClient) Delete(ctx cont
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewayPrivateEndpointConnectionsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewayPrivateEndpointConnectionsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -89,6 +89,7 @@ func (client ApplicationGatewayPrivateEndpointConnectionsClient) DeletePreparer(
// http.Response Body if it receives an error.
func (client ApplicationGatewayPrivateEndpointConnectionsClient) DeleteSender(req *http.Request) (future ApplicationGatewayPrivateEndpointConnectionsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -332,7 +333,7 @@ func (client ApplicationGatewayPrivateEndpointConnectionsClient) Update(ctx cont
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewayPrivateEndpointConnectionsClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewayPrivateEndpointConnectionsClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -369,6 +370,7 @@ func (client ApplicationGatewayPrivateEndpointConnectionsClient) UpdatePreparer(
// http.Response Body if it receives an error.
func (client ApplicationGatewayPrivateEndpointConnectionsClient) UpdateSender(req *http.Request) (future ApplicationGatewayPrivateEndpointConnectionsUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/applicationgateways.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/applicationgateways.go
index b86dae179e2b..1c6c64591138 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/applicationgateways.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/applicationgateways.go
@@ -56,7 +56,7 @@ func (client ApplicationGatewaysClient) BackendHealth(ctx context.Context, resou
result, err = client.BackendHealthSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "BackendHealth", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "BackendHealth", result.Response(), "Failure sending request")
return
}
@@ -91,6 +91,7 @@ func (client ApplicationGatewaysClient) BackendHealthPreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) BackendHealthSender(req *http.Request) (future ApplicationGatewaysBackendHealthFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -140,7 +141,7 @@ func (client ApplicationGatewaysClient) BackendHealthOnDemand(ctx context.Contex
result, err = client.BackendHealthOnDemandSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "BackendHealthOnDemand", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "BackendHealthOnDemand", result.Response(), "Failure sending request")
return
}
@@ -177,6 +178,7 @@ func (client ApplicationGatewaysClient) BackendHealthOnDemandPreparer(ctx contex
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) BackendHealthOnDemandSender(req *http.Request) (future ApplicationGatewaysBackendHealthOnDemandFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -252,7 +254,7 @@ func (client ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, reso
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -287,6 +289,7 @@ func (client ApplicationGatewaysClient) CreateOrUpdatePreparer(ctx context.Conte
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) CreateOrUpdateSender(req *http.Request) (future ApplicationGatewaysCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -333,7 +336,7 @@ func (client ApplicationGatewaysClient) Delete(ctx context.Context, resourceGrou
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -365,6 +368,7 @@ func (client ApplicationGatewaysClient) DeletePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) DeleteSender(req *http.Request) (future ApplicationGatewaysDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1257,7 +1261,7 @@ func (client ApplicationGatewaysClient) Start(ctx context.Context, resourceGroup
result, err = client.StartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Start", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Start", result.Response(), "Failure sending request")
return
}
@@ -1289,6 +1293,7 @@ func (client ApplicationGatewaysClient) StartPreparer(ctx context.Context, resou
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StartSender(req *http.Request) (future ApplicationGatewaysStartFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1334,7 +1339,7 @@ func (client ApplicationGatewaysClient) Stop(ctx context.Context, resourceGroupN
result, err = client.StopSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Stop", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Stop", result.Response(), "Failure sending request")
return
}
@@ -1366,6 +1371,7 @@ func (client ApplicationGatewaysClient) StopPreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client ApplicationGatewaysClient) StopSender(req *http.Request) (future ApplicationGatewaysStopFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/applicationsecuritygroups.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/applicationsecuritygroups.go
index 0ec443db7620..2903fcc11b41 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/applicationsecuritygroups.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/applicationsecuritygroups.go
@@ -55,7 +55,7 @@ func (client ApplicationSecurityGroupsClient) CreateOrUpdate(ctx context.Context
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -90,6 +90,7 @@ func (client ApplicationSecurityGroupsClient) CreateOrUpdatePreparer(ctx context
// http.Response Body if it receives an error.
func (client ApplicationSecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future ApplicationSecurityGroupsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -136,7 +137,7 @@ func (client ApplicationSecurityGroupsClient) Delete(ctx context.Context, resour
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -168,6 +169,7 @@ func (client ApplicationSecurityGroupsClient) DeletePreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client ApplicationSecurityGroupsClient) DeleteSender(req *http.Request) (future ApplicationSecurityGroupsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/azurefirewalls.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/azurefirewalls.go
index e2adbf311faa..2290c42b9ba7 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/azurefirewalls.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/azurefirewalls.go
@@ -62,7 +62,7 @@ func (client AzureFirewallsClient) CreateOrUpdate(ctx context.Context, resourceG
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -97,6 +97,7 @@ func (client AzureFirewallsClient) CreateOrUpdatePreparer(ctx context.Context, r
// http.Response Body if it receives an error.
func (client AzureFirewallsClient) CreateOrUpdateSender(req *http.Request) (future AzureFirewallsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -143,7 +144,7 @@ func (client AzureFirewallsClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -175,6 +176,7 @@ func (client AzureFirewallsClient) DeletePreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client AzureFirewallsClient) DeleteSender(req *http.Request) (future AzureFirewallsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -526,7 +528,7 @@ func (client AzureFirewallsClient) UpdateTags(ctx context.Context, resourceGroup
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -560,6 +562,7 @@ func (client AzureFirewallsClient) UpdateTagsPreparer(ctx context.Context, resou
// http.Response Body if it receives an error.
func (client AzureFirewallsClient) UpdateTagsSender(req *http.Request) (future AzureFirewallsUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/bastionhosts.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/bastionhosts.go
index 74ed5cb63fc8..265a077de9f3 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/bastionhosts.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/bastionhosts.go
@@ -54,7 +54,7 @@ func (client BastionHostsClient) CreateOrUpdate(ctx context.Context, resourceGro
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -89,6 +89,7 @@ func (client BastionHostsClient) CreateOrUpdatePreparer(ctx context.Context, res
// http.Response Body if it receives an error.
func (client BastionHostsClient) CreateOrUpdateSender(req *http.Request) (future BastionHostsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -135,7 +136,7 @@ func (client BastionHostsClient) Delete(ctx context.Context, resourceGroupName s
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.BastionHostsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -167,6 +168,7 @@ func (client BastionHostsClient) DeletePreparer(ctx context.Context, resourceGro
// http.Response Body if it receives an error.
func (client BastionHostsClient) DeleteSender(req *http.Request) (future BastionHostsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/client.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/client.go
index 5fb346424af8..6271bf8734ca 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/client.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/client.go
@@ -145,7 +145,7 @@ func (client BaseClient) DeleteBastionShareableLink(ctx context.Context, resourc
result, err = client.DeleteBastionShareableLinkSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.BaseClient", "DeleteBastionShareableLink", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.BaseClient", "DeleteBastionShareableLink", result.Response(), "Failure sending request")
return
}
@@ -179,6 +179,7 @@ func (client BaseClient) DeleteBastionShareableLinkPreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client BaseClient) DeleteBastionShareableLinkSender(req *http.Request) (future DeleteBastionShareableLinkFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -347,7 +348,7 @@ func (client BaseClient) Generatevirtualwanvpnserverconfigurationvpnprofile(ctx
result, err = client.GeneratevirtualwanvpnserverconfigurationvpnprofileSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.BaseClient", "Generatevirtualwanvpnserverconfigurationvpnprofile", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.BaseClient", "Generatevirtualwanvpnserverconfigurationvpnprofile", result.Response(), "Failure sending request")
return
}
@@ -381,6 +382,7 @@ func (client BaseClient) GeneratevirtualwanvpnserverconfigurationvpnprofilePrepa
// http.Response Body if it receives an error.
func (client BaseClient) GeneratevirtualwanvpnserverconfigurationvpnprofileSender(req *http.Request) (future GeneratevirtualwanvpnserverconfigurationvpnprofileFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -427,7 +429,7 @@ func (client BaseClient) GetActiveSessions(ctx context.Context, resourceGroupNam
result, err = client.GetActiveSessionsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.BaseClient", "GetActiveSessions", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.BaseClient", "GetActiveSessions", result.Response(), "Failure sending request")
return
}
@@ -459,6 +461,7 @@ func (client BaseClient) GetActiveSessionsPreparer(ctx context.Context, resource
// http.Response Body if it receives an error.
func (client BaseClient) GetActiveSessionsSender(req *http.Request) (future GetActiveSessionsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -668,7 +671,7 @@ func (client BaseClient) PutBastionShareableLink(ctx context.Context, resourceGr
result, err = client.PutBastionShareableLinkSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.BaseClient", "PutBastionShareableLink", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.BaseClient", "PutBastionShareableLink", result.Response(), "Failure sending request")
return
}
@@ -702,6 +705,7 @@ func (client BaseClient) PutBastionShareableLinkPreparer(ctx context.Context, re
// http.Response Body if it receives an error.
func (client BaseClient) PutBastionShareableLinkSender(req *http.Request) (future PutBastionShareableLinkFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/connectionmonitors.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/connectionmonitors.go
index f6548f944ecc..4e3c76fee850 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/connectionmonitors.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/connectionmonitors.go
@@ -82,7 +82,7 @@ func (client ConnectionMonitorsClient) CreateOrUpdate(ctx context.Context, resou
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -120,6 +120,7 @@ func (client ConnectionMonitorsClient) CreateOrUpdatePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) CreateOrUpdateSender(req *http.Request) (future ConnectionMonitorsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -167,7 +168,7 @@ func (client ConnectionMonitorsClient) Delete(ctx context.Context, resourceGroup
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -200,6 +201,7 @@ func (client ConnectionMonitorsClient) DeletePreparer(ctx context.Context, resou
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) DeleteSender(req *http.Request) (future ConnectionMonitorsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -400,7 +402,7 @@ func (client ConnectionMonitorsClient) Query(ctx context.Context, resourceGroupN
result, err = client.QuerySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Query", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Query", result.Response(), "Failure sending request")
return
}
@@ -433,6 +435,7 @@ func (client ConnectionMonitorsClient) QueryPreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) QuerySender(req *http.Request) (future ConnectionMonitorsQueryFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -480,7 +483,7 @@ func (client ConnectionMonitorsClient) Start(ctx context.Context, resourceGroupN
result, err = client.StartSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Start", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Start", result.Response(), "Failure sending request")
return
}
@@ -513,6 +516,7 @@ func (client ConnectionMonitorsClient) StartPreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) StartSender(req *http.Request) (future ConnectionMonitorsStartFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -559,7 +563,7 @@ func (client ConnectionMonitorsClient) Stop(ctx context.Context, resourceGroupNa
result, err = client.StopSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Stop", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Stop", result.Response(), "Failure sending request")
return
}
@@ -592,6 +596,7 @@ func (client ConnectionMonitorsClient) StopPreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client ConnectionMonitorsClient) StopSender(req *http.Request) (future ConnectionMonitorsStopFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/customipprefixes.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/customipprefixes.go
index 0fb2a203f71e..67c72eb66c74 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/customipprefixes.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/customipprefixes.go
@@ -63,7 +63,7 @@ func (client CustomIPPrefixesClient) CreateOrUpdate(ctx context.Context, resourc
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.CustomIPPrefixesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.CustomIPPrefixesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -98,6 +98,7 @@ func (client CustomIPPrefixesClient) CreateOrUpdatePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client CustomIPPrefixesClient) CreateOrUpdateSender(req *http.Request) (future CustomIPPrefixesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -144,7 +145,7 @@ func (client CustomIPPrefixesClient) Delete(ctx context.Context, resourceGroupNa
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.CustomIPPrefixesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.CustomIPPrefixesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -176,6 +177,7 @@ func (client CustomIPPrefixesClient) DeletePreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client CustomIPPrefixesClient) DeleteSender(req *http.Request) (future CustomIPPrefixesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/ddoscustompolicies.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/ddoscustompolicies.go
index 3ce37afe7ab2..cb52e222ea71 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/ddoscustompolicies.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/ddoscustompolicies.go
@@ -55,7 +55,7 @@ func (client DdosCustomPoliciesClient) CreateOrUpdate(ctx context.Context, resou
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -90,6 +90,7 @@ func (client DdosCustomPoliciesClient) CreateOrUpdatePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client DdosCustomPoliciesClient) CreateOrUpdateSender(req *http.Request) (future DdosCustomPoliciesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -136,7 +137,7 @@ func (client DdosCustomPoliciesClient) Delete(ctx context.Context, resourceGroup
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.DdosCustomPoliciesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -168,6 +169,7 @@ func (client DdosCustomPoliciesClient) DeletePreparer(ctx context.Context, resou
// http.Response Body if it receives an error.
func (client DdosCustomPoliciesClient) DeleteSender(req *http.Request) (future DdosCustomPoliciesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/ddosprotectionplans.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/ddosprotectionplans.go
index b0ba658a775d..7ca89dd3143b 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/ddosprotectionplans.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/ddosprotectionplans.go
@@ -55,7 +55,7 @@ func (client DdosProtectionPlansClient) CreateOrUpdate(ctx context.Context, reso
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -93,6 +93,7 @@ func (client DdosProtectionPlansClient) CreateOrUpdatePreparer(ctx context.Conte
// http.Response Body if it receives an error.
func (client DdosProtectionPlansClient) CreateOrUpdateSender(req *http.Request) (future DdosProtectionPlansCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -139,7 +140,7 @@ func (client DdosProtectionPlansClient) Delete(ctx context.Context, resourceGrou
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -171,6 +172,7 @@ func (client DdosProtectionPlansClient) DeletePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client DdosProtectionPlansClient) DeleteSender(req *http.Request) (future DdosProtectionPlansDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/dscpconfiguration.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/dscpconfiguration.go
index 9dd694af7771..1865da477bab 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/dscpconfiguration.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/dscpconfiguration.go
@@ -55,7 +55,7 @@ func (client DscpConfigurationClient) CreateOrUpdate(ctx context.Context, resour
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.DscpConfigurationClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.DscpConfigurationClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -90,6 +90,7 @@ func (client DscpConfigurationClient) CreateOrUpdatePreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client DscpConfigurationClient) CreateOrUpdateSender(req *http.Request) (future DscpConfigurationCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -136,7 +137,7 @@ func (client DscpConfigurationClient) Delete(ctx context.Context, resourceGroupN
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.DscpConfigurationClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.DscpConfigurationClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -168,6 +169,7 @@ func (client DscpConfigurationClient) DeletePreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client DscpConfigurationClient) DeleteSender(req *http.Request) (future DscpConfigurationDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressroutecircuitauthorizations.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressroutecircuitauthorizations.go
index 9377eaf14520..dfab0d4a0da2 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressroutecircuitauthorizations.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressroutecircuitauthorizations.go
@@ -58,7 +58,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdate(ctx context
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -95,6 +95,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdatePreparer(ctx
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -142,7 +143,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) Delete(ctx context.Context
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -175,6 +176,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeletePreparer(ctx context
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitAuthorizationsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitAuthorizationsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressroutecircuitconnections.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressroutecircuitconnections.go
index 68070ebb0cbe..61fb94890615 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressroutecircuitconnections.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressroutecircuitconnections.go
@@ -58,7 +58,7 @@ func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdate(ctx context.Co
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -96,6 +96,7 @@ func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdatePreparer(ctx co
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitConnectionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -144,7 +145,7 @@ func (client ExpressRouteCircuitConnectionsClient) Delete(ctx context.Context, r
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -178,6 +179,7 @@ func (client ExpressRouteCircuitConnectionsClient) DeletePreparer(ctx context.Co
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitConnectionsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitConnectionsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressroutecircuitpeerings.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressroutecircuitpeerings.go
index ba654567252b..824f44c84e27 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressroutecircuitpeerings.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressroutecircuitpeerings.go
@@ -68,7 +68,7 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdate(ctx context.Conte
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -105,6 +105,7 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdatePreparer(ctx conte
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitPeeringsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -152,7 +153,7 @@ func (client ExpressRouteCircuitPeeringsClient) Delete(ctx context.Context, reso
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -185,6 +186,7 @@ func (client ExpressRouteCircuitPeeringsClient) DeletePreparer(ctx context.Conte
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitPeeringsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressroutecircuits.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressroutecircuits.go
index 80577cc52d74..8fe3e78b60d4 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressroutecircuits.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressroutecircuits.go
@@ -55,7 +55,7 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdate(ctx context.Context, res
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -90,6 +90,7 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdatePreparer(ctx context.Cont
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCircuitsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -136,7 +137,7 @@ func (client ExpressRouteCircuitsClient) Delete(ctx context.Context, resourceGro
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -168,6 +169,7 @@ func (client ExpressRouteCircuitsClient) DeletePreparer(ctx context.Context, res
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) DeleteSender(req *http.Request) (future ExpressRouteCircuitsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -674,7 +676,7 @@ func (client ExpressRouteCircuitsClient) ListArpTable(ctx context.Context, resou
result, err = client.ListArpTableSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListArpTable", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListArpTable", result.Response(), "Failure sending request")
return
}
@@ -708,6 +710,7 @@ func (client ExpressRouteCircuitsClient) ListArpTablePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListArpTableSender(req *http.Request) (future ExpressRouteCircuitsListArpTableFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -757,7 +760,7 @@ func (client ExpressRouteCircuitsClient) ListRoutesTable(ctx context.Context, re
result, err = client.ListRoutesTableSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListRoutesTable", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListRoutesTable", result.Response(), "Failure sending request")
return
}
@@ -791,6 +794,7 @@ func (client ExpressRouteCircuitsClient) ListRoutesTablePreparer(ctx context.Con
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -840,7 +844,7 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummary(ctx context.Cont
result, err = client.ListRoutesTableSummarySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListRoutesTableSummary", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListRoutesTableSummary", result.Response(), "Failure sending request")
return
}
@@ -874,6 +878,7 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummaryPreparer(ctx cont
// http.Response Body if it receives an error.
func (client ExpressRouteCircuitsClient) ListRoutesTableSummarySender(req *http.Request) (future ExpressRouteCircuitsListRoutesTableSummaryFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressrouteconnections.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressrouteconnections.go
index e9e708c3afe9..79f3ed62bd49 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressrouteconnections.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressrouteconnections.go
@@ -65,7 +65,7 @@ func (client ExpressRouteConnectionsClient) CreateOrUpdate(ctx context.Context,
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -100,6 +100,7 @@ func (client ExpressRouteConnectionsClient) CreateOrUpdatePreparer(ctx context.C
// http.Response Body if it receives an error.
func (client ExpressRouteConnectionsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteConnectionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -147,7 +148,7 @@ func (client ExpressRouteConnectionsClient) Delete(ctx context.Context, resource
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -180,6 +181,7 @@ func (client ExpressRouteConnectionsClient) DeletePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client ExpressRouteConnectionsClient) DeleteSender(req *http.Request) (future ExpressRouteConnectionsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressroutecrossconnectionpeerings.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressroutecrossconnectionpeerings.go
index 306483cbdeaf..790120212719 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressroutecrossconnectionpeerings.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressroutecrossconnectionpeerings.go
@@ -70,7 +70,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdate(ctx conte
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -106,6 +106,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdatePreparer(c
// http.Response Body if it receives an error.
func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -153,7 +154,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) Delete(ctx context.Conte
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -186,6 +187,7 @@ func (client ExpressRouteCrossConnectionPeeringsClient) DeletePreparer(ctx conte
// http.Response Body if it receives an error.
func (client ExpressRouteCrossConnectionPeeringsClient) DeleteSender(req *http.Request) (future ExpressRouteCrossConnectionPeeringsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressroutecrossconnections.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressroutecrossconnections.go
index 27f336901ab9..5903044ce3ca 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressroutecrossconnections.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressroutecrossconnections.go
@@ -55,7 +55,7 @@ func (client ExpressRouteCrossConnectionsClient) CreateOrUpdate(ctx context.Cont
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -90,6 +90,7 @@ func (client ExpressRouteCrossConnectionsClient) CreateOrUpdatePreparer(ctx cont
// http.Response Body if it receives an error.
func (client ExpressRouteCrossConnectionsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteCrossConnectionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -328,7 +329,7 @@ func (client ExpressRouteCrossConnectionsClient) ListArpTable(ctx context.Contex
result, err = client.ListArpTableSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListArpTable", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListArpTable", result.Response(), "Failure sending request")
return
}
@@ -362,6 +363,7 @@ func (client ExpressRouteCrossConnectionsClient) ListArpTablePreparer(ctx contex
// http.Response Body if it receives an error.
func (client ExpressRouteCrossConnectionsClient) ListArpTableSender(req *http.Request) (future ExpressRouteCrossConnectionsListArpTableFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -527,7 +529,7 @@ func (client ExpressRouteCrossConnectionsClient) ListRoutesTable(ctx context.Con
result, err = client.ListRoutesTableSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListRoutesTable", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListRoutesTable", result.Response(), "Failure sending request")
return
}
@@ -561,6 +563,7 @@ func (client ExpressRouteCrossConnectionsClient) ListRoutesTablePreparer(ctx con
// http.Response Body if it receives an error.
func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSender(req *http.Request) (future ExpressRouteCrossConnectionsListRoutesTableFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -610,7 +613,7 @@ func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummary(ctx cont
result, err = client.ListRoutesTableSummarySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListRoutesTableSummary", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListRoutesTableSummary", result.Response(), "Failure sending request")
return
}
@@ -644,6 +647,7 @@ func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummaryPreparer(
// http.Response Body if it receives an error.
func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummarySender(req *http.Request) (future ExpressRouteCrossConnectionsListRoutesTableSummaryFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressroutegateways.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressroutegateways.go
index 4b3b6b3682d3..1dcd0b6d859c 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressroutegateways.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressroutegateways.go
@@ -63,7 +63,7 @@ func (client ExpressRouteGatewaysClient) CreateOrUpdate(ctx context.Context, res
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -98,6 +98,7 @@ func (client ExpressRouteGatewaysClient) CreateOrUpdatePreparer(ctx context.Cont
// http.Response Body if it receives an error.
func (client ExpressRouteGatewaysClient) CreateOrUpdateSender(req *http.Request) (future ExpressRouteGatewaysCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -145,7 +146,7 @@ func (client ExpressRouteGatewaysClient) Delete(ctx context.Context, resourceGro
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -177,6 +178,7 @@ func (client ExpressRouteGatewaysClient) DeletePreparer(ctx context.Context, res
// http.Response Body if it receives an error.
func (client ExpressRouteGatewaysClient) DeleteSender(req *http.Request) (future ExpressRouteGatewaysDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -444,7 +446,7 @@ func (client ExpressRouteGatewaysClient) UpdateTags(ctx context.Context, resourc
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -478,6 +480,7 @@ func (client ExpressRouteGatewaysClient) UpdateTagsPreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client ExpressRouteGatewaysClient) UpdateTagsSender(req *http.Request) (future ExpressRouteGatewaysUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressrouteports.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressrouteports.go
index 144302f713fa..b7af0d6018c5 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressrouteports.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/expressrouteports.go
@@ -56,7 +56,7 @@ func (client ExpressRoutePortsClient) CreateOrUpdate(ctx context.Context, resour
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -91,6 +91,7 @@ func (client ExpressRoutePortsClient) CreateOrUpdatePreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client ExpressRoutePortsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRoutePortsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -137,7 +138,7 @@ func (client ExpressRoutePortsClient) Delete(ctx context.Context, resourceGroupN
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -169,6 +170,7 @@ func (client ExpressRoutePortsClient) DeletePreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client ExpressRoutePortsClient) DeleteSender(req *http.Request) (future ExpressRoutePortsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/firewallpolicies.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/firewallpolicies.go
index 1e776682579b..c85fa8941b23 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/firewallpolicies.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/firewallpolicies.go
@@ -55,7 +55,7 @@ func (client FirewallPoliciesClient) CreateOrUpdate(ctx context.Context, resourc
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -90,6 +90,7 @@ func (client FirewallPoliciesClient) CreateOrUpdatePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client FirewallPoliciesClient) CreateOrUpdateSender(req *http.Request) (future FirewallPoliciesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -136,7 +137,7 @@ func (client FirewallPoliciesClient) Delete(ctx context.Context, resourceGroupNa
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.FirewallPoliciesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -168,6 +169,7 @@ func (client FirewallPoliciesClient) DeletePreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client FirewallPoliciesClient) DeleteSender(req *http.Request) (future FirewallPoliciesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/firewallpolicyrulecollectiongroups.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/firewallpolicyrulecollectiongroups.go
index 2488c8d1edc4..b22194bb72c3 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/firewallpolicyrulecollectiongroups.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/firewallpolicyrulecollectiongroups.go
@@ -69,7 +69,7 @@ func (client FirewallPolicyRuleCollectionGroupsClient) CreateOrUpdate(ctx contex
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleCollectionGroupsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleCollectionGroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -106,6 +106,7 @@ func (client FirewallPolicyRuleCollectionGroupsClient) CreateOrUpdatePreparer(ct
// http.Response Body if it receives an error.
func (client FirewallPolicyRuleCollectionGroupsClient) CreateOrUpdateSender(req *http.Request) (future FirewallPolicyRuleCollectionGroupsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -153,7 +154,7 @@ func (client FirewallPolicyRuleCollectionGroupsClient) Delete(ctx context.Contex
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleCollectionGroupsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.FirewallPolicyRuleCollectionGroupsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -186,6 +187,7 @@ func (client FirewallPolicyRuleCollectionGroupsClient) DeletePreparer(ctx contex
// http.Response Body if it receives an error.
func (client FirewallPolicyRuleCollectionGroupsClient) DeleteSender(req *http.Request) (future FirewallPolicyRuleCollectionGroupsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/flowlogs.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/flowlogs.go
index 1562732af904..965bab5e2ae7 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/flowlogs.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/flowlogs.go
@@ -65,7 +65,7 @@ func (client FlowLogsClient) CreateOrUpdate(ctx context.Context, resourceGroupNa
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.FlowLogsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.FlowLogsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -101,6 +101,7 @@ func (client FlowLogsClient) CreateOrUpdatePreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client FlowLogsClient) CreateOrUpdateSender(req *http.Request) (future FlowLogsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -148,7 +149,7 @@ func (client FlowLogsClient) Delete(ctx context.Context, resourceGroupName strin
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.FlowLogsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.FlowLogsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -181,6 +182,7 @@ func (client FlowLogsClient) DeletePreparer(ctx context.Context, resourceGroupNa
// http.Response Body if it receives an error.
func (client FlowLogsClient) DeleteSender(req *http.Request) (future FlowLogsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/hubroutetables.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/hubroutetables.go
index 845ae80cb456..6551acf62e7e 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/hubroutetables.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/hubroutetables.go
@@ -55,7 +55,7 @@ func (client HubRouteTablesClient) CreateOrUpdate(ctx context.Context, resourceG
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.HubRouteTablesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.HubRouteTablesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -92,6 +92,7 @@ func (client HubRouteTablesClient) CreateOrUpdatePreparer(ctx context.Context, r
// http.Response Body if it receives an error.
func (client HubRouteTablesClient) CreateOrUpdateSender(req *http.Request) (future HubRouteTablesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -139,7 +140,7 @@ func (client HubRouteTablesClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.HubRouteTablesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.HubRouteTablesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -172,6 +173,7 @@ func (client HubRouteTablesClient) DeletePreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client HubRouteTablesClient) DeleteSender(req *http.Request) (future HubRouteTablesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/hubvirtualnetworkconnections.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/hubvirtualnetworkconnections.go
index a58809578059..11fbce0d1b32 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/hubvirtualnetworkconnections.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/hubvirtualnetworkconnections.go
@@ -57,7 +57,7 @@ func (client HubVirtualNetworkConnectionsClient) CreateOrUpdate(ctx context.Cont
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -93,6 +93,7 @@ func (client HubVirtualNetworkConnectionsClient) CreateOrUpdatePreparer(ctx cont
// http.Response Body if it receives an error.
func (client HubVirtualNetworkConnectionsClient) CreateOrUpdateSender(req *http.Request) (future HubVirtualNetworkConnectionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -140,7 +141,7 @@ func (client HubVirtualNetworkConnectionsClient) Delete(ctx context.Context, res
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -173,6 +174,7 @@ func (client HubVirtualNetworkConnectionsClient) DeletePreparer(ctx context.Cont
// http.Response Body if it receives an error.
func (client HubVirtualNetworkConnectionsClient) DeleteSender(req *http.Request) (future HubVirtualNetworkConnectionsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/inboundnatrules.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/inboundnatrules.go
index 06ea306c7416..38eba29463e5 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/inboundnatrules.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/inboundnatrules.go
@@ -77,7 +77,7 @@ func (client InboundNatRulesClient) CreateOrUpdate(ctx context.Context, resource
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -114,6 +114,7 @@ func (client InboundNatRulesClient) CreateOrUpdatePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client InboundNatRulesClient) CreateOrUpdateSender(req *http.Request) (future InboundNatRulesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -161,7 +162,7 @@ func (client InboundNatRulesClient) Delete(ctx context.Context, resourceGroupNam
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -194,6 +195,7 @@ func (client InboundNatRulesClient) DeletePreparer(ctx context.Context, resource
// http.Response Body if it receives an error.
func (client InboundNatRulesClient) DeleteSender(req *http.Request) (future InboundNatRulesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/inboundsecurityrule.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/inboundsecurityrule.go
index a6c7b4ca3ca9..e2296fcb5a3b 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/inboundsecurityrule.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/inboundsecurityrule.go
@@ -57,7 +57,7 @@ func (client InboundSecurityRuleClient) CreateOrUpdate(ctx context.Context, reso
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.InboundSecurityRuleClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.InboundSecurityRuleClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -94,6 +94,7 @@ func (client InboundSecurityRuleClient) CreateOrUpdatePreparer(ctx context.Conte
// http.Response Body if it receives an error.
func (client InboundSecurityRuleClient) CreateOrUpdateSender(req *http.Request) (future InboundSecurityRuleCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/interfacesgroup.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/interfacesgroup.go
index a7e6f7e56667..58c91cc78fdb 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/interfacesgroup.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/interfacesgroup.go
@@ -54,7 +54,7 @@ func (client InterfacesClient) CreateOrUpdate(ctx context.Context, resourceGroup
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -89,6 +89,7 @@ func (client InterfacesClient) CreateOrUpdatePreparer(ctx context.Context, resou
// http.Response Body if it receives an error.
func (client InterfacesClient) CreateOrUpdateSender(req *http.Request) (future InterfacesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -135,7 +136,7 @@ func (client InterfacesClient) Delete(ctx context.Context, resourceGroupName str
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -167,6 +168,7 @@ func (client InterfacesClient) DeletePreparer(ctx context.Context, resourceGroup
// http.Response Body if it receives an error.
func (client InterfacesClient) DeleteSender(req *http.Request) (future InterfacesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -376,7 +378,7 @@ func (client InterfacesClient) GetEffectiveRouteTable(ctx context.Context, resou
result, err = client.GetEffectiveRouteTableSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetEffectiveRouteTable", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetEffectiveRouteTable", result.Response(), "Failure sending request")
return
}
@@ -408,6 +410,7 @@ func (client InterfacesClient) GetEffectiveRouteTablePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client InterfacesClient) GetEffectiveRouteTableSender(req *http.Request) (future InterfacesGetEffectiveRouteTableFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1093,7 +1096,7 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroups(ctx context.Co
result, err = client.ListEffectiveNetworkSecurityGroupsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListEffectiveNetworkSecurityGroups", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListEffectiveNetworkSecurityGroups", result.Response(), "Failure sending request")
return
}
@@ -1125,6 +1128,7 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsPreparer(ctx co
// http.Response Body if it receives an error.
func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsSender(req *http.Request) (future InterfacesListEffectiveNetworkSecurityGroupsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/interfacetapconfigurations.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/interfacetapconfigurations.go
index c1100b15f93a..881dc349ae86 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/interfacetapconfigurations.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/interfacetapconfigurations.go
@@ -96,7 +96,7 @@ func (client InterfaceTapConfigurationsClient) CreateOrUpdate(ctx context.Contex
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -133,6 +133,7 @@ func (client InterfaceTapConfigurationsClient) CreateOrUpdatePreparer(ctx contex
// http.Response Body if it receives an error.
func (client InterfaceTapConfigurationsClient) CreateOrUpdateSender(req *http.Request) (future InterfaceTapConfigurationsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -180,7 +181,7 @@ func (client InterfaceTapConfigurationsClient) Delete(ctx context.Context, resou
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -213,6 +214,7 @@ func (client InterfaceTapConfigurationsClient) DeletePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client InterfaceTapConfigurationsClient) DeleteSender(req *http.Request) (future InterfaceTapConfigurationsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/ipallocations.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/ipallocations.go
index 54b78a9ff019..ae0cded0e2f1 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/ipallocations.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/ipallocations.go
@@ -54,7 +54,7 @@ func (client IPAllocationsClient) CreateOrUpdate(ctx context.Context, resourceGr
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.IPAllocationsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.IPAllocationsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -89,6 +89,7 @@ func (client IPAllocationsClient) CreateOrUpdatePreparer(ctx context.Context, re
// http.Response Body if it receives an error.
func (client IPAllocationsClient) CreateOrUpdateSender(req *http.Request) (future IPAllocationsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -135,7 +136,7 @@ func (client IPAllocationsClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.IPAllocationsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.IPAllocationsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -167,6 +168,7 @@ func (client IPAllocationsClient) DeletePreparer(ctx context.Context, resourceGr
// http.Response Body if it receives an error.
func (client IPAllocationsClient) DeleteSender(req *http.Request) (future IPAllocationsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/ipgroups.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/ipgroups.go
index 61cd852140fe..34aa7d0b896c 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/ipgroups.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/ipgroups.go
@@ -54,7 +54,7 @@ func (client IPGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupNa
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -89,6 +89,7 @@ func (client IPGroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client IPGroupsClient) CreateOrUpdateSender(req *http.Request) (future IPGroupsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -135,7 +136,7 @@ func (client IPGroupsClient) Delete(ctx context.Context, resourceGroupName strin
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.IPGroupsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -167,6 +168,7 @@ func (client IPGroupsClient) DeletePreparer(ctx context.Context, resourceGroupNa
// http.Response Body if it receives an error.
func (client IPGroupsClient) DeleteSender(req *http.Request) (future IPGroupsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/loadbalancerbackendaddresspools.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/loadbalancerbackendaddresspools.go
index 009ab1c2b72e..395e3427621e 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/loadbalancerbackendaddresspools.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/loadbalancerbackendaddresspools.go
@@ -56,7 +56,7 @@ func (client LoadBalancerBackendAddressPoolsClient) CreateOrUpdate(ctx context.C
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -93,6 +93,7 @@ func (client LoadBalancerBackendAddressPoolsClient) CreateOrUpdatePreparer(ctx c
// http.Response Body if it receives an error.
func (client LoadBalancerBackendAddressPoolsClient) CreateOrUpdateSender(req *http.Request) (future LoadBalancerBackendAddressPoolsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -140,7 +141,7 @@ func (client LoadBalancerBackendAddressPoolsClient) Delete(ctx context.Context,
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -173,6 +174,7 @@ func (client LoadBalancerBackendAddressPoolsClient) DeletePreparer(ctx context.C
// http.Response Body if it receives an error.
func (client LoadBalancerBackendAddressPoolsClient) DeleteSender(req *http.Request) (future LoadBalancerBackendAddressPoolsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/loadbalancers.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/loadbalancers.go
index 0aa8cffaea95..02766bd8002b 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/loadbalancers.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/loadbalancers.go
@@ -54,7 +54,7 @@ func (client LoadBalancersClient) CreateOrUpdate(ctx context.Context, resourceGr
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -89,6 +89,7 @@ func (client LoadBalancersClient) CreateOrUpdatePreparer(ctx context.Context, re
// http.Response Body if it receives an error.
func (client LoadBalancersClient) CreateOrUpdateSender(req *http.Request) (future LoadBalancersCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -135,7 +136,7 @@ func (client LoadBalancersClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -167,6 +168,7 @@ func (client LoadBalancersClient) DeletePreparer(ctx context.Context, resourceGr
// http.Response Body if it receives an error.
func (client LoadBalancersClient) DeleteSender(req *http.Request) (future LoadBalancersDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -521,7 +523,7 @@ func (client LoadBalancersClient) SwapPublicIPAddresses(ctx context.Context, loc
result, err = client.SwapPublicIPAddressesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "SwapPublicIPAddresses", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "SwapPublicIPAddresses", result.Response(), "Failure sending request")
return
}
@@ -554,6 +556,7 @@ func (client LoadBalancersClient) SwapPublicIPAddressesPreparer(ctx context.Cont
// http.Response Body if it receives an error.
func (client LoadBalancersClient) SwapPublicIPAddressesSender(req *http.Request) (future LoadBalancersSwapPublicIPAddressesFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/localnetworkgateways.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/localnetworkgateways.go
index 04d2e2888be9..163240394d21 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/localnetworkgateways.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/localnetworkgateways.go
@@ -71,7 +71,7 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdate(ctx context.Context, res
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -106,6 +106,7 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Cont
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future LocalNetworkGatewaysCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -158,7 +159,7 @@ func (client LocalNetworkGatewaysClient) Delete(ctx context.Context, resourceGro
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -190,6 +191,7 @@ func (client LocalNetworkGatewaysClient) DeletePreparer(ctx context.Context, res
// http.Response Body if it receives an error.
func (client LocalNetworkGatewaysClient) DeleteSender(req *http.Request) (future LocalNetworkGatewaysDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/natgateways.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/natgateways.go
index 444cf20a6676..86f1705cc808 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/natgateways.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/natgateways.go
@@ -54,7 +54,7 @@ func (client NatGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGrou
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -89,6 +89,7 @@ func (client NatGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client NatGatewaysClient) CreateOrUpdateSender(req *http.Request) (future NatGatewaysCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -135,7 +136,7 @@ func (client NatGatewaysClient) Delete(ctx context.Context, resourceGroupName st
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.NatGatewaysClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -167,6 +168,7 @@ func (client NatGatewaysClient) DeletePreparer(ctx context.Context, resourceGrou
// http.Response Body if it receives an error.
func (client NatGatewaysClient) DeleteSender(req *http.Request) (future NatGatewaysDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/natrules.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/natrules.go
index 7f910d65ca98..e7fbe5c3c6d6 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/natrules.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/natrules.go
@@ -55,7 +55,7 @@ func (client NatRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupNa
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.NatRulesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.NatRulesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -92,6 +92,7 @@ func (client NatRulesClient) CreateOrUpdatePreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client NatRulesClient) CreateOrUpdateSender(req *http.Request) (future NatRulesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -139,7 +140,7 @@ func (client NatRulesClient) Delete(ctx context.Context, resourceGroupName strin
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.NatRulesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.NatRulesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -172,6 +173,7 @@ func (client NatRulesClient) DeletePreparer(ctx context.Context, resourceGroupNa
// http.Response Body if it receives an error.
func (client NatRulesClient) DeleteSender(req *http.Request) (future NatRulesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/p2svpngateways.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/p2svpngateways.go
index 728c4482a82b..2e7187fff23e 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/p2svpngateways.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/p2svpngateways.go
@@ -54,7 +54,7 @@ func (client P2sVpnGatewaysClient) CreateOrUpdate(ctx context.Context, resourceG
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -89,6 +89,7 @@ func (client P2sVpnGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, r
// http.Response Body if it receives an error.
func (client P2sVpnGatewaysClient) CreateOrUpdateSender(req *http.Request) (future P2sVpnGatewaysCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -135,7 +136,7 @@ func (client P2sVpnGatewaysClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -167,6 +168,7 @@ func (client P2sVpnGatewaysClient) DeletePreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client P2sVpnGatewaysClient) DeleteSender(req *http.Request) (future P2sVpnGatewaysDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -214,7 +216,7 @@ func (client P2sVpnGatewaysClient) DisconnectP2sVpnConnections(ctx context.Conte
result, err = client.DisconnectP2sVpnConnectionsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "DisconnectP2sVpnConnections", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "DisconnectP2sVpnConnections", result.Response(), "Failure sending request")
return
}
@@ -248,6 +250,7 @@ func (client P2sVpnGatewaysClient) DisconnectP2sVpnConnectionsPreparer(ctx conte
// http.Response Body if it receives an error.
func (client P2sVpnGatewaysClient) DisconnectP2sVpnConnectionsSender(req *http.Request) (future P2sVpnGatewaysDisconnectP2sVpnConnectionsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -294,7 +297,7 @@ func (client P2sVpnGatewaysClient) GenerateVpnProfile(ctx context.Context, resou
result, err = client.GenerateVpnProfileSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "GenerateVpnProfile", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "GenerateVpnProfile", result.Response(), "Failure sending request")
return
}
@@ -328,6 +331,7 @@ func (client P2sVpnGatewaysClient) GenerateVpnProfilePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client P2sVpnGatewaysClient) GenerateVpnProfileSender(req *http.Request) (future P2sVpnGatewaysGenerateVpnProfileFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -451,7 +455,7 @@ func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealth(ctx context.Context
result, err = client.GetP2sVpnConnectionHealthSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "GetP2sVpnConnectionHealth", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "GetP2sVpnConnectionHealth", result.Response(), "Failure sending request")
return
}
@@ -483,6 +487,7 @@ func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthPreparer(ctx context
// http.Response Body if it receives an error.
func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthSender(req *http.Request) (future P2sVpnGatewaysGetP2sVpnConnectionHealthFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -531,7 +536,7 @@ func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthDetailed(ctx context
result, err = client.GetP2sVpnConnectionHealthDetailedSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "GetP2sVpnConnectionHealthDetailed", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "GetP2sVpnConnectionHealthDetailed", result.Response(), "Failure sending request")
return
}
@@ -565,6 +570,7 @@ func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthDetailedPreparer(ctx
// http.Response Body if it receives an error.
func (client P2sVpnGatewaysClient) GetP2sVpnConnectionHealthDetailedSender(req *http.Request) (future P2sVpnGatewaysGetP2sVpnConnectionHealthDetailedFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -840,7 +846,7 @@ func (client P2sVpnGatewaysClient) Reset(ctx context.Context, resourceGroupName
result, err = client.ResetSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "Reset", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "Reset", result.Response(), "Failure sending request")
return
}
@@ -872,6 +878,7 @@ func (client P2sVpnGatewaysClient) ResetPreparer(ctx context.Context, resourceGr
// http.Response Body if it receives an error.
func (client P2sVpnGatewaysClient) ResetSender(req *http.Request) (future P2SVpnGatewaysResetFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -919,7 +926,7 @@ func (client P2sVpnGatewaysClient) UpdateTags(ctx context.Context, resourceGroup
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -953,6 +960,7 @@ func (client P2sVpnGatewaysClient) UpdateTagsPreparer(ctx context.Context, resou
// http.Response Body if it receives an error.
func (client P2sVpnGatewaysClient) UpdateTagsSender(req *http.Request) (future P2sVpnGatewaysUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/packetcaptures.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/packetcaptures.go
index 41560c2a4c16..ab2096e4e614 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/packetcaptures.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/packetcaptures.go
@@ -77,7 +77,7 @@ func (client PacketCapturesClient) Create(ctx context.Context, resourceGroupName
result, err = client.CreateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Create", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Create", result.Response(), "Failure sending request")
return
}
@@ -112,6 +112,7 @@ func (client PacketCapturesClient) CreatePreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client PacketCapturesClient) CreateSender(req *http.Request) (future PacketCapturesCreateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -159,7 +160,7 @@ func (client PacketCapturesClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -192,6 +193,7 @@ func (client PacketCapturesClient) DeletePreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client PacketCapturesClient) DeleteSender(req *http.Request) (future PacketCapturesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -316,7 +318,7 @@ func (client PacketCapturesClient) GetStatus(ctx context.Context, resourceGroupN
result, err = client.GetStatusSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "GetStatus", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "GetStatus", result.Response(), "Failure sending request")
return
}
@@ -349,6 +351,7 @@ func (client PacketCapturesClient) GetStatusPreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client PacketCapturesClient) GetStatusSender(req *http.Request) (future PacketCapturesGetStatusFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -472,7 +475,7 @@ func (client PacketCapturesClient) Stop(ctx context.Context, resourceGroupName s
result, err = client.StopSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Stop", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Stop", result.Response(), "Failure sending request")
return
}
@@ -505,6 +508,7 @@ func (client PacketCapturesClient) StopPreparer(ctx context.Context, resourceGro
// http.Response Body if it receives an error.
func (client PacketCapturesClient) StopSender(req *http.Request) (future PacketCapturesStopFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/privatednszonegroups.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/privatednszonegroups.go
index 5cb59cecb1a6..6a190ee64e1d 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/privatednszonegroups.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/privatednszonegroups.go
@@ -56,7 +56,7 @@ func (client PrivateDNSZoneGroupsClient) CreateOrUpdate(ctx context.Context, res
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateDNSZoneGroupsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PrivateDNSZoneGroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -92,6 +92,7 @@ func (client PrivateDNSZoneGroupsClient) CreateOrUpdatePreparer(ctx context.Cont
// http.Response Body if it receives an error.
func (client PrivateDNSZoneGroupsClient) CreateOrUpdateSender(req *http.Request) (future PrivateDNSZoneGroupsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -139,7 +140,7 @@ func (client PrivateDNSZoneGroupsClient) Delete(ctx context.Context, resourceGro
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateDNSZoneGroupsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PrivateDNSZoneGroupsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -172,6 +173,7 @@ func (client PrivateDNSZoneGroupsClient) DeletePreparer(ctx context.Context, res
// http.Response Body if it receives an error.
func (client PrivateDNSZoneGroupsClient) DeleteSender(req *http.Request) (future PrivateDNSZoneGroupsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/privateendpoints.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/privateendpoints.go
index 58015381d2fe..0f33921d6e42 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/privateendpoints.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/privateendpoints.go
@@ -55,7 +55,7 @@ func (client PrivateEndpointsClient) CreateOrUpdate(ctx context.Context, resourc
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -90,6 +90,7 @@ func (client PrivateEndpointsClient) CreateOrUpdatePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client PrivateEndpointsClient) CreateOrUpdateSender(req *http.Request) (future PrivateEndpointsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -136,7 +137,7 @@ func (client PrivateEndpointsClient) Delete(ctx context.Context, resourceGroupNa
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PrivateEndpointsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -168,6 +169,7 @@ func (client PrivateEndpointsClient) DeletePreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client PrivateEndpointsClient) DeleteSender(req *http.Request) (future PrivateEndpointsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/privatelinkservices.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/privatelinkservices.go
index 4a57bea8ab4f..a99587d3416a 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/privatelinkservices.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/privatelinkservices.go
@@ -54,7 +54,7 @@ func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibility(ctx co
result, err = client.CheckPrivateLinkServiceVisibilitySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CheckPrivateLinkServiceVisibility", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CheckPrivateLinkServiceVisibility", result.Response(), "Failure sending request")
return
}
@@ -87,6 +87,7 @@ func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityPrepare
// http.Response Body if it receives an error.
func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilitySender(req *http.Request) (future PrivateLinkServicesCheckPrivateLinkServiceVisibilityFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -135,7 +136,7 @@ func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityByResou
result, err = client.CheckPrivateLinkServiceVisibilityByResourceGroupSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CheckPrivateLinkServiceVisibilityByResourceGroup", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CheckPrivateLinkServiceVisibilityByResourceGroup", result.Response(), "Failure sending request")
return
}
@@ -169,6 +170,7 @@ func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityByResou
// http.Response Body if it receives an error.
func (client PrivateLinkServicesClient) CheckPrivateLinkServiceVisibilityByResourceGroupSender(req *http.Request) (future PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -216,7 +218,7 @@ func (client PrivateLinkServicesClient) CreateOrUpdate(ctx context.Context, reso
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -251,6 +253,7 @@ func (client PrivateLinkServicesClient) CreateOrUpdatePreparer(ctx context.Conte
// http.Response Body if it receives an error.
func (client PrivateLinkServicesClient) CreateOrUpdateSender(req *http.Request) (future PrivateLinkServicesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -297,7 +300,7 @@ func (client PrivateLinkServicesClient) Delete(ctx context.Context, resourceGrou
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -329,6 +332,7 @@ func (client PrivateLinkServicesClient) DeletePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client PrivateLinkServicesClient) DeleteSender(req *http.Request) (future PrivateLinkServicesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -375,7 +379,7 @@ func (client PrivateLinkServicesClient) DeletePrivateEndpointConnection(ctx cont
result, err = client.DeletePrivateEndpointConnectionSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "DeletePrivateEndpointConnection", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PrivateLinkServicesClient", "DeletePrivateEndpointConnection", result.Response(), "Failure sending request")
return
}
@@ -408,6 +412,7 @@ func (client PrivateLinkServicesClient) DeletePrivateEndpointConnectionPreparer(
// http.Response Body if it receives an error.
func (client PrivateLinkServicesClient) DeletePrivateEndpointConnectionSender(req *http.Request) (future PrivateLinkServicesDeletePrivateEndpointConnectionFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/profiles.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/profiles.go
index fea9adb0ad87..ca0bc2b3143b 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/profiles.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/profiles.go
@@ -133,7 +133,7 @@ func (client ProfilesClient) Delete(ctx context.Context, resourceGroupName strin
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ProfilesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ProfilesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -165,6 +165,7 @@ func (client ProfilesClient) DeletePreparer(ctx context.Context, resourceGroupNa
// http.Response Body if it receives an error.
func (client ProfilesClient) DeleteSender(req *http.Request) (future ProfilesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/publicipaddresses.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/publicipaddresses.go
index 135c598b2cc1..1416bb9f9dc9 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/publicipaddresses.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/publicipaddresses.go
@@ -69,7 +69,7 @@ func (client PublicIPAddressesClient) CreateOrUpdate(ctx context.Context, resour
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -104,6 +104,7 @@ func (client PublicIPAddressesClient) CreateOrUpdatePreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) CreateOrUpdateSender(req *http.Request) (future PublicIPAddressesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -150,7 +151,7 @@ func (client PublicIPAddressesClient) Delete(ctx context.Context, resourceGroupN
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -182,6 +183,7 @@ func (client PublicIPAddressesClient) DeletePreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client PublicIPAddressesClient) DeleteSender(req *http.Request) (future PublicIPAddressesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/publicipprefixes.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/publicipprefixes.go
index b8b72b2c3917..63280a7baa28 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/publicipprefixes.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/publicipprefixes.go
@@ -55,7 +55,7 @@ func (client PublicIPPrefixesClient) CreateOrUpdate(ctx context.Context, resourc
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -90,6 +90,7 @@ func (client PublicIPPrefixesClient) CreateOrUpdatePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client PublicIPPrefixesClient) CreateOrUpdateSender(req *http.Request) (future PublicIPPrefixesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -136,7 +137,7 @@ func (client PublicIPPrefixesClient) Delete(ctx context.Context, resourceGroupNa
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -168,6 +169,7 @@ func (client PublicIPPrefixesClient) DeletePreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client PublicIPPrefixesClient) DeleteSender(req *http.Request) (future PublicIPPrefixesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/routefilterrules.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/routefilterrules.go
index c5d32e65b244..36f2d3e4e432 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/routefilterrules.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/routefilterrules.go
@@ -66,7 +66,7 @@ func (client RouteFilterRulesClient) CreateOrUpdate(ctx context.Context, resourc
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -102,6 +102,7 @@ func (client RouteFilterRulesClient) CreateOrUpdatePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) CreateOrUpdateSender(req *http.Request) (future RouteFilterRulesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -149,7 +150,7 @@ func (client RouteFilterRulesClient) Delete(ctx context.Context, resourceGroupNa
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -182,6 +183,7 @@ func (client RouteFilterRulesClient) DeletePreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) DeleteSender(req *http.Request) (future RouteFilterRulesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/routefilters.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/routefilters.go
index f4a5f1c1b35c..35fb5bae0b78 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/routefilters.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/routefilters.go
@@ -54,7 +54,7 @@ func (client RouteFiltersClient) CreateOrUpdate(ctx context.Context, resourceGro
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -89,6 +89,7 @@ func (client RouteFiltersClient) CreateOrUpdatePreparer(ctx context.Context, res
// http.Response Body if it receives an error.
func (client RouteFiltersClient) CreateOrUpdateSender(req *http.Request) (future RouteFiltersCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -135,7 +136,7 @@ func (client RouteFiltersClient) Delete(ctx context.Context, resourceGroupName s
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -167,6 +168,7 @@ func (client RouteFiltersClient) DeletePreparer(ctx context.Context, resourceGro
// http.Response Body if it receives an error.
func (client RouteFiltersClient) DeleteSender(req *http.Request) (future RouteFiltersDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/routes.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/routes.go
index f8836015c3b5..4ff180534ff3 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/routes.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/routes.go
@@ -55,7 +55,7 @@ func (client RoutesClient) CreateOrUpdate(ctx context.Context, resourceGroupName
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RoutesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -91,6 +91,7 @@ func (client RoutesClient) CreateOrUpdatePreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client RoutesClient) CreateOrUpdateSender(req *http.Request) (future RoutesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -138,7 +139,7 @@ func (client RoutesClient) Delete(ctx context.Context, resourceGroupName string,
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RoutesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RoutesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -171,6 +172,7 @@ func (client RoutesClient) DeletePreparer(ctx context.Context, resourceGroupName
// http.Response Body if it receives an error.
func (client RoutesClient) DeleteSender(req *http.Request) (future RoutesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/routetables.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/routetables.go
index 08365f0c06e2..c61fddb9b131 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/routetables.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/routetables.go
@@ -54,7 +54,7 @@ func (client RouteTablesClient) CreateOrUpdate(ctx context.Context, resourceGrou
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -89,6 +89,7 @@ func (client RouteTablesClient) CreateOrUpdatePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client RouteTablesClient) CreateOrUpdateSender(req *http.Request) (future RouteTablesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -135,7 +136,7 @@ func (client RouteTablesClient) Delete(ctx context.Context, resourceGroupName st
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -167,6 +168,7 @@ func (client RouteTablesClient) DeletePreparer(ctx context.Context, resourceGrou
// http.Response Body if it receives an error.
func (client RouteTablesClient) DeleteSender(req *http.Request) (future RouteTablesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/securitygroups.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/securitygroups.go
index a86c3d156247..5fa8b0db3f55 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/securitygroups.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/securitygroups.go
@@ -54,7 +54,7 @@ func (client SecurityGroupsClient) CreateOrUpdate(ctx context.Context, resourceG
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -89,6 +89,7 @@ func (client SecurityGroupsClient) CreateOrUpdatePreparer(ctx context.Context, r
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (future SecurityGroupsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -135,7 +136,7 @@ func (client SecurityGroupsClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -167,6 +168,7 @@ func (client SecurityGroupsClient) DeletePreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client SecurityGroupsClient) DeleteSender(req *http.Request) (future SecurityGroupsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/securitypartnerproviders.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/securitypartnerproviders.go
index a52483faca7b..b844ef9e3fbe 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/securitypartnerproviders.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/securitypartnerproviders.go
@@ -55,7 +55,7 @@ func (client SecurityPartnerProvidersClient) CreateOrUpdate(ctx context.Context,
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -90,6 +90,7 @@ func (client SecurityPartnerProvidersClient) CreateOrUpdatePreparer(ctx context.
// http.Response Body if it receives an error.
func (client SecurityPartnerProvidersClient) CreateOrUpdateSender(req *http.Request) (future SecurityPartnerProvidersCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -136,7 +137,7 @@ func (client SecurityPartnerProvidersClient) Delete(ctx context.Context, resourc
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SecurityPartnerProvidersClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -168,6 +169,7 @@ func (client SecurityPartnerProvidersClient) DeletePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client SecurityPartnerProvidersClient) DeleteSender(req *http.Request) (future SecurityPartnerProvidersDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/securityrules.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/securityrules.go
index c2e0e1766d28..6a3ea28f44a9 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/securityrules.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/securityrules.go
@@ -55,7 +55,7 @@ func (client SecurityRulesClient) CreateOrUpdate(ctx context.Context, resourceGr
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -91,6 +91,7 @@ func (client SecurityRulesClient) CreateOrUpdatePreparer(ctx context.Context, re
// http.Response Body if it receives an error.
func (client SecurityRulesClient) CreateOrUpdateSender(req *http.Request) (future SecurityRulesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -138,7 +139,7 @@ func (client SecurityRulesClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -171,6 +172,7 @@ func (client SecurityRulesClient) DeletePreparer(ctx context.Context, resourceGr
// http.Response Body if it receives an error.
func (client SecurityRulesClient) DeleteSender(req *http.Request) (future SecurityRulesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/serviceendpointpolicies.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/serviceendpointpolicies.go
index 0bc3fbdae07f..6db4106c0dd0 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/serviceendpointpolicies.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/serviceendpointpolicies.go
@@ -55,7 +55,7 @@ func (client ServiceEndpointPoliciesClient) CreateOrUpdate(ctx context.Context,
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -91,6 +91,7 @@ func (client ServiceEndpointPoliciesClient) CreateOrUpdatePreparer(ctx context.C
// http.Response Body if it receives an error.
func (client ServiceEndpointPoliciesClient) CreateOrUpdateSender(req *http.Request) (future ServiceEndpointPoliciesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -137,7 +138,7 @@ func (client ServiceEndpointPoliciesClient) Delete(ctx context.Context, resource
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -169,6 +170,7 @@ func (client ServiceEndpointPoliciesClient) DeletePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client ServiceEndpointPoliciesClient) DeleteSender(req *http.Request) (future ServiceEndpointPoliciesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/serviceendpointpolicydefinitions.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/serviceendpointpolicydefinitions.go
index 877ebd439462..dfe855ec3a92 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/serviceendpointpolicydefinitions.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/serviceendpointpolicydefinitions.go
@@ -57,7 +57,7 @@ func (client ServiceEndpointPolicyDefinitionsClient) CreateOrUpdate(ctx context.
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -93,6 +93,7 @@ func (client ServiceEndpointPolicyDefinitionsClient) CreateOrUpdatePreparer(ctx
// http.Response Body if it receives an error.
func (client ServiceEndpointPolicyDefinitionsClient) CreateOrUpdateSender(req *http.Request) (future ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -140,7 +141,7 @@ func (client ServiceEndpointPolicyDefinitionsClient) Delete(ctx context.Context,
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -173,6 +174,7 @@ func (client ServiceEndpointPolicyDefinitionsClient) DeletePreparer(ctx context.
// http.Response Body if it receives an error.
func (client ServiceEndpointPolicyDefinitionsClient) DeleteSender(req *http.Request) (future ServiceEndpointPolicyDefinitionsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/subnets.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/subnets.go
index 8dd18d35d55a..5721e13d2a9e 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/subnets.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/subnets.go
@@ -55,7 +55,7 @@ func (client SubnetsClient) CreateOrUpdate(ctx context.Context, resourceGroupNam
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SubnetsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -91,6 +91,7 @@ func (client SubnetsClient) CreateOrUpdatePreparer(ctx context.Context, resource
// http.Response Body if it receives an error.
func (client SubnetsClient) CreateOrUpdateSender(req *http.Request) (future SubnetsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -138,7 +139,7 @@ func (client SubnetsClient) Delete(ctx context.Context, resourceGroupName string
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SubnetsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -171,6 +172,7 @@ func (client SubnetsClient) DeletePreparer(ctx context.Context, resourceGroupNam
// http.Response Body if it receives an error.
func (client SubnetsClient) DeleteSender(req *http.Request) (future SubnetsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -419,7 +421,7 @@ func (client SubnetsClient) PrepareNetworkPolicies(ctx context.Context, resource
result, err = client.PrepareNetworkPoliciesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsClient", "PrepareNetworkPolicies", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SubnetsClient", "PrepareNetworkPolicies", result.Response(), "Failure sending request")
return
}
@@ -454,6 +456,7 @@ func (client SubnetsClient) PrepareNetworkPoliciesPreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client SubnetsClient) PrepareNetworkPoliciesSender(req *http.Request) (future SubnetsPrepareNetworkPoliciesFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -502,7 +505,7 @@ func (client SubnetsClient) UnprepareNetworkPolicies(ctx context.Context, resour
result, err = client.UnprepareNetworkPoliciesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.SubnetsClient", "UnprepareNetworkPolicies", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.SubnetsClient", "UnprepareNetworkPolicies", result.Response(), "Failure sending request")
return
}
@@ -537,6 +540,7 @@ func (client SubnetsClient) UnprepareNetworkPoliciesPreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client SubnetsClient) UnprepareNetworkPoliciesSender(req *http.Request) (future SubnetsUnprepareNetworkPoliciesFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualappliances.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualappliances.go
index ee4d6a1aeb68..e55e359ab7d2 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualappliances.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualappliances.go
@@ -67,7 +67,7 @@ func (client VirtualAppliancesClient) CreateOrUpdate(ctx context.Context, resour
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualAppliancesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualAppliancesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -102,6 +102,7 @@ func (client VirtualAppliancesClient) CreateOrUpdatePreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client VirtualAppliancesClient) CreateOrUpdateSender(req *http.Request) (future VirtualAppliancesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -148,7 +149,7 @@ func (client VirtualAppliancesClient) Delete(ctx context.Context, resourceGroupN
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualAppliancesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualAppliancesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -180,6 +181,7 @@ func (client VirtualAppliancesClient) DeletePreparer(ctx context.Context, resour
// http.Response Body if it receives an error.
func (client VirtualAppliancesClient) DeleteSender(req *http.Request) (future VirtualAppliancesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualappliancesites.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualappliancesites.go
index a772265cff29..223264551d9f 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualappliancesites.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualappliancesites.go
@@ -56,7 +56,7 @@ func (client VirtualApplianceSitesClient) CreateOrUpdate(ctx context.Context, re
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualApplianceSitesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualApplianceSitesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -93,6 +93,7 @@ func (client VirtualApplianceSitesClient) CreateOrUpdatePreparer(ctx context.Con
// http.Response Body if it receives an error.
func (client VirtualApplianceSitesClient) CreateOrUpdateSender(req *http.Request) (future VirtualApplianceSitesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -140,7 +141,7 @@ func (client VirtualApplianceSitesClient) Delete(ctx context.Context, resourceGr
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualApplianceSitesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualApplianceSitesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -173,6 +174,7 @@ func (client VirtualApplianceSitesClient) DeletePreparer(ctx context.Context, re
// http.Response Body if it receives an error.
func (client VirtualApplianceSitesClient) DeleteSender(req *http.Request) (future VirtualApplianceSitesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualhubbgpconnection.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualhubbgpconnection.go
index 261265201e3a..ecec2ce600e5 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualhubbgpconnection.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualhubbgpconnection.go
@@ -69,7 +69,7 @@ func (client VirtualHubBgpConnectionClient) CreateOrUpdate(ctx context.Context,
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -106,6 +106,7 @@ func (client VirtualHubBgpConnectionClient) CreateOrUpdatePreparer(ctx context.C
// http.Response Body if it receives an error.
func (client VirtualHubBgpConnectionClient) CreateOrUpdateSender(req *http.Request) (future VirtualHubBgpConnectionCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -153,7 +154,7 @@ func (client VirtualHubBgpConnectionClient) Delete(ctx context.Context, resource
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -186,6 +187,7 @@ func (client VirtualHubBgpConnectionClient) DeletePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VirtualHubBgpConnectionClient) DeleteSender(req *http.Request) (future VirtualHubBgpConnectionDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualhubbgpconnections.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualhubbgpconnections.go
index ac7204cfb942..305fdd1c87bc 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualhubbgpconnections.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualhubbgpconnections.go
@@ -173,7 +173,7 @@ func (client VirtualHubBgpConnectionsClient) ListAdvertisedRoutes(ctx context.Co
result, err = client.ListAdvertisedRoutesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionsClient", "ListAdvertisedRoutes", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionsClient", "ListAdvertisedRoutes", result.Response(), "Failure sending request")
return
}
@@ -206,6 +206,7 @@ func (client VirtualHubBgpConnectionsClient) ListAdvertisedRoutesPreparer(ctx co
// http.Response Body if it receives an error.
func (client VirtualHubBgpConnectionsClient) ListAdvertisedRoutesSender(req *http.Request) (future VirtualHubBgpConnectionsListAdvertisedRoutesFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -253,7 +254,7 @@ func (client VirtualHubBgpConnectionsClient) ListLearnedRoutes(ctx context.Conte
result, err = client.ListLearnedRoutesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionsClient", "ListLearnedRoutes", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualHubBgpConnectionsClient", "ListLearnedRoutes", result.Response(), "Failure sending request")
return
}
@@ -286,6 +287,7 @@ func (client VirtualHubBgpConnectionsClient) ListLearnedRoutesPreparer(ctx conte
// http.Response Body if it receives an error.
func (client VirtualHubBgpConnectionsClient) ListLearnedRoutesSender(req *http.Request) (future VirtualHubBgpConnectionsListLearnedRoutesFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualhubipconfiguration.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualhubipconfiguration.go
index ebeefc315b1b..1de52f0aab04 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualhubipconfiguration.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualhubipconfiguration.go
@@ -75,7 +75,7 @@ func (client VirtualHubIPConfigurationClient) CreateOrUpdate(ctx context.Context
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubIPConfigurationClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualHubIPConfigurationClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -112,6 +112,7 @@ func (client VirtualHubIPConfigurationClient) CreateOrUpdatePreparer(ctx context
// http.Response Body if it receives an error.
func (client VirtualHubIPConfigurationClient) CreateOrUpdateSender(req *http.Request) (future VirtualHubIPConfigurationCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -159,7 +160,7 @@ func (client VirtualHubIPConfigurationClient) Delete(ctx context.Context, resour
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubIPConfigurationClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualHubIPConfigurationClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -192,6 +193,7 @@ func (client VirtualHubIPConfigurationClient) DeletePreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client VirtualHubIPConfigurationClient) DeleteSender(req *http.Request) (future VirtualHubIPConfigurationDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualhubroutetablev2s.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualhubroutetablev2s.go
index baa2dde0da66..2309aea9ba85 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualhubroutetablev2s.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualhubroutetablev2s.go
@@ -57,7 +57,7 @@ func (client VirtualHubRouteTableV2sClient) CreateOrUpdate(ctx context.Context,
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -93,6 +93,7 @@ func (client VirtualHubRouteTableV2sClient) CreateOrUpdatePreparer(ctx context.C
// http.Response Body if it receives an error.
func (client VirtualHubRouteTableV2sClient) CreateOrUpdateSender(req *http.Request) (future VirtualHubRouteTableV2sCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -140,7 +141,7 @@ func (client VirtualHubRouteTableV2sClient) Delete(ctx context.Context, resource
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualHubRouteTableV2sClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -173,6 +174,7 @@ func (client VirtualHubRouteTableV2sClient) DeletePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VirtualHubRouteTableV2sClient) DeleteSender(req *http.Request) (future VirtualHubRouteTableV2sDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualhubs.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualhubs.go
index ee2cc2f1c69c..152b6a6f8dcc 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualhubs.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualhubs.go
@@ -66,7 +66,7 @@ func (client VirtualHubsClient) CreateOrUpdate(ctx context.Context, resourceGrou
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -101,6 +101,7 @@ func (client VirtualHubsClient) CreateOrUpdatePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client VirtualHubsClient) CreateOrUpdateSender(req *http.Request) (future VirtualHubsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -147,7 +148,7 @@ func (client VirtualHubsClient) Delete(ctx context.Context, resourceGroupName st
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -179,6 +180,7 @@ func (client VirtualHubsClient) DeletePreparer(ctx context.Context, resourceGrou
// http.Response Body if it receives an error.
func (client VirtualHubsClient) DeleteSender(req *http.Request) (future VirtualHubsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -302,7 +304,7 @@ func (client VirtualHubsClient) GetEffectiveVirtualHubRoutes(ctx context.Context
result, err = client.GetEffectiveVirtualHubRoutesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "GetEffectiveVirtualHubRoutes", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "GetEffectiveVirtualHubRoutes", result.Response(), "Failure sending request")
return
}
@@ -339,6 +341,7 @@ func (client VirtualHubsClient) GetEffectiveVirtualHubRoutesPreparer(ctx context
// http.Response Body if it receives an error.
func (client VirtualHubsClient) GetEffectiveVirtualHubRoutesSender(req *http.Request) (future VirtualHubsGetEffectiveVirtualHubRoutesFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualnetworkgatewayconnections.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualnetworkgatewayconnections.go
index 1b836ea7ad88..41714b8f7d08 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualnetworkgatewayconnections.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualnetworkgatewayconnections.go
@@ -93,7 +93,7 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdate(ctx context.
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -128,6 +128,7 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdatePreparer(ctx
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewayConnectionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -174,7 +175,7 @@ func (client VirtualNetworkGatewayConnectionsClient) Delete(ctx context.Context,
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -206,6 +207,7 @@ func (client VirtualNetworkGatewayConnectionsClient) DeletePreparer(ctx context.
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewayConnectionsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -328,7 +330,7 @@ func (client VirtualNetworkGatewayConnectionsClient) GetIkeSas(ctx context.Conte
result, err = client.GetIkeSasSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "GetIkeSas", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "GetIkeSas", result.Response(), "Failure sending request")
return
}
@@ -360,6 +362,7 @@ func (client VirtualNetworkGatewayConnectionsClient) GetIkeSasPreparer(ctx conte
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) GetIkeSasSender(req *http.Request) (future VirtualNetworkGatewayConnectionsGetIkeSasFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -377,7 +380,7 @@ func (client VirtualNetworkGatewayConnectionsClient) GetIkeSasResponder(resp *ht
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
- autorest.ByUnmarshallingJSON(&result),
+ autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
@@ -600,7 +603,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetConnection(ctx context
result, err = client.ResetConnectionSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "ResetConnection", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "ResetConnection", result.Response(), "Failure sending request")
return
}
@@ -632,6 +635,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetConnectionPreparer(ctx
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) ResetConnectionSender(req *http.Request) (future VirtualNetworkGatewayConnectionsResetConnectionFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -690,7 +694,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context.
result, err = client.ResetSharedKeySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "ResetSharedKey", result.Response(), "Failure sending request")
return
}
@@ -724,6 +728,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyPreparer(ctx
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsResetSharedKeyFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -780,7 +785,7 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKey(ctx context.Co
result, err = client.SetSharedKeySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "SetSharedKey", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "SetSharedKey", result.Response(), "Failure sending request")
return
}
@@ -814,6 +819,7 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeyPreparer(ctx co
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeySender(req *http.Request) (future VirtualNetworkGatewayConnectionsSetSharedKeyFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -862,7 +868,7 @@ func (client VirtualNetworkGatewayConnectionsClient) StartPacketCapture(ctx cont
result, err = client.StartPacketCaptureSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "StartPacketCapture", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "StartPacketCapture", result.Response(), "Failure sending request")
return
}
@@ -899,6 +905,7 @@ func (client VirtualNetworkGatewayConnectionsClient) StartPacketCapturePreparer(
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) StartPacketCaptureSender(req *http.Request) (future VirtualNetworkGatewayConnectionsStartPacketCaptureFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -916,7 +923,7 @@ func (client VirtualNetworkGatewayConnectionsClient) StartPacketCaptureResponder
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
- autorest.ByUnmarshallingJSON(&result),
+ autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
@@ -947,7 +954,7 @@ func (client VirtualNetworkGatewayConnectionsClient) StopPacketCapture(ctx conte
result, err = client.StopPacketCaptureSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "StopPacketCapture", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "StopPacketCapture", result.Response(), "Failure sending request")
return
}
@@ -981,6 +988,7 @@ func (client VirtualNetworkGatewayConnectionsClient) StopPacketCapturePreparer(c
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) StopPacketCaptureSender(req *http.Request) (future VirtualNetworkGatewayConnectionsStopPacketCaptureFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -998,7 +1006,7 @@ func (client VirtualNetworkGatewayConnectionsClient) StopPacketCaptureResponder(
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
- autorest.ByUnmarshallingJSON(&result),
+ autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
@@ -1028,7 +1036,7 @@ func (client VirtualNetworkGatewayConnectionsClient) UpdateTags(ctx context.Cont
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -1062,6 +1070,7 @@ func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsPreparer(ctx cont
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayConnectionsClient) UpdateTagsSender(req *http.Request) (future VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualnetworkgatewaynatrules.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualnetworkgatewaynatrules.go
index 6e6752b9e2d0..f9d9aa4b9092 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualnetworkgatewaynatrules.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualnetworkgatewaynatrules.go
@@ -57,7 +57,7 @@ func (client VirtualNetworkGatewayNatRulesClient) CreateOrUpdate(ctx context.Con
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -94,6 +94,7 @@ func (client VirtualNetworkGatewayNatRulesClient) CreateOrUpdatePreparer(ctx con
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayNatRulesClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewayNatRulesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -141,7 +142,7 @@ func (client VirtualNetworkGatewayNatRulesClient) Delete(ctx context.Context, re
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayNatRulesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -174,6 +175,7 @@ func (client VirtualNetworkGatewayNatRulesClient) DeletePreparer(ctx context.Con
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewayNatRulesClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewayNatRulesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualnetworkgateways.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualnetworkgateways.go
index 80c72ec77578..3e58c2ea302c 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualnetworkgateways.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualnetworkgateways.go
@@ -69,7 +69,7 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdate(ctx context.Context, r
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -104,6 +104,7 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdatePreparer(ctx context.Co
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkGatewaysCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -150,7 +151,7 @@ func (client VirtualNetworkGatewaysClient) Delete(ctx context.Context, resourceG
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -182,6 +183,7 @@ func (client VirtualNetworkGatewaysClient) DeletePreparer(ctx context.Context, r
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) DeleteSender(req *http.Request) (future VirtualNetworkGatewaysDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -229,7 +231,7 @@ func (client VirtualNetworkGatewaysClient) DisconnectVirtualNetworkGatewayVpnCon
result, err = client.DisconnectVirtualNetworkGatewayVpnConnectionsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "DisconnectVirtualNetworkGatewayVpnConnections", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "DisconnectVirtualNetworkGatewayVpnConnections", result.Response(), "Failure sending request")
return
}
@@ -263,6 +265,7 @@ func (client VirtualNetworkGatewaysClient) DisconnectVirtualNetworkGatewayVpnCon
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) DisconnectVirtualNetworkGatewayVpnConnectionsSender(req *http.Request) (future VirtualNetworkGatewaysDisconnectVirtualNetworkGatewayVpnConnectionsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -310,7 +313,7 @@ func (client VirtualNetworkGatewaysClient) Generatevpnclientpackage(ctx context.
result, err = client.GeneratevpnclientpackageSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Generatevpnclientpackage", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Generatevpnclientpackage", result.Response(), "Failure sending request")
return
}
@@ -344,6 +347,7 @@ func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackagePreparer(ctx
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackageSender(req *http.Request) (future VirtualNetworkGatewaysGeneratevpnclientpackageFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -361,7 +365,7 @@ func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackageResponder(res
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
- autorest.ByUnmarshallingJSON(&result),
+ autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
@@ -392,7 +396,7 @@ func (client VirtualNetworkGatewaysClient) GenerateVpnProfile(ctx context.Contex
result, err = client.GenerateVpnProfileSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GenerateVpnProfile", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GenerateVpnProfile", result.Response(), "Failure sending request")
return
}
@@ -426,6 +430,7 @@ func (client VirtualNetworkGatewaysClient) GenerateVpnProfilePreparer(ctx contex
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GenerateVpnProfileSender(req *http.Request) (future VirtualNetworkGatewaysGenerateVpnProfileFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -443,7 +448,7 @@ func (client VirtualNetworkGatewaysClient) GenerateVpnProfileResponder(resp *htt
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
- autorest.ByUnmarshallingJSON(&result),
+ autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
@@ -550,7 +555,7 @@ func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutes(ctx context.Conte
result, err = client.GetAdvertisedRoutesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetAdvertisedRoutes", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetAdvertisedRoutes", result.Response(), "Failure sending request")
return
}
@@ -583,6 +588,7 @@ func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesPreparer(ctx conte
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetAdvertisedRoutesFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -630,7 +636,7 @@ func (client VirtualNetworkGatewaysClient) GetBgpPeerStatus(ctx context.Context,
result, err = client.GetBgpPeerStatusSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetBgpPeerStatus", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetBgpPeerStatus", result.Response(), "Failure sending request")
return
}
@@ -665,6 +671,7 @@ func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusPreparer(ctx context.
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusSender(req *http.Request) (future VirtualNetworkGatewaysGetBgpPeerStatusFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -712,7 +719,7 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutes(ctx context.Context,
result, err = client.GetLearnedRoutesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetLearnedRoutes", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetLearnedRoutes", result.Response(), "Failure sending request")
return
}
@@ -744,6 +751,7 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutesPreparer(ctx context.
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetLearnedRoutesSender(req *http.Request) (future VirtualNetworkGatewaysGetLearnedRoutesFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -791,7 +799,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnclientConnectionHealth(ctx cont
result, err = client.GetVpnclientConnectionHealthSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnclientConnectionHealth", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnclientConnectionHealth", result.Response(), "Failure sending request")
return
}
@@ -823,6 +831,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnclientConnectionHealthPreparer(
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetVpnclientConnectionHealthSender(req *http.Request) (future VirtualNetworkGatewaysGetVpnclientConnectionHealthFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -871,7 +880,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParameters(ctx conte
result, err = client.GetVpnclientIpsecParametersSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnclientIpsecParameters", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnclientIpsecParameters", result.Response(), "Failure sending request")
return
}
@@ -903,6 +912,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParametersPreparer(c
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParametersSender(req *http.Request) (future VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -950,7 +960,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURL(ctx context.C
result, err = client.GetVpnProfilePackageURLSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnProfilePackageURL", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnProfilePackageURL", result.Response(), "Failure sending request")
return
}
@@ -982,6 +992,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLPreparer(ctx c
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLSender(req *http.Request) (future VirtualNetworkGatewaysGetVpnProfilePackageURLFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -999,7 +1010,7 @@ func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLResponder(resp
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
- autorest.ByUnmarshallingJSON(&result),
+ autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
@@ -1264,7 +1275,7 @@ func (client VirtualNetworkGatewaysClient) Reset(ctx context.Context, resourceGr
result, err = client.ResetSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Reset", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Reset", result.Response(), "Failure sending request")
return
}
@@ -1299,6 +1310,7 @@ func (client VirtualNetworkGatewaysClient) ResetPreparer(ctx context.Context, re
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) ResetSender(req *http.Request) (future VirtualNetworkGatewaysResetFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1346,7 +1358,7 @@ func (client VirtualNetworkGatewaysClient) ResetVpnClientSharedKey(ctx context.C
result, err = client.ResetVpnClientSharedKeySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "ResetVpnClientSharedKey", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "ResetVpnClientSharedKey", result.Response(), "Failure sending request")
return
}
@@ -1378,6 +1390,7 @@ func (client VirtualNetworkGatewaysClient) ResetVpnClientSharedKeyPreparer(ctx c
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) ResetVpnClientSharedKeySender(req *http.Request) (future VirtualNetworkGatewaysResetVpnClientSharedKeyFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1433,7 +1446,7 @@ func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParameters(ctx conte
result, err = client.SetVpnclientIpsecParametersSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "SetVpnclientIpsecParameters", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "SetVpnclientIpsecParameters", result.Response(), "Failure sending request")
return
}
@@ -1467,6 +1480,7 @@ func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParametersPreparer(c
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParametersSender(req *http.Request) (future VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1514,7 +1528,7 @@ func (client VirtualNetworkGatewaysClient) StartPacketCapture(ctx context.Contex
result, err = client.StartPacketCaptureSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "StartPacketCapture", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "StartPacketCapture", result.Response(), "Failure sending request")
return
}
@@ -1551,6 +1565,7 @@ func (client VirtualNetworkGatewaysClient) StartPacketCapturePreparer(ctx contex
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) StartPacketCaptureSender(req *http.Request) (future VirtualNetworkGatewaysStartPacketCaptureFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1568,7 +1583,7 @@ func (client VirtualNetworkGatewaysClient) StartPacketCaptureResponder(resp *htt
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
- autorest.ByUnmarshallingJSON(&result),
+ autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
@@ -1598,7 +1613,7 @@ func (client VirtualNetworkGatewaysClient) StopPacketCapture(ctx context.Context
result, err = client.StopPacketCaptureSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "StopPacketCapture", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "StopPacketCapture", result.Response(), "Failure sending request")
return
}
@@ -1632,6 +1647,7 @@ func (client VirtualNetworkGatewaysClient) StopPacketCapturePreparer(ctx context
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) StopPacketCaptureSender(req *http.Request) (future VirtualNetworkGatewaysStopPacketCaptureFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1649,7 +1665,7 @@ func (client VirtualNetworkGatewaysClient) StopPacketCaptureResponder(resp *http
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
- autorest.ByUnmarshallingJSON(&result),
+ autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
@@ -1755,7 +1771,7 @@ func (client VirtualNetworkGatewaysClient) UpdateTags(ctx context.Context, resou
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -1789,6 +1805,7 @@ func (client VirtualNetworkGatewaysClient) UpdateTagsPreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client VirtualNetworkGatewaysClient) UpdateTagsSender(req *http.Request) (future VirtualNetworkGatewaysUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualnetworkpeerings.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualnetworkpeerings.go
index 2dc43b94451d..42b188bc2078 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualnetworkpeerings.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualnetworkpeerings.go
@@ -69,7 +69,7 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdate(ctx context.Context, r
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -108,6 +108,7 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdatePreparer(ctx context.Co
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkPeeringsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -155,7 +156,7 @@ func (client VirtualNetworkPeeringsClient) Delete(ctx context.Context, resourceG
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -188,6 +189,7 @@ func (client VirtualNetworkPeeringsClient) DeletePreparer(ctx context.Context, r
// http.Response Body if it receives an error.
func (client VirtualNetworkPeeringsClient) DeleteSender(req *http.Request) (future VirtualNetworkPeeringsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualnetworks.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualnetworks.go
index 00847a0b4956..52e1bf422061 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualnetworks.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualnetworks.go
@@ -142,7 +142,7 @@ func (client VirtualNetworksClient) CreateOrUpdate(ctx context.Context, resource
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -177,6 +177,7 @@ func (client VirtualNetworksClient) CreateOrUpdatePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworksCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -223,7 +224,7 @@ func (client VirtualNetworksClient) Delete(ctx context.Context, resourceGroupNam
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -255,6 +256,7 @@ func (client VirtualNetworksClient) DeletePreparer(ctx context.Context, resource
// http.Response Body if it receives an error.
func (client VirtualNetworksClient) DeleteSender(req *http.Request) (future VirtualNetworksDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualnetworktaps.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualnetworktaps.go
index 2afbf1244fe5..b43eca5b1f02 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualnetworktaps.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualnetworktaps.go
@@ -91,7 +91,7 @@ func (client VirtualNetworkTapsClient) CreateOrUpdate(ctx context.Context, resou
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -126,6 +126,7 @@ func (client VirtualNetworkTapsClient) CreateOrUpdatePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client VirtualNetworkTapsClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkTapsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -172,7 +173,7 @@ func (client VirtualNetworkTapsClient) Delete(ctx context.Context, resourceGroup
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -204,6 +205,7 @@ func (client VirtualNetworkTapsClient) DeletePreparer(ctx context.Context, resou
// http.Response Body if it receives an error.
func (client VirtualNetworkTapsClient) DeleteSender(req *http.Request) (future VirtualNetworkTapsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualrouterpeerings.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualrouterpeerings.go
index 662b99483822..065719b08f0b 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualrouterpeerings.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualrouterpeerings.go
@@ -68,7 +68,7 @@ func (client VirtualRouterPeeringsClient) CreateOrUpdate(ctx context.Context, re
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -105,6 +105,7 @@ func (client VirtualRouterPeeringsClient) CreateOrUpdatePreparer(ctx context.Con
// http.Response Body if it receives an error.
func (client VirtualRouterPeeringsClient) CreateOrUpdateSender(req *http.Request) (future VirtualRouterPeeringsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -152,7 +153,7 @@ func (client VirtualRouterPeeringsClient) Delete(ctx context.Context, resourceGr
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualRouterPeeringsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -185,6 +186,7 @@ func (client VirtualRouterPeeringsClient) DeletePreparer(ctx context.Context, re
// http.Response Body if it receives an error.
func (client VirtualRouterPeeringsClient) DeleteSender(req *http.Request) (future VirtualRouterPeeringsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualrouters.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualrouters.go
index 6521dffbe509..aecbb89552b7 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualrouters.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualrouters.go
@@ -66,7 +66,7 @@ func (client VirtualRoutersClient) CreateOrUpdate(ctx context.Context, resourceG
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualRoutersClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualRoutersClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -101,6 +101,7 @@ func (client VirtualRoutersClient) CreateOrUpdatePreparer(ctx context.Context, r
// http.Response Body if it receives an error.
func (client VirtualRoutersClient) CreateOrUpdateSender(req *http.Request) (future VirtualRoutersCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -147,7 +148,7 @@ func (client VirtualRoutersClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualRoutersClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualRoutersClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -179,6 +180,7 @@ func (client VirtualRoutersClient) DeletePreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client VirtualRoutersClient) DeleteSender(req *http.Request) (future VirtualRoutersDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualwans.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualwans.go
index 082a7979fd0f..7ac1a3f0d3b8 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualwans.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/virtualwans.go
@@ -54,7 +54,7 @@ func (client VirtualWansClient) CreateOrUpdate(ctx context.Context, resourceGrou
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -89,6 +89,7 @@ func (client VirtualWansClient) CreateOrUpdatePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client VirtualWansClient) CreateOrUpdateSender(req *http.Request) (future VirtualWansCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -135,7 +136,7 @@ func (client VirtualWansClient) Delete(ctx context.Context, resourceGroupName st
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -167,6 +168,7 @@ func (client VirtualWansClient) DeletePreparer(ctx context.Context, resourceGrou
// http.Response Body if it receives an error.
func (client VirtualWansClient) DeleteSender(req *http.Request) (future VirtualWansDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/vpnconnections.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/vpnconnections.go
index c0227146279b..ec6e71cd5894 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/vpnconnections.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/vpnconnections.go
@@ -56,7 +56,7 @@ func (client VpnConnectionsClient) CreateOrUpdate(ctx context.Context, resourceG
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -92,6 +92,7 @@ func (client VpnConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, r
// http.Response Body if it receives an error.
func (client VpnConnectionsClient) CreateOrUpdateSender(req *http.Request) (future VpnConnectionsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -139,7 +140,7 @@ func (client VpnConnectionsClient) Delete(ctx context.Context, resourceGroupName
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -172,6 +173,7 @@ func (client VpnConnectionsClient) DeletePreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client VpnConnectionsClient) DeleteSender(req *http.Request) (future VpnConnectionsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -416,7 +418,7 @@ func (client VpnConnectionsClient) StartPacketCapture(ctx context.Context, resou
result, err = client.StartPacketCaptureSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "StartPacketCapture", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "StartPacketCapture", result.Response(), "Failure sending request")
return
}
@@ -454,6 +456,7 @@ func (client VpnConnectionsClient) StartPacketCapturePreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client VpnConnectionsClient) StartPacketCaptureSender(req *http.Request) (future VpnConnectionsStartPacketCaptureFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -471,7 +474,7 @@ func (client VpnConnectionsClient) StartPacketCaptureResponder(resp *http.Respon
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
- autorest.ByUnmarshallingJSON(&result),
+ autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
@@ -502,7 +505,7 @@ func (client VpnConnectionsClient) StopPacketCapture(ctx context.Context, resour
result, err = client.StopPacketCaptureSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "StopPacketCapture", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "StopPacketCapture", result.Response(), "Failure sending request")
return
}
@@ -540,6 +543,7 @@ func (client VpnConnectionsClient) StopPacketCapturePreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client VpnConnectionsClient) StopPacketCaptureSender(req *http.Request) (future VpnConnectionsStopPacketCaptureFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -557,7 +561,7 @@ func (client VpnConnectionsClient) StopPacketCaptureResponder(resp *http.Respons
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
- autorest.ByUnmarshallingJSON(&result),
+ autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/vpngateways.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/vpngateways.go
index 67cf464ea9f0..a62d2be0d947 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/vpngateways.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/vpngateways.go
@@ -68,7 +68,7 @@ func (client VpnGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGrou
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -103,6 +103,7 @@ func (client VpnGatewaysClient) CreateOrUpdatePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client VpnGatewaysClient) CreateOrUpdateSender(req *http.Request) (future VpnGatewaysCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -149,7 +150,7 @@ func (client VpnGatewaysClient) Delete(ctx context.Context, resourceGroupName st
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -181,6 +182,7 @@ func (client VpnGatewaysClient) DeletePreparer(ctx context.Context, resourceGrou
// http.Response Body if it receives an error.
func (client VpnGatewaysClient) DeleteSender(req *http.Request) (future VpnGatewaysDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -531,7 +533,7 @@ func (client VpnGatewaysClient) Reset(ctx context.Context, resourceGroupName str
result, err = client.ResetSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Reset", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Reset", result.Response(), "Failure sending request")
return
}
@@ -563,6 +565,7 @@ func (client VpnGatewaysClient) ResetPreparer(ctx context.Context, resourceGroup
// http.Response Body if it receives an error.
func (client VpnGatewaysClient) ResetSender(req *http.Request) (future VpnGatewaysResetFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -610,7 +613,7 @@ func (client VpnGatewaysClient) StartPacketCapture(ctx context.Context, resource
result, err = client.StartPacketCaptureSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "StartPacketCapture", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "StartPacketCapture", result.Response(), "Failure sending request")
return
}
@@ -647,6 +650,7 @@ func (client VpnGatewaysClient) StartPacketCapturePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VpnGatewaysClient) StartPacketCaptureSender(req *http.Request) (future VpnGatewaysStartPacketCaptureFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -664,7 +668,7 @@ func (client VpnGatewaysClient) StartPacketCaptureResponder(resp *http.Response)
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
- autorest.ByUnmarshallingJSON(&result),
+ autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
@@ -694,7 +698,7 @@ func (client VpnGatewaysClient) StopPacketCapture(ctx context.Context, resourceG
result, err = client.StopPacketCaptureSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "StopPacketCapture", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "StopPacketCapture", result.Response(), "Failure sending request")
return
}
@@ -731,6 +735,7 @@ func (client VpnGatewaysClient) StopPacketCapturePreparer(ctx context.Context, r
// http.Response Body if it receives an error.
func (client VpnGatewaysClient) StopPacketCaptureSender(req *http.Request) (future VpnGatewaysStopPacketCaptureFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -748,7 +753,7 @@ func (client VpnGatewaysClient) StopPacketCaptureResponder(resp *http.Response)
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
- autorest.ByUnmarshallingJSON(&result),
+ autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
@@ -778,7 +783,7 @@ func (client VpnGatewaysClient) UpdateTags(ctx context.Context, resourceGroupNam
result, err = client.UpdateTagsSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "UpdateTags", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "UpdateTags", result.Response(), "Failure sending request")
return
}
@@ -812,6 +817,7 @@ func (client VpnGatewaysClient) UpdateTagsPreparer(ctx context.Context, resource
// http.Response Body if it receives an error.
func (client VpnGatewaysClient) UpdateTagsSender(req *http.Request) (future VpnGatewaysUpdateTagsFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/vpnlinkconnections.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/vpnlinkconnections.go
index b7c97bf8898b..85fb84bddb64 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/vpnlinkconnections.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/vpnlinkconnections.go
@@ -56,7 +56,7 @@ func (client VpnLinkConnectionsClient) GetIkeSas(ctx context.Context, resourceGr
result, err = client.GetIkeSasSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnLinkConnectionsClient", "GetIkeSas", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnLinkConnectionsClient", "GetIkeSas", result.Response(), "Failure sending request")
return
}
@@ -90,6 +90,7 @@ func (client VpnLinkConnectionsClient) GetIkeSasPreparer(ctx context.Context, re
// http.Response Body if it receives an error.
func (client VpnLinkConnectionsClient) GetIkeSasSender(req *http.Request) (future VpnLinkConnectionsGetIkeSasFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -107,7 +108,7 @@ func (client VpnLinkConnectionsClient) GetIkeSasResponder(resp *http.Response) (
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
- autorest.ByUnmarshallingJSON(&result),
+ autorest.ByUnmarshallingJSON(&result.Value),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
@@ -258,7 +259,7 @@ func (client VpnLinkConnectionsClient) ResetConnection(ctx context.Context, reso
result, err = client.ResetConnectionSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnLinkConnectionsClient", "ResetConnection", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnLinkConnectionsClient", "ResetConnection", result.Response(), "Failure sending request")
return
}
@@ -292,6 +293,7 @@ func (client VpnLinkConnectionsClient) ResetConnectionPreparer(ctx context.Conte
// http.Response Body if it receives an error.
func (client VpnLinkConnectionsClient) ResetConnectionSender(req *http.Request) (future VpnLinkConnectionsResetConnectionFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/vpnserverconfigurations.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/vpnserverconfigurations.go
index 3683b84e3fa5..a55252fe0e96 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/vpnserverconfigurations.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/vpnserverconfigurations.go
@@ -56,7 +56,7 @@ func (client VpnServerConfigurationsClient) CreateOrUpdate(ctx context.Context,
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -91,6 +91,7 @@ func (client VpnServerConfigurationsClient) CreateOrUpdatePreparer(ctx context.C
// http.Response Body if it receives an error.
func (client VpnServerConfigurationsClient) CreateOrUpdateSender(req *http.Request) (future VpnServerConfigurationsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -137,7 +138,7 @@ func (client VpnServerConfigurationsClient) Delete(ctx context.Context, resource
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -169,6 +170,7 @@ func (client VpnServerConfigurationsClient) DeletePreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VpnServerConfigurationsClient) DeleteSender(req *http.Request) (future VpnServerConfigurationsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/vpnserverconfigurationsassociatedwithvirtualwan.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/vpnserverconfigurationsassociatedwithvirtualwan.go
index 42c6e121d6de..76b8b7b364fd 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/vpnserverconfigurationsassociatedwithvirtualwan.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/vpnserverconfigurationsassociatedwithvirtualwan.go
@@ -55,7 +55,7 @@ func (client VpnServerConfigurationsAssociatedWithVirtualWanClient) List(ctx con
result, err = client.ListSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsAssociatedWithVirtualWanClient", "List", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnServerConfigurationsAssociatedWithVirtualWanClient", "List", result.Response(), "Failure sending request")
return
}
@@ -87,6 +87,7 @@ func (client VpnServerConfigurationsAssociatedWithVirtualWanClient) ListPreparer
// http.Response Body if it receives an error.
func (client VpnServerConfigurationsAssociatedWithVirtualWanClient) ListSender(req *http.Request) (future VpnServerConfigurationsAssociatedWithVirtualWanListFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/vpnsites.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/vpnsites.go
index 69cde4d210d3..2632c4bff8d7 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/vpnsites.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/vpnsites.go
@@ -68,7 +68,7 @@ func (client VpnSitesClient) CreateOrUpdate(ctx context.Context, resourceGroupNa
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -103,6 +103,7 @@ func (client VpnSitesClient) CreateOrUpdatePreparer(ctx context.Context, resourc
// http.Response Body if it receives an error.
func (client VpnSitesClient) CreateOrUpdateSender(req *http.Request) (future VpnSitesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -149,7 +150,7 @@ func (client VpnSitesClient) Delete(ctx context.Context, resourceGroupName strin
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -181,6 +182,7 @@ func (client VpnSitesClient) DeletePreparer(ctx context.Context, resourceGroupNa
// http.Response Body if it receives an error.
func (client VpnSitesClient) DeleteSender(req *http.Request) (future VpnSitesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/vpnsitesconfiguration.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/vpnsitesconfiguration.go
index ac283358f8fd..cfd2eae785a3 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/vpnsitesconfiguration.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/vpnsitesconfiguration.go
@@ -62,7 +62,7 @@ func (client VpnSitesConfigurationClient) Download(ctx context.Context, resource
result, err = client.DownloadSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationClient", "Download", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationClient", "Download", result.Response(), "Failure sending request")
return
}
@@ -96,6 +96,7 @@ func (client VpnSitesConfigurationClient) DownloadPreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client VpnSitesConfigurationClient) DownloadSender(req *http.Request) (future VpnSitesConfigurationDownloadFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/watchers.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/watchers.go
index 1d69707cceed..189775c79ce4 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/watchers.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/watchers.go
@@ -74,7 +74,7 @@ func (client WatchersClient) CheckConnectivity(ctx context.Context, resourceGrou
result, err = client.CheckConnectivitySender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "CheckConnectivity", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "CheckConnectivity", result.Response(), "Failure sending request")
return
}
@@ -108,6 +108,7 @@ func (client WatchersClient) CheckConnectivityPreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client WatchersClient) CheckConnectivitySender(req *http.Request) (future WatchersCheckConnectivityFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -234,7 +235,7 @@ func (client WatchersClient) Delete(ctx context.Context, resourceGroupName strin
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -266,6 +267,7 @@ func (client WatchersClient) DeletePreparer(ctx context.Context, resourceGroupNa
// http.Response Body if it receives an error.
func (client WatchersClient) DeleteSender(req *http.Request) (future WatchersDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -398,7 +400,7 @@ func (client WatchersClient) GetAzureReachabilityReport(ctx context.Context, res
result, err = client.GetAzureReachabilityReportSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetAzureReachabilityReport", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetAzureReachabilityReport", result.Response(), "Failure sending request")
return
}
@@ -432,6 +434,7 @@ func (client WatchersClient) GetAzureReachabilityReportPreparer(ctx context.Cont
// http.Response Body if it receives an error.
func (client WatchersClient) GetAzureReachabilityReportSender(req *http.Request) (future WatchersGetAzureReachabilityReportFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -485,7 +488,7 @@ func (client WatchersClient) GetFlowLogStatus(ctx context.Context, resourceGroup
result, err = client.GetFlowLogStatusSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetFlowLogStatus", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetFlowLogStatus", result.Response(), "Failure sending request")
return
}
@@ -519,6 +522,7 @@ func (client WatchersClient) GetFlowLogStatusPreparer(ctx context.Context, resou
// http.Response Body if it receives an error.
func (client WatchersClient) GetFlowLogStatusSender(req *http.Request) (future WatchersGetFlowLogStatusFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -577,7 +581,7 @@ func (client WatchersClient) GetNetworkConfigurationDiagnostic(ctx context.Conte
result, err = client.GetNetworkConfigurationDiagnosticSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetNetworkConfigurationDiagnostic", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetNetworkConfigurationDiagnostic", result.Response(), "Failure sending request")
return
}
@@ -611,6 +615,7 @@ func (client WatchersClient) GetNetworkConfigurationDiagnosticPreparer(ctx conte
// http.Response Body if it receives an error.
func (client WatchersClient) GetNetworkConfigurationDiagnosticSender(req *http.Request) (future WatchersGetNetworkConfigurationDiagnosticFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -666,7 +671,7 @@ func (client WatchersClient) GetNextHop(ctx context.Context, resourceGroupName s
result, err = client.GetNextHopSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetNextHop", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetNextHop", result.Response(), "Failure sending request")
return
}
@@ -700,6 +705,7 @@ func (client WatchersClient) GetNextHopPreparer(ctx context.Context, resourceGro
// http.Response Body if it receives an error.
func (client WatchersClient) GetNextHopSender(req *http.Request) (future WatchersGetNextHopFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -836,7 +842,7 @@ func (client WatchersClient) GetTroubleshooting(ctx context.Context, resourceGro
result, err = client.GetTroubleshootingSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTroubleshooting", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTroubleshooting", result.Response(), "Failure sending request")
return
}
@@ -870,6 +876,7 @@ func (client WatchersClient) GetTroubleshootingPreparer(ctx context.Context, res
// http.Response Body if it receives an error.
func (client WatchersClient) GetTroubleshootingSender(req *http.Request) (future WatchersGetTroubleshootingFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -923,7 +930,7 @@ func (client WatchersClient) GetTroubleshootingResult(ctx context.Context, resou
result, err = client.GetTroubleshootingResultSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTroubleshootingResult", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTroubleshootingResult", result.Response(), "Failure sending request")
return
}
@@ -957,6 +964,7 @@ func (client WatchersClient) GetTroubleshootingResultPreparer(ctx context.Contex
// http.Response Body if it receives an error.
func (client WatchersClient) GetTroubleshootingResultSender(req *http.Request) (future WatchersGetTroubleshootingResultFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1010,7 +1018,7 @@ func (client WatchersClient) GetVMSecurityRules(ctx context.Context, resourceGro
result, err = client.GetVMSecurityRulesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetVMSecurityRules", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetVMSecurityRules", result.Response(), "Failure sending request")
return
}
@@ -1044,6 +1052,7 @@ func (client WatchersClient) GetVMSecurityRulesPreparer(ctx context.Context, res
// http.Response Body if it receives an error.
func (client WatchersClient) GetVMSecurityRulesSender(req *http.Request) (future WatchersGetVMSecurityRulesFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1237,7 +1246,7 @@ func (client WatchersClient) ListAvailableProviders(ctx context.Context, resourc
result, err = client.ListAvailableProvidersSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "ListAvailableProviders", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "ListAvailableProviders", result.Response(), "Failure sending request")
return
}
@@ -1271,6 +1280,7 @@ func (client WatchersClient) ListAvailableProvidersPreparer(ctx context.Context,
// http.Response Body if it receives an error.
func (client WatchersClient) ListAvailableProvidersSender(req *http.Request) (future WatchersListAvailableProvidersFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1328,7 +1338,7 @@ func (client WatchersClient) SetFlowLogConfiguration(ctx context.Context, resour
result, err = client.SetFlowLogConfigurationSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "SetFlowLogConfiguration", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "SetFlowLogConfiguration", result.Response(), "Failure sending request")
return
}
@@ -1362,6 +1372,7 @@ func (client WatchersClient) SetFlowLogConfigurationPreparer(ctx context.Context
// http.Response Body if it receives an error.
func (client WatchersClient) SetFlowLogConfigurationSender(req *http.Request) (future WatchersSetFlowLogConfigurationFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1498,7 +1509,7 @@ func (client WatchersClient) VerifyIPFlow(ctx context.Context, resourceGroupName
result, err = client.VerifyIPFlowSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WatchersClient", "VerifyIPFlow", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WatchersClient", "VerifyIPFlow", result.Response(), "Failure sending request")
return
}
@@ -1532,6 +1543,7 @@ func (client WatchersClient) VerifyIPFlowPreparer(ctx context.Context, resourceG
// http.Response Body if it receives an error.
func (client WatchersClient) VerifyIPFlowSender(req *http.Request) (future WatchersVerifyIPFlowFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/webapplicationfirewallpolicies.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/webapplicationfirewallpolicies.go
index 0c27635a5498..d8dd1208b546 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/webapplicationfirewallpolicies.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network/webapplicationfirewallpolicies.go
@@ -158,7 +158,7 @@ func (client WebApplicationFirewallPoliciesClient) Delete(ctx context.Context, r
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "network.WebApplicationFirewallPoliciesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -190,6 +190,7 @@ func (client WebApplicationFirewallPoliciesClient) DeletePreparer(ctx context.Co
// http.Response Body if it receives an error.
func (client WebApplicationFirewallPoliciesClient) DeleteSender(req *http.Request) (future WebApplicationFirewallPoliciesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/CHANGELOG.md b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/CHANGELOG.md
index 67303c77365b..52911e4cc5e4 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/CHANGELOG.md
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/CHANGELOG.md
@@ -1,9 +1,2 @@
# Change History
-## Additive Changes
-
-### New Funcs
-
-1. PrivateZoneProperties.MarshalJSON() ([]byte, error)
-1. ProxyResource.MarshalJSON() ([]byte, error)
-1. Resource.MarshalJSON() ([]byte, error)
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/_meta.json b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/_meta.json
index af0c1e4a7c9e..10e0d5369fce 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/_meta.json
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/_meta.json
@@ -2,10 +2,10 @@
"commit": "3c764635e7d442b3e74caf593029fcd440b3ef82",
"readme": "/_/azure-rest-api-specs/specification/privatedns/resource-manager/readme.md",
"tag": "package-2018-09",
- "use": "@microsoft.azure/autorest.go@2.1.183",
+ "use": "@microsoft.azure/autorest.go@2.1.187",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
- "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2018-09 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/privatedns/resource-manager/readme.md",
+ "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2018-09 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/privatedns/resource-manager/readme.md",
"additional_properties": {
- "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION"
+ "additional_options": "--go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION"
}
}
\ No newline at end of file
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/privatezones.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/privatezones.go
index 2e10b275cd2d..841905875b58 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/privatezones.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/privatezones.go
@@ -59,7 +59,7 @@ func (client PrivateZonesClient) CreateOrUpdate(ctx context.Context, resourceGro
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -101,6 +101,7 @@ func (client PrivateZonesClient) CreateOrUpdatePreparer(ctx context.Context, res
// http.Response Body if it receives an error.
func (client PrivateZonesClient) CreateOrUpdateSender(req *http.Request) (future PrivateZonesCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -150,7 +151,7 @@ func (client PrivateZonesClient) Delete(ctx context.Context, resourceGroupName s
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -186,6 +187,7 @@ func (client PrivateZonesClient) DeletePreparer(ctx context.Context, resourceGro
// http.Response Body if it receives an error.
func (client PrivateZonesClient) DeleteSender(req *http.Request) (future PrivateZonesDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -549,7 +551,7 @@ func (client PrivateZonesClient) Update(ctx context.Context, resourceGroupName s
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -587,6 +589,7 @@ func (client PrivateZonesClient) UpdatePreparer(ctx context.Context, resourceGro
// http.Response Body if it receives an error.
func (client PrivateZonesClient) UpdateSender(req *http.Request) (future PrivateZonesUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/virtualnetworklinks.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/virtualnetworklinks.go
index e85b36982e0e..002a39d9687b 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/virtualnetworklinks.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns/virtualnetworklinks.go
@@ -61,7 +61,7 @@ func (client VirtualNetworkLinksClient) CreateOrUpdate(ctx context.Context, reso
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -104,6 +104,7 @@ func (client VirtualNetworkLinksClient) CreateOrUpdatePreparer(ctx context.Conte
// http.Response Body if it receives an error.
func (client VirtualNetworkLinksClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkLinksCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -155,7 +156,7 @@ func (client VirtualNetworkLinksClient) Delete(ctx context.Context, resourceGrou
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -192,6 +193,7 @@ func (client VirtualNetworkLinksClient) DeletePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client VirtualNetworkLinksClient) DeleteSender(req *http.Request) (future VirtualNetworkLinksDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -443,7 +445,7 @@ func (client VirtualNetworkLinksClient) Update(ctx context.Context, resourceGrou
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksClient", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksClient", "Update", result.Response(), "Failure sending request")
return
}
@@ -482,6 +484,7 @@ func (client VirtualNetworkLinksClient) UpdatePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client VirtualNetworkLinksClient) UpdateSender(req *http.Request) (future VirtualNetworkLinksUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/CHANGELOG.md b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/CHANGELOG.md
index 7ed92404977c..52911e4cc5e4 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/CHANGELOG.md
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/CHANGELOG.md
@@ -1,11 +1,2 @@
# Change History
-## Additive Changes
-
-### New Funcs
-
-1. DeploymentOperationProperties.MarshalJSON() ([]byte, error)
-1. ErrorAdditionalInfo.MarshalJSON() ([]byte, error)
-1. ErrorResponse.MarshalJSON() ([]byte, error)
-1. GroupProperties.MarshalJSON() ([]byte, error)
-1. ManagementErrorWithDetails.MarshalJSON() ([]byte, error)
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/_meta.json b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/_meta.json
index cbc226d83ef1..a8b691021c24 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/_meta.json
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/_meta.json
@@ -2,10 +2,10 @@
"commit": "3c764635e7d442b3e74caf593029fcd440b3ef82",
"readme": "/_/azure-rest-api-specs/specification/resources/resource-manager/readme.md",
"tag": "package-resources-2017-05",
- "use": "@microsoft.azure/autorest.go@2.1.183",
+ "use": "@microsoft.azure/autorest.go@2.1.187",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
- "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-resources-2017-05 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/resources/resource-manager/readme.md",
+ "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-resources-2017-05 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/resources/resource-manager/readme.md",
"additional_properties": {
- "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION"
+ "additional_options": "--go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION"
}
}
\ No newline at end of file
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/deployments.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/deployments.go
index f3adc571accd..dd68f74ab568 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/deployments.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/deployments.go
@@ -323,7 +323,7 @@ func (client DeploymentsClient) CreateOrUpdate(ctx context.Context, resourceGrou
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -357,6 +357,7 @@ func (client DeploymentsClient) CreateOrUpdatePreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client DeploymentsClient) CreateOrUpdateSender(req *http.Request) (future DeploymentsCreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -422,7 +423,7 @@ func (client DeploymentsClient) Delete(ctx context.Context, resourceGroupName st
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -454,6 +455,7 @@ func (client DeploymentsClient) DeletePreparer(ctx context.Context, resourceGrou
// http.Response Body if it receives an error.
func (client DeploymentsClient) DeleteSender(req *http.Request) (future DeploymentsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/groups.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/groups.go
index 8ce2479fca23..1e10a6797307 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/groups.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/groups.go
@@ -231,7 +231,7 @@ func (client GroupsClient) Delete(ctx context.Context, resourceGroupName string)
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Delete", result.Response(), "Failure sending request")
return
}
@@ -262,6 +262,7 @@ func (client GroupsClient) DeletePreparer(ctx context.Context, resourceGroupName
// http.Response Body if it receives an error.
func (client GroupsClient) DeleteSender(req *http.Request) (future GroupsDeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/resources.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/resources.go
index 9488dea032c8..da0d1f493d6e 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/resources.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2017-05-10/resources/resources.go
@@ -234,7 +234,7 @@ func (client Client) CreateOrUpdate(ctx context.Context, resourceGroupName strin
result, err = client.CreateOrUpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "resources.Client", "CreateOrUpdate", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "resources.Client", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
@@ -270,6 +270,7 @@ func (client Client) CreateOrUpdatePreparer(ctx context.Context, resourceGroupNa
// http.Response Body if it receives an error.
func (client Client) CreateOrUpdateSender(req *http.Request) (future CreateOrUpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -326,7 +327,7 @@ func (client Client) CreateOrUpdateByID(ctx context.Context, resourceID string,
result, err = client.CreateOrUpdateByIDSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "resources.Client", "CreateOrUpdateByID", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "resources.Client", "CreateOrUpdateByID", result.Response(), "Failure sending request")
return
}
@@ -357,6 +358,7 @@ func (client Client) CreateOrUpdateByIDPreparer(ctx context.Context, resourceID
// http.Response Body if it receives an error.
func (client Client) CreateOrUpdateByIDSender(req *http.Request) (future CreateOrUpdateByIDFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
@@ -416,7 +418,7 @@ func (client Client) Delete(ctx context.Context, resourceGroupName string, resou
result, err = client.DeleteSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "resources.Client", "Delete", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "resources.Client", "Delete", result.Response(), "Failure sending request")
return
}
@@ -450,6 +452,7 @@ func (client Client) DeletePreparer(ctx context.Context, resourceGroupName strin
// http.Response Body if it receives an error.
func (client Client) DeleteSender(req *http.Request) (future DeleteFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -497,7 +500,7 @@ func (client Client) DeleteByID(ctx context.Context, resourceID string, APIVersi
result, err = client.DeleteByIDSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "resources.Client", "DeleteByID", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "resources.Client", "DeleteByID", result.Response(), "Failure sending request")
return
}
@@ -526,6 +529,7 @@ func (client Client) DeleteByIDPreparer(ctx context.Context, resourceID string,
// http.Response Body if it receives an error.
func (client Client) DeleteByIDSender(req *http.Request) (future DeleteByIDFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
@@ -1011,7 +1015,7 @@ func (client Client) MoveResources(ctx context.Context, sourceResourceGroupName
result, err = client.MoveResourcesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "resources.Client", "MoveResources", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "resources.Client", "MoveResources", result.Response(), "Failure sending request")
return
}
@@ -1044,6 +1048,7 @@ func (client Client) MoveResourcesPreparer(ctx context.Context, sourceResourceGr
// http.Response Body if it receives an error.
func (client Client) MoveResourcesSender(req *http.Request) (future MoveResourcesFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1102,7 +1107,7 @@ func (client Client) Update(ctx context.Context, resourceGroupName string, resou
result, err = client.UpdateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "resources.Client", "Update", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "resources.Client", "Update", result.Response(), "Failure sending request")
return
}
@@ -1138,6 +1143,7 @@ func (client Client) UpdatePreparer(ctx context.Context, resourceGroupName strin
// http.Response Body if it receives an error.
func (client Client) UpdateSender(req *http.Request) (future UpdateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1187,7 +1193,7 @@ func (client Client) UpdateByID(ctx context.Context, resourceID string, APIVersi
result, err = client.UpdateByIDSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "resources.Client", "UpdateByID", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "resources.Client", "UpdateByID", result.Response(), "Failure sending request")
return
}
@@ -1218,6 +1224,7 @@ func (client Client) UpdateByIDPreparer(ctx context.Context, resourceID string,
// http.Response Body if it receives an error.
func (client Client) UpdateByIDSender(req *http.Request) (future UpdateByIDFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if err != nil {
return
@@ -1276,7 +1283,7 @@ func (client Client) ValidateMoveResources(ctx context.Context, sourceResourceGr
result, err = client.ValidateMoveResourcesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "resources.Client", "ValidateMoveResources", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "resources.Client", "ValidateMoveResources", result.Response(), "Failure sending request")
return
}
@@ -1309,6 +1316,7 @@ func (client Client) ValidateMoveResourcesPreparer(ctx context.Context, sourceRe
// http.Response Body if it receives an error.
func (client Client) ValidateMoveResourcesSender(req *http.Request) (future ValidateMoveResourcesFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/CHANGELOG.md b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/CHANGELOG.md
index 7b5c5c968378..52911e4cc5e4 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/CHANGELOG.md
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/CHANGELOG.md
@@ -1,36 +1,2 @@
# Change History
-## Additive Changes
-
-### New Funcs
-
-1. AccountInternetEndpoints.MarshalJSON() ([]byte, error)
-1. AccountKey.MarshalJSON() ([]byte, error)
-1. AccountListKeysResult.MarshalJSON() ([]byte, error)
-1. AccountListResult.MarshalJSON() ([]byte, error)
-1. AccountMicrosoftEndpoints.MarshalJSON() ([]byte, error)
-1. AzureEntityResource.MarshalJSON() ([]byte, error)
-1. BlobRestoreStatus.MarshalJSON() ([]byte, error)
-1. BlobServiceItems.MarshalJSON() ([]byte, error)
-1. CheckNameAvailabilityResult.MarshalJSON() ([]byte, error)
-1. EncryptionScopeListResult.MarshalJSON() ([]byte, error)
-1. FileServiceItems.MarshalJSON() ([]byte, error)
-1. FileShareItems.MarshalJSON() ([]byte, error)
-1. GeoReplicationStats.MarshalJSON() ([]byte, error)
-1. ListAccountSasResponse.MarshalJSON() ([]byte, error)
-1. ListContainerItems.MarshalJSON() ([]byte, error)
-1. ListQueueResource.MarshalJSON() ([]byte, error)
-1. ListQueueServices.MarshalJSON() ([]byte, error)
-1. ListServiceSasResponse.MarshalJSON() ([]byte, error)
-1. ListTableResource.MarshalJSON() ([]byte, error)
-1. ListTableServices.MarshalJSON() ([]byte, error)
-1. PrivateEndpoint.MarshalJSON() ([]byte, error)
-1. ProxyResource.MarshalJSON() ([]byte, error)
-1. Resource.MarshalJSON() ([]byte, error)
-1. SKUCapability.MarshalJSON() ([]byte, error)
-1. SkuListResult.MarshalJSON() ([]byte, error)
-1. TableProperties.MarshalJSON() ([]byte, error)
-1. TagProperty.MarshalJSON() ([]byte, error)
-1. UpdateHistoryProperty.MarshalJSON() ([]byte, error)
-1. Usage.MarshalJSON() ([]byte, error)
-1. UsageName.MarshalJSON() ([]byte, error)
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/_meta.json b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/_meta.json
index e9e533452515..03415d0dc92f 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/_meta.json
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/_meta.json
@@ -2,10 +2,10 @@
"commit": "3c764635e7d442b3e74caf593029fcd440b3ef82",
"readme": "/_/azure-rest-api-specs/specification/storage/resource-manager/readme.md",
"tag": "package-2019-06",
- "use": "@microsoft.azure/autorest.go@2.1.183",
+ "use": "@microsoft.azure/autorest.go@2.1.187",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
- "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2019-06 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/storage/resource-manager/readme.md",
+ "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2019-06 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/storage/resource-manager/readme.md",
"additional_properties": {
- "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION"
+ "additional_options": "--go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION"
}
}
\ No newline at end of file
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/accounts.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/accounts.go
index bb99b9e30fa0..e5143f115417 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/accounts.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-06-01/storage/accounts.go
@@ -177,7 +177,7 @@ func (client AccountsClient) Create(ctx context.Context, resourceGroupName strin
result, err = client.CreateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "storage.AccountsClient", "Create", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "Create", result.Response(), "Failure sending request")
return
}
@@ -211,6 +211,7 @@ func (client AccountsClient) CreatePreparer(ctx context.Context, resourceGroupNa
// http.Response Body if it receives an error.
func (client AccountsClient) CreateSender(req *http.Request) (future AccountsCreateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -364,7 +365,7 @@ func (client AccountsClient) Failover(ctx context.Context, resourceGroupName str
result, err = client.FailoverSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "storage.AccountsClient", "Failover", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "Failover", result.Response(), "Failure sending request")
return
}
@@ -396,6 +397,7 @@ func (client AccountsClient) FailoverPreparer(ctx context.Context, resourceGroup
// http.Response Body if it receives an error.
func (client AccountsClient) FailoverSender(req *http.Request) (future AccountsFailoverFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1148,7 +1150,7 @@ func (client AccountsClient) RestoreBlobRanges(ctx context.Context, resourceGrou
result, err = client.RestoreBlobRangesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "storage.AccountsClient", "RestoreBlobRanges", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "RestoreBlobRanges", result.Response(), "Failure sending request")
return
}
@@ -1182,6 +1184,7 @@ func (client AccountsClient) RestoreBlobRangesPreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client AccountsClient) RestoreBlobRangesSender(req *http.Request) (future AccountsRestoreBlobRangesFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-02-01/storage/CHANGELOG.md b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-02-01/storage/CHANGELOG.md
index df77cd141299..52911e4cc5e4 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-02-01/storage/CHANGELOG.md
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-02-01/storage/CHANGELOG.md
@@ -1,40 +1,2 @@
# Change History
-## Additive Changes
-
-### New Funcs
-
-1. AccountInternetEndpoints.MarshalJSON() ([]byte, error)
-1. AccountKey.MarshalJSON() ([]byte, error)
-1. AccountListKeysResult.MarshalJSON() ([]byte, error)
-1. AccountListResult.MarshalJSON() ([]byte, error)
-1. AccountMicrosoftEndpoints.MarshalJSON() ([]byte, error)
-1. AzureEntityResource.MarshalJSON() ([]byte, error)
-1. BlobRestoreStatus.MarshalJSON() ([]byte, error)
-1. BlobServiceItems.MarshalJSON() ([]byte, error)
-1. CheckNameAvailabilityResult.MarshalJSON() ([]byte, error)
-1. DeletedAccountListResult.MarshalJSON() ([]byte, error)
-1. DeletedAccountProperties.MarshalJSON() ([]byte, error)
-1. EncryptionScopeListResult.MarshalJSON() ([]byte, error)
-1. FileServiceItems.MarshalJSON() ([]byte, error)
-1. FileShareItems.MarshalJSON() ([]byte, error)
-1. GeoReplicationStats.MarshalJSON() ([]byte, error)
-1. ListAccountSasResponse.MarshalJSON() ([]byte, error)
-1. ListBlobInventoryPolicy.MarshalJSON() ([]byte, error)
-1. ListContainerItems.MarshalJSON() ([]byte, error)
-1. ListQueueResource.MarshalJSON() ([]byte, error)
-1. ListQueueServices.MarshalJSON() ([]byte, error)
-1. ListServiceSasResponse.MarshalJSON() ([]byte, error)
-1. ListTableResource.MarshalJSON() ([]byte, error)
-1. ListTableServices.MarshalJSON() ([]byte, error)
-1. PrivateEndpoint.MarshalJSON() ([]byte, error)
-1. ProxyResource.MarshalJSON() ([]byte, error)
-1. Resource.MarshalJSON() ([]byte, error)
-1. SKUCapability.MarshalJSON() ([]byte, error)
-1. SkuListResult.MarshalJSON() ([]byte, error)
-1. TableProperties.MarshalJSON() ([]byte, error)
-1. TagProperty.MarshalJSON() ([]byte, error)
-1. UpdateHistoryProperty.MarshalJSON() ([]byte, error)
-1. Usage.MarshalJSON() ([]byte, error)
-1. UsageName.MarshalJSON() ([]byte, error)
-1. UserAssignedIdentity.MarshalJSON() ([]byte, error)
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-02-01/storage/_meta.json b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-02-01/storage/_meta.json
index ab2950242e6e..b6d9ac079390 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-02-01/storage/_meta.json
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-02-01/storage/_meta.json
@@ -2,10 +2,10 @@
"commit": "ea5bc27ee9cadeb67767d774c82095be2420bcad",
"readme": "/_/azure-rest-api-specs/specification/storage/resource-manager/readme.md",
"tag": "package-2021-02",
- "use": "@microsoft.azure/autorest.go@2.1.183",
+ "use": "@microsoft.azure/autorest.go@2.1.187",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
- "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.183 --tag=package-2021-02 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix /_/azure-rest-api-specs/specification/storage/resource-manager/readme.md",
+ "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2021-02 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix /_/azure-rest-api-specs/specification/storage/resource-manager/readme.md",
"additional_properties": {
- "additional_options": "--go --verbose --use-onever --version=V2 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix"
+ "additional_options": "--go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION --enum-prefix"
}
}
\ No newline at end of file
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-02-01/storage/accounts.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-02-01/storage/accounts.go
index 0e34d4a948d5..aab326ade4c3 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-02-01/storage/accounts.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-02-01/storage/accounts.go
@@ -181,7 +181,7 @@ func (client AccountsClient) Create(ctx context.Context, resourceGroupName strin
result, err = client.CreateSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "storage.AccountsClient", "Create", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "Create", result.Response(), "Failure sending request")
return
}
@@ -215,6 +215,7 @@ func (client AccountsClient) CreatePreparer(ctx context.Context, resourceGroupNa
// http.Response Body if it receives an error.
func (client AccountsClient) CreateSender(req *http.Request) (future AccountsCreateFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -368,7 +369,7 @@ func (client AccountsClient) Failover(ctx context.Context, resourceGroupName str
result, err = client.FailoverSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "storage.AccountsClient", "Failover", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "Failover", result.Response(), "Failure sending request")
return
}
@@ -400,6 +401,7 @@ func (client AccountsClient) FailoverPreparer(ctx context.Context, resourceGroup
// http.Response Body if it receives an error.
func (client AccountsClient) FailoverSender(req *http.Request) (future AccountsFailoverFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
@@ -1194,7 +1196,7 @@ func (client AccountsClient) RestoreBlobRanges(ctx context.Context, resourceGrou
result, err = client.RestoreBlobRangesSender(req)
if err != nil {
- err = autorest.NewErrorWithError(err, "storage.AccountsClient", "RestoreBlobRanges", nil, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "storage.AccountsClient", "RestoreBlobRanges", result.Response(), "Failure sending request")
return
}
@@ -1228,6 +1230,7 @@ func (client AccountsClient) RestoreBlobRangesPreparer(ctx context.Context, reso
// http.Response Body if it receives an error.
func (client AccountsClient) RestoreBlobRangesSender(req *http.Request) (future AccountsRestoreBlobRangesFuture, err error) {
var resp *http.Response
+ future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/storage/README.md b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/storage/README.md
index 9f871638b0bf..7e83a5c0862a 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/storage/README.md
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/storage/README.md
@@ -5,9 +5,10 @@ future. Please use one of the following packages instead.
| Service | Import Path/Repo |
|---------|------------------|
-| Storage - Blobs | [github.com/Azure/azure-storage-blob-go](https://github.com/Azure/azure-storage-blob-go) |
+| Storage - Blobs | [github.com/Azure/azure-sdk-for-go/sdk/storage/azblob](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/storage/azblob) |
| Storage - Files | [github.com/Azure/azure-storage-file-go](https://github.com/Azure/azure-storage-file-go) |
| Storage - Queues | [github.com/Azure/azure-storage-queue-go](https://github.com/Azure/azure-storage-queue-go) |
+| Storage - Tables | [github.com/Azure/azure-sdk-for-go/sdk/data/aztables](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/data/aztables)
The `github.com/Azure/azure-sdk-for-go/storage` package is used to manage
[Azure Storage](https://docs.microsoft.com/azure/storage/) data plane
diff --git a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/version/version.go b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/version/version.go
index 0f11f7c56846..2c4bd1693b51 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/version/version.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/azure-sdk-for-go/version/version.go
@@ -4,4 +4,4 @@ package version
// Licensed under the MIT License. See License.txt in the project root for license information.
// Number contains the semantic version of this SDK.
-const Number = "v55.8.0"
+const Number = "v63.4.0"
diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/adal/token.go b/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/adal/token.go
index 20767178c42c..310be07ec335 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/adal/token.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/adal/token.go
@@ -676,8 +676,6 @@ const (
func (m msiType) String() string {
switch m {
- case msiTypeUnavailable:
- return "unavailable"
case msiTypeAppServiceV20170901:
return "AppServiceV20170901"
case msiTypeCloudShell:
@@ -699,13 +697,9 @@ func getMSIType() (msiType, string, error) {
}
// if ONLY the env var MSI_ENDPOINT is set the msiType is CloudShell
return msiTypeCloudShell, endpointEnvVar, nil
- } else if msiAvailableHook(context.Background(), sender()) {
- // if MSI_ENDPOINT is NOT set AND the IMDS endpoint is available the msiType is IMDS. This will timeout after 500 milliseconds
- return msiTypeIMDS, msiEndpoint, nil
- } else {
- // if MSI_ENDPOINT is NOT set and IMDS endpoint is not available Managed Identity is not available
- return msiTypeUnavailable, "", errors.New("MSI not available")
}
+ // if MSI_ENDPOINT is NOT set assume the msiType is IMDS
+ return msiTypeIMDS, msiEndpoint, nil
}
// GetMSIVMEndpoint gets the MSI endpoint on Virtual Machines.
@@ -1322,15 +1316,13 @@ func NewMultiTenantServicePrincipalTokenFromCertificate(multiTenantCfg MultiTena
}
// MSIAvailable returns true if the MSI endpoint is available for authentication.
-func MSIAvailable(ctx context.Context, sender Sender) bool {
- resp, err := getMSIEndpoint(ctx, sender)
+func MSIAvailable(ctx context.Context, s Sender) bool {
+ if s == nil {
+ s = sender()
+ }
+ resp, err := getMSIEndpoint(ctx, s)
if err == nil {
resp.Body.Close()
}
return err == nil
}
-
-// used for testing purposes
-var msiAvailableHook = func(ctx context.Context, sender Sender) bool {
- return MSIAvailable(ctx, sender)
-}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/adal/token_1.13.go b/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/adal/token_1.13.go
index aa5ea47d9b3a..89190a4213cf 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/adal/token_1.13.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/adal/token_1.13.go
@@ -25,7 +25,7 @@ import (
)
func getMSIEndpoint(ctx context.Context, sender Sender) (*http.Response, error) {
- tempCtx, cancel := context.WithTimeout(ctx, 500*time.Millisecond)
+ tempCtx, cancel := context.WithTimeout(ctx, 2*time.Second)
defer cancel()
// http.NewRequestWithContext() was added in Go 1.13
req, _ := http.NewRequestWithContext(tempCtx, http.MethodGet, msiEndpoint, nil)
diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/adal/token_legacy.go b/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/adal/token_legacy.go
index 6a4690a25b02..27ec4efad7c4 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/adal/token_legacy.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/adal/token_legacy.go
@@ -24,7 +24,7 @@ import (
)
func getMSIEndpoint(ctx context.Context, sender Sender) (*http.Response, error) {
- tempCtx, cancel := context.WithTimeout(ctx, 500*time.Millisecond)
+ tempCtx, cancel := context.WithTimeout(ctx, 2*time.Second)
defer cancel()
req, _ := http.NewRequest(http.MethodGet, msiEndpoint, nil)
req = req.WithContext(tempCtx)
diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/azure/azure.go b/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/azure/azure.go
index b6c6314f0740..1328f1764c23 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/azure/azure.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/azure/azure.go
@@ -68,7 +68,7 @@ func (se ServiceError) Error() string {
if err != nil {
result += fmt.Sprintf(" Details=%v", se.Details)
}
- result += fmt.Sprintf(" Details=%v", string(d))
+ result += fmt.Sprintf(" Details=%s", d)
}
if se.InnerError != nil {
@@ -76,7 +76,7 @@ func (se ServiceError) Error() string {
if err != nil {
result += fmt.Sprintf(" InnerError=%v", se.InnerError)
}
- result += fmt.Sprintf(" InnerError=%v", string(d))
+ result += fmt.Sprintf(" InnerError=%s", d)
}
if se.AdditionalInfo != nil {
@@ -84,7 +84,7 @@ func (se ServiceError) Error() string {
if err != nil {
result += fmt.Sprintf(" AdditionalInfo=%v", se.AdditionalInfo)
}
- result += fmt.Sprintf(" AdditionalInfo=%v", string(d))
+ result += fmt.Sprintf(" AdditionalInfo=%s", d)
}
return result
@@ -335,13 +335,13 @@ func WithErrorUnlessStatusCode(codes ...int) autorest.RespondDecorator {
b, decodeErr := autorest.CopyAndDecode(encodedAs, resp.Body, &e)
resp.Body = ioutil.NopCloser(&b)
if decodeErr != nil {
- return fmt.Errorf("autorest/azure: error response cannot be parsed: %q error: %v", b.String(), decodeErr)
+ return fmt.Errorf("autorest/azure: error response cannot be parsed: %q error: %v", b, decodeErr)
}
if e.ServiceError == nil {
// Check if error is unwrapped ServiceError
decoder := autorest.NewDecoder(encodedAs, bytes.NewReader(b.Bytes()))
if err := decoder.Decode(&e.ServiceError); err != nil {
- return fmt.Errorf("autorest/azure: error response cannot be parsed: %q error: %v", b.String(), err)
+ return fmt.Errorf("autorest/azure: error response cannot be parsed: %q error: %v", b, err)
}
// for example, should the API return the literal value `null` as the response
@@ -364,7 +364,7 @@ func WithErrorUnlessStatusCode(codes ...int) autorest.RespondDecorator {
rawBody := map[string]interface{}{}
decoder := autorest.NewDecoder(encodedAs, bytes.NewReader(b.Bytes()))
if err := decoder.Decode(&rawBody); err != nil {
- return fmt.Errorf("autorest/azure: error response cannot be parsed: %q error: %v", b.String(), err)
+ return fmt.Errorf("autorest/azure: error response cannot be parsed: %q error: %v", b, err)
}
e.ServiceError = &ServiceError{
diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/azure/environments.go b/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/azure/environments.go
index 8192e1105419..b0a53769f26b 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/azure/environments.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/azure/environments.go
@@ -34,8 +34,10 @@ const (
var environments = map[string]Environment{
"AZURECHINACLOUD": ChinaCloud,
"AZUREGERMANCLOUD": GermanCloud,
+ "AZURECLOUD": PublicCloud,
"AZUREPUBLICCLOUD": PublicCloud,
- "AZUREUSGOVERNMENTCLOUD": USGovernmentCloud,
+ "AZUREUSGOVERNMENT": USGovernmentCloud,
+ "AZUREUSGOVERNMENTCLOUD": USGovernmentCloud, //TODO: deprecate
}
// ResourceIdentifier contains a set of Azure resource IDs.
@@ -50,6 +52,9 @@ type ResourceIdentifier struct {
Synapse string `json:"synapse"`
ServiceBus string `json:"serviceBus"`
SQLDatabase string `json:"sqlDatabase"`
+ CosmosDB string `json:"cosmosDB"`
+ ManagedHSM string `json:"managedHSM"`
+ MicrosoftGraph string `json:"microsoftGraph"`
}
// Environment represents a set of endpoints for each of Azure's Clouds.
@@ -62,9 +67,11 @@ type Environment struct {
ActiveDirectoryEndpoint string `json:"activeDirectoryEndpoint"`
GalleryEndpoint string `json:"galleryEndpoint"`
KeyVaultEndpoint string `json:"keyVaultEndpoint"`
+ ManagedHSMEndpoint string `json:"managedHSMEndpoint"`
GraphEndpoint string `json:"graphEndpoint"`
ServiceBusEndpoint string `json:"serviceBusEndpoint"`
BatchManagementEndpoint string `json:"batchManagementEndpoint"`
+ MicrosoftGraphEndpoint string `json:"microsoftGraphEndpoint"`
StorageEndpointSuffix string `json:"storageEndpointSuffix"`
CosmosDBDNSSuffix string `json:"cosmosDBDNSSuffix"`
MariaDBDNSSuffix string `json:"mariaDBDNSSuffix"`
@@ -73,6 +80,7 @@ type Environment struct {
SQLDatabaseDNSSuffix string `json:"sqlDatabaseDNSSuffix"`
TrafficManagerDNSSuffix string `json:"trafficManagerDNSSuffix"`
KeyVaultDNSSuffix string `json:"keyVaultDNSSuffix"`
+ ManagedHSMDNSSuffix string `json:"managedHSMDNSSuffix"`
ServiceBusEndpointSuffix string `json:"serviceBusEndpointSuffix"`
ServiceManagementVMDNSSuffix string `json:"serviceManagementVMDNSSuffix"`
ResourceManagerVMDNSSuffix string `json:"resourceManagerVMDNSSuffix"`
@@ -80,6 +88,7 @@ type Environment struct {
TokenAudience string `json:"tokenAudience"`
APIManagementHostNameSuffix string `json:"apiManagementHostNameSuffix"`
SynapseEndpointSuffix string `json:"synapseEndpointSuffix"`
+ DatalakeSuffix string `json:"datalakeSuffix"`
ResourceIdentifiers ResourceIdentifier `json:"resourceIdentifiers"`
}
@@ -94,9 +103,11 @@ var (
ActiveDirectoryEndpoint: "https://login.microsoftonline.com/",
GalleryEndpoint: "https://gallery.azure.com/",
KeyVaultEndpoint: "https://vault.azure.net/",
+ ManagedHSMEndpoint: "https://managedhsm.azure.net/",
GraphEndpoint: "https://graph.windows.net/",
ServiceBusEndpoint: "https://servicebus.windows.net/",
BatchManagementEndpoint: "https://batch.core.windows.net/",
+ MicrosoftGraphEndpoint: "https://graph.microsoft.com/",
StorageEndpointSuffix: "core.windows.net",
CosmosDBDNSSuffix: "documents.azure.com",
MariaDBDNSSuffix: "mariadb.database.azure.com",
@@ -105,6 +116,7 @@ var (
SQLDatabaseDNSSuffix: "database.windows.net",
TrafficManagerDNSSuffix: "trafficmanager.net",
KeyVaultDNSSuffix: "vault.azure.net",
+ ManagedHSMDNSSuffix: "managedhsm.azure.net",
ServiceBusEndpointSuffix: "servicebus.windows.net",
ServiceManagementVMDNSSuffix: "cloudapp.net",
ResourceManagerVMDNSSuffix: "cloudapp.azure.com",
@@ -112,6 +124,7 @@ var (
TokenAudience: "https://management.azure.com/",
APIManagementHostNameSuffix: "azure-api.net",
SynapseEndpointSuffix: "dev.azuresynapse.net",
+ DatalakeSuffix: "azuredatalakestore.net",
ResourceIdentifiers: ResourceIdentifier{
Graph: "https://graph.windows.net/",
KeyVault: "https://vault.azure.net",
@@ -123,6 +136,9 @@ var (
Synapse: "https://dev.azuresynapse.net",
ServiceBus: "https://servicebus.azure.net/",
SQLDatabase: "https://database.windows.net/",
+ CosmosDB: "https://cosmos.azure.com",
+ ManagedHSM: "https://managedhsm.azure.net",
+ MicrosoftGraph: "https://graph.microsoft.com/",
},
}
@@ -136,9 +152,11 @@ var (
ActiveDirectoryEndpoint: "https://login.microsoftonline.us/",
GalleryEndpoint: "https://gallery.usgovcloudapi.net/",
KeyVaultEndpoint: "https://vault.usgovcloudapi.net/",
+ ManagedHSMEndpoint: NotAvailable,
GraphEndpoint: "https://graph.windows.net/",
ServiceBusEndpoint: "https://servicebus.usgovcloudapi.net/",
BatchManagementEndpoint: "https://batch.core.usgovcloudapi.net/",
+ MicrosoftGraphEndpoint: "https://graph.microsoft.us/",
StorageEndpointSuffix: "core.usgovcloudapi.net",
CosmosDBDNSSuffix: "documents.azure.us",
MariaDBDNSSuffix: "mariadb.database.usgovcloudapi.net",
@@ -147,13 +165,15 @@ var (
SQLDatabaseDNSSuffix: "database.usgovcloudapi.net",
TrafficManagerDNSSuffix: "usgovtrafficmanager.net",
KeyVaultDNSSuffix: "vault.usgovcloudapi.net",
+ ManagedHSMDNSSuffix: NotAvailable,
ServiceBusEndpointSuffix: "servicebus.usgovcloudapi.net",
ServiceManagementVMDNSSuffix: "usgovcloudapp.net",
ResourceManagerVMDNSSuffix: "cloudapp.usgovcloudapi.net",
ContainerRegistryDNSSuffix: "azurecr.us",
TokenAudience: "https://management.usgovcloudapi.net/",
APIManagementHostNameSuffix: "azure-api.us",
- SynapseEndpointSuffix: NotAvailable,
+ SynapseEndpointSuffix: "dev.azuresynapse.usgovcloudapi.net",
+ DatalakeSuffix: NotAvailable,
ResourceIdentifiers: ResourceIdentifier{
Graph: "https://graph.windows.net/",
KeyVault: "https://vault.usgovcloudapi.net",
@@ -162,9 +182,12 @@ var (
OperationalInsights: "https://api.loganalytics.us",
OSSRDBMS: "https://ossrdbms-aad.database.usgovcloudapi.net",
Storage: "https://storage.azure.com/",
- Synapse: NotAvailable,
+ Synapse: "https://dev.azuresynapse.usgovcloudapi.net",
ServiceBus: "https://servicebus.azure.net/",
SQLDatabase: "https://database.usgovcloudapi.net/",
+ CosmosDB: "https://cosmos.azure.com",
+ ManagedHSM: NotAvailable,
+ MicrosoftGraph: "https://graph.microsoft.us/",
},
}
@@ -178,9 +201,11 @@ var (
ActiveDirectoryEndpoint: "https://login.chinacloudapi.cn/",
GalleryEndpoint: "https://gallery.chinacloudapi.cn/",
KeyVaultEndpoint: "https://vault.azure.cn/",
+ ManagedHSMEndpoint: NotAvailable,
GraphEndpoint: "https://graph.chinacloudapi.cn/",
ServiceBusEndpoint: "https://servicebus.chinacloudapi.cn/",
BatchManagementEndpoint: "https://batch.chinacloudapi.cn/",
+ MicrosoftGraphEndpoint: "https://microsoftgraph.chinacloudapi.cn/",
StorageEndpointSuffix: "core.chinacloudapi.cn",
CosmosDBDNSSuffix: "documents.azure.cn",
MariaDBDNSSuffix: "mariadb.database.chinacloudapi.cn",
@@ -189,6 +214,7 @@ var (
SQLDatabaseDNSSuffix: "database.chinacloudapi.cn",
TrafficManagerDNSSuffix: "trafficmanager.cn",
KeyVaultDNSSuffix: "vault.azure.cn",
+ ManagedHSMDNSSuffix: NotAvailable,
ServiceBusEndpointSuffix: "servicebus.chinacloudapi.cn",
ServiceManagementVMDNSSuffix: "chinacloudapp.cn",
ResourceManagerVMDNSSuffix: "cloudapp.chinacloudapi.cn",
@@ -196,6 +222,7 @@ var (
TokenAudience: "https://management.chinacloudapi.cn/",
APIManagementHostNameSuffix: "azure-api.cn",
SynapseEndpointSuffix: "dev.azuresynapse.azure.cn",
+ DatalakeSuffix: NotAvailable,
ResourceIdentifiers: ResourceIdentifier{
Graph: "https://graph.chinacloudapi.cn/",
KeyVault: "https://vault.azure.cn",
@@ -207,6 +234,9 @@ var (
Synapse: "https://dev.azuresynapse.net",
ServiceBus: "https://servicebus.azure.net/",
SQLDatabase: "https://database.chinacloudapi.cn/",
+ CosmosDB: "https://cosmos.azure.com",
+ ManagedHSM: NotAvailable,
+ MicrosoftGraph: "https://microsoftgraph.chinacloudapi.cn",
},
}
@@ -220,9 +250,11 @@ var (
ActiveDirectoryEndpoint: "https://login.microsoftonline.de/",
GalleryEndpoint: "https://gallery.cloudapi.de/",
KeyVaultEndpoint: "https://vault.microsoftazure.de/",
+ ManagedHSMEndpoint: NotAvailable,
GraphEndpoint: "https://graph.cloudapi.de/",
ServiceBusEndpoint: "https://servicebus.cloudapi.de/",
BatchManagementEndpoint: "https://batch.cloudapi.de/",
+ MicrosoftGraphEndpoint: NotAvailable,
StorageEndpointSuffix: "core.cloudapi.de",
CosmosDBDNSSuffix: "documents.microsoftazure.de",
MariaDBDNSSuffix: "mariadb.database.cloudapi.de",
@@ -231,6 +263,7 @@ var (
SQLDatabaseDNSSuffix: "database.cloudapi.de",
TrafficManagerDNSSuffix: "azuretrafficmanager.de",
KeyVaultDNSSuffix: "vault.microsoftazure.de",
+ ManagedHSMDNSSuffix: NotAvailable,
ServiceBusEndpointSuffix: "servicebus.cloudapi.de",
ServiceManagementVMDNSSuffix: "azurecloudapp.de",
ResourceManagerVMDNSSuffix: "cloudapp.microsoftazure.de",
@@ -238,6 +271,7 @@ var (
TokenAudience: "https://management.microsoftazure.de/",
APIManagementHostNameSuffix: NotAvailable,
SynapseEndpointSuffix: NotAvailable,
+ DatalakeSuffix: NotAvailable,
ResourceIdentifiers: ResourceIdentifier{
Graph: "https://graph.cloudapi.de/",
KeyVault: "https://vault.microsoftazure.de",
@@ -249,6 +283,9 @@ var (
Synapse: NotAvailable,
ServiceBus: "https://servicebus.azure.net/",
SQLDatabase: "https://database.cloudapi.de/",
+ CosmosDB: "https://cosmos.azure.com",
+ ManagedHSM: NotAvailable,
+ MicrosoftGraph: NotAvailable,
},
}
)
diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/azure/rp.go b/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/azure/rp.go
index c6d39f686655..5b52357f951d 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/azure/rp.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/azure/rp.go
@@ -64,7 +64,7 @@ func DoRetryWithRegistration(client autorest.Client) autorest.SendDecorator {
if re.ServiceError != nil && re.ServiceError.Code == "MissingSubscriptionRegistration" {
regErr := register(client, r, re)
if regErr != nil {
- return resp, fmt.Errorf("failed auto registering Resource Provider: %s. Original error: %s", regErr, err)
+ return resp, fmt.Errorf("failed auto registering Resource Provider: %s. Original error: %w", regErr, err)
}
}
}
diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/go.mod b/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/go.mod
index 9f518c11d750..680b9676fe82 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/go.mod
+++ b/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/go.mod
@@ -4,9 +4,10 @@ go 1.15
require (
github.com/Azure/go-autorest v14.2.0+incompatible
- github.com/Azure/go-autorest/autorest/adal v0.9.14
- github.com/Azure/go-autorest/autorest/mocks v0.4.1
+ github.com/Azure/go-autorest/autorest/adal v0.9.18
+ github.com/Azure/go-autorest/autorest/mocks v0.4.2
github.com/Azure/go-autorest/logger v0.2.1
github.com/Azure/go-autorest/tracing v0.6.0
- golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
+ github.com/golang-jwt/jwt/v4 v4.2.0 // indirect
+ golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3
)
diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/go.sum b/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/go.sum
index 8728b1fc655b..4bb88d68ce5e 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/go.sum
+++ b/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/go.sum
@@ -1,28 +1,28 @@
github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs=
github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
-github.com/Azure/go-autorest/autorest/adal v0.9.14 h1:G8hexQdV5D4khOXrWG2YuLCFKhWYmWD8bHYaXN5ophk=
-github.com/Azure/go-autorest/autorest/adal v0.9.14/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M=
+github.com/Azure/go-autorest/autorest/adal v0.9.18 h1:kLnPsRjzZZUF3K5REu/Kc+qMQrvuza2bwSnNdhmzLfQ=
+github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ=
github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw=
github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74=
-github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk=
github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=
+github.com/Azure/go-autorest/autorest/mocks v0.4.2 h1:PGN4EDXnuQbojHbU0UWoNvmu9AGVwYHG9/fkDYhtAfw=
+github.com/Azure/go-autorest/autorest/mocks v0.4.2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU=
github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg=
github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8=
github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo=
github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU=
-github.com/form3tech-oss/jwt-go v3.2.2+incompatible h1:TcekIExNqud5crz4xD2pavyTgWiPvpYe4Xau31I0PRk=
-github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
-golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg=
+github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
+github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU=
+github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
-golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 h1:0es+/5331RGQPcXlMfP+WrnIIS6dNnNRe0WB02W0F4M=
+golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
-golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/mocks/go.mod b/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/mocks/go.mod
index c3f6b7e866de..ef79c8dfac26 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/mocks/go.mod
+++ b/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/mocks/go.mod
@@ -1,5 +1,5 @@
module github.com/Azure/go-autorest/autorest/mocks
-go 1.12
+go 1.15
require github.com/Azure/go-autorest v14.2.0+incompatible
diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/mocks/go_mod_tidy_hack.go b/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/mocks/go_mod_tidy_hack.go
index 85a4baf1009b..175a1c79f45c 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/mocks/go_mod_tidy_hack.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/mocks/go_mod_tidy_hack.go
@@ -1,3 +1,4 @@
+//go:build modhack
// +build modhack
package mocks
diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/mocks/mocks.go b/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/mocks/mocks.go
index 18847ba0f55d..0317825ee190 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/mocks/mocks.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/mocks/mocks.go
@@ -26,28 +26,25 @@ import (
// Body implements acceptable body over a string.
type Body struct {
- s string
- b []byte
+ src []byte
+ buf []byte
isOpen bool
closeAttempts int
}
// NewBody creates a new instance of Body.
func NewBody(s string) *Body {
- return (&Body{s: s}).reset()
+ return (&Body{src: []byte(s)}).reset()
}
// NewBodyWithBytes creates a new instance of Body.
func NewBodyWithBytes(b []byte) *Body {
- return &Body{
- b: b,
- isOpen: true,
- }
+ return (&Body{src: b}).reset()
}
// NewBodyClose creates a new instance of Body.
func NewBodyClose(s string) *Body {
- return &Body{s: s}
+ return &Body{src: []byte(s)}
}
// Read reads into the passed byte slice and returns the bytes read.
@@ -55,11 +52,11 @@ func (body *Body) Read(b []byte) (n int, err error) {
if !body.IsOpen() {
return 0, fmt.Errorf("ERROR: Body has been closed")
}
- if len(body.b) == 0 {
+ if len(body.buf) == 0 {
return 0, io.EOF
}
- n = copy(b, body.b)
- body.b = body.b[n:]
+ n = copy(b, body.buf)
+ body.buf = body.buf[n:]
return n, nil
}
@@ -84,7 +81,7 @@ func (body *Body) IsOpen() bool {
func (body *Body) reset() *Body {
body.isOpen = true
- body.b = []byte(body.s)
+ body.buf = body.src
return body
}
@@ -93,7 +90,7 @@ func (body *Body) Length() int64 {
if body == nil {
return 0
}
- return int64(len(body.b))
+ return int64(len(body.src))
}
type response struct {
diff --git a/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/preparer.go b/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/preparer.go
index 98574a4155fc..121a66fa883d 100644
--- a/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/preparer.go
+++ b/cluster-autoscaler/vendor/github.com/Azure/go-autorest/autorest/preparer.go
@@ -241,6 +241,8 @@ func WithBaseURL(baseURL string) PrepareDecorator {
return r, fmt.Errorf("autorest: No scheme detected in URL %s", baseURL)
}
if u.RawQuery != "" {
+ // handle unencoded semicolons (ideally the server would send them already encoded)
+ u.RawQuery = strings.Replace(u.RawQuery, ";", "%3B", -1)
q, err := url.ParseQuery(u.RawQuery)
if err != nil {
return r, err
diff --git a/cluster-autoscaler/vendor/github.com/cespare/xxhash/v2/.travis.yml b/cluster-autoscaler/vendor/github.com/cespare/xxhash/v2/.travis.yml
deleted file mode 100644
index c516ea88da73..000000000000
--- a/cluster-autoscaler/vendor/github.com/cespare/xxhash/v2/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: go
-go:
- - "1.x"
- - master
-env:
- - TAGS=""
- - TAGS="-tags purego"
-script: go test $TAGS -v ./...
diff --git a/cluster-autoscaler/vendor/github.com/cespare/xxhash/v2/README.md b/cluster-autoscaler/vendor/github.com/cespare/xxhash/v2/README.md
index 2fd8693c21b2..792b4a60b346 100644
--- a/cluster-autoscaler/vendor/github.com/cespare/xxhash/v2/README.md
+++ b/cluster-autoscaler/vendor/github.com/cespare/xxhash/v2/README.md
@@ -1,7 +1,7 @@
# xxhash
-[![GoDoc](https://godoc.org/github.com/cespare/xxhash?status.svg)](https://godoc.org/github.com/cespare/xxhash)
-[![Build Status](https://travis-ci.org/cespare/xxhash.svg?branch=master)](https://travis-ci.org/cespare/xxhash)
+[![Go Reference](https://pkg.go.dev/badge/github.com/cespare/xxhash/v2.svg)](https://pkg.go.dev/github.com/cespare/xxhash/v2)
+[![Test](https://github.com/cespare/xxhash/actions/workflows/test.yml/badge.svg)](https://github.com/cespare/xxhash/actions/workflows/test.yml)
xxhash is a Go implementation of the 64-bit
[xxHash](http://cyan4973.github.io/xxHash/) algorithm, XXH64. This is a
@@ -64,4 +64,6 @@ $ go test -benchtime 10s -bench '/xxhash,direct,bytes'
- [InfluxDB](https://github.com/influxdata/influxdb)
- [Prometheus](https://github.com/prometheus/prometheus)
+- [VictoriaMetrics](https://github.com/VictoriaMetrics/VictoriaMetrics)
- [FreeCache](https://github.com/coocood/freecache)
+- [FastCache](https://github.com/VictoriaMetrics/fastcache)
diff --git a/cluster-autoscaler/vendor/github.com/cespare/xxhash/v2/xxhash.go b/cluster-autoscaler/vendor/github.com/cespare/xxhash/v2/xxhash.go
index db0b35fbe39f..15c835d5417c 100644
--- a/cluster-autoscaler/vendor/github.com/cespare/xxhash/v2/xxhash.go
+++ b/cluster-autoscaler/vendor/github.com/cespare/xxhash/v2/xxhash.go
@@ -193,7 +193,6 @@ func (d *Digest) UnmarshalBinary(b []byte) error {
b, d.v4 = consumeUint64(b)
b, d.total = consumeUint64(b)
copy(d.mem[:], b)
- b = b[len(d.mem):]
d.n = int(d.total % uint64(len(d.mem)))
return nil
}
diff --git a/cluster-autoscaler/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.s b/cluster-autoscaler/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.s
index d580e32aed4a..be8db5bf7960 100644
--- a/cluster-autoscaler/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.s
+++ b/cluster-autoscaler/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.s
@@ -6,7 +6,7 @@
// Register allocation:
// AX h
-// CX pointer to advance through b
+// SI pointer to advance through b
// DX n
// BX loop end
// R8 v1, k1
@@ -16,39 +16,39 @@
// R12 tmp
// R13 prime1v
// R14 prime2v
-// R15 prime4v
+// DI prime4v
-// round reads from and advances the buffer pointer in CX.
+// round reads from and advances the buffer pointer in SI.
// It assumes that R13 has prime1v and R14 has prime2v.
#define round(r) \
- MOVQ (CX), R12 \
- ADDQ $8, CX \
+ MOVQ (SI), R12 \
+ ADDQ $8, SI \
IMULQ R14, R12 \
ADDQ R12, r \
ROLQ $31, r \
IMULQ R13, r
// mergeRound applies a merge round on the two registers acc and val.
-// It assumes that R13 has prime1v, R14 has prime2v, and R15 has prime4v.
+// It assumes that R13 has prime1v, R14 has prime2v, and DI has prime4v.
#define mergeRound(acc, val) \
IMULQ R14, val \
ROLQ $31, val \
IMULQ R13, val \
XORQ val, acc \
IMULQ R13, acc \
- ADDQ R15, acc
+ ADDQ DI, acc
// func Sum64(b []byte) uint64
TEXT ·Sum64(SB), NOSPLIT, $0-32
// Load fixed primes.
MOVQ ·prime1v(SB), R13
MOVQ ·prime2v(SB), R14
- MOVQ ·prime4v(SB), R15
+ MOVQ ·prime4v(SB), DI
// Load slice.
- MOVQ b_base+0(FP), CX
+ MOVQ b_base+0(FP), SI
MOVQ b_len+8(FP), DX
- LEAQ (CX)(DX*1), BX
+ LEAQ (SI)(DX*1), BX
// The first loop limit will be len(b)-32.
SUBQ $32, BX
@@ -65,14 +65,14 @@ TEXT ·Sum64(SB), NOSPLIT, $0-32
XORQ R11, R11
SUBQ R13, R11
- // Loop until CX > BX.
+ // Loop until SI > BX.
blockLoop:
round(R8)
round(R9)
round(R10)
round(R11)
- CMPQ CX, BX
+ CMPQ SI, BX
JLE blockLoop
MOVQ R8, AX
@@ -100,16 +100,16 @@ noBlocks:
afterBlocks:
ADDQ DX, AX
- // Right now BX has len(b)-32, and we want to loop until CX > len(b)-8.
+ // Right now BX has len(b)-32, and we want to loop until SI > len(b)-8.
ADDQ $24, BX
- CMPQ CX, BX
+ CMPQ SI, BX
JG fourByte
wordLoop:
// Calculate k1.
- MOVQ (CX), R8
- ADDQ $8, CX
+ MOVQ (SI), R8
+ ADDQ $8, SI
IMULQ R14, R8
ROLQ $31, R8
IMULQ R13, R8
@@ -117,18 +117,18 @@ wordLoop:
XORQ R8, AX
ROLQ $27, AX
IMULQ R13, AX
- ADDQ R15, AX
+ ADDQ DI, AX
- CMPQ CX, BX
+ CMPQ SI, BX
JLE wordLoop
fourByte:
ADDQ $4, BX
- CMPQ CX, BX
+ CMPQ SI, BX
JG singles
- MOVL (CX), R8
- ADDQ $4, CX
+ MOVL (SI), R8
+ ADDQ $4, SI
IMULQ R13, R8
XORQ R8, AX
@@ -138,19 +138,19 @@ fourByte:
singles:
ADDQ $4, BX
- CMPQ CX, BX
+ CMPQ SI, BX
JGE finalize
singlesLoop:
- MOVBQZX (CX), R12
- ADDQ $1, CX
+ MOVBQZX (SI), R12
+ ADDQ $1, SI
IMULQ ·prime5v(SB), R12
XORQ R12, AX
ROLQ $11, AX
IMULQ R13, AX
- CMPQ CX, BX
+ CMPQ SI, BX
JL singlesLoop
finalize:
@@ -179,9 +179,9 @@ TEXT ·writeBlocks(SB), NOSPLIT, $0-40
MOVQ ·prime2v(SB), R14
// Load slice.
- MOVQ b_base+8(FP), CX
+ MOVQ b_base+8(FP), SI
MOVQ b_len+16(FP), DX
- LEAQ (CX)(DX*1), BX
+ LEAQ (SI)(DX*1), BX
SUBQ $32, BX
// Load vN from d.
@@ -199,7 +199,7 @@ blockLoop:
round(R10)
round(R11)
- CMPQ CX, BX
+ CMPQ SI, BX
JLE blockLoop
// Copy vN back to d.
@@ -208,8 +208,8 @@ blockLoop:
MOVQ R10, 16(AX)
MOVQ R11, 24(AX)
- // The number of bytes written is CX minus the old base pointer.
- SUBQ b_base+8(FP), CX
- MOVQ CX, ret+32(FP)
+ // The number of bytes written is SI minus the old base pointer.
+ SUBQ b_base+8(FP), SI
+ MOVQ SI, ret+32(FP)
RET
diff --git a/cluster-autoscaler/vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go b/cluster-autoscaler/vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go
index 53bf76efbc24..376e0ca2e497 100644
--- a/cluster-autoscaler/vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go
+++ b/cluster-autoscaler/vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go
@@ -6,41 +6,52 @@
package xxhash
import (
- "reflect"
"unsafe"
)
-// Notes:
+// In the future it's possible that compiler optimizations will make these
+// XxxString functions unnecessary by realizing that calls such as
+// Sum64([]byte(s)) don't need to copy s. See https://golang.org/issue/2205.
+// If that happens, even if we keep these functions they can be replaced with
+// the trivial safe code.
+
+// NOTE: The usual way of doing an unsafe string-to-[]byte conversion is:
//
-// See https://groups.google.com/d/msg/golang-nuts/dcjzJy-bSpw/tcZYBzQqAQAJ
-// for some discussion about these unsafe conversions.
+// var b []byte
+// bh := (*reflect.SliceHeader)(unsafe.Pointer(&b))
+// bh.Data = (*reflect.StringHeader)(unsafe.Pointer(&s)).Data
+// bh.Len = len(s)
+// bh.Cap = len(s)
//
-// In the future it's possible that compiler optimizations will make these
-// unsafe operations unnecessary: https://golang.org/issue/2205.
+// Unfortunately, as of Go 1.15.3 the inliner's cost model assigns a high enough
+// weight to this sequence of expressions that any function that uses it will
+// not be inlined. Instead, the functions below use a different unsafe
+// conversion designed to minimize the inliner weight and allow both to be
+// inlined. There is also a test (TestInlining) which verifies that these are
+// inlined.
//
-// Both of these wrapper functions still incur function call overhead since they
-// will not be inlined. We could write Go/asm copies of Sum64 and Digest.Write
-// for strings to squeeze out a bit more speed. Mid-stack inlining should
-// eventually fix this.
+// See https://github.com/golang/go/issues/42739 for discussion.
// Sum64String computes the 64-bit xxHash digest of s.
// It may be faster than Sum64([]byte(s)) by avoiding a copy.
func Sum64String(s string) uint64 {
- var b []byte
- bh := (*reflect.SliceHeader)(unsafe.Pointer(&b))
- bh.Data = (*reflect.StringHeader)(unsafe.Pointer(&s)).Data
- bh.Len = len(s)
- bh.Cap = len(s)
+ b := *(*[]byte)(unsafe.Pointer(&sliceHeader{s, len(s)}))
return Sum64(b)
}
// WriteString adds more data to d. It always returns len(s), nil.
// It may be faster than Write([]byte(s)) by avoiding a copy.
func (d *Digest) WriteString(s string) (n int, err error) {
- var b []byte
- bh := (*reflect.SliceHeader)(unsafe.Pointer(&b))
- bh.Data = (*reflect.StringHeader)(unsafe.Pointer(&s)).Data
- bh.Len = len(s)
- bh.Cap = len(s)
- return d.Write(b)
+ d.Write(*(*[]byte)(unsafe.Pointer(&sliceHeader{s, len(s)})))
+ // d.Write always returns len(s), nil.
+ // Ignoring the return output and returning these fixed values buys a
+ // savings of 6 in the inliner's cost model.
+ return len(s), nil
+}
+
+// sliceHeader is similar to reflect.SliceHeader, but it assumes that the layout
+// of the first two words is the same as the layout of a string.
+type sliceHeader struct {
+ s string
+ cap int
}
diff --git a/cluster-autoscaler/vendor/github.com/evanphx/json-patch/patch.go b/cluster-autoscaler/vendor/github.com/evanphx/json-patch/patch.go
index dc2b7e51e60b..4bce5936d502 100644
--- a/cluster-autoscaler/vendor/github.com/evanphx/json-patch/patch.go
+++ b/cluster-autoscaler/vendor/github.com/evanphx/json-patch/patch.go
@@ -568,29 +568,6 @@ func (p Patch) replace(doc *container, op Operation) error {
return errors.Wrapf(err, "replace operation failed to decode path")
}
- if path == "" {
- val := op.value()
-
- if val.which == eRaw {
- if !val.tryDoc() {
- if !val.tryAry() {
- return errors.Wrapf(err, "replace operation value must be object or array")
- }
- }
- }
-
- switch val.which {
- case eAry:
- *doc = &val.ary
- case eDoc:
- *doc = &val.doc
- case eRaw:
- return errors.Wrapf(err, "replace operation hit impossible case")
- }
-
- return nil
- }
-
con, key := findObject(doc, path)
if con == nil {
@@ -657,25 +634,6 @@ func (p Patch) test(doc *container, op Operation) error {
return errors.Wrapf(err, "test operation failed to decode path")
}
- if path == "" {
- var self lazyNode
-
- switch sv := (*doc).(type) {
- case *partialDoc:
- self.doc = *sv
- self.which = eDoc
- case *partialArray:
- self.ary = *sv
- self.which = eAry
- }
-
- if self.equal(op.value()) {
- return nil
- }
-
- return errors.Wrapf(ErrTestFailed, "testing value %s failed", path)
- }
-
con, key := findObject(doc, path)
if con == nil {
diff --git a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md
index a438fe4b4a54..cc01c08f56d5 100644
--- a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md
+++ b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md
@@ -7,9 +7,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
+## [1.5.4] - 2022-04-25
+
+* Windows: add missing defer to `Watcher.WatchList` [#447](https://github.com/fsnotify/fsnotify/pull/447)
+* go.mod: use latest x/sys [#444](https://github.com/fsnotify/fsnotify/pull/444)
+* Fix compilation for OpenBSD [#443](https://github.com/fsnotify/fsnotify/pull/443)
+
+## [1.5.3] - 2022-04-22
+
+* This version is retracted. An incorrect branch is published accidentally [#445](https://github.com/fsnotify/fsnotify/issues/445)
+
+## [1.5.2] - 2022-04-21
+
+* Add a feature to return the directories and files that are being monitored [#374](https://github.com/fsnotify/fsnotify/pull/374)
+* Fix potential crash on windows if `raw.FileNameLength` exceeds `syscall.MAX_PATH` [#361](https://github.com/fsnotify/fsnotify/pull/361)
+* Allow build on unsupported GOOS [#424](https://github.com/fsnotify/fsnotify/pull/424)
+* Don't set `poller.fd` twice in `newFdPoller` [#406](https://github.com/fsnotify/fsnotify/pull/406)
+* fix go vet warnings: call to `(*T).Fatalf` from a non-test goroutine [#416](https://github.com/fsnotify/fsnotify/pull/416)
+
## [1.5.1] - 2021-08-24
-* Revert Add AddRaw to not follow symlinks
+* Revert Add AddRaw to not follow symlinks [#394](https://github.com/fsnotify/fsnotify/pull/394)
## [1.5.0] - 2021-08-20
diff --git a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md
index 828a60b24ba2..8a642563d718 100644
--- a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md
+++ b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md
@@ -48,18 +48,6 @@ fsnotify uses build tags to compile different code on Linux, BSD, macOS, and Win
Before doing a pull request, please do your best to test your changes on multiple platforms, and list which platforms you were able/unable to test on.
-To aid in cross-platform testing there is a Vagrantfile for Linux and BSD.
-
-* Install [Vagrant](http://www.vagrantup.com/) and [VirtualBox](https://www.virtualbox.org/)
-* Setup [Vagrant Gopher](https://github.com/nathany/vagrant-gopher) in your `src` folder.
-* Run `vagrant up` from the project folder. You can also setup just one box with `vagrant up linux` or `vagrant up bsd` (note: the BSD box doesn't support Windows hosts at this time, and NFS may prompt for your host OS password)
-* Once setup, you can run the test suite on a given OS with a single command `vagrant ssh linux -c 'cd fsnotify/fsnotify; go test'`.
-* When you're done, you will want to halt or destroy the Vagrant boxes.
-
-Notice: fsnotify file system events won't trigger in shared folders. The tests get around this limitation by using the /tmp directory.
-
-Right now there is no equivalent solution for Windows and macOS, but there are Windows VMs [freely available from Microsoft](http://www.modern.ie/en-us/virtualization-tools#downloads).
-
### Maintainers
Help maintaining fsnotify is welcome. To be a maintainer:
@@ -67,11 +55,6 @@ Help maintaining fsnotify is welcome. To be a maintainer:
* Submit a pull request and sign the CLA as above.
* You must be able to run the test suite on Mac, Windows, Linux and BSD.
-To keep master clean, the fsnotify project uses the "apply mail" workflow outlined in Nathaniel Talbott's post ["Merge pull request" Considered Harmful][am]. This requires installing [hub][].
-
All code changes should be internal pull requests.
Releases are tagged using [Semantic Versioning](http://semver.org/).
-
-[hub]: https://github.com/github/hub
-[am]: http://blog.spreedly.com/2014/06/24/merge-pull-request-considered-harmful/#.VGa5yZPF_Zs
diff --git a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/README.md b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/README.md
index df57b1b282c6..0731c5ef8adc 100644
--- a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/README.md
+++ b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/README.md
@@ -1,12 +1,8 @@
# File system notifications for Go
-[![GoDoc](https://godoc.org/github.com/fsnotify/fsnotify?status.svg)](https://godoc.org/github.com/fsnotify/fsnotify) [![Go Report Card](https://goreportcard.com/badge/github.com/fsnotify/fsnotify)](https://goreportcard.com/report/github.com/fsnotify/fsnotify)
+[![Go Reference](https://pkg.go.dev/badge/github.com/fsnotify/fsnotify.svg)](https://pkg.go.dev/github.com/fsnotify/fsnotify) [![Go Report Card](https://goreportcard.com/badge/github.com/fsnotify/fsnotify)](https://goreportcard.com/report/github.com/fsnotify/fsnotify) [![Maintainers Wanted](https://img.shields.io/badge/maintainers-wanted-red.svg)](https://github.com/fsnotify/fsnotify/issues/413)
-fsnotify utilizes [golang.org/x/sys](https://godoc.org/golang.org/x/sys) rather than `syscall` from the standard library. Ensure you have the latest version installed by running:
-
-```console
-go get -u golang.org/x/sys/...
-```
+fsnotify utilizes [`golang.org/x/sys`](https://pkg.go.dev/golang.org/x/sys) rather than [`syscall`](https://pkg.go.dev/syscall) from the standard library.
Cross platform: Windows, Linux, BSD and macOS.
@@ -16,22 +12,20 @@ Cross platform: Windows, Linux, BSD and macOS.
| kqueue | BSD, macOS, iOS\* | Supported |
| ReadDirectoryChangesW | Windows | Supported |
| FSEvents | macOS | [Planned](https://github.com/fsnotify/fsnotify/issues/11) |
-| FEN | Solaris 11 | [In Progress](https://github.com/fsnotify/fsnotify/issues/12) |
-| fanotify | Linux 2.6.37+ | [Planned](https://github.com/fsnotify/fsnotify/issues/114) |
+| FEN | Solaris 11 | [In Progress](https://github.com/fsnotify/fsnotify/pull/371) |
+| fanotify | Linux 2.6.37+ | [Maybe](https://github.com/fsnotify/fsnotify/issues/114) |
| USN Journals | Windows | [Maybe](https://github.com/fsnotify/fsnotify/issues/53) |
| Polling | *All* | [Maybe](https://github.com/fsnotify/fsnotify/issues/9) |
\* Android and iOS are untested.
-Please see [the documentation](https://godoc.org/github.com/fsnotify/fsnotify) and consult the [FAQ](#faq) for usage information.
+Please see [the documentation](https://pkg.go.dev/github.com/fsnotify/fsnotify) and consult the [FAQ](#faq) for usage information.
## API stability
-fsnotify is a fork of [howeyc/fsnotify](https://godoc.org/github.com/howeyc/fsnotify) with a new API as of v1.0. The API is based on [this design document](http://goo.gl/MrYxyA).
-
-All [releases](https://github.com/fsnotify/fsnotify/releases) are tagged based on [Semantic Versioning](http://semver.org/). Further API changes are [planned](https://github.com/fsnotify/fsnotify/milestones), and will be tagged with a new major revision number.
+fsnotify is a fork of [howeyc/fsnotify](https://github.com/howeyc/fsnotify) with a new API as of v1.0. The API is based on [this design document](http://goo.gl/MrYxyA).
-Go 1.6 supports dependencies located in the `vendor/` folder. Unless you are creating a library, it is recommended that you copy fsnotify into `vendor/github.com/fsnotify/fsnotify` within your project, and likewise for `golang.org/x/sys`.
+All [releases](https://github.com/fsnotify/fsnotify/releases) are tagged based on [Semantic Versioning](http://semver.org/).
## Usage
@@ -84,10 +78,6 @@ func main() {
Please refer to [CONTRIBUTING][] before opening an issue or pull request.
-## Example
-
-See [example_test.go](https://github.com/fsnotify/fsnotify/blob/master/example_test.go).
-
## FAQ
**When a file is moved to another directory is it still being watched?**
diff --git a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/fsnotify_unsupported.go b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/fsnotify_unsupported.go
new file mode 100644
index 000000000000..59688559836f
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/fsnotify_unsupported.go
@@ -0,0 +1,36 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !darwin && !dragonfly && !freebsd && !openbsd && !linux && !netbsd && !solaris && !windows
+// +build !darwin,!dragonfly,!freebsd,!openbsd,!linux,!netbsd,!solaris,!windows
+
+package fsnotify
+
+import (
+ "fmt"
+ "runtime"
+)
+
+// Watcher watches a set of files, delivering events to a channel.
+type Watcher struct{}
+
+// NewWatcher establishes a new watcher with the underlying OS and begins waiting for events.
+func NewWatcher() (*Watcher, error) {
+ return nil, fmt.Errorf("fsnotify not supported on %s", runtime.GOOS)
+}
+
+// Close removes all watches and closes the events channel.
+func (w *Watcher) Close() error {
+ return nil
+}
+
+// Add starts watching the named file or directory (non-recursively).
+func (w *Watcher) Add(name string) error {
+ return nil
+}
+
+// Remove stops watching the the named file or directory (non-recursively).
+func (w *Watcher) Remove(name string) error {
+ return nil
+}
diff --git a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/go.mod b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/go.mod
index 54089e48b7bd..48cfd07fe230 100644
--- a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/go.mod
+++ b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/go.mod
@@ -1,7 +1,10 @@
module github.com/fsnotify/fsnotify
-go 1.13
+go 1.16
-require golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c
+require golang.org/x/sys v0.0.0-20220412211240-33da011f77ad
-retract v1.5.0
+retract (
+ v1.5.3 // Published an incorrect branch accidentally https://github.com/fsnotify/fsnotify/issues/445
+ v1.5.0 // Contains symlink regression https://github.com/fsnotify/fsnotify/pull/394
+)
diff --git a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/go.sum b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/go.sum
index 0f478630ca06..7f2d82d5c1bc 100644
--- a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/go.sum
+++ b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/go.sum
@@ -1,2 +1,2 @@
-golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I=
-golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0=
+golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
diff --git a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/inotify.go b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/inotify.go
index eb87699b5b4c..a6d0e0ec8c10 100644
--- a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/inotify.go
+++ b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/inotify.go
@@ -163,6 +163,19 @@ func (w *Watcher) Remove(name string) error {
return nil
}
+// WatchList returns the directories and files that are being monitered.
+func (w *Watcher) WatchList() []string {
+ w.mu.Lock()
+ defer w.mu.Unlock()
+
+ entries := make([]string, 0, len(w.watches))
+ for pathname := range w.watches {
+ entries = append(entries, pathname)
+ }
+
+ return entries
+}
+
type watch struct {
wd uint32 // Watch descriptor (as returned by the inotify_add_watch() syscall)
flags uint32 // inotify flags of this watch (see inotify(7) for the list of valid flags)
diff --git a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/inotify_poller.go b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/inotify_poller.go
index e9ff9439f7f0..b572a37c3f1a 100644
--- a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/inotify_poller.go
+++ b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/inotify_poller.go
@@ -38,7 +38,6 @@ func newFdPoller(fd int) (*fdPoller, error) {
poller.close()
}
}()
- poller.fd = fd
// Create epoll fd
poller.epfd, errno = unix.EpollCreate1(unix.EPOLL_CLOEXEC)
diff --git a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/kqueue.go b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/kqueue.go
index 368f5b790d4d..6fb8d8532e7f 100644
--- a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/kqueue.go
+++ b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/kqueue.go
@@ -148,6 +148,19 @@ func (w *Watcher) Remove(name string) error {
return nil
}
+// WatchList returns the directories and files that are being monitered.
+func (w *Watcher) WatchList() []string {
+ w.mu.Lock()
+ defer w.mu.Unlock()
+
+ entries := make([]string, 0, len(w.watches))
+ for pathname := range w.watches {
+ entries = append(entries, pathname)
+ }
+
+ return entries
+}
+
// Watch all events (except NOTE_EXTEND, NOTE_LINK, NOTE_REVOKE)
const noteAllEvents = unix.NOTE_DELETE | unix.NOTE_WRITE | unix.NOTE_ATTRIB | unix.NOTE_RENAME
diff --git a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/windows.go b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/windows.go
index c02b75f7c374..02ce7deb0bbf 100644
--- a/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/windows.go
+++ b/cluster-autoscaler/vendor/github.com/fsnotify/fsnotify/windows.go
@@ -12,6 +12,7 @@ import (
"fmt"
"os"
"path/filepath"
+ "reflect"
"runtime"
"sync"
"syscall"
@@ -96,6 +97,21 @@ func (w *Watcher) Remove(name string) error {
return <-in.reply
}
+// WatchList returns the directories and files that are being monitered.
+func (w *Watcher) WatchList() []string {
+ w.mu.Lock()
+ defer w.mu.Unlock()
+
+ entries := make([]string, 0, len(w.watches))
+ for _, entry := range w.watches {
+ for _, watchEntry := range entry {
+ entries = append(entries, watchEntry.path)
+ }
+ }
+
+ return entries
+}
+
const (
// Options for AddWatch
sysFSONESHOT = 0x80000000
@@ -452,8 +468,16 @@ func (w *Watcher) readEvents() {
// Point "raw" to the event in the buffer
raw := (*syscall.FileNotifyInformation)(unsafe.Pointer(&watch.buf[offset]))
- buf := (*[syscall.MAX_PATH]uint16)(unsafe.Pointer(&raw.FileName))
- name := syscall.UTF16ToString(buf[:raw.FileNameLength/2])
+ // TODO: Consider using unsafe.Slice that is available from go1.17
+ // https://stackoverflow.com/questions/51187973/how-to-create-an-array-or-a-slice-from-an-array-unsafe-pointer-in-golang
+ // instead of using a fixed syscall.MAX_PATH buf, we create a buf that is the size of the path name
+ size := int(raw.FileNameLength / 2)
+ var buf []uint16
+ sh := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
+ sh.Data = uintptr(unsafe.Pointer(&raw.FileName))
+ sh.Len = size
+ sh.Cap = size
+ name := syscall.UTF16ToString(buf)
fullname := filepath.Join(watch.path, name)
var mask uint64
diff --git a/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/MIGRATION_GUIDE.md b/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/MIGRATION_GUIDE.md
index 0b621493008c..32966f59818e 100644
--- a/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/MIGRATION_GUIDE.md
+++ b/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/MIGRATION_GUIDE.md
@@ -1,6 +1,6 @@
## Migration Guide (v4.0.0)
-Starting from [v4.0.0](https://github.com/golang-jwt/jwt/releases/tag/v4.0.0]), the import path will be:
+Starting from [v4.0.0](https://github.com/golang-jwt/jwt/releases/tag/v4.0.0), the import path will be:
"github.com/golang-jwt/jwt/v4"
@@ -19,4 +19,4 @@ go mod tidy
## Older releases (before v3.2.0)
-The original migration guide for older releases can be found at https://github.com/dgrijalva/jwt-go/blob/master/MIGRATION_GUIDE.md.
\ No newline at end of file
+The original migration guide for older releases can be found at https://github.com/dgrijalva/jwt-go/blob/master/MIGRATION_GUIDE.md.
diff --git a/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/README.md b/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/README.md
index 96fe3b978032..3072d24a9da6 100644
--- a/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/README.md
+++ b/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/README.md
@@ -1,12 +1,12 @@
# jwt-go
[![build](https://github.com/golang-jwt/jwt/actions/workflows/build.yml/badge.svg)](https://github.com/golang-jwt/jwt/actions/workflows/build.yml)
-[![Go Reference](https://pkg.go.dev/badge/github.com/golang-jwt/jwt.svg)](https://pkg.go.dev/github.com/golang-jwt/jwt)
+[![Go Reference](https://pkg.go.dev/badge/github.com/golang-jwt/jwt/v4.svg)](https://pkg.go.dev/github.com/golang-jwt/jwt/v4)
A [go](http://www.golang.org) (or 'golang' for search engine friendliness) implementation of [JSON Web Tokens](https://datatracker.ietf.org/doc/html/rfc7519).
-Starting with [v4.0.0](https://github.com/golang-jwt/jwt/releases/tag/v4.0.0) this project adds Go module support, but maintains backwards compataibility with older `v3.x.y` tags and upstream `github.com/dgrijalva/jwt-go`.
-See the `MIGRATION_GUIDE.md` for more information.
+Starting with [v4.0.0](https://github.com/golang-jwt/jwt/releases/tag/v4.0.0) this project adds Go module support, but maintains backwards compatibility with older `v3.x.y` tags and upstream `github.com/dgrijalva/jwt-go`.
+See the [`MIGRATION_GUIDE.md`](./MIGRATION_GUIDE.md) for more information.
> After the original author of the library suggested migrating the maintenance of `jwt-go`, a dedicated team of open source maintainers decided to clone the existing library into this repository. See [dgrijalva/jwt-go#462](https://github.com/dgrijalva/jwt-go/issues/462) for a detailed discussion on this topic.
@@ -52,7 +52,7 @@ Here's an example of an extension that integrates with multiple Google Cloud Pla
## Compliance
-This library was last reviewed to comply with [RTF 7519](https://datatracker.ietf.org/doc/html/rfc7519) dated May 2015 with a few notable differences:
+This library was last reviewed to comply with [RFC 7519](https://datatracker.ietf.org/doc/html/rfc7519) dated May 2015 with a few notable differences:
* In order to protect against accidental use of [Unsecured JWTs](https://datatracker.ietf.org/doc/html/rfc7519#section-6), tokens using `alg=none` will only be accepted if the constant `jwt.UnsafeAllowNoneSignatureType` is provided as the key.
@@ -91,6 +91,7 @@ Each signing method expects a different object type for its signing keys. See th
* The [HMAC signing method](https://pkg.go.dev/github.com/golang-jwt/jwt#SigningMethodHMAC) (`HS256`,`HS384`,`HS512`) expect `[]byte` values for signing and validation
* The [RSA signing method](https://pkg.go.dev/github.com/golang-jwt/jwt#SigningMethodRSA) (`RS256`,`RS384`,`RS512`) expect `*rsa.PrivateKey` for signing and `*rsa.PublicKey` for validation
* The [ECDSA signing method](https://pkg.go.dev/github.com/golang-jwt/jwt#SigningMethodECDSA) (`ES256`,`ES384`,`ES512`) expect `*ecdsa.PrivateKey` for signing and `*ecdsa.PublicKey` for validation
+* The [EdDSA signing method](https://pkg.go.dev/github.com/golang-jwt/jwt#SigningMethodEd25519) (`Ed25519`) expect `ed25519.PrivateKey` for signing and `ed25519.PublicKey` for validation
### JWT and OAuth
diff --git a/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/claims.go b/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/claims.go
index 7c2f33bcbe05..41cc826563ba 100644
--- a/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/claims.go
+++ b/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/claims.go
@@ -12,9 +12,122 @@ type Claims interface {
Valid() error
}
-// StandardClaims are a structured version of the Claims Section, as referenced at
-// https://tools.ietf.org/html/rfc7519#section-4.1
-// See examples for how to use this with your own claim types
+// RegisteredClaims are a structured version of the JWT Claims Set,
+// restricted to Registered Claim Names, as referenced at
+// https://datatracker.ietf.org/doc/html/rfc7519#section-4.1
+//
+// This type can be used on its own, but then additional private and
+// public claims embedded in the JWT will not be parsed. The typical usecase
+// therefore is to embedded this in a user-defined claim type.
+//
+// See examples for how to use this with your own claim types.
+type RegisteredClaims struct {
+ // the `iss` (Issuer) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.1
+ Issuer string `json:"iss,omitempty"`
+
+ // the `sub` (Subject) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.2
+ Subject string `json:"sub,omitempty"`
+
+ // the `aud` (Audience) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.3
+ Audience ClaimStrings `json:"aud,omitempty"`
+
+ // the `exp` (Expiration Time) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.4
+ ExpiresAt *NumericDate `json:"exp,omitempty"`
+
+ // the `nbf` (Not Before) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.5
+ NotBefore *NumericDate `json:"nbf,omitempty"`
+
+ // the `iat` (Issued At) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.6
+ IssuedAt *NumericDate `json:"iat,omitempty"`
+
+ // the `jti` (JWT ID) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.7
+ ID string `json:"jti,omitempty"`
+}
+
+// Valid validates time based claims "exp, iat, nbf".
+// There is no accounting for clock skew.
+// As well, if any of the above claims are not in the token, it will still
+// be considered a valid claim.
+func (c RegisteredClaims) Valid() error {
+ vErr := new(ValidationError)
+ now := TimeFunc()
+
+ // The claims below are optional, by default, so if they are set to the
+ // default value in Go, let's not fail the verification for them.
+ if !c.VerifyExpiresAt(now, false) {
+ delta := now.Sub(c.ExpiresAt.Time)
+ vErr.Inner = fmt.Errorf("token is expired by %v", delta)
+ vErr.Errors |= ValidationErrorExpired
+ }
+
+ if !c.VerifyIssuedAt(now, false) {
+ vErr.Inner = fmt.Errorf("token used before issued")
+ vErr.Errors |= ValidationErrorIssuedAt
+ }
+
+ if !c.VerifyNotBefore(now, false) {
+ vErr.Inner = fmt.Errorf("token is not valid yet")
+ vErr.Errors |= ValidationErrorNotValidYet
+ }
+
+ if vErr.valid() {
+ return nil
+ }
+
+ return vErr
+}
+
+// VerifyAudience compares the aud claim against cmp.
+// If required is false, this method will return true if the value matches or is unset
+func (c *RegisteredClaims) VerifyAudience(cmp string, req bool) bool {
+ return verifyAud(c.Audience, cmp, req)
+}
+
+// VerifyExpiresAt compares the exp claim against cmp (cmp < exp).
+// If req is false, it will return true, if exp is unset.
+func (c *RegisteredClaims) VerifyExpiresAt(cmp time.Time, req bool) bool {
+ if c.ExpiresAt == nil {
+ return verifyExp(nil, cmp, req)
+ }
+
+ return verifyExp(&c.ExpiresAt.Time, cmp, req)
+}
+
+// VerifyIssuedAt compares the iat claim against cmp (cmp >= iat).
+// If req is false, it will return true, if iat is unset.
+func (c *RegisteredClaims) VerifyIssuedAt(cmp time.Time, req bool) bool {
+ if c.IssuedAt == nil {
+ return verifyIat(nil, cmp, req)
+ }
+
+ return verifyIat(&c.IssuedAt.Time, cmp, req)
+}
+
+// VerifyNotBefore compares the nbf claim against cmp (cmp >= nbf).
+// If req is false, it will return true, if nbf is unset.
+func (c *RegisteredClaims) VerifyNotBefore(cmp time.Time, req bool) bool {
+ if c.NotBefore == nil {
+ return verifyNbf(nil, cmp, req)
+ }
+
+ return verifyNbf(&c.NotBefore.Time, cmp, req)
+}
+
+// VerifyIssuer compares the iss claim against cmp.
+// If required is false, this method will return true if the value matches or is unset
+func (c *RegisteredClaims) VerifyIssuer(cmp string, req bool) bool {
+ return verifyIss(c.Issuer, cmp, req)
+}
+
+// StandardClaims are a structured version of the JWT Claims Set, as referenced at
+// https://datatracker.ietf.org/doc/html/rfc7519#section-4. They do not follow the
+// specification exactly, since they were based on an earlier draft of the
+// specification and not updated. The main difference is that they only
+// support integer-based date fields and singular audiences. This might lead to
+// incompatibilities with other JWT implementations. The use of this is discouraged, instead
+// the newer RegisteredClaims struct should be used.
+//
+// Deprecated: Use RegisteredClaims instead for a forward-compatible way to access registered claims in a struct.
type StandardClaims struct {
Audience string `json:"aud,omitempty"`
ExpiresAt int64 `json:"exp,omitempty"`
@@ -41,7 +154,7 @@ func (c StandardClaims) Valid() error {
}
if !c.VerifyIssuedAt(now, false) {
- vErr.Inner = fmt.Errorf("Token used before issued")
+ vErr.Inner = fmt.Errorf("token used before issued")
vErr.Errors |= ValidationErrorIssuedAt
}
@@ -63,16 +176,37 @@ func (c *StandardClaims) VerifyAudience(cmp string, req bool) bool {
return verifyAud([]string{c.Audience}, cmp, req)
}
-// VerifyExpiresAt compares the exp claim against cmp.
-// If required is false, this method will return true if the value matches or is unset
+// VerifyExpiresAt compares the exp claim against cmp (cmp < exp).
+// If req is false, it will return true, if exp is unset.
func (c *StandardClaims) VerifyExpiresAt(cmp int64, req bool) bool {
- return verifyExp(c.ExpiresAt, cmp, req)
+ if c.ExpiresAt == 0 {
+ return verifyExp(nil, time.Unix(cmp, 0), req)
+ }
+
+ t := time.Unix(c.ExpiresAt, 0)
+ return verifyExp(&t, time.Unix(cmp, 0), req)
}
-// VerifyIssuedAt compares the iat claim against cmp.
-// If required is false, this method will return true if the value matches or is unset
+// VerifyIssuedAt compares the iat claim against cmp (cmp >= iat).
+// If req is false, it will return true, if iat is unset.
func (c *StandardClaims) VerifyIssuedAt(cmp int64, req bool) bool {
- return verifyIat(c.IssuedAt, cmp, req)
+ if c.IssuedAt == 0 {
+ return verifyIat(nil, time.Unix(cmp, 0), req)
+ }
+
+ t := time.Unix(c.IssuedAt, 0)
+ return verifyIat(&t, time.Unix(cmp, 0), req)
+}
+
+// VerifyNotBefore compares the nbf claim against cmp (cmp >= nbf).
+// If req is false, it will return true, if nbf is unset.
+func (c *StandardClaims) VerifyNotBefore(cmp int64, req bool) bool {
+ if c.NotBefore == 0 {
+ return verifyNbf(nil, time.Unix(cmp, 0), req)
+ }
+
+ t := time.Unix(c.NotBefore, 0)
+ return verifyNbf(&t, time.Unix(cmp, 0), req)
}
// VerifyIssuer compares the iss claim against cmp.
@@ -81,12 +215,6 @@ func (c *StandardClaims) VerifyIssuer(cmp string, req bool) bool {
return verifyIss(c.Issuer, cmp, req)
}
-// VerifyNotBefore compares the nbf claim against cmp.
-// If required is false, this method will return true if the value matches or is unset
-func (c *StandardClaims) VerifyNotBefore(cmp int64, req bool) bool {
- return verifyNbf(c.NotBefore, cmp, req)
-}
-
// ----- helpers
func verifyAud(aud []string, cmp string, required bool) bool {
@@ -112,18 +240,25 @@ func verifyAud(aud []string, cmp string, required bool) bool {
return result
}
-func verifyExp(exp int64, now int64, required bool) bool {
- if exp == 0 {
+func verifyExp(exp *time.Time, now time.Time, required bool) bool {
+ if exp == nil {
+ return !required
+ }
+ return now.Before(*exp)
+}
+
+func verifyIat(iat *time.Time, now time.Time, required bool) bool {
+ if iat == nil {
return !required
}
- return now <= exp
+ return now.After(*iat) || now.Equal(*iat)
}
-func verifyIat(iat int64, now int64, required bool) bool {
- if iat == 0 {
+func verifyNbf(nbf *time.Time, now time.Time, required bool) bool {
+ if nbf == nil {
return !required
}
- return now >= iat
+ return now.After(*nbf) || now.Equal(*nbf)
}
func verifyIss(iss string, cmp string, required bool) bool {
@@ -136,10 +271,3 @@ func verifyIss(iss string, cmp string, required bool) bool {
return false
}
}
-
-func verifyNbf(nbf int64, now int64, required bool) bool {
- if nbf == 0 {
- return !required
- }
- return now >= nbf
-}
diff --git a/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/ed25519.go b/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/ed25519.go
index 9f40dc0c7356..07d3aacd631f 100644
--- a/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/ed25519.go
+++ b/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/ed25519.go
@@ -3,7 +3,9 @@ package jwt
import (
"errors"
+ "crypto"
"crypto/ed25519"
+ "crypto/rand"
)
var (
@@ -62,20 +64,22 @@ func (m *SigningMethodEd25519) Verify(signingString, signature string, key inter
// Sign implements token signing for the SigningMethod.
// For this signing method, key must be an ed25519.PrivateKey
func (m *SigningMethodEd25519) Sign(signingString string, key interface{}) (string, error) {
- var ed25519Key ed25519.PrivateKey
+ var ed25519Key crypto.Signer
var ok bool
- if ed25519Key, ok = key.(ed25519.PrivateKey); !ok {
+ if ed25519Key, ok = key.(crypto.Signer); !ok {
return "", ErrInvalidKeyType
}
- // ed25519.Sign panics if private key not equal to ed25519.PrivateKeySize
- // this allows to avoid recover usage
- if len(ed25519Key) != ed25519.PrivateKeySize {
+ if _, ok := ed25519Key.Public().(ed25519.PublicKey); !ok {
return "", ErrInvalidKey
}
// Sign the string and return the encoded result
- sig := ed25519.Sign(ed25519Key, []byte(signingString))
+ // ed25519 performs a two-pass hash as part of its algorithm. Therefore, we need to pass a non-prehashed message into the Sign function, as indicated by crypto.Hash(0)
+ sig, err := ed25519Key.Sign(rand.Reader, []byte(signingString), crypto.Hash(0))
+ if err != nil {
+ return "", err
+ }
return EncodeSegment(sig), nil
}
diff --git a/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/errors.go b/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/errors.go
index f309878b30d6..b9d18e498e3f 100644
--- a/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/errors.go
+++ b/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/errors.go
@@ -53,6 +53,11 @@ func (e ValidationError) Error() string {
}
}
+// Unwrap gives errors.Is and errors.As access to the inner error.
+func (e *ValidationError) Unwrap() error {
+ return e.Inner
+}
+
// No errors
func (e *ValidationError) valid() bool {
return e.Errors == 0
diff --git a/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/map_claims.go b/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/map_claims.go
index 7e00e753dd7c..e7da633b93c6 100644
--- a/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/map_claims.go
+++ b/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/map_claims.go
@@ -3,6 +3,7 @@ package jwt
import (
"encoding/json"
"errors"
+ "time"
// "fmt"
)
@@ -31,65 +32,92 @@ func (m MapClaims) VerifyAudience(cmp string, req bool) bool {
return verifyAud(aud, cmp, req)
}
-// VerifyExpiresAt compares the exp claim against cmp.
-// If required is false, this method will return true if the value matches or is unset
+// VerifyExpiresAt compares the exp claim against cmp (cmp <= exp).
+// If req is false, it will return true, if exp is unset.
func (m MapClaims) VerifyExpiresAt(cmp int64, req bool) bool {
- exp, ok := m["exp"]
+ cmpTime := time.Unix(cmp, 0)
+
+ v, ok := m["exp"]
if !ok {
return !req
}
- switch expType := exp.(type) {
+
+ switch exp := v.(type) {
case float64:
- return verifyExp(int64(expType), cmp, req)
+ if exp == 0 {
+ return verifyExp(nil, cmpTime, req)
+ }
+
+ return verifyExp(&newNumericDateFromSeconds(exp).Time, cmpTime, req)
case json.Number:
- v, _ := expType.Int64()
- return verifyExp(v, cmp, req)
+ v, _ := exp.Float64()
+
+ return verifyExp(&newNumericDateFromSeconds(v).Time, cmpTime, req)
}
+
return false
}
-// VerifyIssuedAt compares the iat claim against cmp.
-// If required is false, this method will return true if the value matches or is unset
+// VerifyIssuedAt compares the exp claim against cmp (cmp >= iat).
+// If req is false, it will return true, if iat is unset.
func (m MapClaims) VerifyIssuedAt(cmp int64, req bool) bool {
- iat, ok := m["iat"]
+ cmpTime := time.Unix(cmp, 0)
+
+ v, ok := m["iat"]
if !ok {
return !req
}
- switch iatType := iat.(type) {
+
+ switch iat := v.(type) {
case float64:
- return verifyIat(int64(iatType), cmp, req)
+ if iat == 0 {
+ return verifyIat(nil, cmpTime, req)
+ }
+
+ return verifyIat(&newNumericDateFromSeconds(iat).Time, cmpTime, req)
case json.Number:
- v, _ := iatType.Int64()
- return verifyIat(v, cmp, req)
+ v, _ := iat.Float64()
+
+ return verifyIat(&newNumericDateFromSeconds(v).Time, cmpTime, req)
}
- return false
-}
-// VerifyIssuer compares the iss claim against cmp.
-// If required is false, this method will return true if the value matches or is unset
-func (m MapClaims) VerifyIssuer(cmp string, req bool) bool {
- iss, _ := m["iss"].(string)
- return verifyIss(iss, cmp, req)
+ return false
}
-// VerifyNotBefore compares the nbf claim against cmp.
-// If required is false, this method will return true if the value matches or is unset
+// VerifyNotBefore compares the nbf claim against cmp (cmp >= nbf).
+// If req is false, it will return true, if nbf is unset.
func (m MapClaims) VerifyNotBefore(cmp int64, req bool) bool {
- nbf, ok := m["nbf"]
+ cmpTime := time.Unix(cmp, 0)
+
+ v, ok := m["nbf"]
if !ok {
return !req
}
- switch nbfType := nbf.(type) {
+
+ switch nbf := v.(type) {
case float64:
- return verifyNbf(int64(nbfType), cmp, req)
+ if nbf == 0 {
+ return verifyNbf(nil, cmpTime, req)
+ }
+
+ return verifyNbf(&newNumericDateFromSeconds(nbf).Time, cmpTime, req)
case json.Number:
- v, _ := nbfType.Int64()
- return verifyNbf(v, cmp, req)
+ v, _ := nbf.Float64()
+
+ return verifyNbf(&newNumericDateFromSeconds(v).Time, cmpTime, req)
}
+
return false
}
-// Valid calidates time based claims "exp, iat, nbf".
+// VerifyIssuer compares the iss claim against cmp.
+// If required is false, this method will return true if the value matches or is unset
+func (m MapClaims) VerifyIssuer(cmp string, req bool) bool {
+ iss, _ := m["iss"].(string)
+ return verifyIss(iss, cmp, req)
+}
+
+// Valid validates time based claims "exp, iat, nbf".
// There is no accounting for clock skew.
// As well, if any of the above claims are not in the token, it will still
// be considered a valid claim.
diff --git a/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/parser.go b/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/parser.go
index 0c811f311b63..2f61a69d7fcb 100644
--- a/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/parser.go
+++ b/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/parser.go
@@ -8,14 +8,36 @@ import (
)
type Parser struct {
- ValidMethods []string // If populated, only these methods will be considered valid
- UseJSONNumber bool // Use JSON Number format in JSON decoder
- SkipClaimsValidation bool // Skip claims validation during token parsing
+ // If populated, only these methods will be considered valid.
+ //
+ // Deprecated: In future releases, this field will not be exported anymore and should be set with an option to NewParser instead.
+ ValidMethods []string
+
+ // Use JSON Number format in JSON decoder.
+ //
+ // Deprecated: In future releases, this field will not be exported anymore and should be set with an option to NewParser instead.
+ UseJSONNumber bool
+
+ // Skip claims validation during token parsing.
+ //
+ // Deprecated: In future releases, this field will not be exported anymore and should be set with an option to NewParser instead.
+ SkipClaimsValidation bool
}
-// Parse parses, validates, and returns a token.
+// NewParser creates a new Parser with the specified options
+func NewParser(options ...ParserOption) *Parser {
+ p := &Parser{}
+
+ // loop through our parsing options and apply them
+ for _, option := range options {
+ option(p)
+ }
+
+ return p
+}
+
+// Parse parses, validates, verifies the signature and returns the parsed token.
// keyFunc will receive the parsed token and should return the key for validating.
-// If everything is kosher, err will be nil
func (p *Parser) Parse(tokenString string, keyFunc Keyfunc) (*Token, error) {
return p.ParseWithClaims(tokenString, MapClaims{}, keyFunc)
}
diff --git a/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/parser_option.go b/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/parser_option.go
new file mode 100644
index 000000000000..0fede4f15c90
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/parser_option.go
@@ -0,0 +1,29 @@
+package jwt
+
+// ParserOption is used to implement functional-style options that modify the behaviour of the parser. To add
+// new options, just create a function (ideally beginning with With or Without) that returns an anonymous function that
+// takes a *Parser type as input and manipulates its configuration accordingly.
+type ParserOption func(*Parser)
+
+// WithValidMethods is an option to supply algorithm methods that the parser will check. Only those methods will be considered valid.
+// It is heavily encouraged to use this option in order to prevent attacks such as https://auth0.com/blog/critical-vulnerabilities-in-json-web-token-libraries/.
+func WithValidMethods(methods []string) ParserOption {
+ return func(p *Parser) {
+ p.ValidMethods = methods
+ }
+}
+
+// WithJSONNumber is an option to configure the underyling JSON parser with UseNumber
+func WithJSONNumber() ParserOption {
+ return func(p *Parser) {
+ p.UseJSONNumber = true
+ }
+}
+
+// WithoutClaimsValidation is an option to disable claims validation. This option should only be used if you exactly know
+// what you are doing.
+func WithoutClaimsValidation() ParserOption {
+ return func(p *Parser) {
+ p.SkipClaimsValidation = true
+ }
+}
diff --git a/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/signing_method.go b/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/signing_method.go
index 3269170f31f1..241ae9c60d08 100644
--- a/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/signing_method.go
+++ b/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/signing_method.go
@@ -33,3 +33,14 @@ func GetSigningMethod(alg string) (method SigningMethod) {
}
return
}
+
+// GetAlgorithms returns a list of registered "alg" names
+func GetAlgorithms() (algs []string) {
+ signingMethodLock.RLock()
+ defer signingMethodLock.RUnlock()
+
+ for alg := range signingMethods {
+ algs = append(algs, alg)
+ }
+ return
+}
diff --git a/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/token.go b/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/token.go
index b896acb0b4aa..12344138bedc 100644
--- a/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/token.go
+++ b/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/token.go
@@ -7,6 +7,14 @@ import (
"time"
)
+
+// DecodePaddingAllowed will switch the codec used for decoding JWTs respectively. Note that the JWS RFC7515
+// states that the tokens will utilize a Base64url encoding with no padding. Unfortunately, some implementations
+// of JWT are producing non-standard tokens, and thus require support for decoding. Note that this is a global
+// variable, and updating it will change the behavior on a package level, and is also NOT go-routine safe.
+// To use the non-recommended decoding, set this boolean to `true` prior to using this package.
+var DecodePaddingAllowed bool
+
// TimeFunc provides the current time when parsing token to validate "exp" claim (expiration time).
// You can override it to use another time value. This is useful for testing or if your
// server uses a different time zone than your tokens.
@@ -29,11 +37,12 @@ type Token struct {
Valid bool // Is the token valid? Populated when you Parse/Verify a token
}
-// New creates a new Token. Takes a signing method
+// New creates a new Token with the specified signing method and an empty map of claims.
func New(method SigningMethod) *Token {
return NewWithClaims(method, MapClaims{})
}
+// NewWithClaims creates a new Token with the specified signing method and claims.
func NewWithClaims(method SigningMethod, claims Claims) *Token {
return &Token{
Header: map[string]interface{}{
@@ -45,7 +54,8 @@ func NewWithClaims(method SigningMethod, claims Claims) *Token {
}
}
-// SignedString retrieves the complete, signed token
+// SignedString creates and returns a complete, signed JWT.
+// The token is signed using the SigningMethod specified in the token.
func (t *Token) SignedString(key interface{}) (string, error) {
var sig, sstr string
var err error
@@ -82,15 +92,19 @@ func (t *Token) SigningString() (string, error) {
return strings.Join(parts, "."), nil
}
-// Parse parses, validates, and returns a token.
-// keyFunc will receive the parsed token and should return the key for validating.
-// If everything is kosher, err will be nil
-func Parse(tokenString string, keyFunc Keyfunc) (*Token, error) {
- return new(Parser).Parse(tokenString, keyFunc)
+// Parse parses, validates, verifies the signature and returns the parsed token.
+// keyFunc will receive the parsed token and should return the cryptographic key
+// for verifying the signature.
+// The caller is strongly encouraged to set the WithValidMethods option to
+// validate the 'alg' claim in the token matches the expected algorithm.
+// For more details about the importance of validating the 'alg' claim,
+// see https://auth0.com/blog/critical-vulnerabilities-in-json-web-token-libraries/
+func Parse(tokenString string, keyFunc Keyfunc, options ...ParserOption) (*Token, error) {
+ return NewParser(options...).Parse(tokenString, keyFunc)
}
-func ParseWithClaims(tokenString string, claims Claims, keyFunc Keyfunc) (*Token, error) {
- return new(Parser).ParseWithClaims(tokenString, claims, keyFunc)
+func ParseWithClaims(tokenString string, claims Claims, keyFunc Keyfunc, options ...ParserOption) (*Token, error) {
+ return NewParser(options...).ParseWithClaims(tokenString, claims, keyFunc)
}
// EncodeSegment encodes a JWT specific base64url encoding with padding stripped
@@ -106,5 +120,12 @@ func EncodeSegment(seg []byte) string {
// Deprecated: In a future release, we will demote this function to a non-exported function, since it
// should only be used internally
func DecodeSegment(seg string) ([]byte, error) {
+ if DecodePaddingAllowed {
+ if l := len(seg) % 4; l > 0 {
+ seg += strings.Repeat("=", 4-l)
+ }
+ return base64.URLEncoding.DecodeString(seg)
+ }
+
return base64.RawURLEncoding.DecodeString(seg)
}
diff --git a/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/types.go b/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/types.go
new file mode 100644
index 000000000000..80b1b96948ec
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/golang-jwt/jwt/v4/types.go
@@ -0,0 +1,127 @@
+package jwt
+
+import (
+ "encoding/json"
+ "fmt"
+ "math"
+ "reflect"
+ "strconv"
+ "time"
+)
+
+// TimePrecision sets the precision of times and dates within this library.
+// This has an influence on the precision of times when comparing expiry or
+// other related time fields. Furthermore, it is also the precision of times
+// when serializing.
+//
+// For backwards compatibility the default precision is set to seconds, so that
+// no fractional timestamps are generated.
+var TimePrecision = time.Second
+
+// MarshalSingleStringAsArray modifies the behaviour of the ClaimStrings type, especially
+// its MarshalJSON function.
+//
+// If it is set to true (the default), it will always serialize the type as an
+// array of strings, even if it just contains one element, defaulting to the behaviour
+// of the underlying []string. If it is set to false, it will serialize to a single
+// string, if it contains one element. Otherwise, it will serialize to an array of strings.
+var MarshalSingleStringAsArray = true
+
+// NumericDate represents a JSON numeric date value, as referenced at
+// https://datatracker.ietf.org/doc/html/rfc7519#section-2.
+type NumericDate struct {
+ time.Time
+}
+
+// NewNumericDate constructs a new *NumericDate from a standard library time.Time struct.
+// It will truncate the timestamp according to the precision specified in TimePrecision.
+func NewNumericDate(t time.Time) *NumericDate {
+ return &NumericDate{t.Truncate(TimePrecision)}
+}
+
+// newNumericDateFromSeconds creates a new *NumericDate out of a float64 representing a
+// UNIX epoch with the float fraction representing non-integer seconds.
+func newNumericDateFromSeconds(f float64) *NumericDate {
+ round, frac := math.Modf(f)
+ return NewNumericDate(time.Unix(int64(round), int64(frac*1e9)))
+}
+
+// MarshalJSON is an implementation of the json.RawMessage interface and serializes the UNIX epoch
+// represented in NumericDate to a byte array, using the precision specified in TimePrecision.
+func (date NumericDate) MarshalJSON() (b []byte, err error) {
+ f := float64(date.Truncate(TimePrecision).UnixNano()) / float64(time.Second)
+
+ return []byte(strconv.FormatFloat(f, 'f', -1, 64)), nil
+}
+
+// UnmarshalJSON is an implementation of the json.RawMessage interface and deserializses a
+// NumericDate from a JSON representation, i.e. a json.Number. This number represents an UNIX epoch
+// with either integer or non-integer seconds.
+func (date *NumericDate) UnmarshalJSON(b []byte) (err error) {
+ var (
+ number json.Number
+ f float64
+ )
+
+ if err = json.Unmarshal(b, &number); err != nil {
+ return fmt.Errorf("could not parse NumericData: %w", err)
+ }
+
+ if f, err = number.Float64(); err != nil {
+ return fmt.Errorf("could not convert json number value to float: %w", err)
+ }
+
+ n := newNumericDateFromSeconds(f)
+ *date = *n
+
+ return nil
+}
+
+// ClaimStrings is basically just a slice of strings, but it can be either serialized from a string array or just a string.
+// This type is necessary, since the "aud" claim can either be a single string or an array.
+type ClaimStrings []string
+
+func (s *ClaimStrings) UnmarshalJSON(data []byte) (err error) {
+ var value interface{}
+
+ if err = json.Unmarshal(data, &value); err != nil {
+ return err
+ }
+
+ var aud []string
+
+ switch v := value.(type) {
+ case string:
+ aud = append(aud, v)
+ case []string:
+ aud = ClaimStrings(v)
+ case []interface{}:
+ for _, vv := range v {
+ vs, ok := vv.(string)
+ if !ok {
+ return &json.UnsupportedTypeError{Type: reflect.TypeOf(vv)}
+ }
+ aud = append(aud, vs)
+ }
+ case nil:
+ return nil
+ default:
+ return &json.UnsupportedTypeError{Type: reflect.TypeOf(v)}
+ }
+
+ *s = aud
+
+ return
+}
+
+func (s ClaimStrings) MarshalJSON() (b []byte, err error) {
+ // This handles a special case in the JWT RFC. If the string array, e.g. used by the "aud" field,
+ // only contains one element, it MAY be serialized as a single string. This may or may not be
+ // desired based on the ecosystem of other JWT library used, so we make it configurable by the
+ // variable MarshalSingleStringAsArray.
+ if len(s) == 1 && !MarshalSingleStringAsArray {
+ return json.Marshal(s[0])
+ }
+
+ return json.Marshal([]string(s))
+}
diff --git a/cluster-autoscaler/vendor/github.com/google/go-cmp/cmp/path.go b/cluster-autoscaler/vendor/github.com/google/go-cmp/cmp/path.go
index 3d45c1a47f28..f01eff318c56 100644
--- a/cluster-autoscaler/vendor/github.com/google/go-cmp/cmp/path.go
+++ b/cluster-autoscaler/vendor/github.com/google/go-cmp/cmp/path.go
@@ -315,7 +315,7 @@ func (tf Transform) Option() Option { return tf.trans }
// pops the address from the stack. Thus, when traversing into a pointer from
// reflect.Ptr, reflect.Slice element, or reflect.Map, we can detect cycles
// by checking whether the pointer has already been visited. The cycle detection
-// uses a seperate stack for the x and y values.
+// uses a separate stack for the x and y values.
//
// If a cycle is detected we need to determine whether the two pointers
// should be considered equal. The definition of equality chosen by Equal
diff --git a/cluster-autoscaler/vendor/github.com/google/go-cmp/cmp/report_slices.go b/cluster-autoscaler/vendor/github.com/google/go-cmp/cmp/report_slices.go
index 168f92f3c122..2ad3bc85ba82 100644
--- a/cluster-autoscaler/vendor/github.com/google/go-cmp/cmp/report_slices.go
+++ b/cluster-autoscaler/vendor/github.com/google/go-cmp/cmp/report_slices.go
@@ -7,6 +7,7 @@ package cmp
import (
"bytes"
"fmt"
+ "math"
"reflect"
"strconv"
"strings"
@@ -96,15 +97,16 @@ func (opts formatOptions) FormatDiffSlice(v *valueNode) textNode {
}
// Auto-detect the type of the data.
- var isLinedText, isText, isBinary bool
var sx, sy string
+ var ssx, ssy []string
+ var isString, isMostlyText, isPureLinedText, isBinary bool
switch {
case t.Kind() == reflect.String:
sx, sy = vx.String(), vy.String()
- isText = true // Initial estimate, verify later
+ isString = true
case t.Kind() == reflect.Slice && t.Elem() == reflect.TypeOf(byte(0)):
sx, sy = string(vx.Bytes()), string(vy.Bytes())
- isBinary = true // Initial estimate, verify later
+ isString = true
case t.Kind() == reflect.Array:
// Arrays need to be addressable for slice operations to work.
vx2, vy2 := reflect.New(t).Elem(), reflect.New(t).Elem()
@@ -112,13 +114,12 @@ func (opts formatOptions) FormatDiffSlice(v *valueNode) textNode {
vy2.Set(vy)
vx, vy = vx2, vy2
}
- if isText || isBinary {
- var numLines, lastLineIdx, maxLineLen int
- isBinary = !utf8.ValidString(sx) || !utf8.ValidString(sy)
+ if isString {
+ var numTotalRunes, numValidRunes, numLines, lastLineIdx, maxLineLen int
for i, r := range sx + sy {
- if !(unicode.IsPrint(r) || unicode.IsSpace(r)) || r == utf8.RuneError {
- isBinary = true
- break
+ numTotalRunes++
+ if (unicode.IsPrint(r) || unicode.IsSpace(r)) && r != utf8.RuneError {
+ numValidRunes++
}
if r == '\n' {
if maxLineLen < i-lastLineIdx {
@@ -128,8 +129,26 @@ func (opts formatOptions) FormatDiffSlice(v *valueNode) textNode {
numLines++
}
}
- isText = !isBinary
- isLinedText = isText && numLines >= 4 && maxLineLen <= 1024
+ isPureText := numValidRunes == numTotalRunes
+ isMostlyText = float64(numValidRunes) > math.Floor(0.90*float64(numTotalRunes))
+ isPureLinedText = isPureText && numLines >= 4 && maxLineLen <= 1024
+ isBinary = !isMostlyText
+
+ // Avoid diffing by lines if it produces a significantly more complex
+ // edit script than diffing by bytes.
+ if isPureLinedText {
+ ssx = strings.Split(sx, "\n")
+ ssy = strings.Split(sy, "\n")
+ esLines := diff.Difference(len(ssx), len(ssy), func(ix, iy int) diff.Result {
+ return diff.BoolResult(ssx[ix] == ssy[iy])
+ })
+ esBytes := diff.Difference(len(sx), len(sy), func(ix, iy int) diff.Result {
+ return diff.BoolResult(sx[ix] == sy[iy])
+ })
+ efficiencyLines := float64(esLines.Dist()) / float64(len(esLines))
+ efficiencyBytes := float64(esBytes.Dist()) / float64(len(esBytes))
+ isPureLinedText = efficiencyLines < 4*efficiencyBytes
+ }
}
// Format the string into printable records.
@@ -138,9 +157,7 @@ func (opts formatOptions) FormatDiffSlice(v *valueNode) textNode {
switch {
// If the text appears to be multi-lined text,
// then perform differencing across individual lines.
- case isLinedText:
- ssx := strings.Split(sx, "\n")
- ssy := strings.Split(sy, "\n")
+ case isPureLinedText:
list = opts.formatDiffSlice(
reflect.ValueOf(ssx), reflect.ValueOf(ssy), 1, "line",
func(v reflect.Value, d diffMode) textRecord {
@@ -229,7 +246,7 @@ func (opts formatOptions) FormatDiffSlice(v *valueNode) textNode {
// If the text appears to be single-lined text,
// then perform differencing in approximately fixed-sized chunks.
// The output is printed as quoted strings.
- case isText:
+ case isMostlyText:
list = opts.formatDiffSlice(
reflect.ValueOf(sx), reflect.ValueOf(sy), 64, "byte",
func(v reflect.Value, d diffMode) textRecord {
@@ -237,7 +254,6 @@ func (opts formatOptions) FormatDiffSlice(v *valueNode) textNode {
return textRecord{Diff: d, Value: textLine(s)}
},
)
- delim = ""
// If the text appears to be binary data,
// then perform differencing in approximately fixed-sized chunks.
@@ -299,7 +315,7 @@ func (opts formatOptions) FormatDiffSlice(v *valueNode) textNode {
// Wrap the output with appropriate type information.
var out textNode = &textWrap{Prefix: "{", Value: list, Suffix: "}"}
- if !isText {
+ if !isMostlyText {
// The "{...}" byte-sequence literal is not valid Go syntax for strings.
// Emit the type for extra clarity (e.g. "string{...}").
if t.Kind() == reflect.String {
@@ -338,8 +354,11 @@ func (opts formatOptions) formatDiffSlice(
vx, vy reflect.Value, chunkSize int, name string,
makeRec func(reflect.Value, diffMode) textRecord,
) (list textList) {
- es := diff.Difference(vx.Len(), vy.Len(), func(ix int, iy int) diff.Result {
- return diff.BoolResult(vx.Index(ix).Interface() == vy.Index(iy).Interface())
+ eq := func(ix, iy int) bool {
+ return vx.Index(ix).Interface() == vy.Index(iy).Interface()
+ }
+ es := diff.Difference(vx.Len(), vy.Len(), func(ix, iy int) diff.Result {
+ return diff.BoolResult(eq(ix, iy))
})
appendChunks := func(v reflect.Value, d diffMode) int {
@@ -364,6 +383,7 @@ func (opts formatOptions) formatDiffSlice(
groups := coalesceAdjacentEdits(name, es)
groups = coalesceInterveningIdentical(groups, chunkSize/4)
+ groups = cleanupSurroundingIdentical(groups, eq)
maxGroup := diffStats{Name: name}
for i, ds := range groups {
if maxLen >= 0 && numDiffs >= maxLen {
@@ -416,25 +436,36 @@ func (opts formatOptions) formatDiffSlice(
// coalesceAdjacentEdits coalesces the list of edits into groups of adjacent
// equal or unequal counts.
+//
+// Example:
+//
+// Input: "..XXY...Y"
+// Output: [
+// {NumIdentical: 2},
+// {NumRemoved: 2, NumInserted 1},
+// {NumIdentical: 3},
+// {NumInserted: 1},
+// ]
+//
func coalesceAdjacentEdits(name string, es diff.EditScript) (groups []diffStats) {
- var prevCase int // Arbitrary index into which case last occurred
- lastStats := func(i int) *diffStats {
- if prevCase != i {
+ var prevMode byte
+ lastStats := func(mode byte) *diffStats {
+ if prevMode != mode {
groups = append(groups, diffStats{Name: name})
- prevCase = i
+ prevMode = mode
}
return &groups[len(groups)-1]
}
for _, e := range es {
switch e {
case diff.Identity:
- lastStats(1).NumIdentical++
+ lastStats('=').NumIdentical++
case diff.UniqueX:
- lastStats(2).NumRemoved++
+ lastStats('!').NumRemoved++
case diff.UniqueY:
- lastStats(2).NumInserted++
+ lastStats('!').NumInserted++
case diff.Modified:
- lastStats(2).NumModified++
+ lastStats('!').NumModified++
}
}
return groups
@@ -444,6 +475,35 @@ func coalesceAdjacentEdits(name string, es diff.EditScript) (groups []diffStats)
// equal groups into adjacent unequal groups that currently result in a
// dual inserted/removed printout. This acts as a high-pass filter to smooth
// out high-frequency changes within the windowSize.
+//
+// Example:
+//
+// WindowSize: 16,
+// Input: [
+// {NumIdentical: 61}, // group 0
+// {NumRemoved: 3, NumInserted: 1}, // group 1
+// {NumIdentical: 6}, // ├── coalesce
+// {NumInserted: 2}, // ├── coalesce
+// {NumIdentical: 1}, // ├── coalesce
+// {NumRemoved: 9}, // └── coalesce
+// {NumIdentical: 64}, // group 2
+// {NumRemoved: 3, NumInserted: 1}, // group 3
+// {NumIdentical: 6}, // ├── coalesce
+// {NumInserted: 2}, // ├── coalesce
+// {NumIdentical: 1}, // ├── coalesce
+// {NumRemoved: 7}, // ├── coalesce
+// {NumIdentical: 1}, // ├── coalesce
+// {NumRemoved: 2}, // └── coalesce
+// {NumIdentical: 63}, // group 4
+// ]
+// Output: [
+// {NumIdentical: 61},
+// {NumIdentical: 7, NumRemoved: 12, NumInserted: 3},
+// {NumIdentical: 64},
+// {NumIdentical: 8, NumRemoved: 12, NumInserted: 3},
+// {NumIdentical: 63},
+// ]
+//
func coalesceInterveningIdentical(groups []diffStats, windowSize int) []diffStats {
groups, groupsOrig := groups[:0], groups
for i, ds := range groupsOrig {
@@ -463,3 +523,91 @@ func coalesceInterveningIdentical(groups []diffStats, windowSize int) []diffStat
}
return groups
}
+
+// cleanupSurroundingIdentical scans through all unequal groups, and
+// moves any leading sequence of equal elements to the preceding equal group and
+// moves and trailing sequence of equal elements to the succeeding equal group.
+//
+// This is necessary since coalesceInterveningIdentical may coalesce edit groups
+// together such that leading/trailing spans of equal elements becomes possible.
+// Note that this can occur even with an optimal diffing algorithm.
+//
+// Example:
+//
+// Input: [
+// {NumIdentical: 61},
+// {NumIdentical: 1 , NumRemoved: 11, NumInserted: 2}, // assume 3 leading identical elements
+// {NumIdentical: 67},
+// {NumIdentical: 7, NumRemoved: 12, NumInserted: 3}, // assume 10 trailing identical elements
+// {NumIdentical: 54},
+// ]
+// Output: [
+// {NumIdentical: 64}, // incremented by 3
+// {NumRemoved: 9},
+// {NumIdentical: 67},
+// {NumRemoved: 9},
+// {NumIdentical: 64}, // incremented by 10
+// ]
+//
+func cleanupSurroundingIdentical(groups []diffStats, eq func(i, j int) bool) []diffStats {
+ var ix, iy int // indexes into sequence x and y
+ for i, ds := range groups {
+ // Handle equal group.
+ if ds.NumDiff() == 0 {
+ ix += ds.NumIdentical
+ iy += ds.NumIdentical
+ continue
+ }
+
+ // Handle unequal group.
+ nx := ds.NumIdentical + ds.NumRemoved + ds.NumModified
+ ny := ds.NumIdentical + ds.NumInserted + ds.NumModified
+ var numLeadingIdentical, numTrailingIdentical int
+ for i := 0; i < nx && i < ny && eq(ix+i, iy+i); i++ {
+ numLeadingIdentical++
+ }
+ for i := 0; i < nx && i < ny && eq(ix+nx-1-i, iy+ny-1-i); i++ {
+ numTrailingIdentical++
+ }
+ if numIdentical := numLeadingIdentical + numTrailingIdentical; numIdentical > 0 {
+ if numLeadingIdentical > 0 {
+ // Remove leading identical span from this group and
+ // insert it into the preceding group.
+ if i-1 >= 0 {
+ groups[i-1].NumIdentical += numLeadingIdentical
+ } else {
+ // No preceding group exists, so prepend a new group,
+ // but do so after we finish iterating over all groups.
+ defer func() {
+ groups = append([]diffStats{{Name: groups[0].Name, NumIdentical: numLeadingIdentical}}, groups...)
+ }()
+ }
+ // Increment indexes since the preceding group would have handled this.
+ ix += numLeadingIdentical
+ iy += numLeadingIdentical
+ }
+ if numTrailingIdentical > 0 {
+ // Remove trailing identical span from this group and
+ // insert it into the succeeding group.
+ if i+1 < len(groups) {
+ groups[i+1].NumIdentical += numTrailingIdentical
+ } else {
+ // No succeeding group exists, so append a new group,
+ // but do so after we finish iterating over all groups.
+ defer func() {
+ groups = append(groups, diffStats{Name: groups[len(groups)-1].Name, NumIdentical: numTrailingIdentical})
+ }()
+ }
+ // Do not increment indexes since the succeeding group will handle this.
+ }
+
+ // Update this group since some identical elements were removed.
+ nx -= numIdentical
+ ny -= numIdentical
+ groups[i] = diffStats{Name: ds.Name, NumRemoved: nx, NumInserted: ny}
+ }
+ ix += nx
+ iy += ny
+ }
+ return groups
+}
diff --git a/cluster-autoscaler/vendor/github.com/spf13/cobra/MAINTAINERS b/cluster-autoscaler/vendor/github.com/spf13/cobra/MAINTAINERS
new file mode 100644
index 000000000000..4c5ac3dd997c
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/spf13/cobra/MAINTAINERS
@@ -0,0 +1,13 @@
+maintainers:
+- spf13
+- johnSchnake
+- jpmcb
+- marckhouzam
+inactive:
+- anthonyfok
+- bep
+- bogem
+- broady
+- eparis
+- jharshman
+- wfernandes
diff --git a/cluster-autoscaler/vendor/github.com/spf13/cobra/Makefile b/cluster-autoscaler/vendor/github.com/spf13/cobra/Makefile
index 472c73bf16f0..443ef1a987ac 100644
--- a/cluster-autoscaler/vendor/github.com/spf13/cobra/Makefile
+++ b/cluster-autoscaler/vendor/github.com/spf13/cobra/Makefile
@@ -9,11 +9,11 @@ ifeq (, $(shell which richgo))
$(warning "could not find richgo in $(PATH), run: go get github.com/kyoh86/richgo")
endif
-.PHONY: fmt lint test cobra_generator install_deps clean
+.PHONY: fmt lint test install_deps clean
default: all
-all: fmt test cobra_generator
+all: fmt test
fmt:
$(info ******************** checking formatting ********************)
@@ -23,15 +23,10 @@ lint:
$(info ******************** running lint tools ********************)
golangci-lint run -v
-test: install_deps lint
+test: install_deps
$(info ******************** running tests ********************)
richgo test -v ./...
-cobra_generator: install_deps
- $(info ******************** building generator ********************)
- mkdir -p $(BIN)
- make -C cobra all
-
install_deps:
$(info ******************** downloading dependencies ********************)
go get -v ./...
diff --git a/cluster-autoscaler/vendor/github.com/spf13/cobra/README.md b/cluster-autoscaler/vendor/github.com/spf13/cobra/README.md
index 074e3979f893..7adef143b42b 100644
--- a/cluster-autoscaler/vendor/github.com/spf13/cobra/README.md
+++ b/cluster-autoscaler/vendor/github.com/spf13/cobra/README.md
@@ -1,52 +1,26 @@
![cobra logo](https://cloud.githubusercontent.com/assets/173412/10886352/ad566232-814f-11e5-9cd0-aa101788c117.png)
-Cobra is both a library for creating powerful modern CLI applications as well as a program to generate applications and command files.
+Cobra is a library for creating powerful modern CLI applications.
Cobra is used in many Go projects such as [Kubernetes](http://kubernetes.io/),
[Hugo](https://gohugo.io), and [Github CLI](https://github.com/cli/cli) to
name a few. [This list](./projects_using_cobra.md) contains a more extensive list of projects using Cobra.
[![](https://img.shields.io/github/workflow/status/spf13/cobra/Test?longCache=tru&label=Test&logo=github%20actions&logoColor=fff)](https://github.com/spf13/cobra/actions?query=workflow%3ATest)
-[![GoDoc](https://godoc.org/github.com/spf13/cobra?status.svg)](https://godoc.org/github.com/spf13/cobra)
+[![Go Reference](https://pkg.go.dev/badge/github.com/spf13/cobra.svg)](https://pkg.go.dev/github.com/spf13/cobra)
[![Go Report Card](https://goreportcard.com/badge/github.com/spf13/cobra)](https://goreportcard.com/report/github.com/spf13/cobra)
[![Slack](https://img.shields.io/badge/Slack-cobra-brightgreen)](https://gophers.slack.com/archives/CD3LP1199)
-# Table of Contents
-
-- [Overview](#overview)
-- [Concepts](#concepts)
- * [Commands](#commands)
- * [Flags](#flags)
-- [Installing](#installing)
-- [Usage](#usage)
- * [Using the Cobra Generator](user_guide.md#using-the-cobra-generator)
- * [Using the Cobra Library](user_guide.md#using-the-cobra-library)
- * [Working with Flags](user_guide.md#working-with-flags)
- * [Positional and Custom Arguments](user_guide.md#positional-and-custom-arguments)
- * [Example](user_guide.md#example)
- * [Help Command](user_guide.md#help-command)
- * [Usage Message](user_guide.md#usage-message)
- * [PreRun and PostRun Hooks](user_guide.md#prerun-and-postrun-hooks)
- * [Suggestions when "unknown command" happens](user_guide.md#suggestions-when-unknown-command-happens)
- * [Generating documentation for your command](user_guide.md#generating-documentation-for-your-command)
- * [Generating shell completions](user_guide.md#generating-shell-completions)
-- [Contributing](CONTRIBUTING.md)
-- [License](#license)
-
# Overview
Cobra is a library providing a simple interface to create powerful modern CLI
interfaces similar to git & go tools.
-Cobra is also an application that will generate your application scaffolding to rapidly
-develop a Cobra-based application.
-
Cobra provides:
* Easy subcommand-based CLIs: `app server`, `app fetch`, etc.
* Fully POSIX-compliant flags (including short & long versions)
* Nested subcommands
* Global, local and cascading flags
-* Easy generation of applications & commands with `cobra init appname` & `cobra add cmdname`
* Intelligent suggestions (`app srver`... did you mean `app server`?)
* Automatic help generation for commands and flags
* Automatic help flag recognition of `-h`, `--help`, etc.
@@ -54,7 +28,7 @@ Cobra provides:
* Automatically generated man pages for your application
* Command aliases so you can change things without breaking them
* The flexibility to define your own help, usage, etc.
-* Optional tight integration with [viper](http://github.com/spf13/viper) for 12-factor apps
+* Optional seamless integration with [viper](http://github.com/spf13/viper) for 12-factor apps
# Concepts
@@ -88,7 +62,7 @@ have children commands and optionally run an action.
In the example above, 'server' is the command.
-[More about cobra.Command](https://godoc.org/github.com/spf13/cobra#Command)
+[More about cobra.Command](https://pkg.go.dev/github.com/spf13/cobra#Command)
## Flags
@@ -105,10 +79,11 @@ which maintains the same interface while adding POSIX compliance.
# Installing
Using Cobra is easy. First, use `go get` to install the latest version
-of the library. This command will install the `cobra` generator executable
-along with the library and its dependencies:
+of the library.
- go get -u github.com/spf13/cobra
+```
+go get -u github.com/spf13/cobra@latest
+```
Next, include Cobra in your application:
@@ -117,8 +92,19 @@ import "github.com/spf13/cobra"
```
# Usage
+`cobra-cli` is a command line program to generate cobra applications and command files.
+It will bootstrap your application scaffolding to rapidly
+develop a Cobra-based application. It is the easiest way to incorporate Cobra into your application.
+
+It can be installed by running:
+
+```
+go install github.com/spf13/cobra-cli@latest
+```
+
+For complete details on using the Cobra-CLI generator, please read [The Cobra Generator README](https://github.com/spf13/cobra-cli/blob/master/README.md)
-See [User Guide](user_guide.md).
+For complete details on using the Cobra library, please read the [The Cobra User Guide](user_guide.md).
# License
diff --git a/cluster-autoscaler/vendor/github.com/spf13/cobra/args.go b/cluster-autoscaler/vendor/github.com/spf13/cobra/args.go
index 70e9b262912e..20a022b30845 100644
--- a/cluster-autoscaler/vendor/github.com/spf13/cobra/args.go
+++ b/cluster-autoscaler/vendor/github.com/spf13/cobra/args.go
@@ -107,3 +107,15 @@ func RangeArgs(min int, max int) PositionalArgs {
return nil
}
}
+
+// MatchAll allows combining several PositionalArgs to work in concert.
+func MatchAll(pargs ...PositionalArgs) PositionalArgs {
+ return func(cmd *Command, args []string) error {
+ for _, parg := range pargs {
+ if err := parg(cmd, args); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+}
diff --git a/cluster-autoscaler/vendor/github.com/spf13/cobra/bash_completions.go b/cluster-autoscaler/vendor/github.com/spf13/cobra/bash_completions.go
index 733f4d1211da..6c360c595fd0 100644
--- a/cluster-autoscaler/vendor/github.com/spf13/cobra/bash_completions.go
+++ b/cluster-autoscaler/vendor/github.com/spf13/cobra/bash_completions.go
@@ -24,7 +24,7 @@ func writePreamble(buf io.StringWriter, name string) {
WriteStringAndCheck(buf, fmt.Sprintf(`
__%[1]s_debug()
{
- if [[ -n ${BASH_COMP_DEBUG_FILE} ]]; then
+ if [[ -n ${BASH_COMP_DEBUG_FILE:-} ]]; then
echo "$*" >> "${BASH_COMP_DEBUG_FILE}"
fi
}
@@ -134,7 +134,7 @@ __%[1]s_handle_go_custom_completion()
$filteringCmd
elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then
# File completion for directories only
- local subDir
+ local subdir
# Use printf to strip any trailing newline
subdir=$(printf "%%s" "${out[0]}")
if [ -n "$subdir" ]; then
@@ -187,13 +187,19 @@ __%[1]s_handle_reply()
PREFIX=""
cur="${cur#*=}"
${flags_completion[${index}]}
- if [ -n "${ZSH_VERSION}" ]; then
+ if [ -n "${ZSH_VERSION:-}" ]; then
# zsh completion needs --flag= prefix
eval "COMPREPLY=( \"\${COMPREPLY[@]/#/${flag}=}\" )"
fi
fi
fi
- return 0;
+
+ if [[ -z "${flag_parsing_disabled}" ]]; then
+ # If flag parsing is enabled, we have completed the flags and can return.
+ # If flag parsing is disabled, we may not know all (or any) of the flags, so we fallthrough
+ # to possibly call handle_go_custom_completion.
+ return 0;
+ fi
;;
esac
@@ -232,13 +238,13 @@ __%[1]s_handle_reply()
fi
if [[ ${#COMPREPLY[@]} -eq 0 ]]; then
- if declare -F __%[1]s_custom_func >/dev/null; then
- # try command name qualified custom func
- __%[1]s_custom_func
- else
- # otherwise fall back to unqualified for compatibility
- declare -F __custom_func >/dev/null && __custom_func
- fi
+ if declare -F __%[1]s_custom_func >/dev/null; then
+ # try command name qualified custom func
+ __%[1]s_custom_func
+ else
+ # otherwise fall back to unqualified for compatibility
+ declare -F __custom_func >/dev/null && __custom_func
+ fi
fi
# available in bash-completion >= 2, not always present on macOS
@@ -272,7 +278,7 @@ __%[1]s_handle_flag()
# if a command required a flag, and we found it, unset must_have_one_flag()
local flagname=${words[c]}
- local flagvalue
+ local flagvalue=""
# if the word contained an =
if [[ ${words[c]} == *"="* ]]; then
flagvalue=${flagname#*=} # take in as flagvalue after the =
@@ -291,7 +297,7 @@ __%[1]s_handle_flag()
# keep flag value with flagname as flaghash
# flaghash variable is an associative array which is only supported in bash > 3.
- if [[ -z "${BASH_VERSION}" || "${BASH_VERSINFO[0]}" -gt 3 ]]; then
+ if [[ -z "${BASH_VERSION:-}" || "${BASH_VERSINFO[0]:-}" -gt 3 ]]; then
if [ -n "${flagvalue}" ] ; then
flaghash[${flagname}]=${flagvalue}
elif [ -n "${words[ $((c+1)) ]}" ] ; then
@@ -303,7 +309,7 @@ __%[1]s_handle_flag()
# skip the argument to a two word flag
if [[ ${words[c]} != *"="* ]] && __%[1]s_contains_word "${words[c]}" "${two_word_flags[@]}"; then
- __%[1]s_debug "${FUNCNAME[0]}: found a flag ${words[c]}, skip the next argument"
+ __%[1]s_debug "${FUNCNAME[0]}: found a flag ${words[c]}, skip the next argument"
c=$((c+1))
# if we are looking for a flags value, don't show commands
if [[ $c -eq $cword ]]; then
@@ -363,7 +369,7 @@ __%[1]s_handle_word()
__%[1]s_handle_command
elif __%[1]s_contains_word "${words[c]}" "${command_aliases[@]}"; then
# aliashash variable is an associative array which is only supported in bash > 3.
- if [[ -z "${BASH_VERSION}" || "${BASH_VERSINFO[0]}" -gt 3 ]]; then
+ if [[ -z "${BASH_VERSION:-}" || "${BASH_VERSINFO[0]:-}" -gt 3 ]]; then
words[c]=${aliashash[${words[c]}]}
__%[1]s_handle_command
else
@@ -394,6 +400,7 @@ func writePostscript(buf io.StringWriter, name string) {
fi
local c=0
+ local flag_parsing_disabled=
local flags=()
local two_word_flags=()
local local_nonpersistent_flags=()
@@ -403,8 +410,8 @@ func writePostscript(buf io.StringWriter, name string) {
local command_aliases=()
local must_have_one_flag=()
local must_have_one_noun=()
- local has_completion_function
- local last_command
+ local has_completion_function=""
+ local last_command=""
local nouns=()
local noun_aliases=()
@@ -535,6 +542,11 @@ func writeFlags(buf io.StringWriter, cmd *Command) {
flags_completion=()
`)
+
+ if cmd.DisableFlagParsing {
+ WriteStringAndCheck(buf, " flag_parsing_disabled=1\n")
+ }
+
localNonPersistentFlags := cmd.LocalNonPersistentFlags()
cmd.NonInheritedFlags().VisitAll(func(flag *pflag.Flag) {
if nonCompletableFlag(flag) {
@@ -609,7 +621,7 @@ func writeCmdAliases(buf io.StringWriter, cmd *Command) {
sort.Strings(cmd.Aliases)
- WriteStringAndCheck(buf, fmt.Sprint(` if [[ -z "${BASH_VERSION}" || "${BASH_VERSINFO[0]}" -gt 3 ]]; then`, "\n"))
+ WriteStringAndCheck(buf, fmt.Sprint(` if [[ -z "${BASH_VERSION:-}" || "${BASH_VERSINFO[0]:-}" -gt 3 ]]; then`, "\n"))
for _, value := range cmd.Aliases {
WriteStringAndCheck(buf, fmt.Sprintf(" command_aliases+=(%q)\n", value))
WriteStringAndCheck(buf, fmt.Sprintf(" aliashash[%q]=%q\n", value, cmd.Name()))
diff --git a/cluster-autoscaler/vendor/github.com/spf13/cobra/bash_completionsV2.go b/cluster-autoscaler/vendor/github.com/spf13/cobra/bash_completionsV2.go
index 8859b57c42c0..82d26c17568e 100644
--- a/cluster-autoscaler/vendor/github.com/spf13/cobra/bash_completionsV2.go
+++ b/cluster-autoscaler/vendor/github.com/spf13/cobra/bash_completionsV2.go
@@ -138,13 +138,42 @@ __%[1]s_process_completion_results() {
_filedir -d
fi
else
- __%[1]s_handle_standard_completion_case
+ __%[1]s_handle_completion_types
fi
__%[1]s_handle_special_char "$cur" :
__%[1]s_handle_special_char "$cur" =
}
+__%[1]s_handle_completion_types() {
+ __%[1]s_debug "__%[1]s_handle_completion_types: COMP_TYPE is $COMP_TYPE"
+
+ case $COMP_TYPE in
+ 37|42)
+ # Type: menu-complete/menu-complete-backward and insert-completions
+ # If the user requested inserting one completion at a time, or all
+ # completions at once on the command-line we must remove the descriptions.
+ # https://github.com/spf13/cobra/issues/1508
+ local tab comp
+ tab=$(printf '\t')
+ while IFS='' read -r comp; do
+ # Strip any description
+ comp=${comp%%%%$tab*}
+ # Only consider the completions that match
+ comp=$(compgen -W "$comp" -- "$cur")
+ if [ -n "$comp" ]; then
+ COMPREPLY+=("$comp")
+ fi
+ done < <(printf "%%s\n" "${out[@]}")
+ ;;
+
+ *)
+ # Type: complete (normal completion)
+ __%[1]s_handle_standard_completion_case
+ ;;
+ esac
+}
+
__%[1]s_handle_standard_completion_case() {
local tab comp
tab=$(printf '\t')
diff --git a/cluster-autoscaler/vendor/github.com/spf13/cobra/command_notwin.go b/cluster-autoscaler/vendor/github.com/spf13/cobra/command_notwin.go
index 6159c1cc19d4..bb5dad90b7f0 100644
--- a/cluster-autoscaler/vendor/github.com/spf13/cobra/command_notwin.go
+++ b/cluster-autoscaler/vendor/github.com/spf13/cobra/command_notwin.go
@@ -1,3 +1,4 @@
+//go:build !windows
// +build !windows
package cobra
diff --git a/cluster-autoscaler/vendor/github.com/spf13/cobra/command_win.go b/cluster-autoscaler/vendor/github.com/spf13/cobra/command_win.go
index 8768b1736dca..a84f5a82aab8 100644
--- a/cluster-autoscaler/vendor/github.com/spf13/cobra/command_win.go
+++ b/cluster-autoscaler/vendor/github.com/spf13/cobra/command_win.go
@@ -1,3 +1,4 @@
+//go:build windows
// +build windows
package cobra
diff --git a/cluster-autoscaler/vendor/github.com/spf13/cobra/completions.go b/cluster-autoscaler/vendor/github.com/spf13/cobra/completions.go
index b849b9c84445..9ecd56a472aa 100644
--- a/cluster-autoscaler/vendor/github.com/spf13/cobra/completions.go
+++ b/cluster-autoscaler/vendor/github.com/spf13/cobra/completions.go
@@ -93,6 +93,8 @@ type CompletionOptions struct {
// DisableDescriptions turns off all completion descriptions for shells
// that support them
DisableDescriptions bool
+ // HiddenDefaultCmd makes the default 'completion' command hidden
+ HiddenDefaultCmd bool
}
// NoFileCompletions can be used to disable file completion for commands that should
@@ -226,7 +228,17 @@ func (c *Command) getCompletions(args []string) (*Command, []string, ShellCompDi
if c.Root().TraverseChildren {
finalCmd, finalArgs, err = c.Root().Traverse(trimmedArgs)
} else {
- finalCmd, finalArgs, err = c.Root().Find(trimmedArgs)
+ // For Root commands that don't specify any value for their Args fields, when we call
+ // Find(), if those Root commands don't have any sub-commands, they will accept arguments.
+ // However, because we have added the __complete sub-command in the current code path, the
+ // call to Find() -> legacyArgs() will return an error if there are any arguments.
+ // To avoid this, we first remove the __complete command to get back to having no sub-commands.
+ rootCmd := c.Root()
+ if len(rootCmd.Commands()) == 1 {
+ rootCmd.RemoveCommand(c)
+ }
+
+ finalCmd, finalArgs, err = rootCmd.Find(trimmedArgs)
}
if err != nil {
// Unable to find the real command. E.g., someInvalidCmd
@@ -266,6 +278,12 @@ func (c *Command) getCompletions(args []string) (*Command, []string, ShellCompDi
}
}
+ // We only remove the flags from the arguments if DisableFlagParsing is not set.
+ // This is important for commands which have requested to do their own flag completion.
+ if !finalCmd.DisableFlagParsing {
+ finalArgs = finalCmd.Flags().Args()
+ }
+
if flag != nil && flagCompletion {
// Check if we are completing a flag value subject to annotations
if validExts, present := flag.Annotations[BashCompFilenameExt]; present {
@@ -290,12 +308,16 @@ func (c *Command) getCompletions(args []string) (*Command, []string, ShellCompDi
}
}
+ var completions []string
+ var directive ShellCompDirective
+
+ // Note that we want to perform flagname completion even if finalCmd.DisableFlagParsing==true;
+ // doing this allows for completion of persistant flag names even for commands that disable flag parsing.
+ //
// When doing completion of a flag name, as soon as an argument starts with
// a '-' we know it is a flag. We cannot use isFlagArg() here as it requires
// the flag name to be complete
if flag == nil && len(toComplete) > 0 && toComplete[0] == '-' && !strings.Contains(toComplete, "=") && flagCompletion {
- var completions []string
-
// First check for required flags
completions = completeRequireFlags(finalCmd, toComplete)
@@ -322,86 +344,86 @@ func (c *Command) getCompletions(args []string) (*Command, []string, ShellCompDi
})
}
- directive := ShellCompDirectiveNoFileComp
+ directive = ShellCompDirectiveNoFileComp
if len(completions) == 1 && strings.HasSuffix(completions[0], "=") {
// If there is a single completion, the shell usually adds a space
// after the completion. We don't want that if the flag ends with an =
directive = ShellCompDirectiveNoSpace
}
- return finalCmd, completions, directive, nil
- }
- // We only remove the flags from the arguments if DisableFlagParsing is not set.
- // This is important for commands which have requested to do their own flag completion.
- if !finalCmd.DisableFlagParsing {
- finalArgs = finalCmd.Flags().Args()
- }
-
- var completions []string
- directive := ShellCompDirectiveDefault
- if flag == nil {
- foundLocalNonPersistentFlag := false
- // If TraverseChildren is true on the root command we don't check for
- // local flags because we can use a local flag on a parent command
- if !finalCmd.Root().TraverseChildren {
- // Check if there are any local, non-persistent flags on the command-line
- localNonPersistentFlags := finalCmd.LocalNonPersistentFlags()
- finalCmd.NonInheritedFlags().VisitAll(func(flag *pflag.Flag) {
- if localNonPersistentFlags.Lookup(flag.Name) != nil && flag.Changed {
- foundLocalNonPersistentFlag = true
- }
- })
+ if !finalCmd.DisableFlagParsing {
+ // If DisableFlagParsing==false, we have completed the flags as known by Cobra;
+ // we can return what we found.
+ // If DisableFlagParsing==true, Cobra may not be aware of all flags, so we
+ // let the logic continue to see if ValidArgsFunction needs to be called.
+ return finalCmd, completions, directive, nil
}
+ } else {
+ directive = ShellCompDirectiveDefault
+ if flag == nil {
+ foundLocalNonPersistentFlag := false
+ // If TraverseChildren is true on the root command we don't check for
+ // local flags because we can use a local flag on a parent command
+ if !finalCmd.Root().TraverseChildren {
+ // Check if there are any local, non-persistent flags on the command-line
+ localNonPersistentFlags := finalCmd.LocalNonPersistentFlags()
+ finalCmd.NonInheritedFlags().VisitAll(func(flag *pflag.Flag) {
+ if localNonPersistentFlags.Lookup(flag.Name) != nil && flag.Changed {
+ foundLocalNonPersistentFlag = true
+ }
+ })
+ }
- // Complete subcommand names, including the help command
- if len(finalArgs) == 0 && !foundLocalNonPersistentFlag {
- // We only complete sub-commands if:
- // - there are no arguments on the command-line and
- // - there are no local, non-persistent flags on the command-line or TraverseChildren is true
- for _, subCmd := range finalCmd.Commands() {
- if subCmd.IsAvailableCommand() || subCmd == finalCmd.helpCommand {
- if strings.HasPrefix(subCmd.Name(), toComplete) {
- completions = append(completions, fmt.Sprintf("%s\t%s", subCmd.Name(), subCmd.Short))
+ // Complete subcommand names, including the help command
+ if len(finalArgs) == 0 && !foundLocalNonPersistentFlag {
+ // We only complete sub-commands if:
+ // - there are no arguments on the command-line and
+ // - there are no local, non-persistent flags on the command-line or TraverseChildren is true
+ for _, subCmd := range finalCmd.Commands() {
+ if subCmd.IsAvailableCommand() || subCmd == finalCmd.helpCommand {
+ if strings.HasPrefix(subCmd.Name(), toComplete) {
+ completions = append(completions, fmt.Sprintf("%s\t%s", subCmd.Name(), subCmd.Short))
+ }
+ directive = ShellCompDirectiveNoFileComp
}
- directive = ShellCompDirectiveNoFileComp
}
}
- }
- // Complete required flags even without the '-' prefix
- completions = append(completions, completeRequireFlags(finalCmd, toComplete)...)
-
- // Always complete ValidArgs, even if we are completing a subcommand name.
- // This is for commands that have both subcommands and ValidArgs.
- if len(finalCmd.ValidArgs) > 0 {
- if len(finalArgs) == 0 {
- // ValidArgs are only for the first argument
- for _, validArg := range finalCmd.ValidArgs {
- if strings.HasPrefix(validArg, toComplete) {
- completions = append(completions, validArg)
+ // Complete required flags even without the '-' prefix
+ completions = append(completions, completeRequireFlags(finalCmd, toComplete)...)
+
+ // Always complete ValidArgs, even if we are completing a subcommand name.
+ // This is for commands that have both subcommands and ValidArgs.
+ if len(finalCmd.ValidArgs) > 0 {
+ if len(finalArgs) == 0 {
+ // ValidArgs are only for the first argument
+ for _, validArg := range finalCmd.ValidArgs {
+ if strings.HasPrefix(validArg, toComplete) {
+ completions = append(completions, validArg)
+ }
}
- }
- directive = ShellCompDirectiveNoFileComp
-
- // If no completions were found within commands or ValidArgs,
- // see if there are any ArgAliases that should be completed.
- if len(completions) == 0 {
- for _, argAlias := range finalCmd.ArgAliases {
- if strings.HasPrefix(argAlias, toComplete) {
- completions = append(completions, argAlias)
+ directive = ShellCompDirectiveNoFileComp
+
+ // If no completions were found within commands or ValidArgs,
+ // see if there are any ArgAliases that should be completed.
+ if len(completions) == 0 {
+ for _, argAlias := range finalCmd.ArgAliases {
+ if strings.HasPrefix(argAlias, toComplete) {
+ completions = append(completions, argAlias)
+ }
}
}
}
+
+ // If there are ValidArgs specified (even if they don't match), we stop completion.
+ // Only one of ValidArgs or ValidArgsFunction can be used for a single command.
+ return finalCmd, completions, directive, nil
}
- // If there are ValidArgs specified (even if they don't match), we stop completion.
- // Only one of ValidArgs or ValidArgsFunction can be used for a single command.
- return finalCmd, completions, directive, nil
+ // Let the logic continue so as to add any ValidArgsFunction completions,
+ // even if we already found sub-commands.
+ // This is for commands that have subcommands but also specify a ValidArgsFunction.
}
-
- // Let the logic continue so as to add any ValidArgsFunction completions,
- // even if we already found sub-commands.
- // This is for commands that have subcommands but also specify a ValidArgsFunction.
}
// Find the completion function for the flag or command
@@ -589,39 +611,43 @@ func (c *Command) initDefaultCompletionCmd() {
completionCmd := &Command{
Use: compCmdName,
- Short: "generate the autocompletion script for the specified shell",
- Long: fmt.Sprintf(`
-Generate the autocompletion script for %[1]s for the specified shell.
+ Short: "Generate the autocompletion script for the specified shell",
+ Long: fmt.Sprintf(`Generate the autocompletion script for %[1]s for the specified shell.
See each sub-command's help for details on how to use the generated script.
`, c.Root().Name()),
Args: NoArgs,
ValidArgsFunction: NoFileCompletions,
+ Hidden: c.CompletionOptions.HiddenDefaultCmd,
}
c.AddCommand(completionCmd)
out := c.OutOrStdout()
noDesc := c.CompletionOptions.DisableDescriptions
- shortDesc := "generate the autocompletion script for %s"
+ shortDesc := "Generate the autocompletion script for %s"
bash := &Command{
Use: "bash",
Short: fmt.Sprintf(shortDesc, "bash"),
- Long: fmt.Sprintf(`
-Generate the autocompletion script for the bash shell.
+ Long: fmt.Sprintf(`Generate the autocompletion script for the bash shell.
This script depends on the 'bash-completion' package.
If it is not installed already, you can install it via your OS's package manager.
To load completions in your current shell session:
-$ source <(%[1]s completion bash)
+
+ source <(%[1]s completion bash)
To load completions for every new session, execute once:
-Linux:
- $ %[1]s completion bash > /etc/bash_completion.d/%[1]s
-MacOS:
- $ %[1]s completion bash > /usr/local/etc/bash_completion.d/%[1]s
+
+#### Linux:
+
+ %[1]s completion bash > /etc/bash_completion.d/%[1]s
+
+#### macOS:
+
+ %[1]s completion bash > /usr/local/etc/bash_completion.d/%[1]s
You will need to start a new shell for this setup to take effect.
- `, c.Root().Name()),
+`, c.Root().Name()),
Args: NoArgs,
DisableFlagsInUseLine: true,
ValidArgsFunction: NoFileCompletions,
@@ -636,19 +662,22 @@ You will need to start a new shell for this setup to take effect.
zsh := &Command{
Use: "zsh",
Short: fmt.Sprintf(shortDesc, "zsh"),
- Long: fmt.Sprintf(`
-Generate the autocompletion script for the zsh shell.
+ Long: fmt.Sprintf(`Generate the autocompletion script for the zsh shell.
If shell completion is not already enabled in your environment you will need
to enable it. You can execute the following once:
-$ echo "autoload -U compinit; compinit" >> ~/.zshrc
+ echo "autoload -U compinit; compinit" >> ~/.zshrc
To load completions for every new session, execute once:
-# Linux:
-$ %[1]s completion zsh > "${fpath[1]}/_%[1]s"
-# macOS:
-$ %[1]s completion zsh > /usr/local/share/zsh/site-functions/_%[1]s
+
+#### Linux:
+
+ %[1]s completion zsh > "${fpath[1]}/_%[1]s"
+
+#### macOS:
+
+ %[1]s completion zsh > /usr/local/share/zsh/site-functions/_%[1]s
You will need to start a new shell for this setup to take effect.
`, c.Root().Name()),
@@ -668,14 +697,15 @@ You will need to start a new shell for this setup to take effect.
fish := &Command{
Use: "fish",
Short: fmt.Sprintf(shortDesc, "fish"),
- Long: fmt.Sprintf(`
-Generate the autocompletion script for the fish shell.
+ Long: fmt.Sprintf(`Generate the autocompletion script for the fish shell.
To load completions in your current shell session:
-$ %[1]s completion fish | source
+
+ %[1]s completion fish | source
To load completions for every new session, execute once:
-$ %[1]s completion fish > ~/.config/fish/completions/%[1]s.fish
+
+ %[1]s completion fish > ~/.config/fish/completions/%[1]s.fish
You will need to start a new shell for this setup to take effect.
`, c.Root().Name()),
@@ -692,11 +722,11 @@ You will need to start a new shell for this setup to take effect.
powershell := &Command{
Use: "powershell",
Short: fmt.Sprintf(shortDesc, "powershell"),
- Long: fmt.Sprintf(`
-Generate the autocompletion script for powershell.
+ Long: fmt.Sprintf(`Generate the autocompletion script for powershell.
To load completions in your current shell session:
-PS C:\> %[1]s completion powershell | Out-String | Invoke-Expression
+
+ %[1]s completion powershell | Out-String | Invoke-Expression
To load completions for every new session, add the output of the above command
to your powershell profile.
diff --git a/cluster-autoscaler/vendor/github.com/spf13/cobra/go.mod b/cluster-autoscaler/vendor/github.com/spf13/cobra/go.mod
index 1fb9439dd86e..2d6855911de2 100644
--- a/cluster-autoscaler/vendor/github.com/spf13/cobra/go.mod
+++ b/cluster-autoscaler/vendor/github.com/spf13/cobra/go.mod
@@ -1,11 +1,10 @@
module github.com/spf13/cobra
-go 1.14
+go 1.15
require (
- github.com/cpuguy83/go-md2man/v2 v2.0.0
+ github.com/cpuguy83/go-md2man/v2 v2.0.1
github.com/inconshreveable/mousetrap v1.0.0
github.com/spf13/pflag v1.0.5
- github.com/spf13/viper v1.8.1
gopkg.in/yaml.v2 v2.4.0
)
diff --git a/cluster-autoscaler/vendor/github.com/spf13/cobra/go.sum b/cluster-autoscaler/vendor/github.com/spf13/cobra/go.sum
index 3e22df29a3de..431058ed0f61 100644
--- a/cluster-autoscaler/vendor/github.com/spf13/cobra/go.sum
+++ b/cluster-autoscaler/vendor/github.com/spf13/cobra/go.sum
@@ -1,592 +1,18 @@
-cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
-cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
-cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
-cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=
-cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
-cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=
-cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=
-cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To=
-cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4=
-cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M=
-cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc=
-cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk=
-cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=
-cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=
-cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=
-cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI=
-cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk=
-cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg=
-cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8=
-cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0=
-cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
-cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
-cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
-cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=
-cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=
-cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
-cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
-cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
-cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk=
-cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
-cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
-cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
-cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU=
-cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
-cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
-cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
-cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
-cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
-dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
-github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
-github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
-github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
-github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
-github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
-github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
-github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
-github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM=
-github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
-github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
-github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
-github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
-github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
-github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
-github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
-github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
-github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
-github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
-github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM=
-github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
-github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
-github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
-github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=
-github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
-github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
-github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
-github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
-github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
-github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
-github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
-github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
-github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
-github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
-github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
-github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
-github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
-github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
-github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
-github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
-github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
-github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
-github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
-github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
-github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
-github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
-github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
-github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=
-github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
-github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
-github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
-github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
-github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
-github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
-github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
-github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
-github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
-github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
-github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
-github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
-github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=
-github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
-github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
-github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
-github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
-github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
-github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
-github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
-github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
-github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
-github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
-github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
-github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
-github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
-github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
-github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
-github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
-github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
-github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
-github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
-github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
-github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
-github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
-github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
-github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
-github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
-github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
-github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
-github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
-github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q=
-github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
-github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
-github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
-github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
-github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
-github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
-github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=
-github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
-github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
-github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
-github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
-github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=
-github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
-github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
-github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
-github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
-github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
-github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
-github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
-github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
-github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
-github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
+github.com/cpuguy83/go-md2man/v2 v2.0.1 h1:r/myEWzV9lfsM1tFLgDyu0atFtJ1fXn261LKYj/3DxU=
+github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
-github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
-github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
-github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
-github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
-github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
-github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
-github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
-github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
-github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
-github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
+github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs=
+github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
-github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls=
-github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
-github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
-github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
-github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
-github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
-github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
-github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
-github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
-github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
-github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
-github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
-github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag=
-github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
-github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
-github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
-github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
-github.com/pelletier/go-toml v1.9.3 h1:zeC5b1GviRUyKYd6OJPvBU/mcVDVoL1OhT17FCt5dSQ=
-github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
-github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
-github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
-github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
-github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
-github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
-github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
-github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
-github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
-github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
-github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
-github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
-github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
-github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=
-github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
-github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY=
-github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=
-github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng=
-github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
-github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
-github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
+github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
+github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
-github.com/spf13/viper v1.8.1 h1:Kq1fyeebqsBfbjZj4EL7gj2IO0mMaiyjYUWcUsl2O44=
-github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
-github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
-github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
-github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
-github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
-github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
-github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
-github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
-github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
-github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
-go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs=
-go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
-go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ=
-go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
-go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
-go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
-go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
-go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
-go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
-go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
-go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
-go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
-go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
-golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
-golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
-golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
-golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
-golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek=
-golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=
-golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
-golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
-golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
-golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
-golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
-golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
-golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
-golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
-golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
-golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
-golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
-golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
-golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
-golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
-golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
-golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
-golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
-golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
-golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
-golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
-golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
-golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
-golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
-golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
-golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
-golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
-golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
-golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
-golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
-golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
-golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
-golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
-golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=
-golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
-golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
-golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
-golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
-golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
-golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
-golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
-golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
-golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ=
-golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
-golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
-golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
-golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
-golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
-golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
-golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
-golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
-golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
-golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
-golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
-golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
-golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
-golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
-golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
-golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
-golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
-golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE=
-golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
-golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
-golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
-golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
-golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
-golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
-golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
-golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
-google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
-google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
-google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
-google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
-google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
-google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
-google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
-google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
-google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
-google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
-google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
-google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
-google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
-google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=
-google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=
-google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg=
-google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE=
-google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8=
-google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU=
-google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94=
-google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8=
-google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
-google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
-google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
-google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
-google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
-google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
-google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
-google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
-google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
-google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
-google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
-google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
-google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
-google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
-google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
-google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA=
-google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=
-google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
-google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
-google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A=
-google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
-google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
-google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
-google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
-google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
-google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
-google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
-google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
-google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
-google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
-google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
-google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
-google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
-google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
-google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
-google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
-google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8=
-google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
-google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
-google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
-google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
-google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
-google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
-google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
-google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
-google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
-google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
-google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
-google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
-google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
-google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
-google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
-google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
-gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
-gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU=
-gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
-gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
+gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
-gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
-gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
-honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
-honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
-honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
-honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
-honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
-honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
-rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
-rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
-rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
diff --git a/cluster-autoscaler/vendor/github.com/spf13/cobra/powershell_completions.go b/cluster-autoscaler/vendor/github.com/spf13/cobra/powershell_completions.go
index 59234c09f18d..62d719f0b33f 100644
--- a/cluster-autoscaler/vendor/github.com/spf13/cobra/powershell_completions.go
+++ b/cluster-autoscaler/vendor/github.com/spf13/cobra/powershell_completions.go
@@ -50,7 +50,7 @@ Register-ArgumentCompleter -CommandName '%[1]s' -ScriptBlock {
if ($Command.Length -gt $CursorPosition) {
$Command=$Command.Substring(0,$CursorPosition)
}
- __%[1]s_debug "Truncated command: $Command"
+ __%[1]s_debug "Truncated command: $Command"
$ShellCompDirectiveError=%[3]d
$ShellCompDirectiveNoSpace=%[4]d
@@ -58,7 +58,7 @@ Register-ArgumentCompleter -CommandName '%[1]s' -ScriptBlock {
$ShellCompDirectiveFilterFileExt=%[6]d
$ShellCompDirectiveFilterDirs=%[7]d
- # Prepare the command to request completions for the program.
+ # Prepare the command to request completions for the program.
# Split the command at the first space to separate the program and arguments.
$Program,$Arguments = $Command.Split(" ",2)
$RequestComp="$Program %[2]s $Arguments"
@@ -233,7 +233,7 @@ Register-ArgumentCompleter -CommandName '%[1]s' -ScriptBlock {
Default {
# Like MenuComplete but we don't want to add a space here because
# the user need to press space anyway to get the completion.
- # Description will not be shown because thats not possible with TabCompleteNext
+ # Description will not be shown because that's not possible with TabCompleteNext
[System.Management.Automation.CompletionResult]::new($($comp.Name | __%[1]s_escapeStringWithSpecialChars), "$($comp.Name)", 'ParameterValue', "$($comp.Description)")
}
}
diff --git a/cluster-autoscaler/vendor/github.com/spf13/cobra/projects_using_cobra.md b/cluster-autoscaler/vendor/github.com/spf13/cobra/projects_using_cobra.md
index d98a71e36f96..9674c348c0d5 100644
--- a/cluster-autoscaler/vendor/github.com/spf13/cobra/projects_using_cobra.md
+++ b/cluster-autoscaler/vendor/github.com/spf13/cobra/projects_using_cobra.md
@@ -4,6 +4,7 @@
- [Bleve](http://www.blevesearch.com/)
- [CockroachDB](http://www.cockroachlabs.com/)
- [Cosmos SDK](https://github.com/cosmos/cosmos-sdk)
+- [Datree](https://github.com/datreeio/datree)
- [Delve](https://github.com/derekparker/delve)
- [Docker (distribution)](https://github.com/docker/distribution)
- [Etcd](https://etcd.io/)
@@ -14,25 +15,37 @@
- [GitHub Labeler](https://github.com/erdaltsksn/gh-label)
- [Golangci-lint](https://golangci-lint.run)
- [GopherJS](http://www.gopherjs.org/)
+- [GoReleaser](https://goreleaser.com)
- [Helm](https://helm.sh)
- [Hugo](https://gohugo.io)
+- [Infracost](https://github.com/infracost/infracost)
- [Istio](https://istio.io)
- [Kool](https://github.com/kool-dev/kool)
- [Kubernetes](http://kubernetes.io/)
- [Linkerd](https://linkerd.io/)
- [Mattermost-server](https://github.com/mattermost/mattermost-server)
+- [Mercure](https://mercure.rocks/)
+- [Meroxa CLI](https://github.com/meroxa/cli)
- [Metal Stack CLI](https://github.com/metal-stack/metalctl)
- [Moby (former Docker)](https://github.com/moby/moby)
+- [Moldy](https://github.com/Moldy-Community/moldy)
+- [Multi-gitter](https://github.com/lindell/multi-gitter)
- [Nanobox](https://github.com/nanobox-io/nanobox)/[Nanopack](https://github.com/nanopack)
+- [nFPM](https://nfpm.goreleaser.com)
- [OpenShift](https://www.openshift.com/)
- [Ory Hydra](https://github.com/ory/hydra)
- [Ory Kratos](https://github.com/ory/kratos)
+- [Pixie](https://github.com/pixie-io/pixie)
- [Pouch](https://github.com/alibaba/pouch)
- [ProjectAtomic (enterprise)](http://www.projectatomic.io/)
- [Prototool](https://github.com/uber/prototool)
+- [QRcp](https://github.com/claudiodangelis/qrcp)
- [Random](https://github.com/erdaltsksn/random)
- [Rclone](https://rclone.org/)
+- [Scaleway CLI](https://github.com/scaleway/scaleway-cli)
- [Skaffold](https://skaffold.dev/)
- [Tendermint](https://github.com/tendermint/tendermint)
- [Twitch CLI](https://github.com/twitchdev/twitch-cli)
+- [UpCloud CLI (`upctl`)](https://github.com/UpCloudLtd/upcloud-cli)
+- VMware's [Tanzu Community Edition](https://github.com/vmware-tanzu/community-edition) & [Tanzu Framework](https://github.com/vmware-tanzu/tanzu-framework)
- [Werf](https://werf.io/)
diff --git a/cluster-autoscaler/vendor/github.com/spf13/cobra/shell_completions.md b/cluster-autoscaler/vendor/github.com/spf13/cobra/shell_completions.md
index 4ba06a11c0d5..33a4c65a5a38 100644
--- a/cluster-autoscaler/vendor/github.com/spf13/cobra/shell_completions.md
+++ b/cluster-autoscaler/vendor/github.com/spf13/cobra/shell_completions.md
@@ -16,10 +16,12 @@ If you do not wish to use the default `completion` command, you can choose to
provide your own, which will take precedence over the default one. (This also provides
backwards-compatibility with programs that already have their own `completion` command.)
-If you are using the generator, you can create a completion command by running
+If you are using the `cobra-cli` generator,
+which can be found at [spf13/cobra-cli](https://github.com/spf13/cobra-cli),
+you can create a completion command by running
```bash
-cobra add completion
+cobra-cli add completion
```
and then modifying the generated `cmd/completion.go` file to look something like this
(writing the shell script to stdout allows the most flexible use):
@@ -28,17 +30,17 @@ and then modifying the generated `cmd/completion.go` file to look something like
var completionCmd = &cobra.Command{
Use: "completion [bash|zsh|fish|powershell]",
Short: "Generate completion script",
- Long: `To load completions:
+ Long: fmt.Sprintf(`To load completions:
Bash:
- $ source <(yourprogram completion bash)
+ $ source <(%[1]s completion bash)
# To load completions for each session, execute once:
# Linux:
- $ yourprogram completion bash > /etc/bash_completion.d/yourprogram
+ $ %[1]s completion bash > /etc/bash_completion.d/%[1]s
# macOS:
- $ yourprogram completion bash > /usr/local/etc/bash_completion.d/yourprogram
+ $ %[1]s completion bash > /usr/local/etc/bash_completion.d/%[1]s
Zsh:
@@ -48,25 +50,25 @@ Zsh:
$ echo "autoload -U compinit; compinit" >> ~/.zshrc
# To load completions for each session, execute once:
- $ yourprogram completion zsh > "${fpath[1]}/_yourprogram"
+ $ %[1]s completion zsh > "${fpath[1]}/_%[1]s"
# You will need to start a new shell for this setup to take effect.
fish:
- $ yourprogram completion fish | source
+ $ %[1]s completion fish | source
# To load completions for each session, execute once:
- $ yourprogram completion fish > ~/.config/fish/completions/yourprogram.fish
+ $ %[1]s completion fish > ~/.config/fish/completions/%[1]s.fish
PowerShell:
- PS> yourprogram completion powershell | Out-String | Invoke-Expression
+ PS> %[1]s completion powershell | Out-String | Invoke-Expression
# To load completions for every new session, run:
- PS> yourprogram completion powershell > yourprogram.ps1
+ PS> %[1]s completion powershell > %[1]s.ps1
# and source this file from your PowerShell profile.
-`,
+`,cmd.Root().Name()),
DisableFlagsInUseLine: true,
ValidArgs: []string{"bash", "zsh", "fish", "powershell"},
Args: cobra.ExactValidArgs(1),
diff --git a/cluster-autoscaler/vendor/github.com/spf13/cobra/user_guide.md b/cluster-autoscaler/vendor/github.com/spf13/cobra/user_guide.md
index 311abce284d2..4a3c2b0da53b 100644
--- a/cluster-autoscaler/vendor/github.com/spf13/cobra/user_guide.md
+++ b/cluster-autoscaler/vendor/github.com/spf13/cobra/user_guide.md
@@ -29,10 +29,10 @@ func main() {
## Using the Cobra Generator
-Cobra provides its own program that will create your application and add any
+Cobra-CLI is its own program that will create your application and add any
commands you want. It's the easiest way to incorporate Cobra into your application.
-[Here](https://github.com/spf13/cobra/blob/master/cobra/README.md) you can find more information about it.
+For complete details on using the Cobra generator, please refer to [The Cobra-CLI Generator README](https://github.com/spf13/cobra-cli/blob/master/README.md)
## Using the Cobra Library
@@ -86,7 +86,7 @@ var (
userLicense string
rootCmd = &cobra.Command{
- Use: "cobra",
+ Use: "cobra-cli",
Short: "A generator for Cobra based Applications",
Long: `Cobra is a CLI library for Go that empowers applications.
This application is a tool to generate the needed files
@@ -281,7 +281,7 @@ func init() {
In this example, the persistent flag `author` is bound with `viper`.
**Note**: the variable `author` will not be set to the value from config,
-when the `--author` flag is not provided by user.
+when the `--author` flag is provided by user.
More in [viper documentation](https://github.com/spf13/viper#working-with-flags).
@@ -315,6 +315,7 @@ The following validators are built in:
- `ExactArgs(int)` - the command will report an error if there are not exactly N positional args.
- `ExactValidArgs(int)` - the command will report an error if there are not exactly N positional args OR if there are any positional args that are not in the `ValidArgs` field of `Command`
- `RangeArgs(min, max)` - the command will report an error if the number of args is not between the minimum and maximum number of expected args.
+- `MatchAll(pargs ...PositionalArgs)` - enables combining existing checks with arbitrary other checks (e.g. you want to check the ExactArgs length along with other qualities).
An example of setting the custom validator:
diff --git a/cluster-autoscaler/vendor/github.com/spf13/cobra/zsh_completions.go b/cluster-autoscaler/vendor/github.com/spf13/cobra/zsh_completions.go
index 1afec30ea922..624adab537b9 100644
--- a/cluster-autoscaler/vendor/github.com/spf13/cobra/zsh_completions.go
+++ b/cluster-autoscaler/vendor/github.com/spf13/cobra/zsh_completions.go
@@ -202,7 +202,7 @@ _%[1]s()
_arguments '*:filename:'"$filteringCmd"
elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then
# File completion for directories only
- local subDir
+ local subdir
subdir="${completions[1]}"
if [ -n "$subdir" ]; then
__%[1]s_debug "Listing directories in $subdir"
@@ -250,7 +250,7 @@ _%[1]s()
# don't run the completion function when being source-ed or eval-ed
if [ "$funcstack[1]" = "_%[1]s" ]; then
- _%[1]s
+ _%[1]s
fi
`, name, compCmd,
ShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp,
diff --git a/cluster-autoscaler/vendor/github.com/stretchr/testify/assert/assertion_compare.go b/cluster-autoscaler/vendor/github.com/stretchr/testify/assert/assertion_compare.go
index 41649d267924..3bb22a9718eb 100644
--- a/cluster-autoscaler/vendor/github.com/stretchr/testify/assert/assertion_compare.go
+++ b/cluster-autoscaler/vendor/github.com/stretchr/testify/assert/assertion_compare.go
@@ -3,6 +3,7 @@ package assert
import (
"fmt"
"reflect"
+ "time"
)
type CompareType int
@@ -30,6 +31,8 @@ var (
float64Type = reflect.TypeOf(float64(1))
stringType = reflect.TypeOf("")
+
+ timeType = reflect.TypeOf(time.Time{})
)
func compare(obj1, obj2 interface{}, kind reflect.Kind) (CompareType, bool) {
@@ -299,6 +302,27 @@ func compare(obj1, obj2 interface{}, kind reflect.Kind) (CompareType, bool) {
return compareLess, true
}
}
+ // Check for known struct types we can check for compare results.
+ case reflect.Struct:
+ {
+ // All structs enter here. We're not interested in most types.
+ if !canConvert(obj1Value, timeType) {
+ break
+ }
+
+ // time.Time can compared!
+ timeObj1, ok := obj1.(time.Time)
+ if !ok {
+ timeObj1 = obj1Value.Convert(timeType).Interface().(time.Time)
+ }
+
+ timeObj2, ok := obj2.(time.Time)
+ if !ok {
+ timeObj2 = obj2Value.Convert(timeType).Interface().(time.Time)
+ }
+
+ return compare(timeObj1.UnixNano(), timeObj2.UnixNano(), reflect.Int64)
+ }
}
return compareEqual, false
@@ -310,7 +334,10 @@ func compare(obj1, obj2 interface{}, kind reflect.Kind) (CompareType, bool) {
// assert.Greater(t, float64(2), float64(1))
// assert.Greater(t, "b", "a")
func Greater(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool {
- return compareTwoValues(t, e1, e2, []CompareType{compareGreater}, "\"%v\" is not greater than \"%v\"", msgAndArgs)
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+ return compareTwoValues(t, e1, e2, []CompareType{compareGreater}, "\"%v\" is not greater than \"%v\"", msgAndArgs...)
}
// GreaterOrEqual asserts that the first element is greater than or equal to the second
@@ -320,7 +347,10 @@ func Greater(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface
// assert.GreaterOrEqual(t, "b", "a")
// assert.GreaterOrEqual(t, "b", "b")
func GreaterOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool {
- return compareTwoValues(t, e1, e2, []CompareType{compareGreater, compareEqual}, "\"%v\" is not greater than or equal to \"%v\"", msgAndArgs)
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+ return compareTwoValues(t, e1, e2, []CompareType{compareGreater, compareEqual}, "\"%v\" is not greater than or equal to \"%v\"", msgAndArgs...)
}
// Less asserts that the first element is less than the second
@@ -329,7 +359,10 @@ func GreaterOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...in
// assert.Less(t, float64(1), float64(2))
// assert.Less(t, "a", "b")
func Less(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool {
- return compareTwoValues(t, e1, e2, []CompareType{compareLess}, "\"%v\" is not less than \"%v\"", msgAndArgs)
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+ return compareTwoValues(t, e1, e2, []CompareType{compareLess}, "\"%v\" is not less than \"%v\"", msgAndArgs...)
}
// LessOrEqual asserts that the first element is less than or equal to the second
@@ -339,7 +372,10 @@ func Less(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{})
// assert.LessOrEqual(t, "a", "b")
// assert.LessOrEqual(t, "b", "b")
func LessOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool {
- return compareTwoValues(t, e1, e2, []CompareType{compareLess, compareEqual}, "\"%v\" is not less than or equal to \"%v\"", msgAndArgs)
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+ return compareTwoValues(t, e1, e2, []CompareType{compareLess, compareEqual}, "\"%v\" is not less than or equal to \"%v\"", msgAndArgs...)
}
// Positive asserts that the specified element is positive
@@ -347,8 +383,11 @@ func LessOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...inter
// assert.Positive(t, 1)
// assert.Positive(t, 1.23)
func Positive(t TestingT, e interface{}, msgAndArgs ...interface{}) bool {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
zero := reflect.Zero(reflect.TypeOf(e))
- return compareTwoValues(t, e, zero.Interface(), []CompareType{compareGreater}, "\"%v\" is not positive", msgAndArgs)
+ return compareTwoValues(t, e, zero.Interface(), []CompareType{compareGreater}, "\"%v\" is not positive", msgAndArgs...)
}
// Negative asserts that the specified element is negative
@@ -356,8 +395,11 @@ func Positive(t TestingT, e interface{}, msgAndArgs ...interface{}) bool {
// assert.Negative(t, -1)
// assert.Negative(t, -1.23)
func Negative(t TestingT, e interface{}, msgAndArgs ...interface{}) bool {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
zero := reflect.Zero(reflect.TypeOf(e))
- return compareTwoValues(t, e, zero.Interface(), []CompareType{compareLess}, "\"%v\" is not negative", msgAndArgs)
+ return compareTwoValues(t, e, zero.Interface(), []CompareType{compareLess}, "\"%v\" is not negative", msgAndArgs...)
}
func compareTwoValues(t TestingT, e1 interface{}, e2 interface{}, allowedComparesResults []CompareType, failMessage string, msgAndArgs ...interface{}) bool {
diff --git a/cluster-autoscaler/vendor/github.com/stretchr/testify/assert/assertion_compare_can_convert.go b/cluster-autoscaler/vendor/github.com/stretchr/testify/assert/assertion_compare_can_convert.go
new file mode 100644
index 000000000000..df22c47fc50a
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/stretchr/testify/assert/assertion_compare_can_convert.go
@@ -0,0 +1,16 @@
+//go:build go1.17
+// +build go1.17
+
+// TODO: once support for Go 1.16 is dropped, this file can be
+// merged/removed with assertion_compare_go1.17_test.go and
+// assertion_compare_legacy.go
+
+package assert
+
+import "reflect"
+
+// Wrapper around reflect.Value.CanConvert, for compatability
+// reasons.
+func canConvert(value reflect.Value, to reflect.Type) bool {
+ return value.CanConvert(to)
+}
diff --git a/cluster-autoscaler/vendor/github.com/stretchr/testify/assert/assertion_compare_legacy.go b/cluster-autoscaler/vendor/github.com/stretchr/testify/assert/assertion_compare_legacy.go
new file mode 100644
index 000000000000..1701af2a3c89
--- /dev/null
+++ b/cluster-autoscaler/vendor/github.com/stretchr/testify/assert/assertion_compare_legacy.go
@@ -0,0 +1,16 @@
+//go:build !go1.17
+// +build !go1.17
+
+// TODO: once support for Go 1.16 is dropped, this file can be
+// merged/removed with assertion_compare_go1.17_test.go and
+// assertion_compare_can_convert.go
+
+package assert
+
+import "reflect"
+
+// Older versions of Go does not have the reflect.Value.CanConvert
+// method.
+func canConvert(value reflect.Value, to reflect.Type) bool {
+ return false
+}
diff --git a/cluster-autoscaler/vendor/github.com/stretchr/testify/assert/assertion_format.go b/cluster-autoscaler/vendor/github.com/stretchr/testify/assert/assertion_format.go
index 4dfd1229a861..27e2420ed2e7 100644
--- a/cluster-autoscaler/vendor/github.com/stretchr/testify/assert/assertion_format.go
+++ b/cluster-autoscaler/vendor/github.com/stretchr/testify/assert/assertion_format.go
@@ -123,6 +123,18 @@ func ErrorAsf(t TestingT, err error, target interface{}, msg string, args ...int
return ErrorAs(t, err, target, append([]interface{}{msg}, args...)...)
}
+// ErrorContainsf asserts that a function returned an error (i.e. not `nil`)
+// and that the error contains the specified substring.
+//
+// actualObj, err := SomeFunction()
+// assert.ErrorContainsf(t, err, expectedErrorSubString, "error message %s", "formatted")
+func ErrorContainsf(t TestingT, theError error, contains string, msg string, args ...interface{}) bool {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+ return ErrorContains(t, theError, contains, append([]interface{}{msg}, args...)...)
+}
+
// ErrorIsf asserts that at least one of the errors in err's chain matches target.
// This is a wrapper for errors.Is.
func ErrorIsf(t TestingT, err error, target error, msg string, args ...interface{}) bool {
diff --git a/cluster-autoscaler/vendor/github.com/stretchr/testify/assert/assertion_forward.go b/cluster-autoscaler/vendor/github.com/stretchr/testify/assert/assertion_forward.go
index 25337a6f07e6..d9ea368d0a35 100644
--- a/cluster-autoscaler/vendor/github.com/stretchr/testify/assert/assertion_forward.go
+++ b/cluster-autoscaler/vendor/github.com/stretchr/testify/assert/assertion_forward.go
@@ -222,6 +222,30 @@ func (a *Assertions) ErrorAsf(err error, target interface{}, msg string, args ..
return ErrorAsf(a.t, err, target, msg, args...)
}
+// ErrorContains asserts that a function returned an error (i.e. not `nil`)
+// and that the error contains the specified substring.
+//
+// actualObj, err := SomeFunction()
+// a.ErrorContains(err, expectedErrorSubString)
+func (a *Assertions) ErrorContains(theError error, contains string, msgAndArgs ...interface{}) bool {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ return ErrorContains(a.t, theError, contains, msgAndArgs...)
+}
+
+// ErrorContainsf asserts that a function returned an error (i.e. not `nil`)
+// and that the error contains the specified substring.
+//
+// actualObj, err := SomeFunction()
+// a.ErrorContainsf(err, expectedErrorSubString, "error message %s", "formatted")
+func (a *Assertions) ErrorContainsf(theError error, contains string, msg string, args ...interface{}) bool {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ return ErrorContainsf(a.t, theError, contains, msg, args...)
+}
+
// ErrorIs asserts that at least one of the errors in err's chain matches target.
// This is a wrapper for errors.Is.
func (a *Assertions) ErrorIs(err error, target error, msgAndArgs ...interface{}) bool {
diff --git a/cluster-autoscaler/vendor/github.com/stretchr/testify/assert/assertion_order.go b/cluster-autoscaler/vendor/github.com/stretchr/testify/assert/assertion_order.go
index 1c3b47182a72..759448783585 100644
--- a/cluster-autoscaler/vendor/github.com/stretchr/testify/assert/assertion_order.go
+++ b/cluster-autoscaler/vendor/github.com/stretchr/testify/assert/assertion_order.go
@@ -50,7 +50,7 @@ func isOrdered(t TestingT, object interface{}, allowedComparesResults []CompareT
// assert.IsIncreasing(t, []float{1, 2})
// assert.IsIncreasing(t, []string{"a", "b"})
func IsIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool {
- return isOrdered(t, object, []CompareType{compareLess}, "\"%v\" is not less than \"%v\"", msgAndArgs)
+ return isOrdered(t, object, []CompareType{compareLess}, "\"%v\" is not less than \"%v\"", msgAndArgs...)
}
// IsNonIncreasing asserts that the collection is not increasing
@@ -59,7 +59,7 @@ func IsIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) boo
// assert.IsNonIncreasing(t, []float{2, 1})
// assert.IsNonIncreasing(t, []string{"b", "a"})
func IsNonIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool {
- return isOrdered(t, object, []CompareType{compareEqual, compareGreater}, "\"%v\" is not greater than or equal to \"%v\"", msgAndArgs)
+ return isOrdered(t, object, []CompareType{compareEqual, compareGreater}, "\"%v\" is not greater than or equal to \"%v\"", msgAndArgs...)
}
// IsDecreasing asserts that the collection is decreasing
@@ -68,7 +68,7 @@ func IsNonIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{})
// assert.IsDecreasing(t, []float{2, 1})
// assert.IsDecreasing(t, []string{"b", "a"})
func IsDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool {
- return isOrdered(t, object, []CompareType{compareGreater}, "\"%v\" is not greater than \"%v\"", msgAndArgs)
+ return isOrdered(t, object, []CompareType{compareGreater}, "\"%v\" is not greater than \"%v\"", msgAndArgs...)
}
// IsNonDecreasing asserts that the collection is not decreasing
@@ -77,5 +77,5 @@ func IsDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) boo
// assert.IsNonDecreasing(t, []float{1, 2})
// assert.IsNonDecreasing(t, []string{"a", "b"})
func IsNonDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool {
- return isOrdered(t, object, []CompareType{compareLess, compareEqual}, "\"%v\" is not less than or equal to \"%v\"", msgAndArgs)
+ return isOrdered(t, object, []CompareType{compareLess, compareEqual}, "\"%v\" is not less than or equal to \"%v\"", msgAndArgs...)
}
diff --git a/cluster-autoscaler/vendor/github.com/stretchr/testify/assert/assertions.go b/cluster-autoscaler/vendor/github.com/stretchr/testify/assert/assertions.go
index bcac4401f57f..0357b2231a2c 100644
--- a/cluster-autoscaler/vendor/github.com/stretchr/testify/assert/assertions.go
+++ b/cluster-autoscaler/vendor/github.com/stretchr/testify/assert/assertions.go
@@ -718,10 +718,14 @@ func NotEqualValues(t TestingT, expected, actual interface{}, msgAndArgs ...inte
// return (false, false) if impossible.
// return (true, false) if element was not found.
// return (true, true) if element was found.
-func includeElement(list interface{}, element interface{}) (ok, found bool) {
+func containsElement(list interface{}, element interface{}) (ok, found bool) {
listValue := reflect.ValueOf(list)
- listKind := reflect.TypeOf(list).Kind()
+ listType := reflect.TypeOf(list)
+ if listType == nil {
+ return false, false
+ }
+ listKind := listType.Kind()
defer func() {
if e := recover(); e != nil {
ok = false
@@ -764,7 +768,7 @@ func Contains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) bo
h.Helper()
}
- ok, found := includeElement(s, contains)
+ ok, found := containsElement(s, contains)
if !ok {
return Fail(t, fmt.Sprintf("%#v could not be applied builtin len()", s), msgAndArgs...)
}
@@ -787,7 +791,7 @@ func NotContains(t TestingT, s, contains interface{}, msgAndArgs ...interface{})
h.Helper()
}
- ok, found := includeElement(s, contains)
+ ok, found := containsElement(s, contains)
if !ok {
return Fail(t, fmt.Sprintf("\"%s\" could not be applied builtin len()", s), msgAndArgs...)
}
@@ -831,7 +835,7 @@ func Subset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) (ok
for i := 0; i < subsetValue.Len(); i++ {
element := subsetValue.Index(i).Interface()
- ok, found := includeElement(list, element)
+ ok, found := containsElement(list, element)
if !ok {
return Fail(t, fmt.Sprintf("\"%s\" could not be applied builtin len()", list), msgAndArgs...)
}
@@ -852,7 +856,7 @@ func NotSubset(t TestingT, list, subset interface{}, msgAndArgs ...interface{})
h.Helper()
}
if subset == nil {
- return Fail(t, fmt.Sprintf("nil is the empty set which is a subset of every set"), msgAndArgs...)
+ return Fail(t, "nil is the empty set which is a subset of every set", msgAndArgs...)
}
subsetValue := reflect.ValueOf(subset)
@@ -875,7 +879,7 @@ func NotSubset(t TestingT, list, subset interface{}, msgAndArgs ...interface{})
for i := 0; i < subsetValue.Len(); i++ {
element := subsetValue.Index(i).Interface()
- ok, found := includeElement(list, element)
+ ok, found := containsElement(list, element)
if !ok {
return Fail(t, fmt.Sprintf("\"%s\" could not be applied builtin len()", list), msgAndArgs...)
}
@@ -1000,27 +1004,21 @@ func Condition(t TestingT, comp Comparison, msgAndArgs ...interface{}) bool {
type PanicTestFunc func()
// didPanic returns true if the function passed to it panics. Otherwise, it returns false.
-func didPanic(f PanicTestFunc) (bool, interface{}, string) {
-
- didPanic := false
- var message interface{}
- var stack string
- func() {
-
- defer func() {
- if message = recover(); message != nil {
- didPanic = true
- stack = string(debug.Stack())
- }
- }()
-
- // call the target function
- f()
+func didPanic(f PanicTestFunc) (didPanic bool, message interface{}, stack string) {
+ didPanic = true
+ defer func() {
+ message = recover()
+ if didPanic {
+ stack = string(debug.Stack())
+ }
}()
- return didPanic, message, stack
+ // call the target function
+ f()
+ didPanic = false
+ return
}
// Panics asserts that the code inside the specified PanicTestFunc panics.
@@ -1161,11 +1159,15 @@ func InDelta(t TestingT, expected, actual interface{}, delta float64, msgAndArgs
bf, bok := toFloat(actual)
if !aok || !bok {
- return Fail(t, fmt.Sprintf("Parameters must be numerical"), msgAndArgs...)
+ return Fail(t, "Parameters must be numerical", msgAndArgs...)
+ }
+
+ if math.IsNaN(af) && math.IsNaN(bf) {
+ return true
}
if math.IsNaN(af) {
- return Fail(t, fmt.Sprintf("Expected must not be NaN"), msgAndArgs...)
+ return Fail(t, "Expected must not be NaN", msgAndArgs...)
}
if math.IsNaN(bf) {
@@ -1188,7 +1190,7 @@ func InDeltaSlice(t TestingT, expected, actual interface{}, delta float64, msgAn
if expected == nil || actual == nil ||
reflect.TypeOf(actual).Kind() != reflect.Slice ||
reflect.TypeOf(expected).Kind() != reflect.Slice {
- return Fail(t, fmt.Sprintf("Parameters must be slice"), msgAndArgs...)
+ return Fail(t, "Parameters must be slice", msgAndArgs...)
}
actualSlice := reflect.ValueOf(actual)
@@ -1250,8 +1252,12 @@ func InDeltaMapValues(t TestingT, expected, actual interface{}, delta float64, m
func calcRelativeError(expected, actual interface{}) (float64, error) {
af, aok := toFloat(expected)
- if !aok {
- return 0, fmt.Errorf("expected value %q cannot be converted to float", expected)
+ bf, bok := toFloat(actual)
+ if !aok || !bok {
+ return 0, fmt.Errorf("Parameters must be numerical")
+ }
+ if math.IsNaN(af) && math.IsNaN(bf) {
+ return 0, nil
}
if math.IsNaN(af) {
return 0, errors.New("expected value must not be NaN")
@@ -1259,10 +1265,6 @@ func calcRelativeError(expected, actual interface{}) (float64, error) {
if af == 0 {
return 0, fmt.Errorf("expected value must have a value other than zero to calculate the relative error")
}
- bf, bok := toFloat(actual)
- if !bok {
- return 0, fmt.Errorf("actual value %q cannot be converted to float", actual)
- }
if math.IsNaN(bf) {
return 0, errors.New("actual value must not be NaN")
}
@@ -1298,7 +1300,7 @@ func InEpsilonSlice(t TestingT, expected, actual interface{}, epsilon float64, m
if expected == nil || actual == nil ||
reflect.TypeOf(actual).Kind() != reflect.Slice ||
reflect.TypeOf(expected).Kind() != reflect.Slice {
- return Fail(t, fmt.Sprintf("Parameters must be slice"), msgAndArgs...)
+ return Fail(t, "Parameters must be slice", msgAndArgs...)
}
actualSlice := reflect.ValueOf(actual)
@@ -1375,6 +1377,27 @@ func EqualError(t TestingT, theError error, errString string, msgAndArgs ...inte
return true
}
+// ErrorContains asserts that a function returned an error (i.e. not `nil`)
+// and that the error contains the specified substring.
+//
+// actualObj, err := SomeFunction()
+// assert.ErrorContains(t, err, expectedErrorSubString)
+func ErrorContains(t TestingT, theError error, contains string, msgAndArgs ...interface{}) bool {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+ if !Error(t, theError, msgAndArgs...) {
+ return false
+ }
+
+ actual := theError.Error()
+ if !strings.Contains(actual, contains) {
+ return Fail(t, fmt.Sprintf("Error %#v does not contain %#v", actual, contains), msgAndArgs...)
+ }
+
+ return true
+}
+
// matchRegexp return true if a specified regexp matches a string.
func matchRegexp(rx interface{}, str interface{}) bool {
@@ -1588,12 +1611,17 @@ func diff(expected interface{}, actual interface{}) string {
}
var e, a string
- if et != reflect.TypeOf("") {
- e = spewConfig.Sdump(expected)
- a = spewConfig.Sdump(actual)
- } else {
+
+ switch et {
+ case reflect.TypeOf(""):
e = reflect.ValueOf(expected).String()
a = reflect.ValueOf(actual).String()
+ case reflect.TypeOf(time.Time{}):
+ e = spewConfigStringerEnabled.Sdump(expected)
+ a = spewConfigStringerEnabled.Sdump(actual)
+ default:
+ e = spewConfig.Sdump(expected)
+ a = spewConfig.Sdump(actual)
}
diff, _ := difflib.GetUnifiedDiffString(difflib.UnifiedDiff{
@@ -1625,6 +1653,14 @@ var spewConfig = spew.ConfigState{
MaxDepth: 10,
}
+var spewConfigStringerEnabled = spew.ConfigState{
+ Indent: " ",
+ DisablePointerAddresses: true,
+ DisableCapacities: true,
+ SortKeys: true,
+ MaxDepth: 10,
+}
+
type tHelper interface {
Helper()
}
diff --git a/cluster-autoscaler/vendor/github.com/stretchr/testify/mock/mock.go b/cluster-autoscaler/vendor/github.com/stretchr/testify/mock/mock.go
index e2e6a2d237df..853da6cce2de 100644
--- a/cluster-autoscaler/vendor/github.com/stretchr/testify/mock/mock.go
+++ b/cluster-autoscaler/vendor/github.com/stretchr/testify/mock/mock.go
@@ -221,6 +221,14 @@ type Mock struct {
mutex sync.Mutex
}
+// String provides a %v format string for Mock.
+// Note: this is used implicitly by Arguments.Diff if a Mock is passed.
+// It exists because go's default %v formatting traverses the struct
+// without acquiring the mutex, which is detected by go test -race.
+func (m *Mock) String() string {
+ return fmt.Sprintf("%[1]T<%[1]p>", m)
+}
+
// TestData holds any data that might be useful for testing. Testify ignores
// this data completely allowing you to do whatever you like with it.
func (m *Mock) TestData() objx.Map {
@@ -720,7 +728,7 @@ func (f argumentMatcher) Matches(argument interface{}) bool {
}
func (f argumentMatcher) String() string {
- return fmt.Sprintf("func(%s) bool", f.fn.Type().In(0).Name())
+ return fmt.Sprintf("func(%s) bool", f.fn.Type().In(0).String())
}
// MatchedBy can be used to match a mock call based on only certain properties
diff --git a/cluster-autoscaler/vendor/github.com/stretchr/testify/require/require.go b/cluster-autoscaler/vendor/github.com/stretchr/testify/require/require.go
index 51820df2e672..59c48277ac6d 100644
--- a/cluster-autoscaler/vendor/github.com/stretchr/testify/require/require.go
+++ b/cluster-autoscaler/vendor/github.com/stretchr/testify/require/require.go
@@ -280,6 +280,36 @@ func ErrorAsf(t TestingT, err error, target interface{}, msg string, args ...int
t.FailNow()
}
+// ErrorContains asserts that a function returned an error (i.e. not `nil`)
+// and that the error contains the specified substring.
+//
+// actualObj, err := SomeFunction()
+// assert.ErrorContains(t, err, expectedErrorSubString)
+func ErrorContains(t TestingT, theError error, contains string, msgAndArgs ...interface{}) {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+ if assert.ErrorContains(t, theError, contains, msgAndArgs...) {
+ return
+ }
+ t.FailNow()
+}
+
+// ErrorContainsf asserts that a function returned an error (i.e. not `nil`)
+// and that the error contains the specified substring.
+//
+// actualObj, err := SomeFunction()
+// assert.ErrorContainsf(t, err, expectedErrorSubString, "error message %s", "formatted")
+func ErrorContainsf(t TestingT, theError error, contains string, msg string, args ...interface{}) {
+ if h, ok := t.(tHelper); ok {
+ h.Helper()
+ }
+ if assert.ErrorContainsf(t, theError, contains, msg, args...) {
+ return
+ }
+ t.FailNow()
+}
+
// ErrorIs asserts that at least one of the errors in err's chain matches target.
// This is a wrapper for errors.Is.
func ErrorIs(t TestingT, err error, target error, msgAndArgs ...interface{}) {
diff --git a/cluster-autoscaler/vendor/github.com/stretchr/testify/require/require_forward.go b/cluster-autoscaler/vendor/github.com/stretchr/testify/require/require_forward.go
index ed54a9d83f35..5bb07c89c68b 100644
--- a/cluster-autoscaler/vendor/github.com/stretchr/testify/require/require_forward.go
+++ b/cluster-autoscaler/vendor/github.com/stretchr/testify/require/require_forward.go
@@ -223,6 +223,30 @@ func (a *Assertions) ErrorAsf(err error, target interface{}, msg string, args ..
ErrorAsf(a.t, err, target, msg, args...)
}
+// ErrorContains asserts that a function returned an error (i.e. not `nil`)
+// and that the error contains the specified substring.
+//
+// actualObj, err := SomeFunction()
+// a.ErrorContains(err, expectedErrorSubString)
+func (a *Assertions) ErrorContains(theError error, contains string, msgAndArgs ...interface{}) {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ ErrorContains(a.t, theError, contains, msgAndArgs...)
+}
+
+// ErrorContainsf asserts that a function returned an error (i.e. not `nil`)
+// and that the error contains the specified substring.
+//
+// actualObj, err := SomeFunction()
+// a.ErrorContainsf(err, expectedErrorSubString, "error message %s", "formatted")
+func (a *Assertions) ErrorContainsf(theError error, contains string, msg string, args ...interface{}) {
+ if h, ok := a.t.(tHelper); ok {
+ h.Helper()
+ }
+ ErrorContainsf(a.t, theError, contains, msg, args...)
+}
+
// ErrorIs asserts that at least one of the errors in err's chain matches target.
// This is a wrapper for errors.Is.
func (a *Assertions) ErrorIs(err error, target error, msgAndArgs ...interface{}) {
diff --git a/cluster-autoscaler/vendor/go.etcd.io/etcd/api/v3/version/version.go b/cluster-autoscaler/vendor/go.etcd.io/etcd/api/v3/version/version.go
index 95b62fd8b2ff..71dfdf5107cd 100644
--- a/cluster-autoscaler/vendor/go.etcd.io/etcd/api/v3/version/version.go
+++ b/cluster-autoscaler/vendor/go.etcd.io/etcd/api/v3/version/version.go
@@ -26,7 +26,7 @@ import (
var (
// MinClusterVersion is the min cluster version this etcd binary is compatible with.
MinClusterVersion = "3.0.0"
- Version = "3.5.0"
+ Version = "3.5.1"
APIVersion = "unknown"
// Git SHA Value will be set during build
diff --git a/cluster-autoscaler/vendor/golang.org/x/crypto/cryptobyte/asn1.go b/cluster-autoscaler/vendor/golang.org/x/crypto/cryptobyte/asn1.go
index 83c776de0830..3a1674a1e57c 100644
--- a/cluster-autoscaler/vendor/golang.org/x/crypto/cryptobyte/asn1.go
+++ b/cluster-autoscaler/vendor/golang.org/x/crypto/cryptobyte/asn1.go
@@ -407,7 +407,12 @@ func (s *String) ReadASN1Enum(out *int) bool {
func (s *String) readBase128Int(out *int) bool {
ret := 0
for i := 0; len(*s) > 0; i++ {
- if i == 4 {
+ if i == 5 {
+ return false
+ }
+ // Avoid overflowing int on a 32-bit platform.
+ // We don't want different behavior based on the architecture.
+ if ret >= 1<<(31-7) {
return false
}
ret <<= 7
diff --git a/cluster-autoscaler/vendor/golang.org/x/net/http2/client_conn_pool.go b/cluster-autoscaler/vendor/golang.org/x/net/http2/client_conn_pool.go
index 652bc11a029b..c936843eafa1 100644
--- a/cluster-autoscaler/vendor/golang.org/x/net/http2/client_conn_pool.go
+++ b/cluster-autoscaler/vendor/golang.org/x/net/http2/client_conn_pool.go
@@ -16,6 +16,12 @@ import (
// ClientConnPool manages a pool of HTTP/2 client connections.
type ClientConnPool interface {
+ // GetClientConn returns a specific HTTP/2 connection (usually
+ // a TLS-TCP connection) to an HTTP/2 server. On success, the
+ // returned ClientConn accounts for the upcoming RoundTrip
+ // call, so the caller should not omit it. If the caller needs
+ // to, ClientConn.RoundTrip can be called with a bogus
+ // new(http.Request) to release the stream reservation.
GetClientConn(req *http.Request, addr string) (*ClientConn, error)
MarkDead(*ClientConn)
}
@@ -42,7 +48,7 @@ type clientConnPool struct {
conns map[string][]*ClientConn // key is host:port
dialing map[string]*dialCall // currently in-flight dials
keys map[*ClientConn][]string
- addConnCalls map[string]*addConnCall // in-flight addConnIfNeede calls
+ addConnCalls map[string]*addConnCall // in-flight addConnIfNeeded calls
}
func (p *clientConnPool) GetClientConn(req *http.Request, addr string) (*ClientConn, error) {
@@ -54,28 +60,8 @@ const (
noDialOnMiss = false
)
-// shouldTraceGetConn reports whether getClientConn should call any
-// ClientTrace.GetConn hook associated with the http.Request.
-//
-// This complexity is needed to avoid double calls of the GetConn hook
-// during the back-and-forth between net/http and x/net/http2 (when the
-// net/http.Transport is upgraded to also speak http2), as well as support
-// the case where x/net/http2 is being used directly.
-func (p *clientConnPool) shouldTraceGetConn(st clientConnIdleState) bool {
- // If our Transport wasn't made via ConfigureTransport, always
- // trace the GetConn hook if provided, because that means the
- // http2 package is being used directly and it's the one
- // dialing, as opposed to net/http.
- if _, ok := p.t.ConnPool.(noDialClientConnPool); !ok {
- return true
- }
- // Otherwise, only use the GetConn hook if this connection has
- // been used previously for other requests. For fresh
- // connections, the net/http package does the dialing.
- return !st.freshConn
-}
-
func (p *clientConnPool) getClientConn(req *http.Request, addr string, dialOnMiss bool) (*ClientConn, error) {
+ // TODO(dneil): Dial a new connection when t.DisableKeepAlives is set?
if isConnectionCloseRequest(req) && dialOnMiss {
// It gets its own connection.
traceGetConn(req, addr)
@@ -89,10 +75,14 @@ func (p *clientConnPool) getClientConn(req *http.Request, addr string, dialOnMis
for {
p.mu.Lock()
for _, cc := range p.conns[addr] {
- if st := cc.idleState(); st.canTakeNewRequest {
- if p.shouldTraceGetConn(st) {
+ if cc.ReserveNewRequest() {
+ // When a connection is presented to us by the net/http package,
+ // the GetConn hook has already been called.
+ // Don't call it a second time here.
+ if !cc.getConnCalled {
traceGetConn(req, addr)
}
+ cc.getConnCalled = false
p.mu.Unlock()
return cc, nil
}
@@ -108,7 +98,13 @@ func (p *clientConnPool) getClientConn(req *http.Request, addr string, dialOnMis
if shouldRetryDial(call, req) {
continue
}
- return call.res, call.err
+ cc, err := call.res, call.err
+ if err != nil {
+ return nil, err
+ }
+ if cc.ReserveNewRequest() {
+ return cc, nil
+ }
}
}
@@ -205,6 +201,7 @@ func (c *addConnCall) run(t *Transport, key string, tc *tls.Conn) {
if err != nil {
c.err = err
} else {
+ cc.getConnCalled = true // already called by the net/http package
p.addConnLocked(key, cc)
}
delete(p.addConnCalls, key)
diff --git a/cluster-autoscaler/vendor/golang.org/x/net/http2/errors.go b/cluster-autoscaler/vendor/golang.org/x/net/http2/errors.go
index 71f2c4631787..2663e5d287ee 100644
--- a/cluster-autoscaler/vendor/golang.org/x/net/http2/errors.go
+++ b/cluster-autoscaler/vendor/golang.org/x/net/http2/errors.go
@@ -53,6 +53,13 @@ func (e ErrCode) String() string {
return fmt.Sprintf("unknown error code 0x%x", uint32(e))
}
+func (e ErrCode) stringToken() string {
+ if s, ok := errCodeName[e]; ok {
+ return s
+ }
+ return fmt.Sprintf("ERR_UNKNOWN_%d", uint32(e))
+}
+
// ConnectionError is an error that results in the termination of the
// entire connection.
type ConnectionError ErrCode
@@ -67,6 +74,11 @@ type StreamError struct {
Cause error // optional additional detail
}
+// errFromPeer is a sentinel error value for StreamError.Cause to
+// indicate that the StreamError was sent from the peer over the wire
+// and wasn't locally generated in the Transport.
+var errFromPeer = errors.New("received from peer")
+
func streamError(id uint32, code ErrCode) StreamError {
return StreamError{StreamID: id, Code: code}
}
diff --git a/cluster-autoscaler/vendor/golang.org/x/net/http2/frame.go b/cluster-autoscaler/vendor/golang.org/x/net/http2/frame.go
index 514c126c5f8f..96a747905241 100644
--- a/cluster-autoscaler/vendor/golang.org/x/net/http2/frame.go
+++ b/cluster-autoscaler/vendor/golang.org/x/net/http2/frame.go
@@ -122,7 +122,7 @@ var flagName = map[FrameType]map[Flags]string{
// a frameParser parses a frame given its FrameHeader and payload
// bytes. The length of payload will always equal fh.Length (which
// might be 0).
-type frameParser func(fc *frameCache, fh FrameHeader, payload []byte) (Frame, error)
+type frameParser func(fc *frameCache, fh FrameHeader, countError func(string), payload []byte) (Frame, error)
var frameParsers = map[FrameType]frameParser{
FrameData: parseDataFrame,
@@ -267,6 +267,11 @@ type Framer struct {
lastFrame Frame
errDetail error
+ // countError is a non-nil func that's called on a frame parse
+ // error with some unique error path token. It's initialized
+ // from Transport.CountError or Server.CountError.
+ countError func(errToken string)
+
// lastHeaderStream is non-zero if the last frame was an
// unfinished HEADERS/CONTINUATION.
lastHeaderStream uint32
@@ -426,6 +431,7 @@ func NewFramer(w io.Writer, r io.Reader) *Framer {
fr := &Framer{
w: w,
r: r,
+ countError: func(string) {},
logReads: logFrameReads,
logWrites: logFrameWrites,
debugReadLoggerf: log.Printf,
@@ -500,7 +506,7 @@ func (fr *Framer) ReadFrame() (Frame, error) {
if _, err := io.ReadFull(fr.r, payload); err != nil {
return nil, err
}
- f, err := typeFrameParser(fh.Type)(fr.frameCache, fh, payload)
+ f, err := typeFrameParser(fh.Type)(fr.frameCache, fh, fr.countError, payload)
if err != nil {
if ce, ok := err.(connError); ok {
return nil, fr.connError(ce.Code, ce.Reason)
@@ -588,13 +594,14 @@ func (f *DataFrame) Data() []byte {
return f.data
}
-func parseDataFrame(fc *frameCache, fh FrameHeader, payload []byte) (Frame, error) {
+func parseDataFrame(fc *frameCache, fh FrameHeader, countError func(string), payload []byte) (Frame, error) {
if fh.StreamID == 0 {
// DATA frames MUST be associated with a stream. If a
// DATA frame is received whose stream identifier
// field is 0x0, the recipient MUST respond with a
// connection error (Section 5.4.1) of type
// PROTOCOL_ERROR.
+ countError("frame_data_stream_0")
return nil, connError{ErrCodeProtocol, "DATA frame with stream ID 0"}
}
f := fc.getDataFrame()
@@ -605,6 +612,7 @@ func parseDataFrame(fc *frameCache, fh FrameHeader, payload []byte) (Frame, erro
var err error
payload, padSize, err = readByte(payload)
if err != nil {
+ countError("frame_data_pad_byte_short")
return nil, err
}
}
@@ -613,6 +621,7 @@ func parseDataFrame(fc *frameCache, fh FrameHeader, payload []byte) (Frame, erro
// length of the frame payload, the recipient MUST
// treat this as a connection error.
// Filed: https://github.com/http2/http2-spec/issues/610
+ countError("frame_data_pad_too_big")
return nil, connError{ErrCodeProtocol, "pad size larger than data payload"}
}
f.data = payload[:len(payload)-int(padSize)]
@@ -695,7 +704,7 @@ type SettingsFrame struct {
p []byte
}
-func parseSettingsFrame(_ *frameCache, fh FrameHeader, p []byte) (Frame, error) {
+func parseSettingsFrame(_ *frameCache, fh FrameHeader, countError func(string), p []byte) (Frame, error) {
if fh.Flags.Has(FlagSettingsAck) && fh.Length > 0 {
// When this (ACK 0x1) bit is set, the payload of the
// SETTINGS frame MUST be empty. Receipt of a
@@ -703,6 +712,7 @@ func parseSettingsFrame(_ *frameCache, fh FrameHeader, p []byte) (Frame, error)
// field value other than 0 MUST be treated as a
// connection error (Section 5.4.1) of type
// FRAME_SIZE_ERROR.
+ countError("frame_settings_ack_with_length")
return nil, ConnectionError(ErrCodeFrameSize)
}
if fh.StreamID != 0 {
@@ -713,14 +723,17 @@ func parseSettingsFrame(_ *frameCache, fh FrameHeader, p []byte) (Frame, error)
// field is anything other than 0x0, the endpoint MUST
// respond with a connection error (Section 5.4.1) of
// type PROTOCOL_ERROR.
+ countError("frame_settings_has_stream")
return nil, ConnectionError(ErrCodeProtocol)
}
if len(p)%6 != 0 {
+ countError("frame_settings_mod_6")
// Expecting even number of 6 byte settings.
return nil, ConnectionError(ErrCodeFrameSize)
}
f := &SettingsFrame{FrameHeader: fh, p: p}
if v, ok := f.Value(SettingInitialWindowSize); ok && v > (1<<31)-1 {
+ countError("frame_settings_window_size_too_big")
// Values above the maximum flow control window size of 2^31 - 1 MUST
// be treated as a connection error (Section 5.4.1) of type
// FLOW_CONTROL_ERROR.
@@ -832,11 +845,13 @@ type PingFrame struct {
func (f *PingFrame) IsAck() bool { return f.Flags.Has(FlagPingAck) }
-func parsePingFrame(_ *frameCache, fh FrameHeader, payload []byte) (Frame, error) {
+func parsePingFrame(_ *frameCache, fh FrameHeader, countError func(string), payload []byte) (Frame, error) {
if len(payload) != 8 {
+ countError("frame_ping_length")
return nil, ConnectionError(ErrCodeFrameSize)
}
if fh.StreamID != 0 {
+ countError("frame_ping_has_stream")
return nil, ConnectionError(ErrCodeProtocol)
}
f := &PingFrame{FrameHeader: fh}
@@ -872,11 +887,13 @@ func (f *GoAwayFrame) DebugData() []byte {
return f.debugData
}
-func parseGoAwayFrame(_ *frameCache, fh FrameHeader, p []byte) (Frame, error) {
+func parseGoAwayFrame(_ *frameCache, fh FrameHeader, countError func(string), p []byte) (Frame, error) {
if fh.StreamID != 0 {
+ countError("frame_goaway_has_stream")
return nil, ConnectionError(ErrCodeProtocol)
}
if len(p) < 8 {
+ countError("frame_goaway_short")
return nil, ConnectionError(ErrCodeFrameSize)
}
return &GoAwayFrame{
@@ -912,7 +929,7 @@ func (f *UnknownFrame) Payload() []byte {
return f.p
}
-func parseUnknownFrame(_ *frameCache, fh FrameHeader, p []byte) (Frame, error) {
+func parseUnknownFrame(_ *frameCache, fh FrameHeader, countError func(string), p []byte) (Frame, error) {
return &UnknownFrame{fh, p}, nil
}
@@ -923,8 +940,9 @@ type WindowUpdateFrame struct {
Increment uint32 // never read with high bit set
}
-func parseWindowUpdateFrame(_ *frameCache, fh FrameHeader, p []byte) (Frame, error) {
+func parseWindowUpdateFrame(_ *frameCache, fh FrameHeader, countError func(string), p []byte) (Frame, error) {
if len(p) != 4 {
+ countError("frame_windowupdate_bad_len")
return nil, ConnectionError(ErrCodeFrameSize)
}
inc := binary.BigEndian.Uint32(p[:4]) & 0x7fffffff // mask off high reserved bit
@@ -936,8 +954,10 @@ func parseWindowUpdateFrame(_ *frameCache, fh FrameHeader, p []byte) (Frame, err
// control window MUST be treated as a connection
// error (Section 5.4.1).
if fh.StreamID == 0 {
+ countError("frame_windowupdate_zero_inc_conn")
return nil, ConnectionError(ErrCodeProtocol)
}
+ countError("frame_windowupdate_zero_inc_stream")
return nil, streamError(fh.StreamID, ErrCodeProtocol)
}
return &WindowUpdateFrame{
@@ -988,7 +1008,7 @@ func (f *HeadersFrame) HasPriority() bool {
return f.FrameHeader.Flags.Has(FlagHeadersPriority)
}
-func parseHeadersFrame(_ *frameCache, fh FrameHeader, p []byte) (_ Frame, err error) {
+func parseHeadersFrame(_ *frameCache, fh FrameHeader, countError func(string), p []byte) (_ Frame, err error) {
hf := &HeadersFrame{
FrameHeader: fh,
}
@@ -997,11 +1017,13 @@ func parseHeadersFrame(_ *frameCache, fh FrameHeader, p []byte) (_ Frame, err er
// is received whose stream identifier field is 0x0, the recipient MUST
// respond with a connection error (Section 5.4.1) of type
// PROTOCOL_ERROR.
+ countError("frame_headers_zero_stream")
return nil, connError{ErrCodeProtocol, "HEADERS frame with stream ID 0"}
}
var padLength uint8
if fh.Flags.Has(FlagHeadersPadded) {
if p, padLength, err = readByte(p); err != nil {
+ countError("frame_headers_pad_short")
return
}
}
@@ -1009,16 +1031,19 @@ func parseHeadersFrame(_ *frameCache, fh FrameHeader, p []byte) (_ Frame, err er
var v uint32
p, v, err = readUint32(p)
if err != nil {
+ countError("frame_headers_prio_short")
return nil, err
}
hf.Priority.StreamDep = v & 0x7fffffff
hf.Priority.Exclusive = (v != hf.Priority.StreamDep) // high bit was set
p, hf.Priority.Weight, err = readByte(p)
if err != nil {
+ countError("frame_headers_prio_weight_short")
return nil, err
}
}
- if len(p)-int(padLength) <= 0 {
+ if len(p)-int(padLength) < 0 {
+ countError("frame_headers_pad_too_big")
return nil, streamError(fh.StreamID, ErrCodeProtocol)
}
hf.headerFragBuf = p[:len(p)-int(padLength)]
@@ -1125,11 +1150,13 @@ func (p PriorityParam) IsZero() bool {
return p == PriorityParam{}
}
-func parsePriorityFrame(_ *frameCache, fh FrameHeader, payload []byte) (Frame, error) {
+func parsePriorityFrame(_ *frameCache, fh FrameHeader, countError func(string), payload []byte) (Frame, error) {
if fh.StreamID == 0 {
+ countError("frame_priority_zero_stream")
return nil, connError{ErrCodeProtocol, "PRIORITY frame with stream ID 0"}
}
if len(payload) != 5 {
+ countError("frame_priority_bad_length")
return nil, connError{ErrCodeFrameSize, fmt.Sprintf("PRIORITY frame payload size was %d; want 5", len(payload))}
}
v := binary.BigEndian.Uint32(payload[:4])
@@ -1172,11 +1199,13 @@ type RSTStreamFrame struct {
ErrCode ErrCode
}
-func parseRSTStreamFrame(_ *frameCache, fh FrameHeader, p []byte) (Frame, error) {
+func parseRSTStreamFrame(_ *frameCache, fh FrameHeader, countError func(string), p []byte) (Frame, error) {
if len(p) != 4 {
+ countError("frame_rststream_bad_len")
return nil, ConnectionError(ErrCodeFrameSize)
}
if fh.StreamID == 0 {
+ countError("frame_rststream_zero_stream")
return nil, ConnectionError(ErrCodeProtocol)
}
return &RSTStreamFrame{fh, ErrCode(binary.BigEndian.Uint32(p[:4]))}, nil
@@ -1202,8 +1231,9 @@ type ContinuationFrame struct {
headerFragBuf []byte
}
-func parseContinuationFrame(_ *frameCache, fh FrameHeader, p []byte) (Frame, error) {
+func parseContinuationFrame(_ *frameCache, fh FrameHeader, countError func(string), p []byte) (Frame, error) {
if fh.StreamID == 0 {
+ countError("frame_continuation_zero_stream")
return nil, connError{ErrCodeProtocol, "CONTINUATION frame with stream ID 0"}
}
return &ContinuationFrame{fh, p}, nil
@@ -1252,7 +1282,7 @@ func (f *PushPromiseFrame) HeadersEnded() bool {
return f.FrameHeader.Flags.Has(FlagPushPromiseEndHeaders)
}
-func parsePushPromise(_ *frameCache, fh FrameHeader, p []byte) (_ Frame, err error) {
+func parsePushPromise(_ *frameCache, fh FrameHeader, countError func(string), p []byte) (_ Frame, err error) {
pp := &PushPromiseFrame{
FrameHeader: fh,
}
@@ -1263,6 +1293,7 @@ func parsePushPromise(_ *frameCache, fh FrameHeader, p []byte) (_ Frame, err err
// with. If the stream identifier field specifies the value
// 0x0, a recipient MUST respond with a connection error
// (Section 5.4.1) of type PROTOCOL_ERROR.
+ countError("frame_pushpromise_zero_stream")
return nil, ConnectionError(ErrCodeProtocol)
}
// The PUSH_PROMISE frame includes optional padding.
@@ -1270,18 +1301,21 @@ func parsePushPromise(_ *frameCache, fh FrameHeader, p []byte) (_ Frame, err err
var padLength uint8
if fh.Flags.Has(FlagPushPromisePadded) {
if p, padLength, err = readByte(p); err != nil {
+ countError("frame_pushpromise_pad_short")
return
}
}
p, pp.PromiseID, err = readUint32(p)
if err != nil {
+ countError("frame_pushpromise_promiseid_short")
return
}
pp.PromiseID = pp.PromiseID & (1<<31 - 1)
if int(padLength) > len(p) {
// like the DATA frame, error out if padding is longer than the body.
+ countError("frame_pushpromise_pad_too_big")
return nil, ConnectionError(ErrCodeProtocol)
}
pp.headerFragBuf = p[:len(p)-int(padLength)]
diff --git a/cluster-autoscaler/vendor/golang.org/x/net/http2/go118.go b/cluster-autoscaler/vendor/golang.org/x/net/http2/go118.go
new file mode 100644
index 000000000000..aca4b2b31acd
--- /dev/null
+++ b/cluster-autoscaler/vendor/golang.org/x/net/http2/go118.go
@@ -0,0 +1,17 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build go1.18
+// +build go1.18
+
+package http2
+
+import (
+ "crypto/tls"
+ "net"
+)
+
+func tlsUnderlyingConn(tc *tls.Conn) net.Conn {
+ return tc.NetConn()
+}
diff --git a/cluster-autoscaler/vendor/golang.org/x/net/http2/hpack/huffman.go b/cluster-autoscaler/vendor/golang.org/x/net/http2/hpack/huffman.go
index a1ab2f056794..fe0b84ccd467 100644
--- a/cluster-autoscaler/vendor/golang.org/x/net/http2/hpack/huffman.go
+++ b/cluster-autoscaler/vendor/golang.org/x/net/http2/hpack/huffman.go
@@ -140,25 +140,29 @@ func buildRootHuffmanNode() {
panic("unexpected size")
}
lazyRootHuffmanNode = newInternalNode()
- for i, code := range huffmanCodes {
- addDecoderNode(byte(i), code, huffmanCodeLen[i])
- }
-}
+ // allocate a leaf node for each of the 256 symbols
+ leaves := new([256]node)
+
+ for sym, code := range huffmanCodes {
+ codeLen := huffmanCodeLen[sym]
+
+ cur := lazyRootHuffmanNode
+ for codeLen > 8 {
+ codeLen -= 8
+ i := uint8(code >> codeLen)
+ if cur.children[i] == nil {
+ cur.children[i] = newInternalNode()
+ }
+ cur = cur.children[i]
+ }
+ shift := 8 - codeLen
+ start, end := int(uint8(code< 8 {
- codeLen -= 8
- i := uint8(code >> codeLen)
- if cur.children[i] == nil {
- cur.children[i] = newInternalNode()
+ leaves[sym].sym = byte(sym)
+ leaves[sym].codeLen = codeLen
+ for i := start; i < start+end; i++ {
+ cur.children[i] = &leaves[sym]
}
- cur = cur.children[i]
- }
- shift := 8 - codeLen
- start, end := int(uint8(code< 0 {
// Check whether the client has flow control quota.
if st.inflow.available() < int32(f.Length) {
- return streamError(id, ErrCodeFlowControl)
+ return sc.countError("flow_on_data_length", streamError(id, ErrCodeFlowControl))
}
st.inflow.take(int32(f.Length))
@@ -1710,7 +1727,7 @@ func (sc *serverConn) processData(f *DataFrame) error {
wrote, err := st.body.Write(data)
if err != nil {
sc.sendWindowUpdate(nil, int(f.Length)-wrote)
- return streamError(id, ErrCodeStreamClosed)
+ return sc.countError("body_write_err", streamError(id, ErrCodeStreamClosed))
}
if wrote != len(data) {
panic("internal error: bad Writer")
@@ -1796,7 +1813,7 @@ func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error {
// stream identifier MUST respond with a connection error
// (Section 5.4.1) of type PROTOCOL_ERROR.
if id%2 != 1 {
- return ConnectionError(ErrCodeProtocol)
+ return sc.countError("headers_even", ConnectionError(ErrCodeProtocol))
}
// A HEADERS frame can be used to create a new stream or
// send a trailer for an open one. If we already have a stream
@@ -1813,7 +1830,7 @@ func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error {
// this state, it MUST respond with a stream error (Section 5.4.2) of
// type STREAM_CLOSED.
if st.state == stateHalfClosedRemote {
- return streamError(id, ErrCodeStreamClosed)
+ return sc.countError("headers_half_closed", streamError(id, ErrCodeStreamClosed))
}
return st.processTrailerHeaders(f)
}
@@ -1824,7 +1841,7 @@ func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error {
// receives an unexpected stream identifier MUST respond with
// a connection error (Section 5.4.1) of type PROTOCOL_ERROR.
if id <= sc.maxClientStreamID {
- return ConnectionError(ErrCodeProtocol)
+ return sc.countError("stream_went_down", ConnectionError(ErrCodeProtocol))
}
sc.maxClientStreamID = id
@@ -1841,14 +1858,14 @@ func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error {
if sc.curClientStreams+1 > sc.advMaxStreams {
if sc.unackedSettings == 0 {
// They should know better.
- return streamError(id, ErrCodeProtocol)
+ return sc.countError("over_max_streams", streamError(id, ErrCodeProtocol))
}
// Assume it's a network race, where they just haven't
// received our last SETTINGS update. But actually
// this can't happen yet, because we don't yet provide
// a way for users to adjust server parameters at
// runtime.
- return streamError(id, ErrCodeRefusedStream)
+ return sc.countError("over_max_streams_race", streamError(id, ErrCodeRefusedStream))
}
initialState := stateOpen
@@ -1858,7 +1875,7 @@ func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error {
st := sc.newStream(id, 0, initialState)
if f.HasPriority() {
- if err := checkPriority(f.StreamID, f.Priority); err != nil {
+ if err := sc.checkPriority(f.StreamID, f.Priority); err != nil {
return err
}
sc.writeSched.AdjustStream(st.id, f.Priority)
@@ -1902,15 +1919,15 @@ func (st *stream) processTrailerHeaders(f *MetaHeadersFrame) error {
sc := st.sc
sc.serveG.check()
if st.gotTrailerHeader {
- return ConnectionError(ErrCodeProtocol)
+ return sc.countError("dup_trailers", ConnectionError(ErrCodeProtocol))
}
st.gotTrailerHeader = true
if !f.StreamEnded() {
- return streamError(st.id, ErrCodeProtocol)
+ return sc.countError("trailers_not_ended", streamError(st.id, ErrCodeProtocol))
}
if len(f.PseudoFields()) > 0 {
- return streamError(st.id, ErrCodeProtocol)
+ return sc.countError("trailers_pseudo", streamError(st.id, ErrCodeProtocol))
}
if st.trailer != nil {
for _, hf := range f.RegularFields() {
@@ -1919,7 +1936,7 @@ func (st *stream) processTrailerHeaders(f *MetaHeadersFrame) error {
// TODO: send more details to the peer somehow. But http2 has
// no way to send debug data at a stream level. Discuss with
// HTTP folk.
- return streamError(st.id, ErrCodeProtocol)
+ return sc.countError("trailers_bogus", streamError(st.id, ErrCodeProtocol))
}
st.trailer[key] = append(st.trailer[key], hf.Value)
}
@@ -1928,13 +1945,13 @@ func (st *stream) processTrailerHeaders(f *MetaHeadersFrame) error {
return nil
}
-func checkPriority(streamID uint32, p PriorityParam) error {
+func (sc *serverConn) checkPriority(streamID uint32, p PriorityParam) error {
if streamID == p.StreamDep {
// Section 5.3.1: "A stream cannot depend on itself. An endpoint MUST treat
// this as a stream error (Section 5.4.2) of type PROTOCOL_ERROR."
// Section 5.3.3 says that a stream can depend on one of its dependencies,
// so it's only self-dependencies that are forbidden.
- return streamError(streamID, ErrCodeProtocol)
+ return sc.countError("priority", streamError(streamID, ErrCodeProtocol))
}
return nil
}
@@ -1943,7 +1960,7 @@ func (sc *serverConn) processPriority(f *PriorityFrame) error {
if sc.inGoAway {
return nil
}
- if err := checkPriority(f.StreamID, f.PriorityParam); err != nil {
+ if err := sc.checkPriority(f.StreamID, f.PriorityParam); err != nil {
return err
}
sc.writeSched.AdjustStream(f.StreamID, f.PriorityParam)
@@ -2000,7 +2017,7 @@ func (sc *serverConn) newWriterAndRequest(st *stream, f *MetaHeadersFrame) (*res
isConnect := rp.method == "CONNECT"
if isConnect {
if rp.path != "" || rp.scheme != "" || rp.authority == "" {
- return nil, nil, streamError(f.StreamID, ErrCodeProtocol)
+ return nil, nil, sc.countError("bad_connect", streamError(f.StreamID, ErrCodeProtocol))
}
} else if rp.method == "" || rp.path == "" || (rp.scheme != "https" && rp.scheme != "http") {
// See 8.1.2.6 Malformed Requests and Responses:
@@ -2013,13 +2030,13 @@ func (sc *serverConn) newWriterAndRequest(st *stream, f *MetaHeadersFrame) (*res
// "All HTTP/2 requests MUST include exactly one valid
// value for the :method, :scheme, and :path
// pseudo-header fields"
- return nil, nil, streamError(f.StreamID, ErrCodeProtocol)
+ return nil, nil, sc.countError("bad_path_method", streamError(f.StreamID, ErrCodeProtocol))
}
bodyOpen := !f.StreamEnded()
if rp.method == "HEAD" && bodyOpen {
// HEAD requests can't have bodies
- return nil, nil, streamError(f.StreamID, ErrCodeProtocol)
+ return nil, nil, sc.countError("head_body", streamError(f.StreamID, ErrCodeProtocol))
}
rp.header = make(http.Header)
@@ -2102,7 +2119,7 @@ func (sc *serverConn) newWriterAndRequestNoBody(st *stream, rp requestParam) (*r
var err error
url_, err = url.ParseRequestURI(rp.path)
if err != nil {
- return nil, nil, streamError(st.id, ErrCodeProtocol)
+ return nil, nil, sc.countError("bad_path", streamError(st.id, ErrCodeProtocol))
}
requestURI = rp.path
}
@@ -2985,3 +3002,31 @@ func h1ServerKeepAlivesDisabled(hs *http.Server) bool {
}
return false
}
+
+func (sc *serverConn) countError(name string, err error) error {
+ if sc == nil || sc.srv == nil {
+ return err
+ }
+ f := sc.srv.CountError
+ if f == nil {
+ return err
+ }
+ var typ string
+ var code ErrCode
+ switch e := err.(type) {
+ case ConnectionError:
+ typ = "conn"
+ code = ErrCode(e)
+ case StreamError:
+ typ = "stream"
+ code = ErrCode(e.Code)
+ default:
+ return err
+ }
+ codeStr := errCodeName[code]
+ if codeStr == "" {
+ codeStr = strconv.Itoa(int(code))
+ }
+ f(fmt.Sprintf("%s_%s_%s", typ, codeStr, name))
+ return err
+}
diff --git a/cluster-autoscaler/vendor/golang.org/x/net/http2/transport.go b/cluster-autoscaler/vendor/golang.org/x/net/http2/transport.go
index b261beb1d0b2..4f098976377c 100644
--- a/cluster-autoscaler/vendor/golang.org/x/net/http2/transport.go
+++ b/cluster-autoscaler/vendor/golang.org/x/net/http2/transport.go
@@ -24,6 +24,7 @@ import (
"net/http"
"net/http/httptrace"
"net/textproto"
+ "os"
"sort"
"strconv"
"strings"
@@ -51,6 +52,15 @@ const (
transportDefaultStreamMinRefresh = 4 << 10
defaultUserAgent = "Go-http-client/2.0"
+
+ // initialMaxConcurrentStreams is a connections maxConcurrentStreams until
+ // it's received servers initial SETTINGS frame, which corresponds with the
+ // spec's minimum recommended value.
+ initialMaxConcurrentStreams = 100
+
+ // defaultMaxConcurrentStreams is a connections default maxConcurrentStreams
+ // if the server doesn't include one in its initial SETTINGS frame.
+ defaultMaxConcurrentStreams = 1000
)
// Transport is an HTTP/2 Transport.
@@ -121,6 +131,17 @@ type Transport struct {
// Defaults to 15s.
PingTimeout time.Duration
+ // WriteByteTimeout is the timeout after which the connection will be
+ // closed no data can be written to it. The timeout begins when data is
+ // available to write, and is extended whenever any bytes are written.
+ WriteByteTimeout time.Duration
+
+ // CountError, if non-nil, is called on HTTP/2 transport errors.
+ // It's intended to increment a metric for monitoring, such
+ // as an expvar or Prometheus metric.
+ // The errType consists of only ASCII word characters.
+ CountError func(errType string)
+
// t1, if non-nil, is the standard library Transport using
// this transport. Its settings are used (but not its
// RoundTrip method, etc).
@@ -227,11 +248,12 @@ func (t *Transport) initConnPool() {
// ClientConn is the state of a single HTTP/2 client connection to an
// HTTP/2 server.
type ClientConn struct {
- t *Transport
- tconn net.Conn // usually *tls.Conn, except specialized impls
- tlsState *tls.ConnectionState // nil only for specialized impls
- reused uint32 // whether conn is being reused; atomic
- singleUse bool // whether being used for a single http.Request
+ t *Transport
+ tconn net.Conn // usually *tls.Conn, except specialized impls
+ tlsState *tls.ConnectionState // nil only for specialized impls
+ reused uint32 // whether conn is being reused; atomic
+ singleUse bool // whether being used for a single http.Request
+ getConnCalled bool // used by clientConnPool
// readLoop goroutine fields:
readerDone chan struct{} // closed on error
@@ -244,86 +266,94 @@ type ClientConn struct {
cond *sync.Cond // hold mu; broadcast on flow/closed changes
flow flow // our conn-level flow control quota (cs.flow is per stream)
inflow flow // peer's conn-level flow control
+ doNotReuse bool // whether conn is marked to not be reused for any future requests
closing bool
closed bool
+ seenSettings bool // true if we've seen a settings frame, false otherwise
wantSettingsAck bool // we sent a SETTINGS frame and haven't heard back
goAway *GoAwayFrame // if non-nil, the GoAwayFrame we received
goAwayDebug string // goAway frame's debug data, retained as a string
streams map[uint32]*clientStream // client-initiated
+ streamsReserved int // incr by ReserveNewRequest; decr on RoundTrip
nextStreamID uint32
pendingRequests int // requests blocked and waiting to be sent because len(streams) == maxConcurrentStreams
pings map[[8]byte]chan struct{} // in flight ping data to notification channel
- bw *bufio.Writer
br *bufio.Reader
- fr *Framer
lastActive time.Time
lastIdle time.Time // time last idle
- // Settings from peer: (also guarded by mu)
+ // Settings from peer: (also guarded by wmu)
maxFrameSize uint32
maxConcurrentStreams uint32
peerMaxHeaderListSize uint64
initialWindowSize uint32
+ // reqHeaderMu is a 1-element semaphore channel controlling access to sending new requests.
+ // Write to reqHeaderMu to lock it, read from it to unlock.
+ // Lock reqmu BEFORE mu or wmu.
+ reqHeaderMu chan struct{}
+
+ // wmu is held while writing.
+ // Acquire BEFORE mu when holding both, to avoid blocking mu on network writes.
+ // Only acquire both at the same time when changing peer settings.
+ wmu sync.Mutex
+ bw *bufio.Writer
+ fr *Framer
+ werr error // first write error that has occurred
hbuf bytes.Buffer // HPACK encoder writes into this
henc *hpack.Encoder
-
- wmu sync.Mutex // held while writing; acquire AFTER mu if holding both
- werr error // first write error that has occurred
}
// clientStream is the state for a single HTTP/2 stream. One of these
// is created for each Transport.RoundTrip call.
type clientStream struct {
- cc *ClientConn
- req *http.Request
+ cc *ClientConn
+
+ // Fields of Request that we may access even after the response body is closed.
+ ctx context.Context
+ reqCancel <-chan struct{}
+
trace *httptrace.ClientTrace // or nil
ID uint32
- resc chan resAndError
bufPipe pipe // buffered pipe with the flow-controlled response payload
- startedWrite bool // started request body write; guarded by cc.mu
requestedGzip bool
- on100 func() // optional code to run if get a 100 continue response
+ isHead bool
+
+ abortOnce sync.Once
+ abort chan struct{} // closed to signal stream should end immediately
+ abortErr error // set if abort is closed
+
+ peerClosed chan struct{} // closed when the peer sends an END_STREAM flag
+ donec chan struct{} // closed after the stream is in the closed state
+ on100 chan struct{} // buffered; written to if a 100 is received
+
+ respHeaderRecv chan struct{} // closed when headers are received
+ res *http.Response // set if respHeaderRecv is closed
flow flow // guarded by cc.mu
inflow flow // guarded by cc.mu
bytesRemain int64 // -1 means unknown; owned by transportResponseBody.Read
readErr error // sticky read error; owned by transportResponseBody.Read
- stopReqBody error // if non-nil, stop writing req body; guarded by cc.mu
- didReset bool // whether we sent a RST_STREAM to the server; guarded by cc.mu
- peerReset chan struct{} // closed on peer reset
- resetErr error // populated before peerReset is closed
+ reqBody io.ReadCloser
+ reqBodyContentLength int64 // -1 means unknown
+ reqBodyClosed bool // body has been closed; guarded by cc.mu
- done chan struct{} // closed when stream remove from cc.streams map; close calls guarded by cc.mu
+ // owned by writeRequest:
+ sentEndStream bool // sent an END_STREAM flag to the peer
+ sentHeaders bool
// owned by clientConnReadLoop:
firstByte bool // got the first response byte
pastHeaders bool // got first MetaHeadersFrame (actual headers)
pastTrailers bool // got optional second MetaHeadersFrame (trailers)
num1xx uint8 // number of 1xx responses seen
+ readClosed bool // peer sent an END_STREAM flag
+ readAborted bool // read loop reset the stream
trailer http.Header // accumulated trailers
resTrailer *http.Header // client's Response.Trailer
}
-// awaitRequestCancel waits for the user to cancel a request or for the done
-// channel to be signaled. A non-nil error is returned only if the request was
-// canceled.
-func awaitRequestCancel(req *http.Request, done <-chan struct{}) error {
- ctx := req.Context()
- if req.Cancel == nil && ctx.Done() == nil {
- return nil
- }
- select {
- case <-req.Cancel:
- return errRequestCanceled
- case <-ctx.Done():
- return ctx.Err()
- case <-done:
- return nil
- }
-}
-
var got1xxFuncForTests func(int, textproto.MIMEHeader) error
// get1xxTraceFunc returns the value of request's httptrace.ClientTrace.Got1xxResponse func,
@@ -335,78 +365,65 @@ func (cs *clientStream) get1xxTraceFunc() func(int, textproto.MIMEHeader) error
return traceGot1xxResponseFunc(cs.trace)
}
-// awaitRequestCancel waits for the user to cancel a request, its context to
-// expire, or for the request to be done (any way it might be removed from the
-// cc.streams map: peer reset, successful completion, TCP connection breakage,
-// etc). If the request is canceled, then cs will be canceled and closed.
-func (cs *clientStream) awaitRequestCancel(req *http.Request) {
- if err := awaitRequestCancel(req, cs.done); err != nil {
- cs.cancelStream()
- cs.bufPipe.CloseWithError(err)
- }
+func (cs *clientStream) abortStream(err error) {
+ cs.cc.mu.Lock()
+ defer cs.cc.mu.Unlock()
+ cs.abortStreamLocked(err)
}
-func (cs *clientStream) cancelStream() {
- cc := cs.cc
- cc.mu.Lock()
- didReset := cs.didReset
- cs.didReset = true
- cc.mu.Unlock()
-
- if !didReset {
- cc.writeStreamReset(cs.ID, ErrCodeCancel, nil)
- cc.forgetStreamID(cs.ID)
+func (cs *clientStream) abortStreamLocked(err error) {
+ cs.abortOnce.Do(func() {
+ cs.abortErr = err
+ close(cs.abort)
+ })
+ if cs.reqBody != nil && !cs.reqBodyClosed {
+ cs.reqBody.Close()
+ cs.reqBodyClosed = true
}
-}
-
-// checkResetOrDone reports any error sent in a RST_STREAM frame by the
-// server, or errStreamClosed if the stream is complete.
-func (cs *clientStream) checkResetOrDone() error {
- select {
- case <-cs.peerReset:
- return cs.resetErr
- case <-cs.done:
- return errStreamClosed
- default:
- return nil
+ // TODO(dneil): Clean up tests where cs.cc.cond is nil.
+ if cs.cc.cond != nil {
+ // Wake up writeRequestBody if it is waiting on flow control.
+ cs.cc.cond.Broadcast()
}
}
-func (cs *clientStream) getStartedWrite() bool {
+func (cs *clientStream) abortRequestBodyWrite() {
cc := cs.cc
cc.mu.Lock()
defer cc.mu.Unlock()
- return cs.startedWrite
-}
-
-func (cs *clientStream) abortRequestBodyWrite(err error) {
- if err == nil {
- panic("nil error")
- }
- cc := cs.cc
- cc.mu.Lock()
- if cs.stopReqBody == nil {
- cs.stopReqBody = err
- if cs.req.Body != nil {
- cs.req.Body.Close()
- }
+ if cs.reqBody != nil && !cs.reqBodyClosed {
+ cs.reqBody.Close()
+ cs.reqBodyClosed = true
cc.cond.Broadcast()
}
- cc.mu.Unlock()
}
type stickyErrWriter struct {
- w io.Writer
- err *error
+ conn net.Conn
+ timeout time.Duration
+ err *error
}
func (sew stickyErrWriter) Write(p []byte) (n int, err error) {
if *sew.err != nil {
return 0, *sew.err
}
- n, err = sew.w.Write(p)
- *sew.err = err
- return
+ for {
+ if sew.timeout != 0 {
+ sew.conn.SetWriteDeadline(time.Now().Add(sew.timeout))
+ }
+ nn, err := sew.conn.Write(p[n:])
+ n += nn
+ if n < len(p) && nn > 0 && errors.Is(err, os.ErrDeadlineExceeded) {
+ // Keep extending the deadline so long as we're making progress.
+ continue
+ }
+ if sew.timeout != 0 {
+ sew.conn.SetWriteDeadline(time.Time{})
+ }
+ *sew.err = err
+ return n, err
+ }
}
// noCachedConnError is the concrete type of ErrNoCachedConn, which
@@ -479,9 +496,9 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res
}
reused := !atomic.CompareAndSwapUint32(&cc.reused, 0, 1)
traceGotConn(req, cc, reused)
- res, gotErrAfterReqBodyWrite, err := cc.roundTrip(req)
+ res, err := cc.RoundTrip(req)
if err != nil && retry <= 6 {
- if req, err = shouldRetryRequest(req, err, gotErrAfterReqBodyWrite); err == nil {
+ if req, err = shouldRetryRequest(req, err); err == nil {
// After the first retry, do exponential backoff with 10% jitter.
if retry == 0 {
continue
@@ -492,7 +509,7 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res
case <-time.After(time.Second * time.Duration(backoff)):
continue
case <-req.Context().Done():
- return nil, req.Context().Err()
+ err = req.Context().Err()
}
}
}
@@ -523,7 +540,7 @@ var (
// response headers. It is always called with a non-nil error.
// It returns either a request to retry (either the same request, or a
// modified clone), or an error if the request can't be replayed.
-func shouldRetryRequest(req *http.Request, err error, afterBodyWrite bool) (*http.Request, error) {
+func shouldRetryRequest(req *http.Request, err error) (*http.Request, error) {
if !canRetryError(err) {
return nil, err
}
@@ -536,7 +553,6 @@ func shouldRetryRequest(req *http.Request, err error, afterBodyWrite bool) (*htt
// If the request body can be reset back to its original
// state via the optional req.GetBody, do that.
if req.GetBody != nil {
- // TODO: consider a req.Body.Close here? or audit that all caller paths do?
body, err := req.GetBody()
if err != nil {
return nil, err
@@ -548,10 +564,8 @@ func shouldRetryRequest(req *http.Request, err error, afterBodyWrite bool) (*htt
// The Request.Body can't reset back to the beginning, but we
// don't seem to have started to read from it yet, so reuse
- // the request directly. The "afterBodyWrite" means the
- // bodyWrite process has started, which becomes true before
- // the first Read.
- if !afterBodyWrite {
+ // the request directly.
+ if err == errClientConnUnusable {
return req, nil
}
@@ -563,6 +577,10 @@ func canRetryError(err error) bool {
return true
}
if se, ok := err.(StreamError); ok {
+ if se.Code == ErrCodeProtocol && se.Cause == errFromPeer {
+ // See golang/go#47635, golang/go#42777
+ return true
+ }
return se.Code == ErrCodeRefusedStream
}
return false
@@ -637,14 +655,15 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro
tconn: c,
readerDone: make(chan struct{}),
nextStreamID: 1,
- maxFrameSize: 16 << 10, // spec default
- initialWindowSize: 65535, // spec default
- maxConcurrentStreams: 1000, // "infinite", per spec. 1000 seems good enough.
- peerMaxHeaderListSize: 0xffffffffffffffff, // "infinite", per spec. Use 2^64-1 instead.
+ maxFrameSize: 16 << 10, // spec default
+ initialWindowSize: 65535, // spec default
+ maxConcurrentStreams: initialMaxConcurrentStreams, // "infinite", per spec. Use a smaller value until we have received server settings.
+ peerMaxHeaderListSize: 0xffffffffffffffff, // "infinite", per spec. Use 2^64-1 instead.
streams: make(map[uint32]*clientStream),
singleUse: singleUse,
wantSettingsAck: true,
pings: make(map[[8]byte]chan struct{}),
+ reqHeaderMu: make(chan struct{}, 1),
}
if d := t.idleConnTimeout(); d != 0 {
cc.idleTimeout = d
@@ -659,9 +678,16 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro
// TODO: adjust this writer size to account for frame size +
// MTU + crypto/tls record padding.
- cc.bw = bufio.NewWriter(stickyErrWriter{c, &cc.werr})
+ cc.bw = bufio.NewWriter(stickyErrWriter{
+ conn: c,
+ timeout: t.WriteByteTimeout,
+ err: &cc.werr,
+ })
cc.br = bufio.NewReader(c)
cc.fr = NewFramer(cc.bw, cc.br)
+ if t.CountError != nil {
+ cc.fr.countError = t.CountError
+ }
cc.fr.ReadMetaHeaders = hpack.NewDecoder(initialHeaderTableSize, nil)
cc.fr.MaxHeaderListSize = t.maxHeaderListSize()
@@ -709,11 +735,17 @@ func (cc *ClientConn) healthCheck() {
err := cc.Ping(ctx)
if err != nil {
cc.closeForLostPing()
- cc.t.connPool().MarkDead(cc)
return
}
}
+// SetDoNotReuse marks cc as not reusable for future HTTP requests.
+func (cc *ClientConn) SetDoNotReuse() {
+ cc.mu.Lock()
+ defer cc.mu.Unlock()
+ cc.doNotReuse = true
+}
+
func (cc *ClientConn) setGoAway(f *GoAwayFrame) {
cc.mu.Lock()
defer cc.mu.Unlock()
@@ -731,27 +763,94 @@ func (cc *ClientConn) setGoAway(f *GoAwayFrame) {
last := f.LastStreamID
for streamID, cs := range cc.streams {
if streamID > last {
- select {
- case cs.resc <- resAndError{err: errClientConnGotGoAway}:
- default:
- }
+ cs.abortStreamLocked(errClientConnGotGoAway)
}
}
}
// CanTakeNewRequest reports whether the connection can take a new request,
// meaning it has not been closed or received or sent a GOAWAY.
+//
+// If the caller is going to immediately make a new request on this
+// connection, use ReserveNewRequest instead.
func (cc *ClientConn) CanTakeNewRequest() bool {
cc.mu.Lock()
defer cc.mu.Unlock()
return cc.canTakeNewRequestLocked()
}
+// ReserveNewRequest is like CanTakeNewRequest but also reserves a
+// concurrent stream in cc. The reservation is decremented on the
+// next call to RoundTrip.
+func (cc *ClientConn) ReserveNewRequest() bool {
+ cc.mu.Lock()
+ defer cc.mu.Unlock()
+ if st := cc.idleStateLocked(); !st.canTakeNewRequest {
+ return false
+ }
+ cc.streamsReserved++
+ return true
+}
+
+// ClientConnState describes the state of a ClientConn.
+type ClientConnState struct {
+ // Closed is whether the connection is closed.
+ Closed bool
+
+ // Closing is whether the connection is in the process of
+ // closing. It may be closing due to shutdown, being a
+ // single-use connection, being marked as DoNotReuse, or
+ // having received a GOAWAY frame.
+ Closing bool
+
+ // StreamsActive is how many streams are active.
+ StreamsActive int
+
+ // StreamsReserved is how many streams have been reserved via
+ // ClientConn.ReserveNewRequest.
+ StreamsReserved int
+
+ // StreamsPending is how many requests have been sent in excess
+ // of the peer's advertised MaxConcurrentStreams setting and
+ // are waiting for other streams to complete.
+ StreamsPending int
+
+ // MaxConcurrentStreams is how many concurrent streams the
+ // peer advertised as acceptable. Zero means no SETTINGS
+ // frame has been received yet.
+ MaxConcurrentStreams uint32
+
+ // LastIdle, if non-zero, is when the connection last
+ // transitioned to idle state.
+ LastIdle time.Time
+}
+
+// State returns a snapshot of cc's state.
+func (cc *ClientConn) State() ClientConnState {
+ cc.wmu.Lock()
+ maxConcurrent := cc.maxConcurrentStreams
+ if !cc.seenSettings {
+ maxConcurrent = 0
+ }
+ cc.wmu.Unlock()
+
+ cc.mu.Lock()
+ defer cc.mu.Unlock()
+ return ClientConnState{
+ Closed: cc.closed,
+ Closing: cc.closing || cc.singleUse || cc.doNotReuse || cc.goAway != nil,
+ StreamsActive: len(cc.streams),
+ StreamsReserved: cc.streamsReserved,
+ StreamsPending: cc.pendingRequests,
+ LastIdle: cc.lastIdle,
+ MaxConcurrentStreams: maxConcurrent,
+ }
+}
+
// clientConnIdleState describes the suitability of a client
// connection to initiate a new RoundTrip request.
type clientConnIdleState struct {
canTakeNewRequest bool
- freshConn bool // whether it's unused by any previous request
}
func (cc *ClientConn) idleState() clientConnIdleState {
@@ -772,13 +871,13 @@ func (cc *ClientConn) idleStateLocked() (st clientConnIdleState) {
// writing it.
maxConcurrentOkay = true
} else {
- maxConcurrentOkay = int64(len(cc.streams)+1) < int64(cc.maxConcurrentStreams)
+ maxConcurrentOkay = int64(len(cc.streams)+cc.streamsReserved+1) <= int64(cc.maxConcurrentStreams)
}
st.canTakeNewRequest = cc.goAway == nil && !cc.closed && !cc.closing && maxConcurrentOkay &&
+ !cc.doNotReuse &&
int64(cc.nextStreamID)+2*int64(cc.pendingRequests) < math.MaxInt32 &&
!cc.tooIdleLocked()
- st.freshConn = cc.nextStreamID == 1 && st.canTakeNewRequest
return
}
@@ -807,9 +906,27 @@ func (cc *ClientConn) onIdleTimeout() {
cc.closeIfIdle()
}
+func (cc *ClientConn) closeConn() error {
+ t := time.AfterFunc(250*time.Millisecond, cc.forceCloseConn)
+ defer t.Stop()
+ return cc.tconn.Close()
+}
+
+// A tls.Conn.Close can hang for a long time if the peer is unresponsive.
+// Try to shut it down more aggressively.
+func (cc *ClientConn) forceCloseConn() {
+ tc, ok := cc.tconn.(*tls.Conn)
+ if !ok {
+ return
+ }
+ if nc := tlsUnderlyingConn(tc); nc != nil {
+ nc.Close()
+ }
+}
+
func (cc *ClientConn) closeIfIdle() {
cc.mu.Lock()
- if len(cc.streams) > 0 {
+ if len(cc.streams) > 0 || cc.streamsReserved > 0 {
cc.mu.Unlock()
return
}
@@ -821,18 +938,24 @@ func (cc *ClientConn) closeIfIdle() {
if VerboseLogs {
cc.vlogf("http2: Transport closing idle conn %p (forSingleUse=%v, maxStream=%v)", cc, cc.singleUse, nextID-2)
}
- cc.tconn.Close()
+ cc.closeConn()
+}
+
+func (cc *ClientConn) isDoNotReuseAndIdle() bool {
+ cc.mu.Lock()
+ defer cc.mu.Unlock()
+ return cc.doNotReuse && len(cc.streams) == 0
}
var shutdownEnterWaitStateHook = func() {}
-// Shutdown gracefully close the client connection, waiting for running streams to complete.
+// Shutdown gracefully closes the client connection, waiting for running streams to complete.
func (cc *ClientConn) Shutdown(ctx context.Context) error {
if err := cc.sendGoAway(); err != nil {
return err
}
// Wait for all in-flight streams to complete or connection to close
- done := make(chan error, 1)
+ done := make(chan struct{})
cancelled := false // guarded by cc.mu
go func() {
cc.mu.Lock()
@@ -840,7 +963,7 @@ func (cc *ClientConn) Shutdown(ctx context.Context) error {
for {
if len(cc.streams) == 0 || cc.closed {
cc.closed = true
- done <- cc.tconn.Close()
+ close(done)
break
}
if cancelled {
@@ -851,8 +974,8 @@ func (cc *ClientConn) Shutdown(ctx context.Context) error {
}()
shutdownEnterWaitStateHook()
select {
- case err := <-done:
- return err
+ case <-done:
+ return cc.closeConn()
case <-ctx.Done():
cc.mu.Lock()
// Free the goroutine above
@@ -865,15 +988,18 @@ func (cc *ClientConn) Shutdown(ctx context.Context) error {
func (cc *ClientConn) sendGoAway() error {
cc.mu.Lock()
- defer cc.mu.Unlock()
- cc.wmu.Lock()
- defer cc.wmu.Unlock()
- if cc.closing {
+ closing := cc.closing
+ cc.closing = true
+ maxStreamID := cc.nextStreamID
+ cc.mu.Unlock()
+ if closing {
// GOAWAY sent already
return nil
}
+
+ cc.wmu.Lock()
+ defer cc.wmu.Unlock()
// Send a graceful shutdown frame to server
- maxStreamID := cc.nextStreamID
if err := cc.fr.WriteGoAway(maxStreamID, ErrCodeNo, nil); err != nil {
return err
}
@@ -881,7 +1007,6 @@ func (cc *ClientConn) sendGoAway() error {
return err
}
// Prevent new requests
- cc.closing = true
return nil
}
@@ -889,18 +1014,13 @@ func (cc *ClientConn) sendGoAway() error {
// err is sent to streams.
func (cc *ClientConn) closeForError(err error) error {
cc.mu.Lock()
- defer cc.cond.Broadcast()
- defer cc.mu.Unlock()
- for id, cs := range cc.streams {
- select {
- case cs.resc <- resAndError{err: err}:
- default:
- }
- cs.bufPipe.CloseWithError(err)
- delete(cc.streams, id)
- }
cc.closed = true
- return cc.tconn.Close()
+ for _, cs := range cc.streams {
+ cs.abortStreamLocked(err)
+ }
+ cc.cond.Broadcast()
+ cc.mu.Unlock()
+ return cc.closeConn()
}
// Close closes the client connection immediately.
@@ -914,6 +1034,9 @@ func (cc *ClientConn) Close() error {
// closes the client connection immediately. In-flight requests are interrupted.
func (cc *ClientConn) closeForLostPing() error {
err := errors.New("http2: client connection lost")
+ if f := cc.t.CountError; f != nil {
+ f("conn_close_lost_ping")
+ }
return cc.closeForError(err)
}
@@ -978,41 +1101,158 @@ func actualContentLength(req *http.Request) int64 {
return -1
}
+func (cc *ClientConn) decrStreamReservations() {
+ cc.mu.Lock()
+ defer cc.mu.Unlock()
+ cc.decrStreamReservationsLocked()
+}
+
+func (cc *ClientConn) decrStreamReservationsLocked() {
+ if cc.streamsReserved > 0 {
+ cc.streamsReserved--
+ }
+}
+
func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) {
- resp, _, err := cc.roundTrip(req)
- return resp, err
+ ctx := req.Context()
+ cs := &clientStream{
+ cc: cc,
+ ctx: ctx,
+ reqCancel: req.Cancel,
+ isHead: req.Method == "HEAD",
+ reqBody: req.Body,
+ reqBodyContentLength: actualContentLength(req),
+ trace: httptrace.ContextClientTrace(ctx),
+ peerClosed: make(chan struct{}),
+ abort: make(chan struct{}),
+ respHeaderRecv: make(chan struct{}),
+ donec: make(chan struct{}),
+ }
+ go cs.doRequest(req)
+
+ waitDone := func() error {
+ select {
+ case <-cs.donec:
+ return nil
+ case <-ctx.Done():
+ return ctx.Err()
+ case <-cs.reqCancel:
+ return errRequestCanceled
+ }
+ }
+
+ handleResponseHeaders := func() (*http.Response, error) {
+ res := cs.res
+ if res.StatusCode > 299 {
+ // On error or status code 3xx, 4xx, 5xx, etc abort any
+ // ongoing write, assuming that the server doesn't care
+ // about our request body. If the server replied with 1xx or
+ // 2xx, however, then assume the server DOES potentially
+ // want our body (e.g. full-duplex streaming:
+ // golang.org/issue/13444). If it turns out the server
+ // doesn't, they'll RST_STREAM us soon enough. This is a
+ // heuristic to avoid adding knobs to Transport. Hopefully
+ // we can keep it.
+ cs.abortRequestBodyWrite()
+ }
+ res.Request = req
+ res.TLS = cc.tlsState
+ if res.Body == noBody && actualContentLength(req) == 0 {
+ // If there isn't a request or response body still being
+ // written, then wait for the stream to be closed before
+ // RoundTrip returns.
+ if err := waitDone(); err != nil {
+ return nil, err
+ }
+ }
+ return res, nil
+ }
+
+ for {
+ select {
+ case <-cs.respHeaderRecv:
+ return handleResponseHeaders()
+ case <-cs.abort:
+ select {
+ case <-cs.respHeaderRecv:
+ // If both cs.respHeaderRecv and cs.abort are signaling,
+ // pick respHeaderRecv. The server probably wrote the
+ // response and immediately reset the stream.
+ // golang.org/issue/49645
+ return handleResponseHeaders()
+ default:
+ waitDone()
+ return nil, cs.abortErr
+ }
+ case <-ctx.Done():
+ err := ctx.Err()
+ cs.abortStream(err)
+ return nil, err
+ case <-cs.reqCancel:
+ cs.abortStream(errRequestCanceled)
+ return nil, errRequestCanceled
+ }
+ }
}
-func (cc *ClientConn) roundTrip(req *http.Request) (res *http.Response, gotErrAfterReqBodyWrite bool, err error) {
+// doRequest runs for the duration of the request lifetime.
+//
+// It sends the request and performs post-request cleanup (closing Request.Body, etc.).
+func (cs *clientStream) doRequest(req *http.Request) {
+ err := cs.writeRequest(req)
+ cs.cleanupWriteRequest(err)
+}
+
+// writeRequest sends a request.
+//
+// It returns nil after the request is written, the response read,
+// and the request stream is half-closed by the peer.
+//
+// It returns non-nil if the request ends otherwise.
+// If the returned error is StreamError, the error Code may be used in resetting the stream.
+func (cs *clientStream) writeRequest(req *http.Request) (err error) {
+ cc := cs.cc
+ ctx := cs.ctx
+
if err := checkConnHeaders(req); err != nil {
- return nil, false, err
- }
- if cc.idleTimer != nil {
- cc.idleTimer.Stop()
+ return err
}
- trailers, err := commaSeparatedTrailers(req)
- if err != nil {
- return nil, false, err
+ // Acquire the new-request lock by writing to reqHeaderMu.
+ // This lock guards the critical section covering allocating a new stream ID
+ // (requires mu) and creating the stream (requires wmu).
+ if cc.reqHeaderMu == nil {
+ panic("RoundTrip on uninitialized ClientConn") // for tests
+ }
+ select {
+ case cc.reqHeaderMu <- struct{}{}:
+ case <-cs.reqCancel:
+ return errRequestCanceled
+ case <-ctx.Done():
+ return ctx.Err()
}
- hasTrailers := trailers != ""
cc.mu.Lock()
- if err := cc.awaitOpenSlotForRequest(req); err != nil {
+ if cc.idleTimer != nil {
+ cc.idleTimer.Stop()
+ }
+ cc.decrStreamReservationsLocked()
+ if err := cc.awaitOpenSlotForStreamLocked(cs); err != nil {
cc.mu.Unlock()
- return nil, false, err
+ <-cc.reqHeaderMu
+ return err
}
-
- body := req.Body
- contentLen := actualContentLength(req)
- hasBody := contentLen != 0
+ cc.addStreamLocked(cs) // assigns stream ID
+ if isConnectionCloseRequest(req) {
+ cc.doNotReuse = true
+ }
+ cc.mu.Unlock()
// TODO(bradfitz): this is a copy of the logic in net/http. Unify somewhere?
- var requestedGzip bool
if !cc.t.disableCompression() &&
req.Header.Get("Accept-Encoding") == "" &&
req.Header.Get("Range") == "" &&
- req.Method != "HEAD" {
+ !cs.isHead {
// Request gzip only, not deflate. Deflate is ambiguous and
// not as universally supported anyway.
// See: https://zlib.net/zlib_faq.html#faq39
@@ -1025,183 +1265,224 @@ func (cc *ClientConn) roundTrip(req *http.Request) (res *http.Response, gotErrAf
// We don't request gzip if the request is for a range, since
// auto-decoding a portion of a gzipped document will just fail
// anyway. See https://golang.org/issue/8923
- requestedGzip = true
+ cs.requestedGzip = true
}
- // we send: HEADERS{1}, CONTINUATION{0,} + DATA{0,} (DATA is
- // sent by writeRequestBody below, along with any Trailers,
- // again in form HEADERS{1}, CONTINUATION{0,})
- hdrs, err := cc.encodeHeaders(req, requestedGzip, trailers, contentLen)
+ continueTimeout := cc.t.expectContinueTimeout()
+ if continueTimeout != 0 {
+ if !httpguts.HeaderValuesContainsToken(req.Header["Expect"], "100-continue") {
+ continueTimeout = 0
+ } else {
+ cs.on100 = make(chan struct{}, 1)
+ }
+ }
+
+ // Past this point (where we send request headers), it is possible for
+ // RoundTrip to return successfully. Since the RoundTrip contract permits
+ // the caller to "mutate or reuse" the Request after closing the Response's Body,
+ // we must take care when referencing the Request from here on.
+ err = cs.encodeAndWriteHeaders(req)
+ <-cc.reqHeaderMu
if err != nil {
- cc.mu.Unlock()
- return nil, false, err
+ return err
}
- cs := cc.newStream()
- cs.req = req
- cs.trace = httptrace.ContextClientTrace(req.Context())
- cs.requestedGzip = requestedGzip
- bodyWriter := cc.t.getBodyWriterState(cs, body)
- cs.on100 = bodyWriter.on100
+ hasBody := cs.reqBodyContentLength != 0
+ if !hasBody {
+ cs.sentEndStream = true
+ } else {
+ if continueTimeout != 0 {
+ traceWait100Continue(cs.trace)
+ timer := time.NewTimer(continueTimeout)
+ select {
+ case <-timer.C:
+ err = nil
+ case <-cs.on100:
+ err = nil
+ case <-cs.abort:
+ err = cs.abortErr
+ case <-ctx.Done():
+ err = ctx.Err()
+ case <-cs.reqCancel:
+ err = errRequestCanceled
+ }
+ timer.Stop()
+ if err != nil {
+ traceWroteRequest(cs.trace, err)
+ return err
+ }
+ }
- defer func() {
- cc.wmu.Lock()
- werr := cc.werr
- cc.wmu.Unlock()
- if werr != nil {
- cc.Close()
+ if err = cs.writeRequestBody(req); err != nil {
+ if err != errStopReqBodyWrite {
+ traceWroteRequest(cs.trace, err)
+ return err
+ }
+ } else {
+ cs.sentEndStream = true
}
- }()
+ }
+
+ traceWroteRequest(cs.trace, err)
+
+ var respHeaderTimer <-chan time.Time
+ var respHeaderRecv chan struct{}
+ if d := cc.responseHeaderTimeout(); d != 0 {
+ timer := time.NewTimer(d)
+ defer timer.Stop()
+ respHeaderTimer = timer.C
+ respHeaderRecv = cs.respHeaderRecv
+ }
+ // Wait until the peer half-closes its end of the stream,
+ // or until the request is aborted (via context, error, or otherwise),
+ // whichever comes first.
+ for {
+ select {
+ case <-cs.peerClosed:
+ return nil
+ case <-respHeaderTimer:
+ return errTimeout
+ case <-respHeaderRecv:
+ respHeaderRecv = nil
+ respHeaderTimer = nil // keep waiting for END_STREAM
+ case <-cs.abort:
+ return cs.abortErr
+ case <-ctx.Done():
+ return ctx.Err()
+ case <-cs.reqCancel:
+ return errRequestCanceled
+ }
+ }
+}
+
+func (cs *clientStream) encodeAndWriteHeaders(req *http.Request) error {
+ cc := cs.cc
+ ctx := cs.ctx
cc.wmu.Lock()
+ defer cc.wmu.Unlock()
+
+ // If the request was canceled while waiting for cc.mu, just quit.
+ select {
+ case <-cs.abort:
+ return cs.abortErr
+ case <-ctx.Done():
+ return ctx.Err()
+ case <-cs.reqCancel:
+ return errRequestCanceled
+ default:
+ }
+
+ // Encode headers.
+ //
+ // we send: HEADERS{1}, CONTINUATION{0,} + DATA{0,} (DATA is
+ // sent by writeRequestBody below, along with any Trailers,
+ // again in form HEADERS{1}, CONTINUATION{0,})
+ trailers, err := commaSeparatedTrailers(req)
+ if err != nil {
+ return err
+ }
+ hasTrailers := trailers != ""
+ contentLen := actualContentLength(req)
+ hasBody := contentLen != 0
+ hdrs, err := cc.encodeHeaders(req, cs.requestedGzip, trailers, contentLen)
+ if err != nil {
+ return err
+ }
+
+ // Write the request.
endStream := !hasBody && !hasTrailers
- werr := cc.writeHeaders(cs.ID, endStream, int(cc.maxFrameSize), hdrs)
- cc.wmu.Unlock()
+ cs.sentHeaders = true
+ err = cc.writeHeaders(cs.ID, endStream, int(cc.maxFrameSize), hdrs)
traceWroteHeaders(cs.trace)
- cc.mu.Unlock()
+ return err
+}
- if werr != nil {
- if hasBody {
- req.Body.Close() // per RoundTripper contract
- bodyWriter.cancel()
- }
- cc.forgetStreamID(cs.ID)
- // Don't bother sending a RST_STREAM (our write already failed;
- // no need to keep writing)
- traceWroteRequest(cs.trace, werr)
- return nil, false, werr
- }
+// cleanupWriteRequest performs post-request tasks.
+//
+// If err (the result of writeRequest) is non-nil and the stream is not closed,
+// cleanupWriteRequest will send a reset to the peer.
+func (cs *clientStream) cleanupWriteRequest(err error) {
+ cc := cs.cc
- var respHeaderTimer <-chan time.Time
- if hasBody {
- bodyWriter.scheduleBodyWrite()
- } else {
- traceWroteRequest(cs.trace, nil)
- if d := cc.responseHeaderTimeout(); d != 0 {
- timer := time.NewTimer(d)
- defer timer.Stop()
- respHeaderTimer = timer.C
- }
+ if cs.ID == 0 {
+ // We were canceled before creating the stream, so return our reservation.
+ cc.decrStreamReservations()
}
- readLoopResCh := cs.resc
- bodyWritten := false
- ctx := req.Context()
+ // TODO: write h12Compare test showing whether
+ // Request.Body is closed by the Transport,
+ // and in multiple cases: server replies <=299 and >299
+ // while still writing request body
+ cc.mu.Lock()
+ bodyClosed := cs.reqBodyClosed
+ cs.reqBodyClosed = true
+ cc.mu.Unlock()
+ if !bodyClosed && cs.reqBody != nil {
+ cs.reqBody.Close()
+ }
- handleReadLoopResponse := func(re resAndError) (*http.Response, bool, error) {
- res := re.res
- if re.err != nil || res.StatusCode > 299 {
- // On error or status code 3xx, 4xx, 5xx, etc abort any
- // ongoing write, assuming that the server doesn't care
- // about our request body. If the server replied with 1xx or
- // 2xx, however, then assume the server DOES potentially
- // want our body (e.g. full-duplex streaming:
- // golang.org/issue/13444). If it turns out the server
- // doesn't, they'll RST_STREAM us soon enough. This is a
- // heuristic to avoid adding knobs to Transport. Hopefully
- // we can keep it.
- bodyWriter.cancel()
- cs.abortRequestBodyWrite(errStopReqBodyWrite)
- if hasBody && !bodyWritten {
- <-bodyWriter.resc
+ if err != nil && cs.sentEndStream {
+ // If the connection is closed immediately after the response is read,
+ // we may be aborted before finishing up here. If the stream was closed
+ // cleanly on both sides, there is no error.
+ select {
+ case <-cs.peerClosed:
+ err = nil
+ default:
+ }
+ }
+ if err != nil {
+ cs.abortStream(err) // possibly redundant, but harmless
+ if cs.sentHeaders {
+ if se, ok := err.(StreamError); ok {
+ if se.Cause != errFromPeer {
+ cc.writeStreamReset(cs.ID, se.Code, err)
+ }
+ } else {
+ cc.writeStreamReset(cs.ID, ErrCodeCancel, err)
}
}
- if re.err != nil {
- cc.forgetStreamID(cs.ID)
- return nil, cs.getStartedWrite(), re.err
+ cs.bufPipe.CloseWithError(err) // no-op if already closed
+ } else {
+ if cs.sentHeaders && !cs.sentEndStream {
+ cc.writeStreamReset(cs.ID, ErrCodeNo, nil)
}
- res.Request = req
- res.TLS = cc.tlsState
- return res, false, nil
+ cs.bufPipe.CloseWithError(errRequestCanceled)
}
-
- handleError := func(err error) (*http.Response, bool, error) {
- if !hasBody || bodyWritten {
- cc.writeStreamReset(cs.ID, ErrCodeCancel, nil)
- } else {
- bodyWriter.cancel()
- cs.abortRequestBodyWrite(errStopReqBodyWriteAndCancel)
- <-bodyWriter.resc
- }
+ if cs.ID != 0 {
cc.forgetStreamID(cs.ID)
- return nil, cs.getStartedWrite(), err
}
- for {
- select {
- case re := <-readLoopResCh:
- return handleReadLoopResponse(re)
- case <-respHeaderTimer:
- return handleError(errTimeout)
- case <-ctx.Done():
- return handleError(ctx.Err())
- case <-req.Cancel:
- return handleError(errRequestCanceled)
- case <-cs.peerReset:
- // processResetStream already removed the
- // stream from the streams map; no need for
- // forgetStreamID.
- return nil, cs.getStartedWrite(), cs.resetErr
- case err := <-bodyWriter.resc:
- bodyWritten = true
- // Prefer the read loop's response, if available. Issue 16102.
- select {
- case re := <-readLoopResCh:
- return handleReadLoopResponse(re)
- default:
- }
- if err != nil {
- cc.forgetStreamID(cs.ID)
- return nil, cs.getStartedWrite(), err
- }
- if d := cc.responseHeaderTimeout(); d != 0 {
- timer := time.NewTimer(d)
- defer timer.Stop()
- respHeaderTimer = timer.C
- }
- }
+ cc.wmu.Lock()
+ werr := cc.werr
+ cc.wmu.Unlock()
+ if werr != nil {
+ cc.Close()
}
+
+ close(cs.donec)
}
-// awaitOpenSlotForRequest waits until len(streams) < maxConcurrentStreams.
+// awaitOpenSlotForStream waits until len(streams) < maxConcurrentStreams.
// Must hold cc.mu.
-func (cc *ClientConn) awaitOpenSlotForRequest(req *http.Request) error {
- var waitingForConn chan struct{}
- var waitingForConnErr error // guarded by cc.mu
+func (cc *ClientConn) awaitOpenSlotForStreamLocked(cs *clientStream) error {
for {
cc.lastActive = time.Now()
if cc.closed || !cc.canTakeNewRequestLocked() {
- if waitingForConn != nil {
- close(waitingForConn)
- }
return errClientConnUnusable
}
cc.lastIdle = time.Time{}
- if int64(len(cc.streams))+1 <= int64(cc.maxConcurrentStreams) {
- if waitingForConn != nil {
- close(waitingForConn)
- }
+ if int64(len(cc.streams)) < int64(cc.maxConcurrentStreams) {
return nil
}
- // Unfortunately, we cannot wait on a condition variable and channel at
- // the same time, so instead, we spin up a goroutine to check if the
- // request is canceled while we wait for a slot to open in the connection.
- if waitingForConn == nil {
- waitingForConn = make(chan struct{})
- go func() {
- if err := awaitRequestCancel(req, waitingForConn); err != nil {
- cc.mu.Lock()
- waitingForConnErr = err
- cc.cond.Broadcast()
- cc.mu.Unlock()
- }
- }()
- }
cc.pendingRequests++
cc.cond.Wait()
cc.pendingRequests--
- if waitingForConnErr != nil {
- return waitingForConnErr
+ select {
+ case <-cs.abort:
+ return cs.abortErr
+ default:
}
}
}
@@ -1228,10 +1509,6 @@ func (cc *ClientConn) writeHeaders(streamID uint32, endStream bool, maxFrameSize
cc.fr.WriteContinuation(streamID, endHeaders, chunk)
}
}
- // TODO(bradfitz): this Flush could potentially block (as
- // could the WriteHeaders call(s) above), which means they
- // wouldn't respond to Request.Cancel being readable. That's
- // rare, but this should probably be in a goroutine.
cc.bw.Flush()
return cc.werr
}
@@ -1258,7 +1535,7 @@ func (cs *clientStream) frameScratchBufferLen(maxFrameSize int) int {
if n > max {
n = max
}
- if cl := actualContentLength(cs.req); cl != -1 && cl+1 < n {
+ if cl := cs.reqBodyContentLength; cl != -1 && cl+1 < n {
// Add an extra byte past the declared content-length to
// give the caller's Request.Body io.Reader a chance to
// give us more bytes than they declared, so we can catch it
@@ -1273,31 +1550,13 @@ func (cs *clientStream) frameScratchBufferLen(maxFrameSize int) int {
var bufPool sync.Pool // of *[]byte
-func (cs *clientStream) writeRequestBody(body io.Reader, bodyCloser io.Closer) (err error) {
+func (cs *clientStream) writeRequestBody(req *http.Request) (err error) {
cc := cs.cc
+ body := cs.reqBody
sentEnd := false // whether we sent the final DATA frame w/ END_STREAM
- defer func() {
- traceWroteRequest(cs.trace, err)
- // TODO: write h12Compare test showing whether
- // Request.Body is closed by the Transport,
- // and in multiple cases: server replies <=299 and >299
- // while still writing request body
- var cerr error
- cc.mu.Lock()
- if cs.stopReqBody == nil {
- cs.stopReqBody = errStopReqBodyWrite
- cerr = bodyCloser.Close()
- }
- cc.mu.Unlock()
- if err == nil {
- err = cerr
- }
- }()
-
- req := cs.req
hasTrailers := req.Trailer != nil
- remainLen := actualContentLength(req)
+ remainLen := cs.reqBodyContentLength
hasContentLen := remainLen != -1
cc.mu.Lock()
@@ -1335,29 +1594,29 @@ func (cs *clientStream) writeRequestBody(body io.Reader, bodyCloser io.Closer) (
}
if remainLen < 0 {
err = errReqBodyTooLong
- cc.writeStreamReset(cs.ID, ErrCodeCancel, err)
return err
}
}
- if err == io.EOF {
- sawEOF = true
- err = nil
- } else if err != nil {
- cc.writeStreamReset(cs.ID, ErrCodeCancel, err)
- return err
+ if err != nil {
+ cc.mu.Lock()
+ bodyClosed := cs.reqBodyClosed
+ cc.mu.Unlock()
+ switch {
+ case bodyClosed:
+ return errStopReqBodyWrite
+ case err == io.EOF:
+ sawEOF = true
+ err = nil
+ default:
+ return err
+ }
}
remain := buf[:n]
for len(remain) > 0 && err == nil {
var allowed int32
allowed, err = cs.awaitFlowControl(len(remain))
- switch {
- case err == errStopReqBodyWrite:
- return err
- case err == errStopReqBodyWriteAndCancel:
- cc.writeStreamReset(cs.ID, ErrCodeCancel, nil)
- return err
- case err != nil:
+ if err != nil {
return err
}
cc.wmu.Lock()
@@ -1388,21 +1647,27 @@ func (cs *clientStream) writeRequestBody(body io.Reader, bodyCloser io.Closer) (
return nil
}
+ // Since the RoundTrip contract permits the caller to "mutate or reuse"
+ // a request after the Response's Body is closed, verify that this hasn't
+ // happened before accessing the trailers.
+ cc.mu.Lock()
+ trailer := req.Trailer
+ err = cs.abortErr
+ cc.mu.Unlock()
+ if err != nil {
+ return err
+ }
+
+ cc.wmu.Lock()
+ defer cc.wmu.Unlock()
var trls []byte
- if hasTrailers {
- cc.mu.Lock()
- trls, err = cc.encodeTrailers(req)
- cc.mu.Unlock()
+ if len(trailer) > 0 {
+ trls, err = cc.encodeTrailers(trailer)
if err != nil {
- cc.writeStreamReset(cs.ID, ErrCodeInternal, err)
- cc.forgetStreamID(cs.ID)
return err
}
}
- cc.wmu.Lock()
- defer cc.wmu.Unlock()
-
// Two ways to send END_STREAM: either with trailers, or
// with an empty DATA frame.
if len(trls) > 0 {
@@ -1422,17 +1687,24 @@ func (cs *clientStream) writeRequestBody(body io.Reader, bodyCloser io.Closer) (
// if the stream is dead.
func (cs *clientStream) awaitFlowControl(maxBytes int) (taken int32, err error) {
cc := cs.cc
+ ctx := cs.ctx
cc.mu.Lock()
defer cc.mu.Unlock()
for {
if cc.closed {
return 0, errClientConnClosed
}
- if cs.stopReqBody != nil {
- return 0, cs.stopReqBody
+ if cs.reqBodyClosed {
+ return 0, errStopReqBodyWrite
}
- if err := cs.checkResetOrDone(); err != nil {
- return 0, err
+ select {
+ case <-cs.abort:
+ return 0, cs.abortErr
+ case <-ctx.Done():
+ return 0, ctx.Err()
+ case <-cs.reqCancel:
+ return 0, errRequestCanceled
+ default:
}
if a := cs.flow.available(); a > 0 {
take := a
@@ -1450,9 +1722,14 @@ func (cs *clientStream) awaitFlowControl(maxBytes int) (taken int32, err error)
}
}
-// requires cc.mu be held.
+var errNilRequestURL = errors.New("http2: Request.URI is nil")
+
+// requires cc.wmu be held.
func (cc *ClientConn) encodeHeaders(req *http.Request, addGzipHeader bool, trailers string, contentLength int64) ([]byte, error) {
cc.hbuf.Reset()
+ if req.URL == nil {
+ return nil, errNilRequestURL
+ }
host := req.Host
if host == "" {
@@ -1638,12 +1915,12 @@ func shouldSendReqContentLength(method string, contentLength int64) bool {
}
}
-// requires cc.mu be held.
-func (cc *ClientConn) encodeTrailers(req *http.Request) ([]byte, error) {
+// requires cc.wmu be held.
+func (cc *ClientConn) encodeTrailers(trailer http.Header) ([]byte, error) {
cc.hbuf.Reset()
hlSize := uint64(0)
- for k, vv := range req.Trailer {
+ for k, vv := range trailer {
for _, v := range vv {
hf := hpack.HeaderField{Name: k, Value: v}
hlSize += uint64(hf.Size())
@@ -1653,7 +1930,7 @@ func (cc *ClientConn) encodeTrailers(req *http.Request) ([]byte, error) {
return nil, errRequestHeaderListSize
}
- for k, vv := range req.Trailer {
+ for k, vv := range trailer {
lowKey, ascii := asciiToLower(k)
if !ascii {
// Skip writing invalid headers. Per RFC 7540, Section 8.1.2, header
@@ -1683,51 +1960,51 @@ type resAndError struct {
}
// requires cc.mu be held.
-func (cc *ClientConn) newStream() *clientStream {
- cs := &clientStream{
- cc: cc,
- ID: cc.nextStreamID,
- resc: make(chan resAndError, 1),
- peerReset: make(chan struct{}),
- done: make(chan struct{}),
- }
+func (cc *ClientConn) addStreamLocked(cs *clientStream) {
cs.flow.add(int32(cc.initialWindowSize))
cs.flow.setConnFlow(&cc.flow)
cs.inflow.add(transportDefaultStreamFlow)
cs.inflow.setConnFlow(&cc.inflow)
+ cs.ID = cc.nextStreamID
cc.nextStreamID += 2
cc.streams[cs.ID] = cs
- return cs
+ if cs.ID == 0 {
+ panic("assigned stream ID 0")
+ }
}
func (cc *ClientConn) forgetStreamID(id uint32) {
- cc.streamByID(id, true)
-}
-
-func (cc *ClientConn) streamByID(id uint32, andRemove bool) *clientStream {
cc.mu.Lock()
- defer cc.mu.Unlock()
- cs := cc.streams[id]
- if andRemove && cs != nil && !cc.closed {
- cc.lastActive = time.Now()
- delete(cc.streams, id)
- if len(cc.streams) == 0 && cc.idleTimer != nil {
- cc.idleTimer.Reset(cc.idleTimeout)
- cc.lastIdle = time.Now()
- }
- close(cs.done)
- // Wake up checkResetOrDone via clientStream.awaitFlowControl and
- // wake up RoundTrip if there is a pending request.
- cc.cond.Broadcast()
+ slen := len(cc.streams)
+ delete(cc.streams, id)
+ if len(cc.streams) != slen-1 {
+ panic("forgetting unknown stream id")
+ }
+ cc.lastActive = time.Now()
+ if len(cc.streams) == 0 && cc.idleTimer != nil {
+ cc.idleTimer.Reset(cc.idleTimeout)
+ cc.lastIdle = time.Now()
+ }
+ // Wake up writeRequestBody via clientStream.awaitFlowControl and
+ // wake up RoundTrip if there is a pending request.
+ cc.cond.Broadcast()
+
+ closeOnIdle := cc.singleUse || cc.doNotReuse || cc.t.disableKeepAlives()
+ if closeOnIdle && cc.streamsReserved == 0 && len(cc.streams) == 0 {
+ if VerboseLogs {
+ cc.vlogf("http2: Transport closing idle conn %p (forSingleUse=%v, maxStream=%v)", cc, cc.singleUse, cc.nextStreamID-2)
+ }
+ cc.closed = true
+ defer cc.closeConn()
}
- return cs
+
+ cc.mu.Unlock()
}
// clientConnReadLoop is the state owned by the clientConn's frame-reading readLoop.
type clientConnReadLoop struct {
- _ incomparable
- cc *ClientConn
- closeWhenIdle bool
+ _ incomparable
+ cc *ClientConn
}
// readLoop runs in its own goroutine and reads and dispatches frames.
@@ -1765,8 +2042,8 @@ func isEOFOrNetReadError(err error) bool {
func (rl *clientConnReadLoop) cleanup() {
cc := rl.cc
- defer cc.tconn.Close()
- defer cc.t.connPool().MarkDead(cc)
+ cc.t.connPool().MarkDead(cc)
+ defer cc.closeConn()
defer close(cc.readerDone)
if cc.idleTimer != nil {
@@ -1787,23 +2064,49 @@ func (rl *clientConnReadLoop) cleanup() {
} else if err == io.EOF {
err = io.ErrUnexpectedEOF
}
+ cc.closed = true
for _, cs := range cc.streams {
- cs.bufPipe.CloseWithError(err) // no-op if already closed
select {
- case cs.resc <- resAndError{err: err}:
+ case <-cs.peerClosed:
+ // The server closed the stream before closing the conn,
+ // so no need to interrupt it.
default:
+ cs.abortStreamLocked(err)
}
- close(cs.done)
}
- cc.closed = true
cc.cond.Broadcast()
cc.mu.Unlock()
}
+// countReadFrameError calls Transport.CountError with a string
+// representing err.
+func (cc *ClientConn) countReadFrameError(err error) {
+ f := cc.t.CountError
+ if f == nil || err == nil {
+ return
+ }
+ if ce, ok := err.(ConnectionError); ok {
+ errCode := ErrCode(ce)
+ f(fmt.Sprintf("read_frame_conn_error_%s", errCode.stringToken()))
+ return
+ }
+ if errors.Is(err, io.EOF) {
+ f("read_frame_eof")
+ return
+ }
+ if errors.Is(err, io.ErrUnexpectedEOF) {
+ f("read_frame_unexpected_eof")
+ return
+ }
+ if errors.Is(err, ErrFrameTooLarge) {
+ f("read_frame_too_large")
+ return
+ }
+ f("read_frame_other")
+}
+
func (rl *clientConnReadLoop) run() error {
cc := rl.cc
- rl.closeWhenIdle = cc.t.disableKeepAlives() || cc.singleUse
- gotReply := false // ever saw a HEADERS reply
gotSettings := false
readIdleTimeout := cc.t.ReadIdleTimeout
var t *time.Timer
@@ -1820,9 +2123,7 @@ func (rl *clientConnReadLoop) run() error {
cc.vlogf("http2: Transport readFrame error on conn %p: (%T) %v", cc, err, err)
}
if se, ok := err.(StreamError); ok {
- if cs := cc.streamByID(se.StreamID, false); cs != nil {
- cs.cc.writeStreamReset(cs.ID, se.Code, err)
- cs.cc.forgetStreamID(cs.ID)
+ if cs := rl.streamByID(se.StreamID); cs != nil {
if se.Cause == nil {
se.Cause = cc.fr.errDetail
}
@@ -1830,6 +2131,7 @@ func (rl *clientConnReadLoop) run() error {
}
continue
} else if err != nil {
+ cc.countReadFrameError(err)
return err
}
if VerboseLogs {
@@ -1842,22 +2144,16 @@ func (rl *clientConnReadLoop) run() error {
}
gotSettings = true
}
- maybeIdle := false // whether frame might transition us to idle
switch f := f.(type) {
case *MetaHeadersFrame:
err = rl.processHeaders(f)
- maybeIdle = true
- gotReply = true
case *DataFrame:
err = rl.processData(f)
- maybeIdle = true
case *GoAwayFrame:
err = rl.processGoAway(f)
- maybeIdle = true
case *RSTStreamFrame:
err = rl.processResetStream(f)
- maybeIdle = true
case *SettingsFrame:
err = rl.processSettings(f)
case *PushPromiseFrame:
@@ -1875,38 +2171,24 @@ func (rl *clientConnReadLoop) run() error {
}
return err
}
- if rl.closeWhenIdle && gotReply && maybeIdle {
- cc.closeIfIdle()
- }
}
}
func (rl *clientConnReadLoop) processHeaders(f *MetaHeadersFrame) error {
- cc := rl.cc
- cs := cc.streamByID(f.StreamID, false)
+ cs := rl.streamByID(f.StreamID)
if cs == nil {
// We'd get here if we canceled a request while the
// server had its response still in flight. So if this
// was just something we canceled, ignore it.
return nil
}
- if f.StreamEnded() {
- // Issue 20521: If the stream has ended, streamByID() causes
- // clientStream.done to be closed, which causes the request's bodyWriter
- // to be closed with an errStreamClosed, which may be received by
- // clientConn.RoundTrip before the result of processing these headers.
- // Deferring stream closure allows the header processing to occur first.
- // clientConn.RoundTrip may still receive the bodyWriter error first, but
- // the fix for issue 16102 prioritises any response.
- //
- // Issue 22413: If there is no request body, we should close the
- // stream before writing to cs.resc so that the stream is closed
- // immediately once RoundTrip returns.
- if cs.req.Body != nil {
- defer cc.forgetStreamID(f.StreamID)
- } else {
- cc.forgetStreamID(f.StreamID)
- }
+ if cs.readClosed {
+ rl.endStreamError(cs, StreamError{
+ StreamID: f.StreamID,
+ Code: ErrCodeProtocol,
+ Cause: errors.New("protocol error: headers after END_STREAM"),
+ })
+ return nil
}
if !cs.firstByte {
if cs.trace != nil {
@@ -1930,9 +2212,11 @@ func (rl *clientConnReadLoop) processHeaders(f *MetaHeadersFrame) error {
return err
}
// Any other error type is a stream error.
- cs.cc.writeStreamReset(f.StreamID, ErrCodeProtocol, err)
- cc.forgetStreamID(cs.ID)
- cs.resc <- resAndError{err: err}
+ rl.endStreamError(cs, StreamError{
+ StreamID: f.StreamID,
+ Code: ErrCodeProtocol,
+ Cause: err,
+ })
return nil // return nil from process* funcs to keep conn alive
}
if res == nil {
@@ -1940,7 +2224,11 @@ func (rl *clientConnReadLoop) processHeaders(f *MetaHeadersFrame) error {
return nil
}
cs.resTrailer = &res.Trailer
- cs.resc <- resAndError{res: res}
+ cs.res = res
+ close(cs.respHeaderRecv)
+ if f.StreamEnded() {
+ rl.endStream(cs)
+ }
return nil
}
@@ -2002,6 +2290,9 @@ func (rl *clientConnReadLoop) handleResponse(cs *clientStream, f *MetaHeadersFra
}
if statusCode >= 100 && statusCode <= 199 {
+ if f.StreamEnded() {
+ return nil, errors.New("1xx informational response with END_STREAM flag")
+ }
cs.num1xx++
const max1xxResponses = 5 // arbitrary bound on number of informational responses, same as net/http
if cs.num1xx > max1xxResponses {
@@ -2014,42 +2305,49 @@ func (rl *clientConnReadLoop) handleResponse(cs *clientStream, f *MetaHeadersFra
}
if statusCode == 100 {
traceGot100Continue(cs.trace)
- if cs.on100 != nil {
- cs.on100() // forces any write delay timer to fire
+ select {
+ case cs.on100 <- struct{}{}:
+ default:
}
}
cs.pastHeaders = false // do it all again
return nil, nil
}
- streamEnded := f.StreamEnded()
- isHead := cs.req.Method == "HEAD"
- if !streamEnded || isHead {
- res.ContentLength = -1
- if clens := res.Header["Content-Length"]; len(clens) == 1 {
- if cl, err := strconv.ParseUint(clens[0], 10, 63); err == nil {
- res.ContentLength = int64(cl)
- } else {
- // TODO: care? unlike http/1, it won't mess up our framing, so it's
- // more safe smuggling-wise to ignore.
- }
- } else if len(clens) > 1 {
+ res.ContentLength = -1
+ if clens := res.Header["Content-Length"]; len(clens) == 1 {
+ if cl, err := strconv.ParseUint(clens[0], 10, 63); err == nil {
+ res.ContentLength = int64(cl)
+ } else {
// TODO: care? unlike http/1, it won't mess up our framing, so it's
// more safe smuggling-wise to ignore.
}
+ } else if len(clens) > 1 {
+ // TODO: care? unlike http/1, it won't mess up our framing, so it's
+ // more safe smuggling-wise to ignore.
+ } else if f.StreamEnded() && !cs.isHead {
+ res.ContentLength = 0
}
- if streamEnded || isHead {
+ if cs.isHead {
res.Body = noBody
return res, nil
}
- cs.bufPipe = pipe{b: &dataBuffer{expected: res.ContentLength}}
+ if f.StreamEnded() {
+ if res.ContentLength > 0 {
+ res.Body = missingBody{}
+ } else {
+ res.Body = noBody
+ }
+ return res, nil
+ }
+
+ cs.bufPipe.setBuffer(&dataBuffer{expected: res.ContentLength})
cs.bytesRemain = res.ContentLength
res.Body = transportResponseBody{cs}
- go cs.awaitRequestCancel(cs.req)
- if cs.requestedGzip && res.Header.Get("Content-Encoding") == "gzip" {
+ if cs.requestedGzip && asciiEqualFold(res.Header.Get("Content-Encoding"), "gzip") {
res.Header.Del("Content-Encoding")
res.Header.Del("Content-Length")
res.ContentLength = -1
@@ -2088,8 +2386,7 @@ func (rl *clientConnReadLoop) processTrailers(cs *clientStream, f *MetaHeadersFr
}
// transportResponseBody is the concrete type of Transport.RoundTrip's
-// Response.Body. It is an io.ReadCloser. On Read, it reads from cs.body.
-// On Close it sends RST_STREAM if EOF wasn't already seen.
+// Response.Body. It is an io.ReadCloser.
type transportResponseBody struct {
cs *clientStream
}
@@ -2107,7 +2404,7 @@ func (b transportResponseBody) Read(p []byte) (n int, err error) {
n = int(cs.bytesRemain)
if err == nil {
err = errors.New("net/http: server replied with more than declared Content-Length; truncated")
- cc.writeStreamReset(cs.ID, ErrCodeProtocol, err)
+ cs.abortStream(err)
}
cs.readErr = err
return int(cs.bytesRemain), err
@@ -2125,8 +2422,6 @@ func (b transportResponseBody) Read(p []byte) (n int, err error) {
}
cc.mu.Lock()
- defer cc.mu.Unlock()
-
var connAdd, streamAdd int32
// Check the conn-level first, before the stream-level.
if v := cc.inflow.available(); v < transportDefaultConnFlow/2 {
@@ -2143,6 +2438,8 @@ func (b transportResponseBody) Read(p []byte) (n int, err error) {
cs.inflow.add(streamAdd)
}
}
+ cc.mu.Unlock()
+
if connAdd != 0 || streamAdd != 0 {
cc.wmu.Lock()
defer cc.wmu.Unlock()
@@ -2163,34 +2460,45 @@ func (b transportResponseBody) Close() error {
cs := b.cs
cc := cs.cc
- serverSentStreamEnd := cs.bufPipe.Err() == io.EOF
unread := cs.bufPipe.Len()
-
- if unread > 0 || !serverSentStreamEnd {
+ if unread > 0 {
cc.mu.Lock()
- cc.wmu.Lock()
- if !serverSentStreamEnd {
- cc.fr.WriteRSTStream(cs.ID, ErrCodeCancel)
- cs.didReset = true
- }
// Return connection-level flow control.
if unread > 0 {
cc.inflow.add(int32(unread))
+ }
+ cc.mu.Unlock()
+
+ // TODO(dneil): Acquiring this mutex can block indefinitely.
+ // Move flow control return to a goroutine?
+ cc.wmu.Lock()
+ // Return connection-level flow control.
+ if unread > 0 {
cc.fr.WriteWindowUpdate(0, uint32(unread))
}
cc.bw.Flush()
cc.wmu.Unlock()
- cc.mu.Unlock()
}
cs.bufPipe.BreakWithError(errClosedResponseBody)
- cc.forgetStreamID(cs.ID)
+ cs.abortStream(errClosedResponseBody)
+
+ select {
+ case <-cs.donec:
+ case <-cs.ctx.Done():
+ // See golang/go#49366: The net/http package can cancel the
+ // request context after the response body is fully read.
+ // Don't treat this as an error.
+ return nil
+ case <-cs.reqCancel:
+ return errRequestCanceled
+ }
return nil
}
func (rl *clientConnReadLoop) processData(f *DataFrame) error {
cc := rl.cc
- cs := cc.streamByID(f.StreamID, f.StreamEnded())
+ cs := rl.streamByID(f.StreamID)
data := f.Data()
if cs == nil {
cc.mu.Lock()
@@ -2219,6 +2527,14 @@ func (rl *clientConnReadLoop) processData(f *DataFrame) error {
}
return nil
}
+ if cs.readClosed {
+ cc.logf("protocol error: received DATA after END_STREAM")
+ rl.endStreamError(cs, StreamError{
+ StreamID: f.StreamID,
+ Code: ErrCodeProtocol,
+ })
+ return nil
+ }
if !cs.firstByte {
cc.logf("protocol error: received DATA before a HEADERS frame")
rl.endStreamError(cs, StreamError{
@@ -2228,7 +2544,7 @@ func (rl *clientConnReadLoop) processData(f *DataFrame) error {
return nil
}
if f.Length > 0 {
- if cs.req.Method == "HEAD" && len(data) > 0 {
+ if cs.isHead && len(data) > 0 {
cc.logf("protocol error: received DATA on a HEAD request")
rl.endStreamError(cs, StreamError{
StreamID: f.StreamID,
@@ -2250,30 +2566,39 @@ func (rl *clientConnReadLoop) processData(f *DataFrame) error {
if pad := int(f.Length) - len(data); pad > 0 {
refund += pad
}
- // Return len(data) now if the stream is already closed,
- // since data will never be read.
- didReset := cs.didReset
- if didReset {
- refund += len(data)
+
+ didReset := false
+ var err error
+ if len(data) > 0 {
+ if _, err = cs.bufPipe.Write(data); err != nil {
+ // Return len(data) now if the stream is already closed,
+ // since data will never be read.
+ didReset = true
+ refund += len(data)
+ }
}
+
if refund > 0 {
cc.inflow.add(int32(refund))
+ if !didReset {
+ cs.inflow.add(int32(refund))
+ }
+ }
+ cc.mu.Unlock()
+
+ if refund > 0 {
cc.wmu.Lock()
cc.fr.WriteWindowUpdate(0, uint32(refund))
if !didReset {
- cs.inflow.add(int32(refund))
cc.fr.WriteWindowUpdate(cs.ID, uint32(refund))
}
cc.bw.Flush()
cc.wmu.Unlock()
}
- cc.mu.Unlock()
- if len(data) > 0 && !didReset {
- if _, err := cs.bufPipe.Write(data); err != nil {
- rl.endStreamError(cs, err)
- return err
- }
+ if err != nil {
+ rl.endStreamError(cs, err)
+ return nil
}
}
@@ -2286,24 +2611,32 @@ func (rl *clientConnReadLoop) processData(f *DataFrame) error {
func (rl *clientConnReadLoop) endStream(cs *clientStream) {
// TODO: check that any declared content-length matches, like
// server.go's (*stream).endStream method.
- rl.endStreamError(cs, nil)
+ if !cs.readClosed {
+ cs.readClosed = true
+ // Close cs.bufPipe and cs.peerClosed with cc.mu held to avoid a
+ // race condition: The caller can read io.EOF from Response.Body
+ // and close the body before we close cs.peerClosed, causing
+ // cleanupWriteRequest to send a RST_STREAM.
+ rl.cc.mu.Lock()
+ defer rl.cc.mu.Unlock()
+ cs.bufPipe.closeWithErrorAndCode(io.EOF, cs.copyTrailers)
+ close(cs.peerClosed)
+ }
}
func (rl *clientConnReadLoop) endStreamError(cs *clientStream, err error) {
- var code func()
- if err == nil {
- err = io.EOF
- code = cs.copyTrailers
- }
- if isConnectionCloseRequest(cs.req) {
- rl.closeWhenIdle = true
- }
- cs.bufPipe.closeWithErrorAndCode(err, code)
+ cs.readAborted = true
+ cs.abortStream(err)
+}
- select {
- case cs.resc <- resAndError{err: err}:
- default:
+func (rl *clientConnReadLoop) streamByID(id uint32) *clientStream {
+ rl.cc.mu.Lock()
+ defer rl.cc.mu.Unlock()
+ cs := rl.cc.streams[id]
+ if cs != nil && !cs.readAborted {
+ return cs
}
+ return nil
}
func (cs *clientStream) copyTrailers() {
@@ -2322,12 +2655,33 @@ func (rl *clientConnReadLoop) processGoAway(f *GoAwayFrame) error {
if f.ErrCode != 0 {
// TODO: deal with GOAWAY more. particularly the error code
cc.vlogf("transport got GOAWAY with error code = %v", f.ErrCode)
+ if fn := cc.t.CountError; fn != nil {
+ fn("recv_goaway_" + f.ErrCode.stringToken())
+ }
+
}
cc.setGoAway(f)
return nil
}
func (rl *clientConnReadLoop) processSettings(f *SettingsFrame) error {
+ cc := rl.cc
+ // Locking both mu and wmu here allows frame encoding to read settings with only wmu held.
+ // Acquiring wmu when f.IsAck() is unnecessary, but convenient and mostly harmless.
+ cc.wmu.Lock()
+ defer cc.wmu.Unlock()
+
+ if err := rl.processSettingsNoWrite(f); err != nil {
+ return err
+ }
+ if !f.IsAck() {
+ cc.fr.WriteSettingsAck()
+ cc.bw.Flush()
+ }
+ return nil
+}
+
+func (rl *clientConnReadLoop) processSettingsNoWrite(f *SettingsFrame) error {
cc := rl.cc
cc.mu.Lock()
defer cc.mu.Unlock()
@@ -2340,12 +2694,14 @@ func (rl *clientConnReadLoop) processSettings(f *SettingsFrame) error {
return ConnectionError(ErrCodeProtocol)
}
+ var seenMaxConcurrentStreams bool
err := f.ForeachSetting(func(s Setting) error {
switch s.ID {
case SettingMaxFrameSize:
cc.maxFrameSize = s.Val
case SettingMaxConcurrentStreams:
cc.maxConcurrentStreams = s.Val
+ seenMaxConcurrentStreams = true
case SettingMaxHeaderListSize:
cc.peerMaxHeaderListSize = uint64(s.Val)
case SettingInitialWindowSize:
@@ -2377,17 +2733,23 @@ func (rl *clientConnReadLoop) processSettings(f *SettingsFrame) error {
return err
}
- cc.wmu.Lock()
- defer cc.wmu.Unlock()
+ if !cc.seenSettings {
+ if !seenMaxConcurrentStreams {
+ // This was the servers initial SETTINGS frame and it
+ // didn't contain a MAX_CONCURRENT_STREAMS field so
+ // increase the number of concurrent streams this
+ // connection can establish to our default.
+ cc.maxConcurrentStreams = defaultMaxConcurrentStreams
+ }
+ cc.seenSettings = true
+ }
- cc.fr.WriteSettingsAck()
- cc.bw.Flush()
- return cc.werr
+ return nil
}
func (rl *clientConnReadLoop) processWindowUpdate(f *WindowUpdateFrame) error {
cc := rl.cc
- cs := cc.streamByID(f.StreamID, false)
+ cs := rl.streamByID(f.StreamID)
if f.StreamID != 0 && cs == nil {
return nil
}
@@ -2407,24 +2769,22 @@ func (rl *clientConnReadLoop) processWindowUpdate(f *WindowUpdateFrame) error {
}
func (rl *clientConnReadLoop) processResetStream(f *RSTStreamFrame) error {
- cs := rl.cc.streamByID(f.StreamID, true)
+ cs := rl.streamByID(f.StreamID)
if cs == nil {
- // TODO: return error if server tries to RST_STEAM an idle stream
+ // TODO: return error if server tries to RST_STREAM an idle stream
return nil
}
- select {
- case <-cs.peerReset:
- // Already reset.
- // This is the only goroutine
- // which closes this, so there
- // isn't a race.
- default:
- err := streamError(cs.ID, f.ErrCode)
- cs.resetErr = err
- close(cs.peerReset)
- cs.bufPipe.CloseWithError(err)
- cs.cc.cond.Broadcast() // wake up checkResetOrDone via clientStream.awaitFlowControl
+ serr := streamError(cs.ID, f.ErrCode)
+ serr.Cause = errFromPeer
+ if f.ErrCode == ErrCodeProtocol {
+ rl.cc.SetDoNotReuse()
}
+ if fn := cs.cc.t.CountError; fn != nil {
+ fn("recv_rststream_" + f.ErrCode.stringToken())
+ }
+ cs.abortStream(serr)
+
+ cs.bufPipe.CloseWithError(serr)
return nil
}
@@ -2446,19 +2806,24 @@ func (cc *ClientConn) Ping(ctx context.Context) error {
}
cc.mu.Unlock()
}
- cc.wmu.Lock()
- if err := cc.fr.WritePing(false, p); err != nil {
- cc.wmu.Unlock()
- return err
- }
- if err := cc.bw.Flush(); err != nil {
- cc.wmu.Unlock()
- return err
- }
- cc.wmu.Unlock()
+ errc := make(chan error, 1)
+ go func() {
+ cc.wmu.Lock()
+ defer cc.wmu.Unlock()
+ if err := cc.fr.WritePing(false, p); err != nil {
+ errc <- err
+ return
+ }
+ if err := cc.bw.Flush(); err != nil {
+ errc <- err
+ return
+ }
+ }()
select {
case <-c:
return nil
+ case err := <-errc:
+ return err
case <-ctx.Done():
return ctx.Err()
case <-cc.readerDone:
@@ -2535,6 +2900,11 @@ func (t *Transport) logf(format string, args ...interface{}) {
var noBody io.ReadCloser = ioutil.NopCloser(bytes.NewReader(nil))
+type missingBody struct{}
+
+func (missingBody) Close() error { return nil }
+func (missingBody) Read([]byte) (int, error) { return 0, io.ErrUnexpectedEOF }
+
func strSliceContains(ss []string, s string) bool {
for _, v := range ss {
if v == s {
@@ -2580,87 +2950,6 @@ type errorReader struct{ err error }
func (r errorReader) Read(p []byte) (int, error) { return 0, r.err }
-// bodyWriterState encapsulates various state around the Transport's writing
-// of the request body, particularly regarding doing delayed writes of the body
-// when the request contains "Expect: 100-continue".
-type bodyWriterState struct {
- cs *clientStream
- timer *time.Timer // if non-nil, we're doing a delayed write
- fnonce *sync.Once // to call fn with
- fn func() // the code to run in the goroutine, writing the body
- resc chan error // result of fn's execution
- delay time.Duration // how long we should delay a delayed write for
-}
-
-func (t *Transport) getBodyWriterState(cs *clientStream, body io.Reader) (s bodyWriterState) {
- s.cs = cs
- if body == nil {
- return
- }
- resc := make(chan error, 1)
- s.resc = resc
- s.fn = func() {
- cs.cc.mu.Lock()
- cs.startedWrite = true
- cs.cc.mu.Unlock()
- resc <- cs.writeRequestBody(body, cs.req.Body)
- }
- s.delay = t.expectContinueTimeout()
- if s.delay == 0 ||
- !httpguts.HeaderValuesContainsToken(
- cs.req.Header["Expect"],
- "100-continue") {
- return
- }
- s.fnonce = new(sync.Once)
-
- // Arm the timer with a very large duration, which we'll
- // intentionally lower later. It has to be large now because
- // we need a handle to it before writing the headers, but the
- // s.delay value is defined to not start until after the
- // request headers were written.
- const hugeDuration = 365 * 24 * time.Hour
- s.timer = time.AfterFunc(hugeDuration, func() {
- s.fnonce.Do(s.fn)
- })
- return
-}
-
-func (s bodyWriterState) cancel() {
- if s.timer != nil {
- if s.timer.Stop() {
- s.resc <- nil
- }
- }
-}
-
-func (s bodyWriterState) on100() {
- if s.timer == nil {
- // If we didn't do a delayed write, ignore the server's
- // bogus 100 continue response.
- return
- }
- s.timer.Stop()
- go func() { s.fnonce.Do(s.fn) }()
-}
-
-// scheduleBodyWrite starts writing the body, either immediately (in
-// the common case) or after the delay timeout. It should not be
-// called until after the headers have been written.
-func (s bodyWriterState) scheduleBodyWrite() {
- if s.timer == nil {
- // We're not doing a delayed write (see
- // getBodyWriterState), so just start the writing
- // goroutine immediately.
- go s.fn()
- return
- }
- traceWait100Continue(s.cs.trace)
- if s.timer.Stop() {
- s.timer.Reset(s.delay)
- }
-}
-
// isConnectionCloseRequest reports whether req should use its own
// connection for a single request and then close the connection.
func isConnectionCloseRequest(req *http.Request) bool {
diff --git a/cluster-autoscaler/vendor/golang.org/x/net/http2/writesched.go b/cluster-autoscaler/vendor/golang.org/x/net/http2/writesched.go
index f24d2b1e7d4a..c7cd0017392e 100644
--- a/cluster-autoscaler/vendor/golang.org/x/net/http2/writesched.go
+++ b/cluster-autoscaler/vendor/golang.org/x/net/http2/writesched.go
@@ -32,7 +32,8 @@ type WriteScheduler interface {
// Pop dequeues the next frame to write. Returns false if no frames can
// be written. Frames with a given wr.StreamID() are Pop'd in the same
- // order they are Push'd. No frames should be discarded except by CloseStream.
+ // order they are Push'd, except RST_STREAM frames. No frames should be
+ // discarded except by CloseStream.
Pop() (wr FrameWriteRequest, ok bool)
}
@@ -52,6 +53,7 @@ type FrameWriteRequest struct {
// stream is the stream on which this frame will be written.
// nil for non-stream frames like PING and SETTINGS.
+ // nil for RST_STREAM streams, which use the StreamError.StreamID field instead.
stream *stream
// done, if non-nil, must be a buffered channel with space for
diff --git a/cluster-autoscaler/vendor/golang.org/x/net/http2/writesched_random.go b/cluster-autoscaler/vendor/golang.org/x/net/http2/writesched_random.go
index 9a7b9e581c1e..f2e55e05ce90 100644
--- a/cluster-autoscaler/vendor/golang.org/x/net/http2/writesched_random.go
+++ b/cluster-autoscaler/vendor/golang.org/x/net/http2/writesched_random.go
@@ -45,11 +45,11 @@ func (ws *randomWriteScheduler) AdjustStream(streamID uint32, priority PriorityP
}
func (ws *randomWriteScheduler) Push(wr FrameWriteRequest) {
- id := wr.StreamID()
- if id == 0 {
+ if wr.isControl() {
ws.zero.push(wr)
return
}
+ id := wr.StreamID()
q, ok := ws.sq[id]
if !ok {
q = ws.queuePool.get()
@@ -59,7 +59,7 @@ func (ws *randomWriteScheduler) Push(wr FrameWriteRequest) {
}
func (ws *randomWriteScheduler) Pop() (FrameWriteRequest, bool) {
- // Control frames first.
+ // Control and RST_STREAM frames first.
if !ws.zero.empty() {
return ws.zero.shift(), true
}
diff --git a/cluster-autoscaler/vendor/golang.org/x/net/idna/go118.go b/cluster-autoscaler/vendor/golang.org/x/net/idna/go118.go
new file mode 100644
index 000000000000..c5c4338dbed4
--- /dev/null
+++ b/cluster-autoscaler/vendor/golang.org/x/net/idna/go118.go
@@ -0,0 +1,14 @@
+// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
+
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build go1.18
+// +build go1.18
+
+package idna
+
+// Transitional processing is disabled by default in Go 1.18.
+// https://golang.org/issue/47510
+const transitionalLookup = false
diff --git a/cluster-autoscaler/vendor/golang.org/x/net/idna/idna10.0.0.go b/cluster-autoscaler/vendor/golang.org/x/net/idna/idna10.0.0.go
index 5208ba6cb884..64ccf85febb6 100644
--- a/cluster-autoscaler/vendor/golang.org/x/net/idna/idna10.0.0.go
+++ b/cluster-autoscaler/vendor/golang.org/x/net/idna/idna10.0.0.go
@@ -59,10 +59,10 @@ type Option func(*options)
// Transitional sets a Profile to use the Transitional mapping as defined in UTS
// #46. This will cause, for example, "ß" to be mapped to "ss". Using the
// transitional mapping provides a compromise between IDNA2003 and IDNA2008
-// compatibility. It is used by most browsers when resolving domain names. This
+// compatibility. It is used by some browsers when resolving domain names. This
// option is only meaningful if combined with MapForLookup.
func Transitional(transitional bool) Option {
- return func(o *options) { o.transitional = true }
+ return func(o *options) { o.transitional = transitional }
}
// VerifyDNSLength sets whether a Profile should fail if any of the IDN parts
@@ -284,7 +284,7 @@ var (
punycode = &Profile{}
lookup = &Profile{options{
- transitional: true,
+ transitional: transitionalLookup,
useSTD3Rules: true,
checkHyphens: true,
checkJoiners: true,
diff --git a/cluster-autoscaler/vendor/golang.org/x/net/idna/idna9.0.0.go b/cluster-autoscaler/vendor/golang.org/x/net/idna/idna9.0.0.go
index 55f718f12744..aae6aac872b3 100644
--- a/cluster-autoscaler/vendor/golang.org/x/net/idna/idna9.0.0.go
+++ b/cluster-autoscaler/vendor/golang.org/x/net/idna/idna9.0.0.go
@@ -58,10 +58,10 @@ type Option func(*options)
// Transitional sets a Profile to use the Transitional mapping as defined in UTS
// #46. This will cause, for example, "ß" to be mapped to "ss". Using the
// transitional mapping provides a compromise between IDNA2003 and IDNA2008
-// compatibility. It is used by most browsers when resolving domain names. This
+// compatibility. It is used by some browsers when resolving domain names. This
// option is only meaningful if combined with MapForLookup.
func Transitional(transitional bool) Option {
- return func(o *options) { o.transitional = true }
+ return func(o *options) { o.transitional = transitional }
}
// VerifyDNSLength sets whether a Profile should fail if any of the IDN parts
diff --git a/cluster-autoscaler/vendor/golang.org/x/net/idna/pre_go118.go b/cluster-autoscaler/vendor/golang.org/x/net/idna/pre_go118.go
new file mode 100644
index 000000000000..3aaccab1c5a0
--- /dev/null
+++ b/cluster-autoscaler/vendor/golang.org/x/net/idna/pre_go118.go
@@ -0,0 +1,12 @@
+// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
+
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !go1.18
+// +build !go1.18
+
+package idna
+
+const transitionalLookup = true
diff --git a/cluster-autoscaler/vendor/golang.org/x/net/idna/punycode.go b/cluster-autoscaler/vendor/golang.org/x/net/idna/punycode.go
index 02c7d59af3b4..e8e3ac11a94b 100644
--- a/cluster-autoscaler/vendor/golang.org/x/net/idna/punycode.go
+++ b/cluster-autoscaler/vendor/golang.org/x/net/idna/punycode.go
@@ -49,6 +49,7 @@ func decode(encoded string) (string, error) {
}
}
i, n, bias := int32(0), initialN, initialBias
+ overflow := false
for pos < len(encoded) {
oldI, w := i, int32(1)
for k := base; ; k += base {
@@ -60,29 +61,32 @@ func decode(encoded string) (string, error) {
return "", punyError(encoded)
}
pos++
- i += digit * w
- if i < 0 {
+ i, overflow = madd(i, digit, w)
+ if overflow {
return "", punyError(encoded)
}
t := k - bias
- if t < tmin {
+ if k <= bias {
t = tmin
- } else if t > tmax {
+ } else if k >= bias+tmax {
t = tmax
}
if digit < t {
break
}
- w *= base - t
- if w >= math.MaxInt32/base {
+ w, overflow = madd(0, w, base-t)
+ if overflow {
return "", punyError(encoded)
}
}
+ if len(output) >= 1024 {
+ return "", punyError(encoded)
+ }
x := int32(len(output) + 1)
bias = adapt(i-oldI, x, oldI == 0)
n += i / x
i %= x
- if n > utf8.MaxRune || len(output) >= 1024 {
+ if n < 0 || n > utf8.MaxRune {
return "", punyError(encoded)
}
output = append(output, 0)
@@ -115,6 +119,7 @@ func encode(prefix, s string) (string, error) {
if b > 0 {
output = append(output, '-')
}
+ overflow := false
for remaining != 0 {
m := int32(0x7fffffff)
for _, r := range s {
@@ -122,8 +127,8 @@ func encode(prefix, s string) (string, error) {
m = r
}
}
- delta += (m - n) * (h + 1)
- if delta < 0 {
+ delta, overflow = madd(delta, m-n, h+1)
+ if overflow {
return "", punyError(s)
}
n = m
@@ -141,9 +146,9 @@ func encode(prefix, s string) (string, error) {
q := delta
for k := base; ; k += base {
t := k - bias
- if t < tmin {
+ if k <= bias {
t = tmin
- } else if t > tmax {
+ } else if k >= bias+tmax {
t = tmax
}
if q < t {
@@ -164,6 +169,15 @@ func encode(prefix, s string) (string, error) {
return string(output), nil
}
+// madd computes a + (b * c), detecting overflow.
+func madd(a, b, c int32) (next int32, overflow bool) {
+ p := int64(b) * int64(c)
+ if p > math.MaxInt32-int64(a) {
+ return 0, true
+ }
+ return a + int32(p), false
+}
+
func decodeDigit(x byte) (digit int32, ok bool) {
switch {
case '0' <= x && x <= '9':
diff --git a/cluster-autoscaler/vendor/golang.org/x/oauth2/google/google.go b/cluster-autoscaler/vendor/golang.org/x/oauth2/google/google.go
index 422ff1fe34c6..ccc23ee0aef6 100644
--- a/cluster-autoscaler/vendor/golang.org/x/oauth2/google/google.go
+++ b/cluster-autoscaler/vendor/golang.org/x/oauth2/google/google.go
@@ -92,9 +92,10 @@ func JWTConfigFromJSON(jsonKey []byte, scope ...string) (*jwt.Config, error) {
// JSON key file types.
const (
- serviceAccountKey = "service_account"
- userCredentialsKey = "authorized_user"
- externalAccountKey = "external_account"
+ serviceAccountKey = "service_account"
+ userCredentialsKey = "authorized_user"
+ externalAccountKey = "external_account"
+ impersonatedServiceAccount = "impersonated_service_account"
)
// credentialsFile is the unmarshalled representation of a credentials file.
@@ -121,8 +122,13 @@ type credentialsFile struct {
TokenURLExternal string `json:"token_url"`
TokenInfoURL string `json:"token_info_url"`
ServiceAccountImpersonationURL string `json:"service_account_impersonation_url"`
+ Delegates []string `json:"delegates"`
CredentialSource externalaccount.CredentialSource `json:"credential_source"`
QuotaProjectID string `json:"quota_project_id"`
+ WorkforcePoolUserProject string `json:"workforce_pool_user_project"`
+
+ // Service account impersonation
+ SourceCredentials *credentialsFile `json:"source_credentials"`
}
func (f *credentialsFile) jwtConfig(scopes []string, subject string) *jwt.Config {
@@ -176,8 +182,26 @@ func (f *credentialsFile) tokenSource(ctx context.Context, params CredentialsPar
CredentialSource: f.CredentialSource,
QuotaProjectID: f.QuotaProjectID,
Scopes: params.Scopes,
+ WorkforcePoolUserProject: f.WorkforcePoolUserProject,
}
return cfg.TokenSource(ctx)
+ case impersonatedServiceAccount:
+ if f.ServiceAccountImpersonationURL == "" || f.SourceCredentials == nil {
+ return nil, errors.New("missing 'source_credentials' field or 'service_account_impersonation_url' in credentials")
+ }
+
+ ts, err := f.SourceCredentials.tokenSource(ctx, params)
+ if err != nil {
+ return nil, err
+ }
+ imp := externalaccount.ImpersonateTokenSource{
+ Ctx: ctx,
+ URL: f.ServiceAccountImpersonationURL,
+ Scopes: params.Scopes,
+ Ts: ts,
+ Delegates: f.Delegates,
+ }
+ return oauth2.ReuseTokenSource(nil, imp), nil
case "":
return nil, errors.New("missing 'type' field in credentials")
default:
diff --git a/cluster-autoscaler/vendor/golang.org/x/oauth2/google/internal/externalaccount/basecredentials.go b/cluster-autoscaler/vendor/golang.org/x/oauth2/google/internal/externalaccount/basecredentials.go
index dab917f39ef2..bc3ce53172ae 100644
--- a/cluster-autoscaler/vendor/golang.org/x/oauth2/google/internal/externalaccount/basecredentials.go
+++ b/cluster-autoscaler/vendor/golang.org/x/oauth2/google/internal/externalaccount/basecredentials.go
@@ -53,6 +53,11 @@ type Config struct {
QuotaProjectID string
// Scopes contains the desired scopes for the returned access token.
Scopes []string
+ // The optional workforce pool user project number when the credential
+ // corresponds to a workforce pool and not a workload identity pool.
+ // The underlying principal must still have serviceusage.services.use IAM
+ // permission to use the project for billing/quota.
+ WorkforcePoolUserProject string
}
// Each element consists of a list of patterns. validateURLs checks for matches
@@ -73,6 +78,7 @@ var (
regexp.MustCompile(`^iamcredentials\.[^\.\s\/\\]+\.googleapis\.com$`),
regexp.MustCompile(`^[^\.\s\/\\]+-iamcredentials\.googleapis\.com$`),
}
+ validWorkforceAudiencePattern *regexp.Regexp = regexp.MustCompile(`//iam\.googleapis\.com/locations/[^/]+/workforcePools/`)
)
func validateURL(input string, patterns []*regexp.Regexp, scheme string) bool {
@@ -86,14 +92,17 @@ func validateURL(input string, patterns []*regexp.Regexp, scheme string) bool {
toTest := parsed.Host
for _, pattern := range patterns {
-
- if valid := pattern.MatchString(toTest); valid {
+ if pattern.MatchString(toTest) {
return true
}
}
return false
}
+func validateWorkforceAudience(input string) bool {
+ return validWorkforceAudiencePattern.MatchString(input)
+}
+
// TokenSource Returns an external account TokenSource struct. This is to be called by package google to construct a google.Credentials.
func (c *Config) TokenSource(ctx context.Context) (oauth2.TokenSource, error) {
return c.tokenSource(ctx, validTokenURLPatterns, validImpersonateURLPatterns, "https")
@@ -115,6 +124,13 @@ func (c *Config) tokenSource(ctx context.Context, tokenURLValidPats []*regexp.Re
}
}
+ if c.WorkforcePoolUserProject != "" {
+ valid := validateWorkforceAudience(c.Audience)
+ if !valid {
+ return nil, fmt.Errorf("oauth2/google: workforce_pool_user_project should not be set for non-workforce pool credentials")
+ }
+ }
+
ts := tokenSource{
ctx: ctx,
conf: c,
@@ -124,11 +140,11 @@ func (c *Config) tokenSource(ctx context.Context, tokenURLValidPats []*regexp.Re
}
scopes := c.Scopes
ts.conf.Scopes = []string{"https://www.googleapis.com/auth/cloud-platform"}
- imp := impersonateTokenSource{
- ctx: ctx,
- url: c.ServiceAccountImpersonationURL,
- scopes: scopes,
- ts: oauth2.ReuseTokenSource(nil, ts),
+ imp := ImpersonateTokenSource{
+ Ctx: ctx,
+ URL: c.ServiceAccountImpersonationURL,
+ Scopes: scopes,
+ Ts: oauth2.ReuseTokenSource(nil, ts),
}
return oauth2.ReuseTokenSource(nil, imp), nil
}
@@ -224,7 +240,15 @@ func (ts tokenSource) Token() (*oauth2.Token, error) {
ClientID: conf.ClientID,
ClientSecret: conf.ClientSecret,
}
- stsResp, err := exchangeToken(ts.ctx, conf.TokenURL, &stsRequest, clientAuth, header, nil)
+ var options map[string]interface{}
+ // Do not pass workforce_pool_user_project when client authentication is used.
+ // The client ID is sufficient for determining the user project.
+ if conf.WorkforcePoolUserProject != "" && conf.ClientID == "" {
+ options = map[string]interface{}{
+ "userProject": conf.WorkforcePoolUserProject,
+ }
+ }
+ stsResp, err := exchangeToken(ts.ctx, conf.TokenURL, &stsRequest, clientAuth, header, options)
if err != nil {
return nil, err
}
diff --git a/cluster-autoscaler/vendor/golang.org/x/oauth2/google/internal/externalaccount/impersonate.go b/cluster-autoscaler/vendor/golang.org/x/oauth2/google/internal/externalaccount/impersonate.go
index 64edb5600135..8251fc85e005 100644
--- a/cluster-autoscaler/vendor/golang.org/x/oauth2/google/internal/externalaccount/impersonate.go
+++ b/cluster-autoscaler/vendor/golang.org/x/oauth2/google/internal/externalaccount/impersonate.go
@@ -29,30 +29,44 @@ type impersonateTokenResponse struct {
ExpireTime string `json:"expireTime"`
}
-type impersonateTokenSource struct {
- ctx context.Context
- ts oauth2.TokenSource
+// ImpersonateTokenSource uses a source credential, stored in Ts, to request an access token to the provided URL.
+// Scopes can be defined when the access token is requested.
+type ImpersonateTokenSource struct {
+ // Ctx is the execution context of the impersonation process
+ // used to perform http call to the URL. Required
+ Ctx context.Context
+ // Ts is the source credential used to generate a token on the
+ // impersonated service account. Required.
+ Ts oauth2.TokenSource
- url string
- scopes []string
+ // URL is the endpoint to call to generate a token
+ // on behalf the service account. Required.
+ URL string
+ // Scopes that the impersonated credential should have. Required.
+ Scopes []string
+ // Delegates are the service account email addresses in a delegation chain.
+ // Each service account must be granted roles/iam.serviceAccountTokenCreator
+ // on the next service account in the chain. Optional.
+ Delegates []string
}
// Token performs the exchange to get a temporary service account token to allow access to GCP.
-func (its impersonateTokenSource) Token() (*oauth2.Token, error) {
+func (its ImpersonateTokenSource) Token() (*oauth2.Token, error) {
reqBody := generateAccessTokenReq{
- Lifetime: "3600s",
- Scope: its.scopes,
+ Lifetime: "3600s",
+ Scope: its.Scopes,
+ Delegates: its.Delegates,
}
b, err := json.Marshal(reqBody)
if err != nil {
return nil, fmt.Errorf("oauth2/google: unable to marshal request: %v", err)
}
- client := oauth2.NewClient(its.ctx, its.ts)
- req, err := http.NewRequest("POST", its.url, bytes.NewReader(b))
+ client := oauth2.NewClient(its.Ctx, its.Ts)
+ req, err := http.NewRequest("POST", its.URL, bytes.NewReader(b))
if err != nil {
return nil, fmt.Errorf("oauth2/google: unable to create impersonation request: %v", err)
}
- req = req.WithContext(its.ctx)
+ req = req.WithContext(its.Ctx)
req.Header.Set("Content-Type", "application/json")
resp, err := client.Do(req)
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/cpu/byteorder.go b/cluster-autoscaler/vendor/golang.org/x/sys/cpu/byteorder.go
index dcbb14ef35a4..271055be0b1e 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/cpu/byteorder.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/cpu/byteorder.go
@@ -46,6 +46,7 @@ func hostByteOrder() byteOrder {
case "386", "amd64", "amd64p32",
"alpha",
"arm", "arm64",
+ "loong64",
"mipsle", "mips64le", "mips64p32le",
"nios2",
"ppc64le",
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go b/cluster-autoscaler/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go
index 3298a87e9812..fa7cdb9bcd5f 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go
@@ -15,7 +15,3 @@ func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32)
// xgetbv with ecx = 0 is implemented in cpu_x86.s for gc compiler
// and in cpu_gccgo.c for gccgo.
func xgetbv() (eax, edx uint32)
-
-// darwinSupportsAVX512 is implemented in cpu_x86.s for gc compiler
-// and in cpu_gccgo_x86.go for gccgo.
-func darwinSupportsAVX512() bool
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/cpu/cpu_loong64.go b/cluster-autoscaler/vendor/golang.org/x/sys/cpu/cpu_loong64.go
new file mode 100644
index 000000000000..0f57b05bdbe5
--- /dev/null
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/cpu/cpu_loong64.go
@@ -0,0 +1,13 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build loong64
+// +build loong64
+
+package cpu
+
+const cacheLineSize = 64
+
+func initOptions() {
+}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/cpu/cpu_x86.go b/cluster-autoscaler/vendor/golang.org/x/sys/cpu/cpu_x86.go
index 5ea287b7eca3..f5aacfc825d5 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/cpu/cpu_x86.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/cpu/cpu_x86.go
@@ -90,9 +90,10 @@ func archInit() {
osSupportsAVX = isSet(1, eax) && isSet(2, eax)
if runtime.GOOS == "darwin" {
- // Check darwin commpage for AVX512 support. Necessary because:
- // https://github.com/apple/darwin-xnu/blob/0a798f6738bc1db01281fc08ae024145e84df927/osfmk/i386/fpu.c#L175-L201
- osSupportsAVX512 = osSupportsAVX && darwinSupportsAVX512()
+ // Darwin doesn't save/restore AVX-512 mask registers correctly across signal handlers.
+ // Since users can't rely on mask register contents, let's not advertise AVX-512 support.
+ // See issue 49233.
+ osSupportsAVX512 = false
} else {
// Check if OPMASK and ZMM registers have OS support.
osSupportsAVX512 = osSupportsAVX && isSet(5, eax) && isSet(6, eax) && isSet(7, eax)
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/cpu/cpu_x86.s b/cluster-autoscaler/vendor/golang.org/x/sys/cpu/cpu_x86.s
index b748ba52f7cf..39acab2ff5c2 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/cpu/cpu_x86.s
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/cpu/cpu_x86.s
@@ -26,27 +26,3 @@ TEXT ·xgetbv(SB),NOSPLIT,$0-8
MOVL AX, eax+0(FP)
MOVL DX, edx+4(FP)
RET
-
-// func darwinSupportsAVX512() bool
-TEXT ·darwinSupportsAVX512(SB), NOSPLIT, $0-1
- MOVB $0, ret+0(FP) // default to false
-#ifdef GOOS_darwin // return if not darwin
-#ifdef GOARCH_amd64 // return if not amd64
-// These values from:
-// https://github.com/apple/darwin-xnu/blob/xnu-4570.1.46/osfmk/i386/cpu_capabilities.h
-#define commpage64_base_address 0x00007fffffe00000
-#define commpage64_cpu_capabilities64 (commpage64_base_address+0x010)
-#define commpage64_version (commpage64_base_address+0x01E)
-#define hasAVX512F 0x0000004000000000
- MOVQ $commpage64_version, BX
- CMPW (BX), $13 // cpu_capabilities64 undefined in versions < 13
- JL no_avx512
- MOVQ $commpage64_cpu_capabilities64, BX
- MOVQ $hasAVX512F, CX
- TESTQ (BX), CX
- JZ no_avx512
- MOVB $1, ret+0(FP)
-no_avx512:
-#endif
-#endif
- RET
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go b/cluster-autoscaler/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go
index a864f24d7589..96134157a10d 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go
@@ -5,7 +5,7 @@
// Recreate a getsystemcfg syscall handler instead of
// using the one provided by x/sys/unix to avoid having
// the dependency between them. (See golang.org/issue/32102)
-// Morever, this file will be used during the building of
+// Moreover, this file will be used during the building of
// gccgo's libgo and thus must not used a CGo method.
//go:build aix && gccgo
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/plan9/pwd_go15_plan9.go b/cluster-autoscaler/vendor/golang.org/x/sys/plan9/pwd_go15_plan9.go
index 87ae9d2a33e3..c9b69937a0d0 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/plan9/pwd_go15_plan9.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/plan9/pwd_go15_plan9.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build go1.5
// +build go1.5
package plan9
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/plan9/pwd_plan9.go b/cluster-autoscaler/vendor/golang.org/x/sys/plan9/pwd_plan9.go
index c07c798bc57d..98bf56b7322c 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/plan9/pwd_plan9.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/plan9/pwd_plan9.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build !go1.5
// +build !go1.5
package plan9
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/plan9/race.go b/cluster-autoscaler/vendor/golang.org/x/sys/plan9/race.go
index 42edd93ef962..62377d2ff96c 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/plan9/race.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/plan9/race.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build plan9 && race
// +build plan9,race
package plan9
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/plan9/race0.go b/cluster-autoscaler/vendor/golang.org/x/sys/plan9/race0.go
index c89cf8fc0d71..f8da30876dbf 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/plan9/race0.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/plan9/race0.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build plan9 && !race
// +build plan9,!race
package plan9
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/plan9/str.go b/cluster-autoscaler/vendor/golang.org/x/sys/plan9/str.go
index 4f7f9ad7c86b..55fa8d025eca 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/plan9/str.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/plan9/str.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build plan9
// +build plan9
package plan9
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/plan9/syscall.go b/cluster-autoscaler/vendor/golang.org/x/sys/plan9/syscall.go
index e7363a2f54d5..602473cba374 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/plan9/syscall.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/plan9/syscall.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build plan9
// +build plan9
// Package plan9 contains an interface to the low-level operating system
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/plan9/syscall_plan9.go b/cluster-autoscaler/vendor/golang.org/x/sys/plan9/syscall_plan9.go
index 84e14714811d..723b1f4002aa 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/plan9/syscall_plan9.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/plan9/syscall_plan9.go
@@ -132,8 +132,10 @@ func Pipe(p []int) (err error) {
}
var pp [2]int32
err = pipe(&pp)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
+ if err == nil {
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ }
return
}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go b/cluster-autoscaler/vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go
index 6819bc2094d3..3f40b9bd743e 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -l32 -plan9 -tags plan9,386 syscall_plan9.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build plan9 && 386
// +build plan9,386
package plan9
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go b/cluster-autoscaler/vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go
index 418abbbfc75b..0e6a96aa4fa1 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -l32 -plan9 -tags plan9,amd64 syscall_plan9.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build plan9 && amd64
// +build plan9,amd64
package plan9
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/plan9/zsyscall_plan9_arm.go b/cluster-autoscaler/vendor/golang.org/x/sys/plan9/zsyscall_plan9_arm.go
index 3e8a1a58cac8..244c501b77ba 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/plan9/zsyscall_plan9_arm.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/plan9/zsyscall_plan9_arm.go
@@ -1,6 +1,7 @@
// go run mksyscall.go -l32 -plan9 -tags plan9,arm syscall_plan9.go
// Code generated by the command above; see README.md. DO NOT EDIT.
+//go:build plan9 && arm
// +build plan9,arm
package plan9
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/README.md b/cluster-autoscaler/vendor/golang.org/x/sys/unix/README.md
index 474efad0e03c..7d3c060e1221 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/README.md
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/README.md
@@ -149,7 +149,7 @@ To add a constant, add the header that includes it to the appropriate variable.
Then, edit the regex (if necessary) to match the desired constant. Avoid making
the regex too broad to avoid matching unintended constants.
-### mkmerge.go
+### internal/mkmerge
This program is used to extract duplicate const, func, and type declarations
from the generated architecture-specific files listed below, and merge these
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/asm_linux_loong64.s b/cluster-autoscaler/vendor/golang.org/x/sys/unix/asm_linux_loong64.s
new file mode 100644
index 000000000000..6abd48eef0df
--- /dev/null
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/asm_linux_loong64.s
@@ -0,0 +1,54 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build linux && loong64 && gc
+// +build linux
+// +build loong64
+// +build gc
+
+#include "textflag.h"
+
+
+// Just jump to package syscall's implementation for all these functions.
+// The runtime may know about them.
+
+TEXT ·Syscall(SB),NOSPLIT,$0-56
+ JMP syscall·Syscall(SB)
+
+TEXT ·Syscall6(SB),NOSPLIT,$0-80
+ JMP syscall·Syscall6(SB)
+
+TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
+ JAL runtime·entersyscall(SB)
+ MOVV a1+8(FP), R4
+ MOVV a2+16(FP), R5
+ MOVV a3+24(FP), R6
+ MOVV R0, R7
+ MOVV R0, R8
+ MOVV R0, R9
+ MOVV trap+0(FP), R11 // syscall entry
+ SYSCALL
+ MOVV R4, r1+32(FP)
+ MOVV R5, r2+40(FP)
+ JAL runtime·exitsyscall(SB)
+ RET
+
+TEXT ·RawSyscall(SB),NOSPLIT,$0-56
+ JMP syscall·RawSyscall(SB)
+
+TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
+ JMP syscall·RawSyscall6(SB)
+
+TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
+ MOVV a1+8(FP), R4
+ MOVV a2+16(FP), R5
+ MOVV a3+24(FP), R6
+ MOVV R0, R7
+ MOVV R0, R8
+ MOVV R0, R9
+ MOVV trap+0(FP), R11 // syscall entry
+ SYSCALL
+ MOVV R4, r1+32(FP)
+ MOVV R5, r2+40(FP)
+ RET
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ioctl_linux.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ioctl_linux.go
index 1dadead21e6d..884430b810cc 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ioctl_linux.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ioctl_linux.go
@@ -194,3 +194,26 @@ func ioctlIfreqData(fd int, req uint, value *ifreqData) error {
// identical so pass *IfreqData directly.
return ioctlPtr(fd, req, unsafe.Pointer(value))
}
+
+// IoctlKCMClone attaches a new file descriptor to a multiplexor by cloning an
+// existing KCM socket, returning a structure containing the file descriptor of
+// the new socket.
+func IoctlKCMClone(fd int) (*KCMClone, error) {
+ var info KCMClone
+ if err := ioctlPtr(fd, SIOCKCMCLONE, unsafe.Pointer(&info)); err != nil {
+ return nil, err
+ }
+
+ return &info, nil
+}
+
+// IoctlKCMAttach attaches a TCP socket and associated BPF program file
+// descriptor to a multiplexor.
+func IoctlKCMAttach(fd int, info KCMAttach) error {
+ return ioctlPtr(fd, SIOCKCMATTACH, unsafe.Pointer(&info))
+}
+
+// IoctlKCMUnattach unattaches a TCP socket file descriptor from a multiplexor.
+func IoctlKCMUnattach(fd int, info KCMUnattach) error {
+ return ioctlPtr(fd, SIOCKCMUNATTACH, unsafe.Pointer(&info))
+}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/mkall.sh b/cluster-autoscaler/vendor/golang.org/x/sys/unix/mkall.sh
index 396aadf86de7..ee73623489b0 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/mkall.sh
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/mkall.sh
@@ -50,7 +50,7 @@ if [[ "$GOOS" = "linux" ]]; then
# Use the Docker-based build system
# Files generated through docker (use $cmd so you can Ctl-C the build or run)
$cmd docker build --tag generate:$GOOS $GOOS
- $cmd docker run --interactive --tty --volume $(cd -- "$(dirname -- "$0")" && /bin/pwd):/build generate:$GOOS
+ $cmd docker run --interactive --tty --volume $(cd -- "$(dirname -- "$0")/.." && /bin/pwd):/build generate:$GOOS
exit
fi
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/mkerrors.sh b/cluster-autoscaler/vendor/golang.org/x/sys/unix/mkerrors.sh
index 0bcb8c32260d..d888fb770364 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/mkerrors.sh
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/mkerrors.sh
@@ -54,7 +54,7 @@ includes_AIX='
includes_Darwin='
#define _DARWIN_C_SOURCE
-#define KERNEL
+#define KERNEL 1
#define _DARWIN_USE_64_BIT_INODE
#define __APPLE_USE_RFC_3542
#include
@@ -75,6 +75,7 @@ includes_Darwin='
#include
#include
#include
+#include
#include
#include
#include
@@ -82,6 +83,9 @@ includes_Darwin='
#include
#include
#include
+
+// for backwards compatibility because moved TIOCREMOTE to Kernel.framework after MacOSX12.0.sdk.
+#define TIOCREMOTE 0x80047469
'
includes_DragonFly='
@@ -201,6 +205,7 @@ struct ltchars {
#include
#include
#include
+#include
#include
#include
#include
@@ -210,6 +215,7 @@ struct ltchars {
#include
#include
#include
+#include
#include
#include
#include
@@ -227,13 +233,16 @@ struct ltchars {
#include
#include
#include
+#include
#include
#include
+#include
#include
#include
#include
#include
#include
+#include
#include
#include
#include
@@ -255,6 +264,7 @@ struct ltchars {
#include
#include
#include
+#include
#include
#include
@@ -465,7 +475,6 @@ ccflags="$@"
$2 !~ /^EQUIV_/ &&
$2 !~ /^EXPR_/ &&
$2 !~ /^EVIOC/ &&
- $2 !~ /^EV_/ &&
$2 ~ /^E[A-Z0-9_]+$/ ||
$2 ~ /^B[0-9_]+$/ ||
$2 ~ /^(OLD|NEW)DEV$/ ||
@@ -497,6 +506,8 @@ ccflags="$@"
$2 ~ /^O?XTABS$/ ||
$2 ~ /^TC[IO](ON|OFF)$/ ||
$2 ~ /^IN_/ ||
+ $2 ~ /^KCM/ ||
+ $2 ~ /^LANDLOCK_/ ||
$2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
$2 ~ /^LO_(KEY|NAME)_SIZE$/ ||
$2 ~ /^LOOP_(CLR|CTL|GET|SET)_/ ||
@@ -515,7 +526,7 @@ ccflags="$@"
$2 ~ /^HW_MACHINE$/ ||
$2 ~ /^SYSCTL_VERS/ ||
$2 !~ "MNT_BITS" &&
- $2 ~ /^(MS|MNT|UMOUNT)_/ ||
+ $2 ~ /^(MS|MNT|MOUNT|UMOUNT)_/ ||
$2 ~ /^NS_GET_/ ||
$2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
$2 ~ /^(O|F|[ES]?FD|NAME|S|PTRACE|PT|TFD)_/ ||
@@ -590,8 +601,10 @@ ccflags="$@"
$2 ~ /^DEVLINK_/ ||
$2 ~ /^ETHTOOL_/ ||
$2 ~ /^LWTUNNEL_IP/ ||
+ $2 ~ /^ITIMER_/ ||
$2 !~ "WMESGLEN" &&
$2 ~ /^W[A-Z0-9]+$/ ||
+ $2 ~ /^P_/ ||
$2 ~/^PPPIOC/ ||
$2 ~ /^FAN_|FANOTIFY_/ ||
$2 == "HID_MAX_DESCRIPTOR_SIZE" ||
@@ -600,6 +613,8 @@ ccflags="$@"
$2 ~ /^MTD/ ||
$2 ~ /^OTP/ ||
$2 ~ /^MEM/ ||
+ $2 ~ /^WG/ ||
+ $2 ~ /^FIB_RULE_/ ||
$2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE)/ {printf("\t%s = C.%s\n", $2, $2)}
$2 ~ /^__WCOREFLAG$/ {next}
$2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/sockcmsg_linux.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/sockcmsg_linux.go
index 8bf45705947c..5f63147e06c1 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/sockcmsg_linux.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/sockcmsg_linux.go
@@ -34,3 +34,52 @@ func ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error) {
ucred := *(*Ucred)(unsafe.Pointer(&m.Data[0]))
return &ucred, nil
}
+
+// PktInfo4 encodes Inet4Pktinfo into a socket control message of type IP_PKTINFO.
+func PktInfo4(info *Inet4Pktinfo) []byte {
+ b := make([]byte, CmsgSpace(SizeofInet4Pktinfo))
+ h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
+ h.Level = SOL_IP
+ h.Type = IP_PKTINFO
+ h.SetLen(CmsgLen(SizeofInet4Pktinfo))
+ *(*Inet4Pktinfo)(h.data(0)) = *info
+ return b
+}
+
+// PktInfo6 encodes Inet6Pktinfo into a socket control message of type IPV6_PKTINFO.
+func PktInfo6(info *Inet6Pktinfo) []byte {
+ b := make([]byte, CmsgSpace(SizeofInet6Pktinfo))
+ h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
+ h.Level = SOL_IPV6
+ h.Type = IPV6_PKTINFO
+ h.SetLen(CmsgLen(SizeofInet6Pktinfo))
+ *(*Inet6Pktinfo)(h.data(0)) = *info
+ return b
+}
+
+// ParseOrigDstAddr decodes a socket control message containing the original
+// destination address. To receive such a message the IP_RECVORIGDSTADDR or
+// IPV6_RECVORIGDSTADDR option must be enabled on the socket.
+func ParseOrigDstAddr(m *SocketControlMessage) (Sockaddr, error) {
+ switch {
+ case m.Header.Level == SOL_IP && m.Header.Type == IP_ORIGDSTADDR:
+ pp := (*RawSockaddrInet4)(unsafe.Pointer(&m.Data[0]))
+ sa := new(SockaddrInet4)
+ p := (*[2]byte)(unsafe.Pointer(&pp.Port))
+ sa.Port = int(p[0])<<8 + int(p[1])
+ sa.Addr = pp.Addr
+ return sa, nil
+
+ case m.Header.Level == SOL_IPV6 && m.Header.Type == IPV6_ORIGDSTADDR:
+ pp := (*RawSockaddrInet6)(unsafe.Pointer(&m.Data[0]))
+ sa := new(SockaddrInet6)
+ p := (*[2]byte)(unsafe.Pointer(&pp.Port))
+ sa.Port = int(p[0])<<8 + int(p[1])
+ sa.ZoneId = pp.Scope_id
+ sa.Addr = pp.Addr
+ return sa, nil
+
+ default:
+ return nil, EINVAL
+ }
+}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_aix.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_aix.go
index d8efb715ff1d..f2a114fc27b6 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_aix.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_aix.go
@@ -70,9 +70,7 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
p[0] = byte(sa.Port >> 8)
p[1] = byte(sa.Port)
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
+ sa.raw.Addr = sa.Addr
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
}
@@ -85,9 +83,7 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
p[0] = byte(sa.Port >> 8)
p[1] = byte(sa.Port)
sa.raw.Scope_id = sa.ZoneId
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
+ sa.raw.Addr = sa.Addr
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
}
@@ -219,18 +215,12 @@ func Accept(fd int) (nfd int, sa Sockaddr, err error) {
return
}
-func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
+func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
// Recvmsg not implemented on AIX
- sa := new(SockaddrUnix)
- return -1, -1, -1, sa, ENOSYS
-}
-
-func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
- _, err = SendmsgN(fd, p, oob, to, flags)
- return
+ return -1, -1, -1, ENOSYS
}
-func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
+func sendmsgN(fd int, p, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
// SendmsgN not implemented on AIX
return -1, ENOSYS
}
@@ -261,9 +251,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
sa := new(SockaddrInet4)
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
sa.Port = int(p[0])<<8 + int(p[1])
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
+ sa.Addr = pp.Addr
return sa, nil
case AF_INET6:
@@ -272,9 +260,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
sa.Port = int(p[0])<<8 + int(p[1])
sa.ZoneId = pp.Scope_id
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
+ sa.Addr = pp.Addr
return sa, nil
}
return nil, EAFNOSUPPORT
@@ -385,6 +371,11 @@ func (w WaitStatus) TrapCause() int { return -1 }
//sys fcntl(fd int, cmd int, arg int) (val int, err error)
+//sys fsyncRange(fd int, how int, start int64, length int64) (err error) = fsync_range
+func Fsync(fd int) error {
+ return fsyncRange(fd, O_SYNC, 0, 0)
+}
+
/*
* Direct access
*/
@@ -401,7 +392,6 @@ func (w WaitStatus) TrapCause() int { return -1 }
//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
//sys Fdatasync(fd int) (err error)
-//sys Fsync(fd int) (err error)
// readdir_r
//sysnb Getpgid(pid int) (pgid int, err error)
@@ -462,8 +452,8 @@ func (w WaitStatus) TrapCause() int { return -1 }
//sys Listen(s int, n int) (err error)
//sys lstat(path string, stat *Stat_t) (err error)
//sys Pause() (err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = pread64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = pwrite64
+//sys pread(fd int, p []byte, offset int64) (n int, err error) = pread64
+//sys pwrite(fd int, p []byte, offset int64) (n int, err error) = pwrite64
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
//sys Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
//sysnb Setregid(rgid int, egid int) (err error)
@@ -523,8 +513,10 @@ func Pipe(p []int) (err error) {
}
var pp [2]_C_int
err = pipe(&pp)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
+ if err == nil {
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ }
return
}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_bsd.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_bsd.go
index 95ac3946b5cc..9c87c5f07f8c 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_bsd.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_bsd.go
@@ -163,9 +163,7 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
p[0] = byte(sa.Port >> 8)
p[1] = byte(sa.Port)
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
+ sa.raw.Addr = sa.Addr
return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
}
@@ -179,9 +177,7 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
p[0] = byte(sa.Port >> 8)
p[1] = byte(sa.Port)
sa.raw.Scope_id = sa.ZoneId
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
+ sa.raw.Addr = sa.Addr
return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
}
@@ -210,9 +206,7 @@ func (sa *SockaddrDatalink) sockaddr() (unsafe.Pointer, _Socklen, error) {
sa.raw.Nlen = sa.Nlen
sa.raw.Alen = sa.Alen
sa.raw.Slen = sa.Slen
- for i := 0; i < len(sa.raw.Data); i++ {
- sa.raw.Data[i] = sa.Data[i]
- }
+ sa.raw.Data = sa.Data
return unsafe.Pointer(&sa.raw), SizeofSockaddrDatalink, nil
}
@@ -228,9 +222,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
sa.Nlen = pp.Nlen
sa.Alen = pp.Alen
sa.Slen = pp.Slen
- for i := 0; i < len(sa.Data); i++ {
- sa.Data[i] = pp.Data[i]
- }
+ sa.Data = pp.Data
return sa, nil
case AF_UNIX:
@@ -262,9 +254,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
sa := new(SockaddrInet4)
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
sa.Port = int(p[0])<<8 + int(p[1])
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
+ sa.Addr = pp.Addr
return sa, nil
case AF_INET6:
@@ -273,9 +263,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
sa.Port = int(p[0])<<8 + int(p[1])
sa.ZoneId = pp.Scope_id
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
+ sa.Addr = pp.Addr
return sa, nil
}
return anyToSockaddrGOOS(fd, rsa)
@@ -337,10 +325,9 @@ func GetsockoptString(fd, level, opt int) (string, error) {
//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
-func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
+func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
var msg Msghdr
- var rsa RawSockaddrAny
- msg.Name = (*byte)(unsafe.Pointer(&rsa))
+ msg.Name = (*byte)(unsafe.Pointer(rsa))
msg.Namelen = uint32(SizeofSockaddrAny)
var iov Iovec
if len(p) > 0 {
@@ -364,29 +351,12 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from
}
oobn = int(msg.Controllen)
recvflags = int(msg.Flags)
- // source address is only specified if the socket is unconnected
- if rsa.Addr.Family != AF_UNSPEC {
- from, err = anyToSockaddr(fd, &rsa)
- }
return
}
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
-func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
- _, err = SendmsgN(fd, p, oob, to, flags)
- return
-}
-
-func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
- var ptr unsafe.Pointer
- var salen _Socklen
- if to != nil {
- ptr, salen, err = to.sockaddr()
- if err != nil {
- return 0, err
- }
- }
+func sendmsgN(fd int, p, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
var msg Msghdr
msg.Name = (*byte)(unsafe.Pointer(ptr))
msg.Namelen = uint32(salen)
@@ -583,12 +553,7 @@ func UtimesNano(path string, ts []Timespec) error {
if len(ts) != 2 {
return EINVAL
}
- // Darwin setattrlist can set nanosecond timestamps
- err := setattrlistTimes(path, ts, 0)
- if err != ENOSYS {
- return err
- }
- err = utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
+ err := utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
if err != ENOSYS {
return err
}
@@ -608,10 +573,6 @@ func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {
if len(ts) != 2 {
return EINVAL
}
- err := setattrlistTimes(path, ts, flags)
- if err != ENOSYS {
- return err
- }
return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags)
}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_darwin.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_darwin.go
index 23f6b57606b4..09a25c65321f 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_darwin.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_darwin.go
@@ -48,6 +48,30 @@ func (sa *SockaddrCtl) sockaddr() (unsafe.Pointer, _Socklen, error) {
return unsafe.Pointer(&sa.raw), SizeofSockaddrCtl, nil
}
+// SockaddrVM implements the Sockaddr interface for AF_VSOCK type sockets.
+// SockaddrVM provides access to Darwin VM sockets: a mechanism that enables
+// bidirectional communication between a hypervisor and its guest virtual
+// machines.
+type SockaddrVM struct {
+ // CID and Port specify a context ID and port address for a VM socket.
+ // Guests have a unique CID, and hosts may have a well-known CID of:
+ // - VMADDR_CID_HYPERVISOR: refers to the hypervisor process.
+ // - VMADDR_CID_LOCAL: refers to local communication (loopback).
+ // - VMADDR_CID_HOST: refers to other processes on the host.
+ CID uint32
+ Port uint32
+ raw RawSockaddrVM
+}
+
+func (sa *SockaddrVM) sockaddr() (unsafe.Pointer, _Socklen, error) {
+ sa.raw.Len = SizeofSockaddrVM
+ sa.raw.Family = AF_VSOCK
+ sa.raw.Port = sa.Port
+ sa.raw.Cid = sa.CID
+
+ return unsafe.Pointer(&sa.raw), SizeofSockaddrVM, nil
+}
+
func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
switch rsa.Addr.Family {
case AF_SYSTEM:
@@ -58,6 +82,13 @@ func anyToSockaddrGOOS(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
sa.Unit = pp.Sc_unit
return sa, nil
}
+ case AF_VSOCK:
+ pp := (*RawSockaddrVM)(unsafe.Pointer(rsa))
+ sa := &SockaddrVM{
+ CID: pp.Cid,
+ Port: pp.Port,
+ }
+ return sa, nil
}
return nil, EAFNOSUPPORT
}
@@ -110,16 +141,6 @@ func direntNamlen(buf []byte) (uint64, bool) {
func PtraceAttach(pid int) (err error) { return ptrace(PT_ATTACH, pid, 0, 0) }
func PtraceDetach(pid int) (err error) { return ptrace(PT_DETACH, pid, 0, 0) }
-type attrList struct {
- bitmapCount uint16
- _ uint16
- CommonAttr uint32
- VolAttr uint32
- DirAttr uint32
- FileAttr uint32
- Forkattr uint32
-}
-
//sysnb pipe(p *[2]int32) (err error)
func Pipe(p []int) (err error) {
@@ -128,8 +149,10 @@ func Pipe(p []int) (err error) {
}
var x [2]int32
err = pipe(&x)
- p[0] = int(x[0])
- p[1] = int(x[1])
+ if err == nil {
+ p[0] = int(x[0])
+ p[1] = int(x[1])
+ }
return
}
@@ -249,36 +272,7 @@ func Flistxattr(fd int, dest []byte) (sz int, err error) {
return flistxattr(fd, xattrPointer(dest), len(dest), 0)
}
-func setattrlistTimes(path string, times []Timespec, flags int) error {
- _p0, err := BytePtrFromString(path)
- if err != nil {
- return err
- }
-
- var attrList attrList
- attrList.bitmapCount = ATTR_BIT_MAP_COUNT
- attrList.CommonAttr = ATTR_CMN_MODTIME | ATTR_CMN_ACCTIME
-
- // order is mtime, atime: the opposite of Chtimes
- attributes := [2]Timespec{times[1], times[0]}
- options := 0
- if flags&AT_SYMLINK_NOFOLLOW != 0 {
- options |= FSOPT_NOFOLLOW
- }
- return setattrlist(
- _p0,
- unsafe.Pointer(&attrList),
- unsafe.Pointer(&attributes),
- unsafe.Sizeof(attributes),
- options)
-}
-
-//sys setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error)
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) error {
- // Darwin doesn't support SYS_UTIMENSAT
- return ENOSYS
-}
+//sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)
/*
* Wrapped
@@ -399,8 +393,25 @@ func GetsockoptXucred(fd, level, opt int) (*Xucred, error) {
return x, err
}
-func SysctlKinfoProcSlice(name string) ([]KinfoProc, error) {
- mib, err := sysctlmib(name)
+func SysctlKinfoProc(name string, args ...int) (*KinfoProc, error) {
+ mib, err := sysctlmib(name, args...)
+ if err != nil {
+ return nil, err
+ }
+
+ var kinfo KinfoProc
+ n := uintptr(SizeofKinfoProc)
+ if err := sysctl(mib, (*byte)(unsafe.Pointer(&kinfo)), &n, nil, 0); err != nil {
+ return nil, err
+ }
+ if n != SizeofKinfoProc {
+ return nil, EIO
+ }
+ return &kinfo, nil
+}
+
+func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) {
+ mib, err := sysctlmib(name, args...)
if err != nil {
return nil, err
}
@@ -433,6 +444,11 @@ func SysctlKinfoProcSlice(name string) ([]KinfoProc, error) {
//sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error)
+//sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error)
+//sys shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error)
+//sys shmdt(addr uintptr) (err error)
+//sys shmget(key int, size int, flag int) (id int, err error)
+
/*
* Exposed directly
*/
@@ -491,8 +507,8 @@ func SysctlKinfoProcSlice(name string) ([]KinfoProc, error) {
//sys Open(path string, mode int, perm uint32) (fd int, err error)
//sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error)
//sys Pathconf(path string, name int) (val int, err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error)
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
+//sys pread(fd int, p []byte, offset int64) (n int, err error)
+//sys pwrite(fd int, p []byte, offset int64) (n int, err error)
//sys read(fd int, p []byte) (n int, err error)
//sys Readlink(path string, buf []byte) (n int, err error)
//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
@@ -590,10 +606,6 @@ func SysctlKinfoProcSlice(name string) ([]KinfoProc, error) {
// Msgget
// Msgsnd
// Msgrcv
-// Shmat
-// Shmctl
-// Shmdt
-// Shmget
// Shm_open
// Shm_unlink
// Sem_open
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_dragonfly.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
index 5af108a50385..c61e27498000 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
@@ -101,7 +101,10 @@ func Pipe(p []int) (err error) {
if len(p) != 2 {
return EINVAL
}
- p[0], p[1], err = pipe()
+ r, w, err := pipe()
+ if err == nil {
+ p[0], p[1] = r, w
+ }
return
}
@@ -114,17 +117,20 @@ func Pipe2(p []int, flags int) (err error) {
var pp [2]_C_int
// pipe2 on dragonfly takes an fds array as an argument, but still
// returns the file descriptors.
- p[0], p[1], err = pipe2(&pp, flags)
+ r, w, err := pipe2(&pp, flags)
+ if err == nil {
+ p[0], p[1] = r, w
+ }
return err
}
//sys extpread(fd int, p []byte, flags int, offset int64) (n int, err error)
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
return extpread(fd, p, 0, offset)
}
//sys extpwrite(fd int, p []byte, flags int, offset int64) (n int, err error)
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
return extpwrite(fd, p, 0, offset)
}
@@ -163,11 +169,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
return
}
-func setattrlistTimes(path string, times []Timespec, flags int) error {
- // used on Darwin for UtimesNano
- return ENOSYS
-}
-
//sys ioctl(fd int, req uint, arg uintptr) (err error)
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_freebsd.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_freebsd.go
index 18c392cf3692..6f6c510f4130 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_freebsd.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_freebsd.go
@@ -110,8 +110,10 @@ func Pipe2(p []int, flags int) error {
}
var pp [2]_C_int
err := pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
+ if err == nil {
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ }
return err
}
@@ -192,11 +194,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
return
}
-func setattrlistTimes(path string, times []Timespec, flags int) error {
- // used on Darwin for UtimesNano
- return ENOSYS
-}
-
//sys ioctl(fd int, req uint, arg uintptr) (err error)
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
@@ -636,8 +633,8 @@ func PtraceSingleStep(pid int) (err error) {
//sys Open(path string, mode int, perm uint32) (fd int, err error)
//sys Openat(fdat int, path string, mode int, perm uint32) (fd int, err error)
//sys Pathconf(path string, name int) (val int, err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error)
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
+//sys pread(fd int, p []byte, offset int64) (n int, err error)
+//sys pwrite(fd int, p []byte, offset int64) (n int, err error)
//sys read(fd int, p []byte) (n int, err error)
//sys Readlink(path string, buf []byte) (n int, err error)
//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_illumos.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_illumos.go
index 8c5357683527..8d5f294c4250 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_illumos.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_illumos.go
@@ -162,6 +162,14 @@ func (l *Lifreq) GetLifruInt() int {
return *(*int)(unsafe.Pointer(&l.Lifru[0]))
}
+func (l *Lifreq) SetLifruUint(d uint) {
+ *(*uint)(unsafe.Pointer(&l.Lifru[0])) = d
+}
+
+func (l *Lifreq) GetLifruUint() uint {
+ return *(*uint)(unsafe.Pointer(&l.Lifru[0]))
+}
+
func IoctlLifreq(fd int, req uint, l *Lifreq) error {
return ioctl(fd, req, uintptr(unsafe.Pointer(l)))
}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux.go
index 2839435e3db3..d251dafae001 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux.go
@@ -13,8 +13,8 @@ package unix
import (
"encoding/binary"
- "runtime"
"syscall"
+ "time"
"unsafe"
)
@@ -38,6 +38,13 @@ func Creat(path string, mode uint32) (fd int, err error) {
return Open(path, O_CREAT|O_WRONLY|O_TRUNC, mode)
}
+func EpollCreate(size int) (fd int, err error) {
+ if size <= 0 {
+ return -1, EINVAL
+ }
+ return EpollCreate1(0)
+}
+
//sys FanotifyInit(flags uint, event_f_flags uint) (fd int, err error)
//sys fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error)
@@ -66,6 +73,10 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
return fchmodat(dirfd, path, mode)
}
+func InotifyInit() (fd int, err error) {
+ return InotifyInit1(0)
+}
+
//sys ioctl(fd int, req uint, arg uintptr) (err error) = SYS_IOCTL
//sys ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL
@@ -109,6 +120,25 @@ func Openat2(dirfd int, path string, how *OpenHow) (fd int, err error) {
return openat2(dirfd, path, how, SizeofOpenHow)
}
+func Pipe(p []int) error {
+ return Pipe2(p, 0)
+}
+
+//sysnb pipe2(p *[2]_C_int, flags int) (err error)
+
+func Pipe2(p []int, flags int) error {
+ if len(p) != 2 {
+ return EINVAL
+ }
+ var pp [2]_C_int
+ err := pipe2(&pp, flags)
+ if err == nil {
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ }
+ return err
+}
+
//sys ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
@@ -118,6 +148,15 @@ func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error
return ppoll(&fds[0], len(fds), timeout, sigmask)
}
+func Poll(fds []PollFd, timeout int) (n int, err error) {
+ var ts *Timespec
+ if timeout >= 0 {
+ ts = new(Timespec)
+ *ts = NsecToTimespec(int64(timeout) * 1e6)
+ }
+ return Ppoll(fds, ts, nil)
+}
+
//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
func Readlink(path string, buf []byte) (n int, err error) {
@@ -168,27 +207,7 @@ func Utimes(path string, tv []Timeval) error {
//sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)
func UtimesNano(path string, ts []Timespec) error {
- if ts == nil {
- err := utimensat(AT_FDCWD, path, nil, 0)
- if err != ENOSYS {
- return err
- }
- return utimes(path, nil)
- }
- if len(ts) != 2 {
- return EINVAL
- }
- err := utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
- if err != ENOSYS {
- return err
- }
- // If the utimensat syscall isn't available (utimensat was added to Linux
- // in 2.6.22, Released, 8 July 2007) then fall back to utimes
- var tv [2]Timeval
- for i := 0; i < 2; i++ {
- tv[i] = NsecToTimeval(TimespecToNsec(ts[i]))
- }
- return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
+ return UtimesNanoAt(AT_FDCWD, path, ts, 0)
}
func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {
@@ -231,6 +250,13 @@ func Getwd() (wd string, err error) {
if n < 1 || n > len(buf) || buf[n-1] != 0 {
return "", EINVAL
}
+ // In some cases, Linux can return a path that starts with the
+ // "(unreachable)" prefix, which can potentially be a valid relative
+ // path. To work around that, return ENOENT if path is not absolute.
+ if buf[0] != '/' {
+ return "", ENOENT
+ }
+
return string(buf[0 : n-1]), nil
}
@@ -340,6 +366,8 @@ func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int,
return
}
+//sys Waitid(idType int, id int, info *Siginfo, options int, rusage *Rusage) (err error)
+
func Mkfifo(path string, mode uint32) error {
return Mknod(path, mode|S_IFIFO, 0)
}
@@ -356,9 +384,7 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
p[0] = byte(sa.Port >> 8)
p[1] = byte(sa.Port)
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
+ sa.raw.Addr = sa.Addr
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
}
@@ -371,9 +397,7 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
p[0] = byte(sa.Port >> 8)
p[1] = byte(sa.Port)
sa.raw.Scope_id = sa.ZoneId
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
+ sa.raw.Addr = sa.Addr
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
}
@@ -422,9 +446,7 @@ func (sa *SockaddrLinklayer) sockaddr() (unsafe.Pointer, _Socklen, error) {
sa.raw.Hatype = sa.Hatype
sa.raw.Pkttype = sa.Pkttype
sa.raw.Halen = sa.Halen
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
+ sa.raw.Addr = sa.Addr
return unsafe.Pointer(&sa.raw), SizeofSockaddrLinklayer, nil
}
@@ -839,12 +861,10 @@ func (sa *SockaddrTIPC) sockaddr() (unsafe.Pointer, _Socklen, error) {
if sa.Addr == nil {
return nil, 0, EINVAL
}
-
sa.raw.Family = AF_TIPC
sa.raw.Scope = int8(sa.Scope)
sa.raw.Addrtype = sa.Addr.tipcAddrtype()
sa.raw.Addr = sa.Addr.tipcAddr()
-
return unsafe.Pointer(&sa.raw), SizeofSockaddrTIPC, nil
}
@@ -858,9 +878,7 @@ type SockaddrL2TPIP struct {
func (sa *SockaddrL2TPIP) sockaddr() (unsafe.Pointer, _Socklen, error) {
sa.raw.Family = AF_INET
sa.raw.Conn_id = sa.ConnId
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
+ sa.raw.Addr = sa.Addr
return unsafe.Pointer(&sa.raw), SizeofSockaddrL2TPIP, nil
}
@@ -876,9 +894,7 @@ func (sa *SockaddrL2TPIP6) sockaddr() (unsafe.Pointer, _Socklen, error) {
sa.raw.Family = AF_INET6
sa.raw.Conn_id = sa.ConnId
sa.raw.Scope_id = sa.ZoneId
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
+ sa.raw.Addr = sa.Addr
return unsafe.Pointer(&sa.raw), SizeofSockaddrL2TPIP6, nil
}
@@ -974,9 +990,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
sa.Hatype = pp.Hatype
sa.Pkttype = pp.Pkttype
sa.Halen = pp.Halen
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
+ sa.Addr = pp.Addr
return sa, nil
case AF_UNIX:
@@ -1015,18 +1029,14 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
pp := (*RawSockaddrL2TPIP)(unsafe.Pointer(rsa))
sa := new(SockaddrL2TPIP)
sa.ConnId = pp.Conn_id
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
+ sa.Addr = pp.Addr
return sa, nil
default:
pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
sa := new(SockaddrInet4)
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
sa.Port = int(p[0])<<8 + int(p[1])
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
+ sa.Addr = pp.Addr
return sa, nil
}
@@ -1042,9 +1052,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
sa := new(SockaddrL2TPIP6)
sa.ConnId = pp.Conn_id
sa.ZoneId = pp.Scope_id
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
+ sa.Addr = pp.Addr
return sa, nil
default:
pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
@@ -1052,9 +1060,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
sa.Port = int(p[0])<<8 + int(p[1])
sa.ZoneId = pp.Scope_id
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
+ sa.Addr = pp.Addr
return sa, nil
}
@@ -1229,11 +1235,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
func Accept(fd int) (nfd int, sa Sockaddr, err error) {
var rsa RawSockaddrAny
var len _Socklen = SizeofSockaddrAny
- // Try accept4 first for Android, then try accept for kernel older than 2.6.28
nfd, err = accept4(fd, &rsa, &len, 0)
- if err == ENOSYS {
- nfd, err = accept(fd, &rsa, &len)
- }
if err != nil {
return
}
@@ -1497,10 +1499,9 @@ func KeyctlRestrictKeyring(ringid int, keyType string, restriction string) error
//sys keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) = SYS_KEYCTL
//sys keyctlRestrictKeyring(cmd int, arg2 int) (err error) = SYS_KEYCTL
-func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
+func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
var msg Msghdr
- var rsa RawSockaddrAny
- msg.Name = (*byte)(unsafe.Pointer(&rsa))
+ msg.Name = (*byte)(unsafe.Pointer(rsa))
msg.Namelen = uint32(SizeofSockaddrAny)
var iov Iovec
if len(p) > 0 {
@@ -1531,28 +1532,10 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from
}
oobn = int(msg.Controllen)
recvflags = int(msg.Flags)
- // source address is only specified if the socket is unconnected
- if rsa.Addr.Family != AF_UNSPEC {
- from, err = anyToSockaddr(fd, &rsa)
- }
- return
-}
-
-func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
- _, err = SendmsgN(fd, p, oob, to, flags)
return
}
-func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
- var ptr unsafe.Pointer
- var salen _Socklen
- if to != nil {
- var err error
- ptr, salen, err = to.sockaddr()
- if err != nil {
- return 0, err
- }
- }
+func sendmsgN(fd int, p, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
var msg Msghdr
msg.Name = (*byte)(ptr)
msg.Namelen = uint32(salen)
@@ -1785,6 +1768,16 @@ func Mount(source string, target string, fstype string, flags uintptr, data stri
return mount(source, target, fstype, flags, datap)
}
+//sys mountSetattr(dirfd int, pathname string, flags uint, attr *MountAttr, size uintptr) (err error) = SYS_MOUNT_SETATTR
+
+// MountSetattr is a wrapper for mount_setattr(2).
+// https://man7.org/linux/man-pages/man2/mount_setattr.2.html
+//
+// Requires kernel >= 5.12.
+func MountSetattr(dirfd int, pathname string, flags uint, attr *MountAttr) error {
+ return mountSetattr(dirfd, pathname, flags, attr, unsafe.Sizeof(*attr))
+}
+
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
if raceenabled {
raceReleaseMerge(unsafe.Pointer(&ioSync))
@@ -1816,11 +1809,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys Dup(oldfd int) (fd int, err error)
func Dup2(oldfd, newfd int) error {
- // Android O and newer blocks dup2; riscv and arm64 don't implement dup2.
- if runtime.GOOS == "android" || runtime.GOARCH == "riscv64" || runtime.GOARCH == "arm64" {
- return Dup3(oldfd, newfd, 0)
- }
- return dup2(oldfd, newfd)
+ return Dup3(oldfd, newfd, 0)
}
//sys Dup3(oldfd int, newfd int, flags int) (err error)
@@ -1840,6 +1829,9 @@ func Dup2(oldfd, newfd int) error {
//sys Fremovexattr(fd int, attr string) (err error)
//sys Fsetxattr(fd int, attr string, dest []byte, flags int) (err error)
//sys Fsync(fd int) (err error)
+//sys Fsmount(fd int, flags int, mountAttrs int) (fsfd int, err error)
+//sys Fsopen(fsName string, flags int) (fd int, err error)
+//sys Fspick(dirfd int, pathName string, flags int) (fd int, err error)
//sys Getdents(fd int, buf []byte) (n int, err error) = SYS_GETDENTS64
//sysnb Getpgid(pid int) (pgid int, err error)
@@ -1870,7 +1862,9 @@ func Getpgrp() (pid int) {
//sys MemfdCreate(name string, flags int) (fd int, err error)
//sys Mkdirat(dirfd int, path string, mode uint32) (err error)
//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
+//sys MoveMount(fromDirfd int, fromPathName string, toDirfd int, toPathName string, flags int) (err error)
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
+//sys OpenTree(dfd int, fileName string, flags uint) (r int, err error)
//sys PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error)
//sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT
//sysnb Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT64
@@ -2195,7 +2189,7 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
gid = Getgid()
}
- if uint32(gid) == st.Gid || isGroupMember(gid) {
+ if uint32(gid) == st.Gid || isGroupMember(int(st.Gid)) {
fmode = (st.Mode >> 3) & 7
} else {
fmode = st.Mode & 7
@@ -2308,11 +2302,65 @@ type RemoteIovec struct {
//sys ProcessVMReadv(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) = SYS_PROCESS_VM_READV
//sys ProcessVMWritev(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags uint) (n int, err error) = SYS_PROCESS_VM_WRITEV
+//sys PidfdOpen(pid int, flags int) (fd int, err error) = SYS_PIDFD_OPEN
+//sys PidfdGetfd(pidfd int, targetfd int, flags int) (fd int, err error) = SYS_PIDFD_GETFD
+//sys PidfdSendSignal(pidfd int, sig Signal, info *Siginfo, flags int) (err error) = SYS_PIDFD_SEND_SIGNAL
+
+//sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error)
+//sys shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error)
+//sys shmdt(addr uintptr) (err error)
+//sys shmget(key int, size int, flag int) (id int, err error)
+
+//sys getitimer(which int, currValue *Itimerval) (err error)
+//sys setitimer(which int, newValue *Itimerval, oldValue *Itimerval) (err error)
+
+// MakeItimerval creates an Itimerval from interval and value durations.
+func MakeItimerval(interval, value time.Duration) Itimerval {
+ return Itimerval{
+ Interval: NsecToTimeval(interval.Nanoseconds()),
+ Value: NsecToTimeval(value.Nanoseconds()),
+ }
+}
+
+// A value which may be passed to the which parameter for Getitimer and
+// Setitimer.
+type ItimerWhich int
+
+// Possible which values for Getitimer and Setitimer.
+const (
+ ItimerReal ItimerWhich = ITIMER_REAL
+ ItimerVirtual ItimerWhich = ITIMER_VIRTUAL
+ ItimerProf ItimerWhich = ITIMER_PROF
+)
+
+// Getitimer wraps getitimer(2) to return the current value of the timer
+// specified by which.
+func Getitimer(which ItimerWhich) (Itimerval, error) {
+ var it Itimerval
+ if err := getitimer(int(which), &it); err != nil {
+ return Itimerval{}, err
+ }
+
+ return it, nil
+}
+
+// Setitimer wraps setitimer(2) to arm or disarm the timer specified by which.
+// It returns the previous value of the timer.
+//
+// If the Itimerval argument is the zero value, the timer will be disarmed.
+func Setitimer(which ItimerWhich, it Itimerval) (Itimerval, error) {
+ var prev Itimerval
+ if err := setitimer(int(which), &it, &prev); err != nil {
+ return Itimerval{}, err
+ }
+
+ return prev, nil
+}
+
/*
* Unimplemented
*/
// AfsSyscall
-// Alarm
// ArchPrctl
// Brk
// ClockNanosleep
@@ -2328,7 +2376,6 @@ type RemoteIovec struct {
// GetMempolicy
// GetRobustList
// GetThreadArea
-// Getitimer
// Getpmsg
// IoCancel
// IoDestroy
@@ -2389,10 +2436,6 @@ type RemoteIovec struct {
// SetRobustList
// SetThreadArea
// SetTidAddress
-// Shmat
-// Shmctl
-// Shmdt
-// Shmget
// Sigaltstack
// Swapoff
// Swapon
@@ -2410,5 +2453,4 @@ type RemoteIovec struct {
// Vfork
// Vhangup
// Vserver
-// Waitid
// _Sysctl
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_386.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_386.go
index 91317d749a9b..518e476e6dda 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_386.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_386.go
@@ -19,36 +19,8 @@ func setTimeval(sec, usec int64) Timeval {
return Timeval{Sec: int32(sec), Usec: int32(usec)}
}
-//sysnb pipe(p *[2]_C_int) (err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe(&pp)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
// 64-bit file system and 32-bit uid calls
// (386 default is 32-bit file system and 16-bit uid).
-//sys dup2(oldfd int, newfd int) (err error)
-//sysnb EpollCreate(size int) (fd int, err error)
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64_64
//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
@@ -59,13 +31,12 @@ func Pipe2(p []int, flags int) (err error) {
//sysnb Geteuid() (euid int) = SYS_GETEUID32
//sysnb Getgid() (gid int) = SYS_GETGID32
//sysnb Getuid() (uid int) = SYS_GETUID32
-//sysnb InotifyInit() (fd int, err error)
//sys Ioperm(from int, num int, on int) (err error)
//sys Iopl(level int) (err error)
//sys Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
+//sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
+//sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
//sys setfsgid(gid int) (prev int, err error) = SYS_SETFSGID32
@@ -202,14 +173,6 @@ const (
_SENDMMSG = 20
)
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- fd, e := socketcall(_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
fd, e := socketcall(_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
if e != 0 {
@@ -381,12 +344,3 @@ func (cmsg *Cmsghdr) SetLen(length int) {
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
rsa.Service_name_len = uint32(length)
}
-
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- if len(fds) == 0 {
- return poll(nil, 0, timeout)
- }
- return poll(&fds[0], len(fds), timeout)
-}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_alarm.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_alarm.go
new file mode 100644
index 000000000000..08086ac6a4c4
--- /dev/null
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_alarm.go
@@ -0,0 +1,14 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build linux && (386 || amd64 || mips || mipsle || mips64 || mipsle || ppc64 || ppc64le || ppc || s390x || sparc64)
+// +build linux
+// +build 386 amd64 mips mipsle mips64 mipsle ppc64 ppc64le ppc s390x sparc64
+
+package unix
+
+// SYS_ALARM is not defined on arm or riscv, but is available for other GOARCH
+// values.
+
+//sys Alarm(seconds uint) (remaining uint, err error)
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
index 85cd97da0949..f5e9d6bef109 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
@@ -7,8 +7,6 @@
package unix
-//sys dup2(oldfd int, newfd int) (err error)
-//sysnb EpollCreate(size int) (fd int, err error)
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
//sys Fchown(fd int, uid int, gid int) (err error)
@@ -21,17 +19,6 @@ package unix
//sysnb Getgid() (gid int)
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
//sysnb Getuid() (uid int)
-//sysnb inotifyInit() (fd int, err error)
-
-func InotifyInit() (fd int, err error) {
- // First try inotify_init1, because Android's seccomp policy blocks the latter.
- fd, err = InotifyInit1(0)
- if err == ENOSYS {
- fd, err = inotifyInit()
- }
- return
-}
-
//sys Ioperm(from int, num int, on int) (err error)
//sys Iopl(level int) (err error)
//sys Lchown(path string, uid int, gid int) (err error)
@@ -41,9 +28,10 @@ func Lstat(path string, stat *Stat_t) (err error) {
return Fstatat(AT_FDCWD, path, stat, AT_SYMLINK_NOFOLLOW)
}
+//sys MemfdSecret(flags int) (fd int, err error)
//sys Pause() (err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
+//sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
+//sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
@@ -75,7 +63,6 @@ func Stat(path string, stat *Stat_t) (err error) {
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
//sys Truncate(path string, length int64) (err error)
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
-//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
@@ -126,32 +113,6 @@ func setTimeval(sec, usec int64) Timeval {
return Timeval{Sec: sec, Usec: usec}
}
-//sysnb pipe(p *[2]_C_int) (err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe(&pp)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
func (r *PtraceRegs) PC() uint64 { return r.Rip }
func (r *PtraceRegs) SetPC(pc uint64) { r.Rip = pc }
@@ -176,15 +137,6 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
rsa.Service_name_len = uint64(length)
}
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- if len(fds) == 0 {
- return poll(nil, 0, timeout)
- }
- return poll(&fds[0], len(fds), timeout)
-}
-
//sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_arm.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
index b961a620e942..c1a7778f1050 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
@@ -19,36 +19,6 @@ func setTimeval(sec, usec int64) Timeval {
return Timeval{Sec: int32(sec), Usec: int32(usec)}
}
-//sysnb pipe(p *[2]_C_int) (err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- // Try pipe2 first for Android O, then try pipe for kernel 2.6.23.
- err = pipe2(&pp, 0)
- if err == ENOSYS {
- err = pipe(&pp)
- }
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
newoffset, errno := seek(fd, offset, whence)
if errno != 0 {
@@ -57,7 +27,6 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
return newoffset, nil
}
-//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
@@ -76,8 +45,6 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
// 64-bit file system and 32-bit uid calls
// (16-bit uid calls are not always supported in newer kernels)
-//sys dup2(oldfd int, newfd int) (err error)
-//sysnb EpollCreate(size int) (fd int, err error)
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
@@ -86,7 +53,6 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
//sysnb Geteuid() (euid int) = SYS_GETEUID32
//sysnb Getgid() (gid int) = SYS_GETGID32
//sysnb Getuid() (uid int) = SYS_GETUID32
-//sysnb InotifyInit() (fd int, err error)
//sys Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32
//sys Listen(s int, n int) (err error)
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
@@ -130,8 +96,8 @@ func Utime(path string, buf *Utimbuf) error {
//sys utimes(path string, times *[2]Timeval) (err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
+//sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
+//sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
//sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64
@@ -260,15 +226,6 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
rsa.Service_name_len = uint32(length)
}
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- if len(fds) == 0 {
- return poll(nil, 0, timeout)
- }
- return poll(&fds[0], len(fds), timeout)
-}
-
//sys armSyncFileRange(fd int, flags int, off int64, n int64) (err error) = SYS_ARM_SYNC_FILE_RANGE
func SyncFileRange(fd int, off int64, n int64, flags int) error {
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
index 4b977ba44b27..d83e2c657161 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
@@ -9,13 +9,6 @@ package unix
import "unsafe"
-func EpollCreate(size int) (fd int, err error) {
- if size <= 0 {
- return -1, EINVAL
- }
- return EpollCreate1(0)
-}
-
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
//sys Fchown(fd int, uid int, gid int) (err error)
@@ -29,8 +22,9 @@ func EpollCreate(size int) (fd int, err error) {
//sysnb getrlimit(resource int, rlim *Rlimit) (err error)
//sysnb Getuid() (uid int)
//sys Listen(s int, n int) (err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
+//sys MemfdSecret(flags int) (fd int, err error)
+//sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
+//sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
@@ -73,7 +67,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
return ENOSYS
}
-//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
@@ -145,30 +138,6 @@ func utimes(path string, tv *[2]Timeval) (err error) {
return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
}
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, 0)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
// Getrlimit prefers the prlimit64 system call. See issue 38604.
func Getrlimit(resource int, rlim *Rlimit) error {
err := Prlimit(0, resource, nil, rlim)
@@ -211,31 +180,11 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
rsa.Service_name_len = uint64(length)
}
-func InotifyInit() (fd int, err error) {
- return InotifyInit1(0)
-}
-
-// dup2 exists because func Dup3 in syscall_linux.go references
-// it in an unreachable path. dup2 isn't available on arm64.
-func dup2(oldfd int, newfd int) error
-
func Pause() error {
_, err := ppoll(nil, 0, nil, nil)
return err
}
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- var ts *Timespec
- if timeout >= 0 {
- ts = new(Timespec)
- *ts = NsecToTimespec(int64(timeout) * 1e6)
- }
- if len(fds) == 0 {
- return ppoll(nil, 0, ts, nil)
- }
- return ppoll(&fds[0], len(fds), ts, nil)
-}
-
//sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
index 27aee81d97d4..98a2660b91f7 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
@@ -8,8 +8,6 @@
package unix
-//sys dup2(oldfd int, newfd int) (err error)
-//sysnb EpollCreate(size int) (fd int, err error)
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
//sys Fchown(fd int, uid int, gid int) (err error)
@@ -23,8 +21,8 @@ package unix
//sys Lchown(path string, uid int, gid int) (err error)
//sys Listen(s int, n int) (err error)
//sys Pause() (err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
+//sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
+//sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
@@ -50,7 +48,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
//sys Truncate(path string, length int64) (err error)
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
-//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
@@ -94,30 +91,6 @@ func setTimeval(sec, usec int64) Timeval {
return Timeval{Sec: sec, Usec: usec}
}
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, 0)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
func Ioperm(from int, num int, on int) (err error) {
return ENOSYS
}
@@ -220,16 +193,3 @@ func (cmsg *Cmsghdr) SetLen(length int) {
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
rsa.Service_name_len = uint64(length)
}
-
-func InotifyInit() (fd int, err error) {
- return InotifyInit1(0)
-}
-
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- if len(fds) == 0 {
- return poll(nil, 0, timeout)
- }
- return poll(&fds[0], len(fds), timeout)
-}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
index 21d74e2fbe5a..b8a18c0ad224 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
@@ -15,8 +15,6 @@ import (
func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
-//sys dup2(oldfd int, newfd int) (err error)
-//sysnb EpollCreate(size int) (fd int, err error)
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
//sys Fchown(fd int, uid int, gid int) (err error)
@@ -27,8 +25,8 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
//sysnb Getuid() (uid int)
//sys Lchown(path string, uid int, gid int) (err error)
//sys Listen(s int, n int) (err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
+//sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
+//sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
@@ -43,7 +41,6 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
-//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
@@ -60,7 +57,6 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sysnb InotifyInit() (fd int, err error)
//sys Ioperm(from int, num int, on int) (err error)
//sys Iopl(level int) (err error)
@@ -113,29 +109,6 @@ func setTimeval(sec, usec int64) Timeval {
return Timeval{Sec: int32(sec), Usec: int32(usec)}
}
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe() (p1 int, p2 int, err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- p[0], p[1], err = pipe()
- return
-}
-
//sys mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)
func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
@@ -232,12 +205,3 @@ func (cmsg *Cmsghdr) SetLen(length int) {
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
rsa.Service_name_len = uint32(length)
}
-
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- if len(fds) == 0 {
- return poll(nil, 0, timeout)
- }
- return poll(&fds[0], len(fds), timeout)
-}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
index 6f1fc581ed60..4ed9e67c6dfd 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
@@ -12,8 +12,6 @@ import (
"unsafe"
)
-//sys dup2(oldfd int, newfd int) (err error)
-//sysnb EpollCreate(size int) (fd int, err error)
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fchown(fd int, uid int, gid int) (err error)
//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
@@ -23,15 +21,14 @@ import (
//sysnb Geteuid() (euid int)
//sysnb Getgid() (gid int)
//sysnb Getuid() (uid int)
-//sysnb InotifyInit() (fd int, err error)
//sys Ioperm(from int, num int, on int) (err error)
//sys Iopl(level int) (err error)
//sys Lchown(path string, uid int, gid int) (err error)
//sys Listen(s int, n int) (err error)
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
//sys Pause() (err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
+//sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
+//sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
@@ -46,7 +43,6 @@ import (
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
-//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
@@ -218,41 +214,6 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
rsa.Service_name_len = uint32(length)
}
-//sysnb pipe(p *[2]_C_int) (err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe(&pp)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- if len(fds) == 0 {
- return poll(nil, 0, timeout)
- }
- return poll(&fds[0], len(fds), timeout)
-}
-
//sys syncFileRange2(fd int, flags int, off int64, n int64) (err error) = SYS_SYNC_FILE_RANGE2
func SyncFileRange(fd int, off int64, n int64, flags int) error {
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
index 5259a5feaf45..db63d384c5bc 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
@@ -8,8 +8,6 @@
package unix
-//sys dup2(oldfd int, newfd int) (err error)
-//sysnb EpollCreate(size int) (fd int, err error)
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
//sys Fchown(fd int, uid int, gid int) (err error)
@@ -22,15 +20,14 @@ package unix
//sysnb Getgid() (gid int)
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = SYS_UGETRLIMIT
//sysnb Getuid() (uid int)
-//sysnb InotifyInit() (fd int, err error)
//sys Ioperm(from int, num int, on int) (err error)
//sys Iopl(level int) (err error)
//sys Lchown(path string, uid int, gid int) (err error)
//sys Listen(s int, n int) (err error)
//sys Lstat(path string, stat *Stat_t) (err error)
//sys Pause() (err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
+//sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
+//sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
@@ -48,7 +45,6 @@ package unix
//sys Statfs(path string, buf *Statfs_t) (err error)
//sys Truncate(path string, length int64) (err error)
//sys Ustat(dev int, ubuf *Ustat_t) (err error)
-//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
@@ -104,41 +100,6 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
rsa.Service_name_len = uint64(length)
}
-//sysnb pipe(p *[2]_C_int) (err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe(&pp)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- if len(fds) == 0 {
- return poll(nil, 0, timeout)
- }
- return poll(&fds[0], len(fds), timeout)
-}
-
//sys syncFileRange2(fd int, flags int, off int64, n int64) (err error) = SYS_SYNC_FILE_RANGE2
func SyncFileRange(fd int, off int64, n int64, flags int) error {
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
index 8ef821e5daa8..8ff7adba0392 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
@@ -9,13 +9,6 @@ package unix
import "unsafe"
-func EpollCreate(size int) (fd int, err error) {
- if size <= 0 {
- return -1, EINVAL
- }
- return EpollCreate1(0)
-}
-
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
//sys Fchown(fd int, uid int, gid int) (err error)
@@ -29,8 +22,8 @@ func EpollCreate(size int) (fd int, err error) {
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
//sysnb Getuid() (uid int)
//sys Listen(s int, n int) (err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
+//sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
+//sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
@@ -72,7 +65,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
return ENOSYS
}
-//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
@@ -144,30 +136,6 @@ func utimes(path string, tv *[2]Timeval) (err error) {
return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
}
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, 0)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
func (r *PtraceRegs) PC() uint64 { return r.Pc }
func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc }
@@ -192,27 +160,11 @@ func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
rsa.Service_name_len = uint64(length)
}
-func InotifyInit() (fd int, err error) {
- return InotifyInit1(0)
-}
-
func Pause() error {
_, err := ppoll(nil, 0, nil, nil)
return err
}
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- var ts *Timespec
- if timeout >= 0 {
- ts = new(Timespec)
- *ts = NsecToTimespec(int64(timeout) * 1e6)
- }
- if len(fds) == 0 {
- return ppoll(nil, 0, ts, nil)
- }
- return ppoll(&fds[0], len(fds), ts, nil)
-}
-
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
return Renameat2(olddirfd, oldpath, newdirfd, newpath, 0)
}
@@ -229,7 +181,3 @@ func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error
}
return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
}
-
-// dup2 exists because func Dup3 in syscall_linux.go references
-// it in an unreachable path. dup2 isn't available on arm64.
-func dup2(oldfd int, newfd int) error
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
index a1c0574b584e..6fcf277b0d73 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
@@ -11,8 +11,6 @@ import (
"unsafe"
)
-//sys dup2(oldfd int, newfd int) (err error)
-//sysnb EpollCreate(size int) (fd int, err error)
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
//sys Fchown(fd int, uid int, gid int) (err error)
@@ -25,12 +23,11 @@ import (
//sysnb Getgid() (gid int)
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
//sysnb Getuid() (uid int)
-//sysnb InotifyInit() (fd int, err error)
//sys Lchown(path string, uid int, gid int) (err error)
//sys Lstat(path string, stat *Stat_t) (err error)
//sys Pause() (err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
+//sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
+//sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
@@ -77,30 +74,6 @@ func setTimeval(sec, usec int64) Timeval {
return Timeval{Sec: sec, Usec: usec}
}
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, 0) // pipe2 is the same as pipe when flags are set to 0.
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
func Ioperm(from int, num int, on int) (err error) {
return ENOSYS
}
@@ -172,15 +145,6 @@ const (
netSendMMsg = 20
)
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (int, error) {
- args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))}
- fd, _, err := Syscall(SYS_SOCKETCALL, netAccept, uintptr(unsafe.Pointer(&args)), 0)
- if err != 0 {
- return 0, err
- }
- return int(fd), nil
-}
-
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (int, error) {
args := [4]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags)}
fd, _, err := Syscall(SYS_SOCKETCALL, netAccept4, uintptr(unsafe.Pointer(&args)), 0)
@@ -324,15 +288,6 @@ func Shutdown(s, how int) error {
return nil
}
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- if len(fds) == 0 {
- return poll(nil, 0, timeout)
- }
- return poll(&fds[0], len(fds), timeout)
-}
-
//sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
index de14b8898390..02a45d9cc063 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
@@ -9,7 +9,6 @@ package unix
//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
-//sys dup2(oldfd int, newfd int) (err error)
//sys Fchown(fd int, uid int, gid int) (err error)
//sys Fstat(fd int, stat *Stat_t) (err error)
//sys Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) = SYS_FSTATAT64
@@ -20,13 +19,12 @@ package unix
//sysnb Getgid() (gid int)
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
//sysnb Getuid() (uid int)
-//sysnb InotifyInit() (fd int, err error)
//sys Lchown(path string, uid int, gid int) (err error)
//sys Listen(s int, n int) (err error)
//sys Lstat(path string, stat *Stat_t) (err error)
//sys Pause() (err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
+//sys pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
+//sys pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
@@ -44,7 +42,6 @@ package unix
//sys Statfs(path string, buf *Statfs_t) (err error)
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
//sys Truncate(path string, length int64) (err error)
-//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
@@ -119,38 +116,3 @@ func (cmsg *Cmsghdr) SetLen(length int) {
func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
rsa.Service_name_len = uint64(length)
}
-
-//sysnb pipe(p *[2]_C_int) (err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe(&pp)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- if len(fds) == 0 {
- return poll(nil, 0, timeout)
- }
- return poll(&fds[0], len(fds), timeout)
-}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_netbsd.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_netbsd.go
index 853d5f0f4365..666f0a1b33d2 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_netbsd.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_netbsd.go
@@ -110,14 +110,8 @@ func direntNamlen(buf []byte) (uint64, bool) {
return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
}
-//sysnb pipe() (fd1 int, fd2 int, err error)
-
func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- p[0], p[1], err = pipe()
- return
+ return Pipe2(p, 0)
}
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
@@ -128,8 +122,10 @@ func Pipe2(p []int, flags int) error {
}
var pp [2]_C_int
err := pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
+ if err == nil {
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ }
return err
}
@@ -167,11 +163,6 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
return -1, ENOSYS
}
-func setattrlistTimes(path string, times []Timespec, flags int) error {
- // used on Darwin for UtimesNano
- return ENOSYS
-}
-
//sys ioctl(fd int, req uint, arg uintptr) (err error)
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
@@ -317,8 +308,8 @@ func Statvfs(path string, buf *Statvfs_t) (err error) {
//sys Open(path string, mode int, perm uint32) (fd int, err error)
//sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error)
//sys Pathconf(path string, name int) (val int, err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error)
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
+//sys pread(fd int, p []byte, offset int64) (n int, err error)
+//sys pwrite(fd int, p []byte, offset int64) (n int, err error)
//sys read(fd int, p []byte) (n int, err error)
//sys Readlink(path string, buf []byte) (n int, err error)
//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_openbsd.go
index 22b55038501f..15d637d63ea1 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_openbsd.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_openbsd.go
@@ -87,8 +87,10 @@ func Pipe2(p []int, flags int) error {
}
var pp [2]_C_int
err := pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
+ if err == nil {
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ }
return err
}
@@ -147,11 +149,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
return
}
-func setattrlistTimes(path string, times []Timespec, flags int) error {
- // used on Darwin for UtimesNano
- return ENOSYS
-}
-
//sys ioctl(fd int, req uint, arg uintptr) (err error)
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
@@ -272,8 +269,8 @@ func Uname(uname *Utsname) error {
//sys Open(path string, mode int, perm uint32) (fd int, err error)
//sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error)
//sys Pathconf(path string, name int) (val int, err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error)
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
+//sys pread(fd int, p []byte, offset int64) (n int, err error)
+//sys pwrite(fd int, p []byte, offset int64) (n int, err error)
//sys read(fd int, p []byte) (n int, err error)
//sys Readlink(path string, buf []byte) (n int, err error)
//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_solaris.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_solaris.go
index d2a6495c7e35..5c2003cec654 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_solaris.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_solaris.go
@@ -66,8 +66,10 @@ func Pipe(p []int) (err error) {
if n != 0 {
return err
}
- p[0] = int(pp[0])
- p[1] = int(pp[1])
+ if err == nil {
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ }
return nil
}
@@ -79,8 +81,10 @@ func Pipe2(p []int, flags int) error {
}
var pp [2]_C_int
err := pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
+ if err == nil {
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ }
return err
}
@@ -92,9 +96,7 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
p[0] = byte(sa.Port >> 8)
p[1] = byte(sa.Port)
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
+ sa.raw.Addr = sa.Addr
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
}
@@ -107,9 +109,7 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
p[0] = byte(sa.Port >> 8)
p[1] = byte(sa.Port)
sa.raw.Scope_id = sa.ZoneId
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
+ sa.raw.Addr = sa.Addr
return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
}
@@ -417,9 +417,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
sa := new(SockaddrInet4)
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
sa.Port = int(p[0])<<8 + int(p[1])
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
+ sa.Addr = pp.Addr
return sa, nil
case AF_INET6:
@@ -428,9 +426,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
sa.Port = int(p[0])<<8 + int(p[1])
sa.ZoneId = pp.Scope_id
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
+ sa.Addr = pp.Addr
return sa, nil
}
return nil, EAFNOSUPPORT
@@ -455,10 +451,9 @@ func Accept(fd int) (nfd int, sa Sockaddr, err error) {
//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.__xnet_recvmsg
-func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
+func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
var msg Msghdr
- var rsa RawSockaddrAny
- msg.Name = (*byte)(unsafe.Pointer(&rsa))
+ msg.Name = (*byte)(unsafe.Pointer(rsa))
msg.Namelen = uint32(SizeofSockaddrAny)
var iov Iovec
if len(p) > 0 {
@@ -480,29 +475,12 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from
return
}
oobn = int(msg.Accrightslen)
- // source address is only specified if the socket is unconnected
- if rsa.Addr.Family != AF_UNSPEC {
- from, err = anyToSockaddr(fd, &rsa)
- }
- return
-}
-
-func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
- _, err = SendmsgN(fd, p, oob, to, flags)
return
}
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.__xnet_sendmsg
-func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
- var ptr unsafe.Pointer
- var salen _Socklen
- if to != nil {
- ptr, salen, err = to.sockaddr()
- if err != nil {
- return 0, err
- }
- }
+func sendmsgN(fd int, p, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
var msg Msghdr
msg.Name = (*byte)(unsafe.Pointer(ptr))
msg.Namelen = uint32(salen)
@@ -665,8 +643,8 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
//sys Pathconf(path string, name int) (val int, err error)
//sys Pause() (err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error)
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
+//sys pread(fd int, p []byte, offset int64) (n int, err error)
+//sys pwrite(fd int, p []byte, offset int64) (n int, err error)
//sys read(fd int, p []byte) (n int, err error)
//sys Readlink(path string, buf []byte) (n int, err error)
//sys Rename(from string, to string) (err error)
@@ -759,8 +737,20 @@ type fileObjCookie struct {
type EventPort struct {
port int
mu sync.Mutex
- fds map[uintptr]interface{}
+ fds map[uintptr]*fileObjCookie
paths map[string]*fileObjCookie
+ // The user cookie presents an interesting challenge from a memory management perspective.
+ // There are two paths by which we can discover that it is no longer in use:
+ // 1. The user calls port_dissociate before any events fire
+ // 2. An event fires and we return it to the user
+ // The tricky situation is if the event has fired in the kernel but
+ // the user hasn't requested/received it yet.
+ // If the user wants to port_dissociate before the event has been processed,
+ // we should handle things gracefully. To do so, we need to keep an extra
+ // reference to the cookie around until the event is processed
+ // thus the otherwise seemingly extraneous "cookies" map
+ // The key of this map is a pointer to the corresponding &fCookie.cookie
+ cookies map[*interface{}]*fileObjCookie
}
// PortEvent is an abstraction of the port_event C struct.
@@ -784,9 +774,10 @@ func NewEventPort() (*EventPort, error) {
return nil, err
}
e := &EventPort{
- port: port,
- fds: make(map[uintptr]interface{}),
- paths: make(map[string]*fileObjCookie),
+ port: port,
+ fds: make(map[uintptr]*fileObjCookie),
+ paths: make(map[string]*fileObjCookie),
+ cookies: make(map[*interface{}]*fileObjCookie),
}
return e, nil
}
@@ -801,9 +792,13 @@ func NewEventPort() (*EventPort, error) {
func (e *EventPort) Close() error {
e.mu.Lock()
defer e.mu.Unlock()
+ err := Close(e.port)
+ if err != nil {
+ return err
+ }
e.fds = nil
e.paths = nil
- return Close(e.port)
+ return nil
}
// PathIsWatched checks to see if path is associated with this EventPort.
@@ -840,6 +835,7 @@ func (e *EventPort) AssociatePath(path string, stat os.FileInfo, events int, coo
return err
}
e.paths[path] = fCookie
+ e.cookies[&fCookie.cookie] = fCookie
return nil
}
@@ -852,11 +848,19 @@ func (e *EventPort) DissociatePath(path string) error {
return fmt.Errorf("%v is not associated with this Event Port", path)
}
_, err := port_dissociate(e.port, PORT_SOURCE_FILE, uintptr(unsafe.Pointer(f.fobj)))
- if err != nil {
+ // If the path is no longer associated with this event port (ENOENT)
+ // we should delete it from our map. We can still return ENOENT to the caller.
+ // But we need to save the cookie
+ if err != nil && err != ENOENT {
return err
}
+ if err == nil {
+ // dissociate was successful, safe to delete the cookie
+ fCookie := e.paths[path]
+ delete(e.cookies, &fCookie.cookie)
+ }
delete(e.paths, path)
- return nil
+ return err
}
// AssociateFd wraps calls to port_associate(3c) on file descriptors.
@@ -866,12 +870,13 @@ func (e *EventPort) AssociateFd(fd uintptr, events int, cookie interface{}) erro
if _, found := e.fds[fd]; found {
return fmt.Errorf("%v is already associated with this Event Port", fd)
}
- pcookie := &cookie
- _, err := port_associate(e.port, PORT_SOURCE_FD, fd, events, (*byte)(unsafe.Pointer(pcookie)))
+ fCookie := &fileObjCookie{nil, cookie}
+ _, err := port_associate(e.port, PORT_SOURCE_FD, fd, events, (*byte)(unsafe.Pointer(&fCookie.cookie)))
if err != nil {
return err
}
- e.fds[fd] = pcookie
+ e.fds[fd] = fCookie
+ e.cookies[&fCookie.cookie] = fCookie
return nil
}
@@ -884,11 +889,16 @@ func (e *EventPort) DissociateFd(fd uintptr) error {
return fmt.Errorf("%v is not associated with this Event Port", fd)
}
_, err := port_dissociate(e.port, PORT_SOURCE_FD, fd)
- if err != nil {
+ if err != nil && err != ENOENT {
return err
}
+ if err == nil {
+ // dissociate was successful, safe to delete the cookie
+ fCookie := e.fds[fd]
+ delete(e.cookies, &fCookie.cookie)
+ }
delete(e.fds, fd)
- return nil
+ return err
}
func createFileObj(name string, stat os.FileInfo) (*fileObj, error) {
@@ -916,24 +926,46 @@ func (e *EventPort) GetOne(t *Timespec) (*PortEvent, error) {
return nil, err
}
p := new(PortEvent)
- p.Events = pe.Events
- p.Source = pe.Source
e.mu.Lock()
defer e.mu.Unlock()
- switch pe.Source {
+ e.peIntToExt(pe, p)
+ return p, nil
+}
+
+// peIntToExt converts a cgo portEvent struct into the friendlier PortEvent
+// NOTE: Always call this function while holding the e.mu mutex
+func (e *EventPort) peIntToExt(peInt *portEvent, peExt *PortEvent) {
+ peExt.Events = peInt.Events
+ peExt.Source = peInt.Source
+ cookie := (*interface{})(unsafe.Pointer(peInt.User))
+ peExt.Cookie = *cookie
+ switch peInt.Source {
case PORT_SOURCE_FD:
- p.Fd = uintptr(pe.Object)
- cookie := (*interface{})(unsafe.Pointer(pe.User))
- p.Cookie = *cookie
- delete(e.fds, p.Fd)
+ delete(e.cookies, cookie)
+ peExt.Fd = uintptr(peInt.Object)
+ // Only remove the fds entry if it exists and this cookie matches
+ if fobj, ok := e.fds[peExt.Fd]; ok {
+ if &fobj.cookie == cookie {
+ delete(e.fds, peExt.Fd)
+ }
+ }
case PORT_SOURCE_FILE:
- p.fobj = (*fileObj)(unsafe.Pointer(uintptr(pe.Object)))
- p.Path = BytePtrToString((*byte)(unsafe.Pointer(p.fobj.Name)))
- cookie := (*interface{})(unsafe.Pointer(pe.User))
- p.Cookie = *cookie
- delete(e.paths, p.Path)
+ if fCookie, ok := e.cookies[cookie]; ok && uintptr(unsafe.Pointer(fCookie.fobj)) == uintptr(peInt.Object) {
+ // Use our stashed reference rather than using unsafe on what we got back
+ // the unsafe version would be (*fileObj)(unsafe.Pointer(uintptr(peInt.Object)))
+ peExt.fobj = fCookie.fobj
+ } else {
+ panic("mismanaged memory")
+ }
+ delete(e.cookies, cookie)
+ peExt.Path = BytePtrToString((*byte)(unsafe.Pointer(peExt.fobj.Name)))
+ // Only remove the paths entry if it exists and this cookie matches
+ if fobj, ok := e.paths[peExt.Path]; ok {
+ if &fobj.cookie == cookie {
+ delete(e.paths, peExt.Path)
+ }
+ }
}
- return p, nil
}
// Pending wraps port_getn(3c) and returns how many events are pending.
@@ -966,21 +998,7 @@ func (e *EventPort) Get(s []PortEvent, min int, timeout *Timespec) (int, error)
e.mu.Lock()
defer e.mu.Unlock()
for i := 0; i < int(got); i++ {
- s[i].Events = ps[i].Events
- s[i].Source = ps[i].Source
- switch ps[i].Source {
- case PORT_SOURCE_FD:
- s[i].Fd = uintptr(ps[i].Object)
- cookie := (*interface{})(unsafe.Pointer(ps[i].User))
- s[i].Cookie = *cookie
- delete(e.fds, s[i].Fd)
- case PORT_SOURCE_FILE:
- s[i].fobj = (*fileObj)(unsafe.Pointer(uintptr(ps[i].Object)))
- s[i].Path = BytePtrToString((*byte)(unsafe.Pointer(s[i].fobj.Name)))
- cookie := (*interface{})(unsafe.Pointer(ps[i].User))
- s[i].Cookie = *cookie
- delete(e.paths, s[i].Path)
- }
+ e.peIntToExt(&ps[i], &s[i])
}
return int(got), err
}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_unix.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_unix.go
index cf296a2433a9..70508afc1d1c 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_unix.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_unix.go
@@ -177,6 +177,30 @@ func Write(fd int, p []byte) (n int, err error) {
return
}
+func Pread(fd int, p []byte, offset int64) (n int, err error) {
+ n, err = pread(fd, p, offset)
+ if raceenabled {
+ if n > 0 {
+ raceWriteRange(unsafe.Pointer(&p[0]), n)
+ }
+ if err == nil {
+ raceAcquire(unsafe.Pointer(&ioSync))
+ }
+ }
+ return
+}
+
+func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+ if raceenabled {
+ raceReleaseMerge(unsafe.Pointer(&ioSync))
+ }
+ n, err = pwrite(fd, p, offset)
+ if raceenabled && n > 0 {
+ raceReadRange(unsafe.Pointer(&p[0]), n)
+ }
+ return
+}
+
// For testing: clients can set this flag to force
// creation of IPv6 sockets to return EAFNOSUPPORT.
var SocketDisableIPv6 bool
@@ -313,6 +337,33 @@ func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) {
return
}
+func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
+ var rsa RawSockaddrAny
+ n, oobn, recvflags, err = recvmsgRaw(fd, p, oob, flags, &rsa)
+ // source address is only specified if the socket is unconnected
+ if rsa.Addr.Family != AF_UNSPEC {
+ from, err = anyToSockaddr(fd, &rsa)
+ }
+ return
+}
+
+func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
+ _, err = SendmsgN(fd, p, oob, to, flags)
+ return
+}
+
+func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
+ var ptr unsafe.Pointer
+ var salen _Socklen
+ if to != nil {
+ ptr, salen, err = to.sockaddr()
+ if err != nil {
+ return 0, err
+ }
+ }
+ return sendmsgN(fd, p, oob, ptr, salen, flags)
+}
+
func Send(s int, buf []byte, flags int) (err error) {
return sendto(s, buf, flags, nil, 0)
}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
index 1ffd8bfcfb90..f8616f454ec6 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
@@ -67,9 +67,7 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
p[0] = byte(sa.Port >> 8)
p[1] = byte(sa.Port)
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
+ sa.raw.Addr = sa.Addr
return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
}
@@ -83,9 +81,7 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
p[0] = byte(sa.Port >> 8)
p[1] = byte(sa.Port)
sa.raw.Scope_id = sa.ZoneId
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
+ sa.raw.Addr = sa.Addr
return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
}
@@ -144,9 +140,7 @@ func anyToSockaddr(_ int, rsa *RawSockaddrAny) (Sockaddr, error) {
sa := new(SockaddrInet4)
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
sa.Port = int(p[0])<<8 + int(p[1])
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
+ sa.Addr = pp.Addr
return sa, nil
case AF_INET6:
@@ -155,9 +149,7 @@ func anyToSockaddr(_ int, rsa *RawSockaddrAny) (Sockaddr, error) {
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
sa.Port = int(p[0])<<8 + int(p[1])
sa.ZoneId = pp.Scope_id
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
+ sa.Addr = pp.Addr
return sa, nil
}
return nil, EAFNOSUPPORT
@@ -587,8 +579,10 @@ func Pipe(p []int) (err error) {
}
var pp [2]_C_int
err = pipe(&pp)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
+ if err == nil {
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ }
return
}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/sysvshm_linux.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/sysvshm_linux.go
new file mode 100644
index 000000000000..2c3a4437f0f0
--- /dev/null
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/sysvshm_linux.go
@@ -0,0 +1,21 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build linux
+// +build linux
+
+package unix
+
+import "runtime"
+
+// SysvShmCtl performs control operations on the shared memory segment
+// specified by id.
+func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) {
+ if runtime.GOARCH == "arm" ||
+ runtime.GOARCH == "mips64" || runtime.GOARCH == "mips64le" {
+ cmd |= ipc_64
+ }
+
+ return shmctl(id, cmd, desc)
+}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/sysvshm_unix.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/sysvshm_unix.go
new file mode 100644
index 000000000000..0bb4c8de557b
--- /dev/null
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/sysvshm_unix.go
@@ -0,0 +1,61 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build (darwin && !ios) || linux
+// +build darwin,!ios linux
+
+package unix
+
+import (
+ "unsafe"
+
+ "golang.org/x/sys/internal/unsafeheader"
+)
+
+// SysvShmAttach attaches the Sysv shared memory segment associated with the
+// shared memory identifier id.
+func SysvShmAttach(id int, addr uintptr, flag int) ([]byte, error) {
+ addr, errno := shmat(id, addr, flag)
+ if errno != nil {
+ return nil, errno
+ }
+
+ // Retrieve the size of the shared memory to enable slice creation
+ var info SysvShmDesc
+
+ _, err := SysvShmCtl(id, IPC_STAT, &info)
+ if err != nil {
+ // release the shared memory if we can't find the size
+
+ // ignoring error from shmdt as there's nothing sensible to return here
+ shmdt(addr)
+ return nil, err
+ }
+
+ // Use unsafe to convert addr into a []byte.
+ // TODO: convert to unsafe.Slice once we can assume Go 1.17
+ var b []byte
+ hdr := (*unsafeheader.Slice)(unsafe.Pointer(&b))
+ hdr.Data = unsafe.Pointer(addr)
+ hdr.Cap = int(info.Segsz)
+ hdr.Len = int(info.Segsz)
+ return b, nil
+}
+
+// SysvShmDetach unmaps the shared memory slice returned from SysvShmAttach.
+//
+// It is not safe to use the slice after calling this function.
+func SysvShmDetach(data []byte) error {
+ if len(data) == 0 {
+ return EINVAL
+ }
+
+ return shmdt(uintptr(unsafe.Pointer(&data[0])))
+}
+
+// SysvShmGet returns the Sysv shared memory identifier associated with key.
+// If the IPC_CREAT flag is specified a new segment is created.
+func SysvShmGet(key, size, flag int) (id int, err error) {
+ return shmget(key, size, flag)
+}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go
new file mode 100644
index 000000000000..71bddefdb87d
--- /dev/null
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go
@@ -0,0 +1,14 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build darwin && !ios
+// +build darwin,!ios
+
+package unix
+
+// SysvShmCtl performs control operations on the shared memory segment
+// specified by id.
+func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) {
+ return shmctl(id, cmd, desc)
+}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
index a3a45fec5950..476a1c7e77c5 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
@@ -12,1556 +12,1582 @@ package unix
import "syscall"
const (
- AF_APPLETALK = 0x10
- AF_CCITT = 0xa
- AF_CHAOS = 0x5
- AF_CNT = 0x15
- AF_COIP = 0x14
- AF_DATAKIT = 0x9
- AF_DECnet = 0xc
- AF_DLI = 0xd
- AF_E164 = 0x1c
- AF_ECMA = 0x8
- AF_HYLINK = 0xf
- AF_IEEE80211 = 0x25
- AF_IMPLINK = 0x3
- AF_INET = 0x2
- AF_INET6 = 0x1e
- AF_IPX = 0x17
- AF_ISDN = 0x1c
- AF_ISO = 0x7
- AF_LAT = 0xe
- AF_LINK = 0x12
- AF_LOCAL = 0x1
- AF_MAX = 0x29
- AF_NATM = 0x1f
- AF_NDRV = 0x1b
- AF_NETBIOS = 0x21
- AF_NS = 0x6
- AF_OSI = 0x7
- AF_PPP = 0x22
- AF_PUP = 0x4
- AF_RESERVED_36 = 0x24
- AF_ROUTE = 0x11
- AF_SIP = 0x18
- AF_SNA = 0xb
- AF_SYSTEM = 0x20
- AF_SYS_CONTROL = 0x2
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_UTUN = 0x26
- AF_VSOCK = 0x28
- ALTWERASE = 0x200
- ATTR_BIT_MAP_COUNT = 0x5
- ATTR_CMN_ACCESSMASK = 0x20000
- ATTR_CMN_ACCTIME = 0x1000
- ATTR_CMN_ADDEDTIME = 0x10000000
- ATTR_CMN_BKUPTIME = 0x2000
- ATTR_CMN_CHGTIME = 0x800
- ATTR_CMN_CRTIME = 0x200
- ATTR_CMN_DATA_PROTECT_FLAGS = 0x40000000
- ATTR_CMN_DEVID = 0x2
- ATTR_CMN_DOCUMENT_ID = 0x100000
- ATTR_CMN_ERROR = 0x20000000
- ATTR_CMN_EXTENDED_SECURITY = 0x400000
- ATTR_CMN_FILEID = 0x2000000
- ATTR_CMN_FLAGS = 0x40000
- ATTR_CMN_FNDRINFO = 0x4000
- ATTR_CMN_FSID = 0x4
- ATTR_CMN_FULLPATH = 0x8000000
- ATTR_CMN_GEN_COUNT = 0x80000
- ATTR_CMN_GRPID = 0x10000
- ATTR_CMN_GRPUUID = 0x1000000
- ATTR_CMN_MODTIME = 0x400
- ATTR_CMN_NAME = 0x1
- ATTR_CMN_NAMEDATTRCOUNT = 0x80000
- ATTR_CMN_NAMEDATTRLIST = 0x100000
- ATTR_CMN_OBJID = 0x20
- ATTR_CMN_OBJPERMANENTID = 0x40
- ATTR_CMN_OBJTAG = 0x10
- ATTR_CMN_OBJTYPE = 0x8
- ATTR_CMN_OWNERID = 0x8000
- ATTR_CMN_PARENTID = 0x4000000
- ATTR_CMN_PAROBJID = 0x80
- ATTR_CMN_RETURNED_ATTRS = 0x80000000
- ATTR_CMN_SCRIPT = 0x100
- ATTR_CMN_SETMASK = 0x51c7ff00
- ATTR_CMN_USERACCESS = 0x200000
- ATTR_CMN_UUID = 0x800000
- ATTR_CMN_VALIDMASK = 0xffffffff
- ATTR_CMN_VOLSETMASK = 0x6700
- ATTR_FILE_ALLOCSIZE = 0x4
- ATTR_FILE_CLUMPSIZE = 0x10
- ATTR_FILE_DATAALLOCSIZE = 0x400
- ATTR_FILE_DATAEXTENTS = 0x800
- ATTR_FILE_DATALENGTH = 0x200
- ATTR_FILE_DEVTYPE = 0x20
- ATTR_FILE_FILETYPE = 0x40
- ATTR_FILE_FORKCOUNT = 0x80
- ATTR_FILE_FORKLIST = 0x100
- ATTR_FILE_IOBLOCKSIZE = 0x8
- ATTR_FILE_LINKCOUNT = 0x1
- ATTR_FILE_RSRCALLOCSIZE = 0x2000
- ATTR_FILE_RSRCEXTENTS = 0x4000
- ATTR_FILE_RSRCLENGTH = 0x1000
- ATTR_FILE_SETMASK = 0x20
- ATTR_FILE_TOTALSIZE = 0x2
- ATTR_FILE_VALIDMASK = 0x37ff
- ATTR_VOL_ALLOCATIONCLUMP = 0x40
- ATTR_VOL_ATTRIBUTES = 0x40000000
- ATTR_VOL_CAPABILITIES = 0x20000
- ATTR_VOL_DIRCOUNT = 0x400
- ATTR_VOL_ENCODINGSUSED = 0x10000
- ATTR_VOL_FILECOUNT = 0x200
- ATTR_VOL_FSTYPE = 0x1
- ATTR_VOL_INFO = 0x80000000
- ATTR_VOL_IOBLOCKSIZE = 0x80
- ATTR_VOL_MAXOBJCOUNT = 0x800
- ATTR_VOL_MINALLOCATION = 0x20
- ATTR_VOL_MOUNTEDDEVICE = 0x8000
- ATTR_VOL_MOUNTFLAGS = 0x4000
- ATTR_VOL_MOUNTPOINT = 0x1000
- ATTR_VOL_NAME = 0x2000
- ATTR_VOL_OBJCOUNT = 0x100
- ATTR_VOL_QUOTA_SIZE = 0x10000000
- ATTR_VOL_RESERVED_SIZE = 0x20000000
- ATTR_VOL_SETMASK = 0x80002000
- ATTR_VOL_SIGNATURE = 0x2
- ATTR_VOL_SIZE = 0x4
- ATTR_VOL_SPACEAVAIL = 0x10
- ATTR_VOL_SPACEFREE = 0x8
- ATTR_VOL_UUID = 0x40000
- ATTR_VOL_VALIDMASK = 0xf007ffff
- B0 = 0x0
- B110 = 0x6e
- B115200 = 0x1c200
- B1200 = 0x4b0
- B134 = 0x86
- B14400 = 0x3840
- B150 = 0x96
- B1800 = 0x708
- B19200 = 0x4b00
- B200 = 0xc8
- B230400 = 0x38400
- B2400 = 0x960
- B28800 = 0x7080
- B300 = 0x12c
- B38400 = 0x9600
- B4800 = 0x12c0
- B50 = 0x32
- B57600 = 0xe100
- B600 = 0x258
- B7200 = 0x1c20
- B75 = 0x4b
- B76800 = 0x12c00
- B9600 = 0x2580
- BIOCFLUSH = 0x20004268
- BIOCGBLEN = 0x40044266
- BIOCGDLT = 0x4004426a
- BIOCGDLTLIST = 0xc00c4279
- BIOCGETIF = 0x4020426b
- BIOCGHDRCMPLT = 0x40044274
- BIOCGRSIG = 0x40044272
- BIOCGRTIMEOUT = 0x4010426e
- BIOCGSEESENT = 0x40044276
- BIOCGSTATS = 0x4008426f
- BIOCIMMEDIATE = 0x80044270
- BIOCPROMISC = 0x20004269
- BIOCSBLEN = 0xc0044266
- BIOCSDLT = 0x80044278
- BIOCSETF = 0x80104267
- BIOCSETFNR = 0x8010427e
- BIOCSETIF = 0x8020426c
- BIOCSHDRCMPLT = 0x80044275
- BIOCSRSIG = 0x80044273
- BIOCSRTIMEOUT = 0x8010426d
- BIOCSSEESENT = 0x80044277
- BIOCVERSION = 0x40044271
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALIGNMENT = 0x4
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXBUFSIZE = 0x80000
- BPF_MAXINSNS = 0x200
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINBUFSIZE = 0x20
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RELEASE = 0x30bb6
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x8000
- BSDLY = 0x8000
- CFLUSH = 0xf
- CLOCAL = 0x8000
- CLOCK_MONOTONIC = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_MONOTONIC_RAW_APPROX = 0x5
- CLOCK_PROCESS_CPUTIME_ID = 0xc
- CLOCK_REALTIME = 0x0
- CLOCK_THREAD_CPUTIME_ID = 0x10
- CLOCK_UPTIME_RAW = 0x8
- CLOCK_UPTIME_RAW_APPROX = 0x9
- CLONE_NOFOLLOW = 0x1
- CLONE_NOOWNERCOPY = 0x2
- CR0 = 0x0
- CR1 = 0x1000
- CR2 = 0x2000
- CR3 = 0x3000
- CRDLY = 0x3000
- CREAD = 0x800
- CRTSCTS = 0x30000
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0x14
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- CTLIOCGINFO = 0xc0644e03
- CTL_HW = 0x6
- CTL_KERN = 0x1
- CTL_MAXNAME = 0xc
- CTL_NET = 0x4
- DLT_A429 = 0xb8
- DLT_A653_ICM = 0xb9
- DLT_AIRONET_HEADER = 0x78
- DLT_AOS = 0xde
- DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
- DLT_ARCNET = 0x7
- DLT_ARCNET_LINUX = 0x81
- DLT_ATM_CLIP = 0x13
- DLT_ATM_RFC1483 = 0xb
- DLT_AURORA = 0x7e
- DLT_AX25 = 0x3
- DLT_AX25_KISS = 0xca
- DLT_BACNET_MS_TP = 0xa5
- DLT_BLUETOOTH_HCI_H4 = 0xbb
- DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
- DLT_CAN20B = 0xbe
- DLT_CAN_SOCKETCAN = 0xe3
- DLT_CHAOS = 0x5
- DLT_CHDLC = 0x68
- DLT_CISCO_IOS = 0x76
- DLT_C_HDLC = 0x68
- DLT_C_HDLC_WITH_DIR = 0xcd
- DLT_DBUS = 0xe7
- DLT_DECT = 0xdd
- DLT_DOCSIS = 0x8f
- DLT_DVB_CI = 0xeb
- DLT_ECONET = 0x73
- DLT_EN10MB = 0x1
- DLT_EN3MB = 0x2
- DLT_ENC = 0x6d
- DLT_ERF = 0xc5
- DLT_ERF_ETH = 0xaf
- DLT_ERF_POS = 0xb0
- DLT_FC_2 = 0xe0
- DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
- DLT_FDDI = 0xa
- DLT_FLEXRAY = 0xd2
- DLT_FRELAY = 0x6b
- DLT_FRELAY_WITH_DIR = 0xce
- DLT_GCOM_SERIAL = 0xad
- DLT_GCOM_T1E1 = 0xac
- DLT_GPF_F = 0xab
- DLT_GPF_T = 0xaa
- DLT_GPRS_LLC = 0xa9
- DLT_GSMTAP_ABIS = 0xda
- DLT_GSMTAP_UM = 0xd9
- DLT_HHDLC = 0x79
- DLT_IBM_SN = 0x92
- DLT_IBM_SP = 0x91
- DLT_IEEE802 = 0x6
- DLT_IEEE802_11 = 0x69
- DLT_IEEE802_11_RADIO = 0x7f
- DLT_IEEE802_11_RADIO_AVS = 0xa3
- DLT_IEEE802_15_4 = 0xc3
- DLT_IEEE802_15_4_LINUX = 0xbf
- DLT_IEEE802_15_4_NOFCS = 0xe6
- DLT_IEEE802_15_4_NONASK_PHY = 0xd7
- DLT_IEEE802_16_MAC_CPS = 0xbc
- DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
- DLT_IPFILTER = 0x74
- DLT_IPMB = 0xc7
- DLT_IPMB_LINUX = 0xd1
- DLT_IPNET = 0xe2
- DLT_IPOIB = 0xf2
- DLT_IPV4 = 0xe4
- DLT_IPV6 = 0xe5
- DLT_IP_OVER_FC = 0x7a
- DLT_JUNIPER_ATM1 = 0x89
- DLT_JUNIPER_ATM2 = 0x87
- DLT_JUNIPER_ATM_CEMIC = 0xee
- DLT_JUNIPER_CHDLC = 0xb5
- DLT_JUNIPER_ES = 0x84
- DLT_JUNIPER_ETHER = 0xb2
- DLT_JUNIPER_FIBRECHANNEL = 0xea
- DLT_JUNIPER_FRELAY = 0xb4
- DLT_JUNIPER_GGSN = 0x85
- DLT_JUNIPER_ISM = 0xc2
- DLT_JUNIPER_MFR = 0x86
- DLT_JUNIPER_MLFR = 0x83
- DLT_JUNIPER_MLPPP = 0x82
- DLT_JUNIPER_MONITOR = 0xa4
- DLT_JUNIPER_PIC_PEER = 0xae
- DLT_JUNIPER_PPP = 0xb3
- DLT_JUNIPER_PPPOE = 0xa7
- DLT_JUNIPER_PPPOE_ATM = 0xa8
- DLT_JUNIPER_SERVICES = 0x88
- DLT_JUNIPER_SRX_E2E = 0xe9
- DLT_JUNIPER_ST = 0xc8
- DLT_JUNIPER_VP = 0xb7
- DLT_JUNIPER_VS = 0xe8
- DLT_LAPB_WITH_DIR = 0xcf
- DLT_LAPD = 0xcb
- DLT_LIN = 0xd4
- DLT_LINUX_EVDEV = 0xd8
- DLT_LINUX_IRDA = 0x90
- DLT_LINUX_LAPD = 0xb1
- DLT_LINUX_PPP_WITHDIRECTION = 0xa6
- DLT_LINUX_SLL = 0x71
- DLT_LOOP = 0x6c
- DLT_LTALK = 0x72
- DLT_MATCHING_MAX = 0x10a
- DLT_MATCHING_MIN = 0x68
- DLT_MFR = 0xb6
- DLT_MOST = 0xd3
- DLT_MPEG_2_TS = 0xf3
- DLT_MPLS = 0xdb
- DLT_MTP2 = 0x8c
- DLT_MTP2_WITH_PHDR = 0x8b
- DLT_MTP3 = 0x8d
- DLT_MUX27010 = 0xec
- DLT_NETANALYZER = 0xf0
- DLT_NETANALYZER_TRANSPARENT = 0xf1
- DLT_NFC_LLCP = 0xf5
- DLT_NFLOG = 0xef
- DLT_NG40 = 0xf4
- DLT_NULL = 0x0
- DLT_PCI_EXP = 0x7d
- DLT_PFLOG = 0x75
- DLT_PFSYNC = 0x12
- DLT_PPI = 0xc0
- DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0x10
- DLT_PPP_ETHER = 0x33
- DLT_PPP_PPPD = 0xa6
- DLT_PPP_SERIAL = 0x32
- DLT_PPP_WITH_DIR = 0xcc
- DLT_PPP_WITH_DIRECTION = 0xa6
- DLT_PRISM_HEADER = 0x77
- DLT_PRONET = 0x4
- DLT_RAIF1 = 0xc6
- DLT_RAW = 0xc
- DLT_RIO = 0x7c
- DLT_SCCP = 0x8e
- DLT_SITA = 0xc4
- DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xf
- DLT_STANAG_5066_D_PDU = 0xed
- DLT_SUNATM = 0x7b
- DLT_SYMANTEC_FIREWALL = 0x63
- DLT_TZSP = 0x80
- DLT_USB = 0xba
- DLT_USB_DARWIN = 0x10a
- DLT_USB_LINUX = 0xbd
- DLT_USB_LINUX_MMAPPED = 0xdc
- DLT_USER0 = 0x93
- DLT_USER1 = 0x94
- DLT_USER10 = 0x9d
- DLT_USER11 = 0x9e
- DLT_USER12 = 0x9f
- DLT_USER13 = 0xa0
- DLT_USER14 = 0xa1
- DLT_USER15 = 0xa2
- DLT_USER2 = 0x95
- DLT_USER3 = 0x96
- DLT_USER4 = 0x97
- DLT_USER5 = 0x98
- DLT_USER6 = 0x99
- DLT_USER7 = 0x9a
- DLT_USER8 = 0x9b
- DLT_USER9 = 0x9c
- DLT_WIHART = 0xdf
- DLT_X2E_SERIAL = 0xd5
- DLT_X2E_XORAYA = 0xd6
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x40
- ECHOE = 0x2
- ECHOK = 0x4
- ECHOKE = 0x1
- ECHONL = 0x10
- ECHOPRT = 0x20
- EVFILT_AIO = -0x3
- EVFILT_EXCEPT = -0xf
- EVFILT_FS = -0x9
- EVFILT_MACHPORT = -0x8
- EVFILT_PROC = -0x5
- EVFILT_READ = -0x1
- EVFILT_SIGNAL = -0x6
- EVFILT_SYSCOUNT = 0x11
- EVFILT_THREADMARKER = 0x11
- EVFILT_TIMER = -0x7
- EVFILT_USER = -0xa
- EVFILT_VM = -0xc
- EVFILT_VNODE = -0x4
- EVFILT_WRITE = -0x2
- EV_ADD = 0x1
- EV_CLEAR = 0x20
- EV_DELETE = 0x2
- EV_DISABLE = 0x8
- EV_DISPATCH = 0x80
- EV_DISPATCH2 = 0x180
- EV_ENABLE = 0x4
- EV_EOF = 0x8000
- EV_ERROR = 0x4000
- EV_FLAG0 = 0x1000
- EV_FLAG1 = 0x2000
- EV_ONESHOT = 0x10
- EV_OOBAND = 0x2000
- EV_POLL = 0x1000
- EV_RECEIPT = 0x40
- EV_SYSFLAGS = 0xf000
- EV_UDATA_SPECIFIC = 0x100
- EV_VANISHED = 0x200
- EXTA = 0x4b00
- EXTB = 0x9600
- EXTPROC = 0x800
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x4000
- FFDLY = 0x4000
- FLUSHO = 0x800000
- FSOPT_ATTR_CMN_EXTENDED = 0x20
- FSOPT_NOFOLLOW = 0x1
- FSOPT_NOINMEMUPDATE = 0x2
- FSOPT_PACK_INVAL_ATTRS = 0x8
- FSOPT_REPORT_FULLSIZE = 0x4
- FSOPT_RETURN_REALDEV = 0x200
- F_ADDFILESIGS = 0x3d
- F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
- F_ADDFILESIGS_INFO = 0x67
- F_ADDFILESIGS_RETURN = 0x61
- F_ADDFILESUPPL = 0x68
- F_ADDSIGS = 0x3b
- F_ALLOCATEALL = 0x4
- F_ALLOCATECONTIG = 0x2
- F_BARRIERFSYNC = 0x55
- F_CHECK_LV = 0x62
- F_CHKCLEAN = 0x29
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x43
- F_FINDSIGS = 0x4e
- F_FLUSH_DATA = 0x28
- F_FREEZE_FS = 0x35
- F_FULLFSYNC = 0x33
- F_GETCODEDIR = 0x48
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLK = 0x7
- F_GETLKPID = 0x42
- F_GETNOSIGPIPE = 0x4a
- F_GETOWN = 0x5
- F_GETPATH = 0x32
- F_GETPATH_MTMINFO = 0x47
- F_GETPATH_NOFIRMLINK = 0x66
- F_GETPROTECTIONCLASS = 0x3f
- F_GETPROTECTIONLEVEL = 0x4d
- F_GETSIGSINFO = 0x69
- F_GLOBAL_NOCACHE = 0x37
- F_LOG2PHYS = 0x31
- F_LOG2PHYS_EXT = 0x41
- F_NOCACHE = 0x30
- F_NODIRECT = 0x3e
- F_OK = 0x0
- F_PATHPKG_CHECK = 0x34
- F_PEOFPOSMODE = 0x3
- F_PREALLOCATE = 0x2a
- F_PUNCHHOLE = 0x63
- F_RDADVISE = 0x2c
- F_RDAHEAD = 0x2d
- F_RDLCK = 0x1
- F_SETBACKINGSTORE = 0x46
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLK = 0x8
- F_SETLKW = 0x9
- F_SETLKWTIMEOUT = 0xa
- F_SETNOSIGPIPE = 0x49
- F_SETOWN = 0x6
- F_SETPROTECTIONCLASS = 0x40
- F_SETSIZE = 0x2b
- F_SINGLE_WRITER = 0x4c
- F_SPECULATIVE_READ = 0x65
- F_THAW_FS = 0x36
- F_TRANSCODEKEY = 0x4b
- F_TRIM_ACTIVE_FILE = 0x64
- F_UNLCK = 0x2
- F_VOLPOSMODE = 0x4
- F_WRLCK = 0x3
- HUPCL = 0x4000
- HW_MACHINE = 0x1
- ICANON = 0x100
- ICMP6_FILTER = 0x12
- ICRNL = 0x100
- IEXTEN = 0x400
- IFF_ALLMULTI = 0x200
- IFF_ALTPHYS = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_LINK0 = 0x1000
- IFF_LINK1 = 0x2000
- IFF_LINK2 = 0x4000
- IFF_LOOPBACK = 0x8
- IFF_MULTICAST = 0x8000
- IFF_NOARP = 0x80
- IFF_NOTRAILERS = 0x20
- IFF_OACTIVE = 0x400
- IFF_POINTOPOINT = 0x10
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SIMPLEX = 0x800
- IFF_UP = 0x1
- IFNAMSIZ = 0x10
- IFT_1822 = 0x2
- IFT_6LOWPAN = 0x40
- IFT_AAL5 = 0x31
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ATM = 0x25
- IFT_BRIDGE = 0xd1
- IFT_CARP = 0xf8
- IFT_CELLULAR = 0xff
- IFT_CEPT = 0x13
- IFT_DS3 = 0x1e
- IFT_ENC = 0xf4
- IFT_EON = 0x19
- IFT_ETHER = 0x6
- IFT_FAITH = 0x38
- IFT_FDDI = 0xf
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_GIF = 0x37
- IFT_HDH1822 = 0x3
- IFT_HIPPI = 0x2f
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IEEE1394 = 0x90
- IFT_IEEE8023ADLAG = 0x88
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88026 = 0xa
- IFT_L2VLAN = 0x87
- IFT_LAPB = 0x10
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_NSIP = 0x1b
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PDP = 0xff
- IFT_PFLOG = 0xf5
- IFT_PFSYNC = 0xf6
- IFT_PKTAP = 0xfe
- IFT_PPP = 0x17
- IFT_PROPMUX = 0x36
- IFT_PROPVIRTUAL = 0x35
- IFT_PTPSERIAL = 0x16
- IFT_RS232 = 0x21
- IFT_SDLC = 0x11
- IFT_SIP = 0x1f
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_STARLAN = 0xb
- IFT_STF = 0x39
- IFT_T1 = 0x12
- IFT_ULTRA = 0x1d
- IFT_V35 = 0x2d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLASSD_HOST = 0xfffffff
- IN_CLASSD_NET = 0xf0000000
- IN_CLASSD_NSHIFT = 0x1c
- IN_LINKLOCALNETNUM = 0xa9fe0000
- IN_LOOPBACKNET = 0x7f
- IPPROTO_3PC = 0x22
- IPPROTO_ADFS = 0x44
- IPPROTO_AH = 0x33
- IPPROTO_AHIP = 0x3d
- IPPROTO_APES = 0x63
- IPPROTO_ARGUS = 0xd
- IPPROTO_AX25 = 0x5d
- IPPROTO_BHA = 0x31
- IPPROTO_BLT = 0x1e
- IPPROTO_BRSATMON = 0x4c
- IPPROTO_CFTP = 0x3e
- IPPROTO_CHAOS = 0x10
- IPPROTO_CMTP = 0x26
- IPPROTO_CPHB = 0x49
- IPPROTO_CPNX = 0x48
- IPPROTO_DDP = 0x25
- IPPROTO_DGP = 0x56
- IPPROTO_DIVERT = 0xfe
- IPPROTO_DONE = 0x101
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_EMCON = 0xe
- IPPROTO_ENCAP = 0x62
- IPPROTO_EON = 0x50
- IPPROTO_ESP = 0x32
- IPPROTO_ETHERIP = 0x61
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GGP = 0x3
- IPPROTO_GMTP = 0x64
- IPPROTO_GRE = 0x2f
- IPPROTO_HELLO = 0x3f
- IPPROTO_HMP = 0x14
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IDPR = 0x23
- IPPROTO_IDRP = 0x2d
- IPPROTO_IGMP = 0x2
- IPPROTO_IGP = 0x55
- IPPROTO_IGRP = 0x58
- IPPROTO_IL = 0x28
- IPPROTO_INLSP = 0x34
- IPPROTO_INP = 0x20
- IPPROTO_IP = 0x0
- IPPROTO_IPCOMP = 0x6c
- IPPROTO_IPCV = 0x47
- IPPROTO_IPEIP = 0x5e
- IPPROTO_IPIP = 0x4
- IPPROTO_IPPC = 0x43
- IPPROTO_IPV4 = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_IRTP = 0x1c
- IPPROTO_KRYPTOLAN = 0x41
- IPPROTO_LARP = 0x5b
- IPPROTO_LEAF1 = 0x19
- IPPROTO_LEAF2 = 0x1a
- IPPROTO_MAX = 0x100
- IPPROTO_MAXID = 0x34
- IPPROTO_MEAS = 0x13
- IPPROTO_MHRP = 0x30
- IPPROTO_MICP = 0x5f
- IPPROTO_MTP = 0x5c
- IPPROTO_MUX = 0x12
- IPPROTO_ND = 0x4d
- IPPROTO_NHRP = 0x36
- IPPROTO_NONE = 0x3b
- IPPROTO_NSP = 0x1f
- IPPROTO_NVPII = 0xb
- IPPROTO_OSPFIGP = 0x59
- IPPROTO_PGM = 0x71
- IPPROTO_PIGP = 0x9
- IPPROTO_PIM = 0x67
- IPPROTO_PRM = 0x15
- IPPROTO_PUP = 0xc
- IPPROTO_PVP = 0x4b
- IPPROTO_RAW = 0xff
- IPPROTO_RCCMON = 0xa
- IPPROTO_RDP = 0x1b
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_RVD = 0x42
- IPPROTO_SATEXPAK = 0x40
- IPPROTO_SATMON = 0x45
- IPPROTO_SCCSP = 0x60
- IPPROTO_SCTP = 0x84
- IPPROTO_SDRP = 0x2a
- IPPROTO_SEP = 0x21
- IPPROTO_SRPC = 0x5a
- IPPROTO_ST = 0x7
- IPPROTO_SVMTP = 0x52
- IPPROTO_SWIPE = 0x35
- IPPROTO_TCF = 0x57
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_TPXX = 0x27
- IPPROTO_TRUNK1 = 0x17
- IPPROTO_TRUNK2 = 0x18
- IPPROTO_TTP = 0x54
- IPPROTO_UDP = 0x11
- IPPROTO_VINES = 0x53
- IPPROTO_VISA = 0x46
- IPPROTO_VMTP = 0x51
- IPPROTO_WBEXPAK = 0x4f
- IPPROTO_WBMON = 0x4e
- IPPROTO_WSN = 0x4a
- IPPROTO_XNET = 0xf
- IPPROTO_XTP = 0x24
- IPV6_2292DSTOPTS = 0x17
- IPV6_2292HOPLIMIT = 0x14
- IPV6_2292HOPOPTS = 0x16
- IPV6_2292NEXTHOP = 0x15
- IPV6_2292PKTINFO = 0x13
- IPV6_2292PKTOPTIONS = 0x19
- IPV6_2292RTHDR = 0x18
- IPV6_3542DSTOPTS = 0x32
- IPV6_3542HOPLIMIT = 0x2f
- IPV6_3542HOPOPTS = 0x31
- IPV6_3542NEXTHOP = 0x30
- IPV6_3542PKTINFO = 0x2e
- IPV6_3542RTHDR = 0x33
- IPV6_ADDR_MC_FLAGS_PREFIX = 0x20
- IPV6_ADDR_MC_FLAGS_TRANSIENT = 0x10
- IPV6_ADDR_MC_FLAGS_UNICAST_BASED = 0x30
- IPV6_AUTOFLOWLABEL = 0x3b
- IPV6_BINDV6ONLY = 0x1b
- IPV6_BOUND_IF = 0x7d
- IPV6_CHECKSUM = 0x1a
- IPV6_DEFAULT_MULTICAST_HOPS = 0x1
- IPV6_DEFAULT_MULTICAST_LOOP = 0x1
- IPV6_DEFHLIM = 0x40
- IPV6_DONTFRAG = 0x3e
- IPV6_DSTOPTS = 0x32
- IPV6_FAITH = 0x1d
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FLOW_ECN_MASK = 0x3000
- IPV6_FRAGTTL = 0x3c
- IPV6_FW_ADD = 0x1e
- IPV6_FW_DEL = 0x1f
- IPV6_FW_FLUSH = 0x20
- IPV6_FW_GET = 0x22
- IPV6_FW_ZERO = 0x21
- IPV6_HLIMDEC = 0x1
- IPV6_HOPLIMIT = 0x2f
- IPV6_HOPOPTS = 0x31
- IPV6_IPSEC_POLICY = 0x1c
- IPV6_JOIN_GROUP = 0xc
- IPV6_LEAVE_GROUP = 0xd
- IPV6_MAXHLIM = 0xff
- IPV6_MAXOPTHDR = 0x800
- IPV6_MAXPACKET = 0xffff
- IPV6_MAX_GROUP_SRC_FILTER = 0x200
- IPV6_MAX_MEMBERSHIPS = 0xfff
- IPV6_MAX_SOCK_SRC_FILTER = 0x80
- IPV6_MIN_MEMBERSHIPS = 0x1f
- IPV6_MMTU = 0x500
- IPV6_MSFILTER = 0x4a
- IPV6_MULTICAST_HOPS = 0xa
- IPV6_MULTICAST_IF = 0x9
- IPV6_MULTICAST_LOOP = 0xb
- IPV6_NEXTHOP = 0x30
- IPV6_PATHMTU = 0x2c
- IPV6_PKTINFO = 0x2e
- IPV6_PORTRANGE = 0xe
- IPV6_PORTRANGE_DEFAULT = 0x0
- IPV6_PORTRANGE_HIGH = 0x1
- IPV6_PORTRANGE_LOW = 0x2
- IPV6_PREFER_TEMPADDR = 0x3f
- IPV6_RECVDSTOPTS = 0x28
- IPV6_RECVHOPLIMIT = 0x25
- IPV6_RECVHOPOPTS = 0x27
- IPV6_RECVPATHMTU = 0x2b
- IPV6_RECVPKTINFO = 0x3d
- IPV6_RECVRTHDR = 0x26
- IPV6_RECVTCLASS = 0x23
- IPV6_RTHDR = 0x33
- IPV6_RTHDRDSTOPTS = 0x39
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_SOCKOPT_RESERVED1 = 0x3
- IPV6_TCLASS = 0x24
- IPV6_UNICAST_HOPS = 0x4
- IPV6_USE_MIN_MTU = 0x2a
- IPV6_V6ONLY = 0x1b
- IPV6_VERSION = 0x60
- IPV6_VERSION_MASK = 0xf0
- IP_ADD_MEMBERSHIP = 0xc
- IP_ADD_SOURCE_MEMBERSHIP = 0x46
- IP_BLOCK_SOURCE = 0x48
- IP_BOUND_IF = 0x19
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DONTFRAG = 0x1c
- IP_DROP_MEMBERSHIP = 0xd
- IP_DROP_SOURCE_MEMBERSHIP = 0x47
- IP_DUMMYNET_CONFIGURE = 0x3c
- IP_DUMMYNET_DEL = 0x3d
- IP_DUMMYNET_FLUSH = 0x3e
- IP_DUMMYNET_GET = 0x40
- IP_FAITH = 0x16
- IP_FW_ADD = 0x28
- IP_FW_DEL = 0x29
- IP_FW_FLUSH = 0x2a
- IP_FW_GET = 0x2c
- IP_FW_RESETLOG = 0x2d
- IP_FW_ZERO = 0x2b
- IP_HDRINCL = 0x2
- IP_IPSEC_POLICY = 0x15
- IP_MAXPACKET = 0xffff
- IP_MAX_GROUP_SRC_FILTER = 0x200
- IP_MAX_MEMBERSHIPS = 0xfff
- IP_MAX_SOCK_MUTE_FILTER = 0x80
- IP_MAX_SOCK_SRC_FILTER = 0x80
- IP_MF = 0x2000
- IP_MIN_MEMBERSHIPS = 0x1f
- IP_MSFILTER = 0x4a
- IP_MSS = 0x240
- IP_MULTICAST_IF = 0x9
- IP_MULTICAST_IFINDEX = 0x42
- IP_MULTICAST_LOOP = 0xb
- IP_MULTICAST_TTL = 0xa
- IP_MULTICAST_VIF = 0xe
- IP_NAT__XXX = 0x37
- IP_OFFMASK = 0x1fff
- IP_OLD_FW_ADD = 0x32
- IP_OLD_FW_DEL = 0x33
- IP_OLD_FW_FLUSH = 0x34
- IP_OLD_FW_GET = 0x36
- IP_OLD_FW_RESETLOG = 0x38
- IP_OLD_FW_ZERO = 0x35
- IP_OPTIONS = 0x1
- IP_PKTINFO = 0x1a
- IP_PORTRANGE = 0x13
- IP_PORTRANGE_DEFAULT = 0x0
- IP_PORTRANGE_HIGH = 0x1
- IP_PORTRANGE_LOW = 0x2
- IP_RECVDSTADDR = 0x7
- IP_RECVIF = 0x14
- IP_RECVOPTS = 0x5
- IP_RECVPKTINFO = 0x1a
- IP_RECVRETOPTS = 0x6
- IP_RECVTOS = 0x1b
- IP_RECVTTL = 0x18
- IP_RETOPTS = 0x8
- IP_RF = 0x8000
- IP_RSVP_OFF = 0x10
- IP_RSVP_ON = 0xf
- IP_RSVP_VIF_OFF = 0x12
- IP_RSVP_VIF_ON = 0x11
- IP_STRIPHDR = 0x17
- IP_TOS = 0x3
- IP_TRAFFIC_MGT_BACKGROUND = 0x41
- IP_TTL = 0x4
- IP_UNBLOCK_SOURCE = 0x49
- ISIG = 0x80
- ISTRIP = 0x20
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- KERN_HOSTNAME = 0xa
- KERN_OSRELEASE = 0x2
- KERN_OSTYPE = 0x1
- KERN_VERSION = 0x4
- LOCAL_PEERCRED = 0x1
- LOCAL_PEEREPID = 0x3
- LOCAL_PEEREUUID = 0x5
- LOCAL_PEERPID = 0x2
- LOCAL_PEERTOKEN = 0x6
- LOCAL_PEERUUID = 0x4
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_CAN_REUSE = 0x9
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x5
- MADV_FREE_REUSABLE = 0x7
- MADV_FREE_REUSE = 0x8
- MADV_NORMAL = 0x0
- MADV_PAGEOUT = 0xa
- MADV_RANDOM = 0x1
- MADV_SEQUENTIAL = 0x2
- MADV_WILLNEED = 0x3
- MADV_ZERO_WIRED_PAGES = 0x6
- MAP_32BIT = 0x8000
- MAP_ANON = 0x1000
- MAP_ANONYMOUS = 0x1000
- MAP_COPY = 0x2
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_HASSEMAPHORE = 0x200
- MAP_JIT = 0x800
- MAP_NOCACHE = 0x400
- MAP_NOEXTEND = 0x100
- MAP_NORESERVE = 0x40
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_RESERVED0080 = 0x80
- MAP_RESILIENT_CODESIGN = 0x2000
- MAP_RESILIENT_MEDIA = 0x4000
- MAP_SHARED = 0x1
- MAP_TRANSLATED_ALLOW_EXECUTE = 0x20000
- MAP_UNIX03 = 0x40000
- MCAST_BLOCK_SOURCE = 0x54
- MCAST_EXCLUDE = 0x2
- MCAST_INCLUDE = 0x1
- MCAST_JOIN_GROUP = 0x50
- MCAST_JOIN_SOURCE_GROUP = 0x52
- MCAST_LEAVE_GROUP = 0x51
- MCAST_LEAVE_SOURCE_GROUP = 0x53
- MCAST_UNBLOCK_SOURCE = 0x55
- MCAST_UNDEFINED = 0x0
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MNT_ASYNC = 0x40
- MNT_AUTOMOUNTED = 0x400000
- MNT_CMDFLAGS = 0xf0000
- MNT_CPROTECT = 0x80
- MNT_DEFWRITE = 0x2000000
- MNT_DONTBROWSE = 0x100000
- MNT_DOVOLFS = 0x8000
- MNT_DWAIT = 0x4
- MNT_EXPORTED = 0x100
- MNT_EXT_ROOT_DATA_VOL = 0x1
- MNT_FORCE = 0x80000
- MNT_IGNORE_OWNERSHIP = 0x200000
- MNT_JOURNALED = 0x800000
- MNT_LOCAL = 0x1000
- MNT_MULTILABEL = 0x4000000
- MNT_NOATIME = 0x10000000
- MNT_NOBLOCK = 0x20000
- MNT_NODEV = 0x10
- MNT_NOEXEC = 0x4
- MNT_NOSUID = 0x8
- MNT_NOUSERXATTR = 0x1000000
- MNT_NOWAIT = 0x2
- MNT_QUARANTINE = 0x400
- MNT_QUOTA = 0x2000
- MNT_RDONLY = 0x1
- MNT_RELOAD = 0x40000
- MNT_REMOVABLE = 0x200
- MNT_ROOTFS = 0x4000
- MNT_SNAPSHOT = 0x40000000
- MNT_STRICTATIME = 0x80000000
- MNT_SYNCHRONOUS = 0x2
- MNT_UNION = 0x20
- MNT_UNKNOWNPERMISSIONS = 0x200000
- MNT_UPDATE = 0x10000
- MNT_VISFLAGMASK = 0xd7f0f7ff
- MNT_WAIT = 0x1
- MSG_CTRUNC = 0x20
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x80
- MSG_EOF = 0x100
- MSG_EOR = 0x8
- MSG_FLUSH = 0x400
- MSG_HAVEMORE = 0x2000
- MSG_HOLD = 0x800
- MSG_NEEDSA = 0x10000
- MSG_NOSIGNAL = 0x80000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_RCVMORE = 0x4000
- MSG_SEND = 0x1000
- MSG_TRUNC = 0x10
- MSG_WAITALL = 0x40
- MSG_WAITSTREAM = 0x200
- MS_ASYNC = 0x1
- MS_DEACTIVATE = 0x8
- MS_INVALIDATE = 0x2
- MS_KILLPAGES = 0x4
- MS_SYNC = 0x10
- NAME_MAX = 0xff
- NET_RT_DUMP = 0x1
- NET_RT_DUMP2 = 0x7
- NET_RT_FLAGS = 0x2
- NET_RT_FLAGS_PRIV = 0xa
- NET_RT_IFLIST = 0x3
- NET_RT_IFLIST2 = 0x6
- NET_RT_MAXID = 0xb
- NET_RT_STAT = 0x4
- NET_RT_TRASH = 0x5
- NFDBITS = 0x20
- NL0 = 0x0
- NL1 = 0x100
- NL2 = 0x200
- NL3 = 0x300
- NLDLY = 0x300
- NOFLSH = 0x80000000
- NOKERNINFO = 0x2000000
- NOTE_ABSOLUTE = 0x8
- NOTE_ATTRIB = 0x8
- NOTE_BACKGROUND = 0x40
- NOTE_CHILD = 0x4
- NOTE_CRITICAL = 0x20
- NOTE_DELETE = 0x1
- NOTE_EXEC = 0x20000000
- NOTE_EXIT = 0x80000000
- NOTE_EXITSTATUS = 0x4000000
- NOTE_EXIT_CSERROR = 0x40000
- NOTE_EXIT_DECRYPTFAIL = 0x10000
- NOTE_EXIT_DETAIL = 0x2000000
- NOTE_EXIT_DETAIL_MASK = 0x70000
- NOTE_EXIT_MEMORY = 0x20000
- NOTE_EXIT_REPARENTED = 0x80000
- NOTE_EXTEND = 0x4
- NOTE_FFAND = 0x40000000
- NOTE_FFCOPY = 0xc0000000
- NOTE_FFCTRLMASK = 0xc0000000
- NOTE_FFLAGSMASK = 0xffffff
- NOTE_FFNOP = 0x0
- NOTE_FFOR = 0x80000000
- NOTE_FORK = 0x40000000
- NOTE_FUNLOCK = 0x100
- NOTE_LEEWAY = 0x10
- NOTE_LINK = 0x10
- NOTE_LOWAT = 0x1
- NOTE_MACHTIME = 0x100
- NOTE_MACH_CONTINUOUS_TIME = 0x80
- NOTE_NONE = 0x80
- NOTE_NSECONDS = 0x4
- NOTE_OOB = 0x2
- NOTE_PCTRLMASK = -0x100000
- NOTE_PDATAMASK = 0xfffff
- NOTE_REAP = 0x10000000
- NOTE_RENAME = 0x20
- NOTE_REVOKE = 0x40
- NOTE_SECONDS = 0x1
- NOTE_SIGNAL = 0x8000000
- NOTE_TRACK = 0x1
- NOTE_TRACKERR = 0x2
- NOTE_TRIGGER = 0x1000000
- NOTE_USECONDS = 0x2
- NOTE_VM_ERROR = 0x10000000
- NOTE_VM_PRESSURE = 0x80000000
- NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000
- NOTE_VM_PRESSURE_TERMINATE = 0x40000000
- NOTE_WRITE = 0x2
- OCRNL = 0x10
- OFDEL = 0x20000
- OFILL = 0x80
- ONLCR = 0x2
- ONLRET = 0x40
- ONOCR = 0x20
- ONOEOT = 0x8
- OPOST = 0x1
- OXTABS = 0x4
- O_ACCMODE = 0x3
- O_ALERT = 0x20000000
- O_APPEND = 0x8
- O_ASYNC = 0x40
- O_CLOEXEC = 0x1000000
- O_CREAT = 0x200
- O_DIRECTORY = 0x100000
- O_DP_GETRAWENCRYPTED = 0x1
- O_DP_GETRAWUNENCRYPTED = 0x2
- O_DSYNC = 0x400000
- O_EVTONLY = 0x8000
- O_EXCL = 0x800
- O_EXLOCK = 0x20
- O_FSYNC = 0x80
- O_NDELAY = 0x4
- O_NOCTTY = 0x20000
- O_NOFOLLOW = 0x100
- O_NOFOLLOW_ANY = 0x20000000
- O_NONBLOCK = 0x4
- O_POPUP = 0x80000000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_SHLOCK = 0x10
- O_SYMLINK = 0x200000
- O_SYNC = 0x80
- O_TRUNC = 0x400
- O_WRONLY = 0x1
- PARENB = 0x1000
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PT_ATTACH = 0xa
- PT_ATTACHEXC = 0xe
- PT_CONTINUE = 0x7
- PT_DENY_ATTACH = 0x1f
- PT_DETACH = 0xb
- PT_FIRSTMACH = 0x20
- PT_FORCEQUOTA = 0x1e
- PT_KILL = 0x8
- PT_READ_D = 0x2
- PT_READ_I = 0x1
- PT_READ_U = 0x3
- PT_SIGEXC = 0xc
- PT_STEP = 0x9
- PT_THUPDATE = 0xd
- PT_TRACE_ME = 0x0
- PT_WRITE_D = 0x5
- PT_WRITE_I = 0x4
- PT_WRITE_U = 0x6
- RLIMIT_AS = 0x5
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_CPU_USAGE_MONITOR = 0x2
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_MEMLOCK = 0x6
- RLIMIT_NOFILE = 0x8
- RLIMIT_NPROC = 0x7
- RLIMIT_RSS = 0x5
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0x7fffffffffffffff
- RTAX_AUTHOR = 0x6
- RTAX_BRD = 0x7
- RTAX_DST = 0x0
- RTAX_GATEWAY = 0x1
- RTAX_GENMASK = 0x3
- RTAX_IFA = 0x5
- RTAX_IFP = 0x4
- RTAX_MAX = 0x8
- RTAX_NETMASK = 0x2
- RTA_AUTHOR = 0x40
- RTA_BRD = 0x80
- RTA_DST = 0x1
- RTA_GATEWAY = 0x2
- RTA_GENMASK = 0x8
- RTA_IFA = 0x20
- RTA_IFP = 0x10
- RTA_NETMASK = 0x4
- RTF_BLACKHOLE = 0x1000
- RTF_BROADCAST = 0x400000
- RTF_CLONING = 0x100
- RTF_CONDEMNED = 0x2000000
- RTF_DEAD = 0x20000000
- RTF_DELCLONE = 0x80
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_GATEWAY = 0x2
- RTF_GLOBAL = 0x40000000
- RTF_HOST = 0x4
- RTF_IFREF = 0x4000000
- RTF_IFSCOPE = 0x1000000
- RTF_LLDATA = 0x400
- RTF_LLINFO = 0x400
- RTF_LOCAL = 0x200000
- RTF_MODIFIED = 0x20
- RTF_MULTICAST = 0x800000
- RTF_NOIFREF = 0x2000
- RTF_PINNED = 0x100000
- RTF_PRCLONING = 0x10000
- RTF_PROTO1 = 0x8000
- RTF_PROTO2 = 0x4000
- RTF_PROTO3 = 0x40000
- RTF_PROXY = 0x8000000
- RTF_REJECT = 0x8
- RTF_ROUTER = 0x10000000
- RTF_STATIC = 0x800
- RTF_UP = 0x1
- RTF_WASCLONED = 0x20000
- RTF_XRESOLVE = 0x200
- RTM_ADD = 0x1
- RTM_CHANGE = 0x3
- RTM_DELADDR = 0xd
- RTM_DELETE = 0x2
- RTM_DELMADDR = 0x10
- RTM_GET = 0x4
- RTM_GET2 = 0x14
- RTM_IFINFO = 0xe
- RTM_IFINFO2 = 0x12
- RTM_LOCK = 0x8
- RTM_LOSING = 0x5
- RTM_MISS = 0x7
- RTM_NEWADDR = 0xc
- RTM_NEWMADDR = 0xf
- RTM_NEWMADDR2 = 0x13
- RTM_OLDADD = 0x9
- RTM_OLDDEL = 0xa
- RTM_REDIRECT = 0x6
- RTM_RESOLVE = 0xb
- RTM_RTTUNIT = 0xf4240
- RTM_VERSION = 0x5
- RTV_EXPIRE = 0x4
- RTV_HOPCOUNT = 0x2
- RTV_MTU = 0x1
- RTV_RPIPE = 0x8
- RTV_RTT = 0x40
- RTV_RTTVAR = 0x80
- RTV_SPIPE = 0x10
- RTV_SSTHRESH = 0x20
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- SCM_CREDS = 0x3
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x2
- SCM_TIMESTAMP_MONOTONIC = 0x4
- SEEK_CUR = 0x1
- SEEK_DATA = 0x4
- SEEK_END = 0x2
- SEEK_HOLE = 0x3
- SEEK_SET = 0x0
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDMULTI = 0x80206931
- SIOCAIFADDR = 0x8040691a
- SIOCARPIPLL = 0xc0206928
- SIOCATMARK = 0x40047307
- SIOCAUTOADDR = 0xc0206926
- SIOCAUTONETMASK = 0x80206927
- SIOCDELMULTI = 0x80206932
- SIOCDIFADDR = 0x80206919
- SIOCDIFPHYADDR = 0x80206941
- SIOCGDRVSPEC = 0xc028697b
- SIOCGETVLAN = 0xc020697f
- SIOCGHIWAT = 0x40047301
- SIOCGIF6LOWPAN = 0xc02069c5
- SIOCGIFADDR = 0xc0206921
- SIOCGIFALTMTU = 0xc0206948
- SIOCGIFASYNCMAP = 0xc020697c
- SIOCGIFBOND = 0xc0206947
- SIOCGIFBRDADDR = 0xc0206923
- SIOCGIFCAP = 0xc020695b
- SIOCGIFCONF = 0xc00c6924
- SIOCGIFDEVMTU = 0xc0206944
- SIOCGIFDSTADDR = 0xc0206922
- SIOCGIFFLAGS = 0xc0206911
- SIOCGIFFUNCTIONALTYPE = 0xc02069ad
- SIOCGIFGENERIC = 0xc020693a
- SIOCGIFKPI = 0xc0206987
- SIOCGIFMAC = 0xc0206982
- SIOCGIFMEDIA = 0xc02c6938
- SIOCGIFMETRIC = 0xc0206917
- SIOCGIFMTU = 0xc0206933
- SIOCGIFNETMASK = 0xc0206925
- SIOCGIFPDSTADDR = 0xc0206940
- SIOCGIFPHYS = 0xc0206935
- SIOCGIFPSRCADDR = 0xc020693f
- SIOCGIFSTATUS = 0xc331693d
- SIOCGIFVLAN = 0xc020697f
- SIOCGIFWAKEFLAGS = 0xc0206988
- SIOCGIFXMEDIA = 0xc02c6948
- SIOCGLOWAT = 0x40047303
- SIOCGPGRP = 0x40047309
- SIOCIFCREATE = 0xc0206978
- SIOCIFCREATE2 = 0xc020697a
- SIOCIFDESTROY = 0x80206979
- SIOCIFGCLONERS = 0xc0106981
- SIOCRSLVMULTI = 0xc010693b
- SIOCSDRVSPEC = 0x8028697b
- SIOCSETVLAN = 0x8020697e
- SIOCSHIWAT = 0x80047300
- SIOCSIF6LOWPAN = 0x802069c4
- SIOCSIFADDR = 0x8020690c
- SIOCSIFALTMTU = 0x80206945
- SIOCSIFASYNCMAP = 0x8020697d
- SIOCSIFBOND = 0x80206946
- SIOCSIFBRDADDR = 0x80206913
- SIOCSIFCAP = 0x8020695a
- SIOCSIFDSTADDR = 0x8020690e
- SIOCSIFFLAGS = 0x80206910
- SIOCSIFGENERIC = 0x80206939
- SIOCSIFKPI = 0x80206986
- SIOCSIFLLADDR = 0x8020693c
- SIOCSIFMAC = 0x80206983
- SIOCSIFMEDIA = 0xc0206937
- SIOCSIFMETRIC = 0x80206918
- SIOCSIFMTU = 0x80206934
- SIOCSIFNETMASK = 0x80206916
- SIOCSIFPHYADDR = 0x8040693e
- SIOCSIFPHYS = 0x80206936
- SIOCSIFVLAN = 0x8020697e
- SIOCSLOWAT = 0x80047302
- SIOCSPGRP = 0x80047308
- SOCK_DGRAM = 0x2
- SOCK_MAXADDRLEN = 0xff
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_LOCAL = 0x0
- SOL_SOCKET = 0xffff
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x2
- SO_BROADCAST = 0x20
- SO_DEBUG = 0x1
- SO_DONTROUTE = 0x10
- SO_DONTTRUNC = 0x2000
- SO_ERROR = 0x1007
- SO_KEEPALIVE = 0x8
- SO_LABEL = 0x1010
- SO_LINGER = 0x80
- SO_LINGER_SEC = 0x1080
- SO_NETSVC_MARKING_LEVEL = 0x1119
- SO_NET_SERVICE_TYPE = 0x1116
- SO_NKE = 0x1021
- SO_NOADDRERR = 0x1023
- SO_NOSIGPIPE = 0x1022
- SO_NOTIFYCONFLICT = 0x1026
- SO_NP_EXTENSIONS = 0x1083
- SO_NREAD = 0x1020
- SO_NUMRCVPKT = 0x1112
- SO_NWRITE = 0x1024
- SO_OOBINLINE = 0x100
- SO_PEERLABEL = 0x1011
- SO_RANDOMPORT = 0x1082
- SO_RCVBUF = 0x1002
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x1006
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_REUSESHAREUID = 0x1025
- SO_SNDBUF = 0x1001
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x1005
- SO_TIMESTAMP = 0x400
- SO_TIMESTAMP_MONOTONIC = 0x800
- SO_TYPE = 0x1008
- SO_UPCALLCLOSEWAIT = 0x1027
- SO_USELOOPBACK = 0x40
- SO_WANTMORE = 0x4000
- SO_WANTOOBFLAG = 0x8000
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IFWHT = 0xe000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISTXT = 0x200
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TAB0 = 0x0
- TAB1 = 0x400
- TAB2 = 0x800
- TAB3 = 0x4
- TABDLY = 0xc04
- TCIFLUSH = 0x1
- TCIOFF = 0x3
- TCIOFLUSH = 0x3
- TCION = 0x4
- TCOFLUSH = 0x2
- TCOOFF = 0x1
- TCOON = 0x2
- TCP_CONNECTIONTIMEOUT = 0x20
- TCP_CONNECTION_INFO = 0x106
- TCP_ENABLE_ECN = 0x104
- TCP_FASTOPEN = 0x105
- TCP_KEEPALIVE = 0x10
- TCP_KEEPCNT = 0x102
- TCP_KEEPINTVL = 0x101
- TCP_MAXHLEN = 0x3c
- TCP_MAXOLEN = 0x28
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_SACK = 0x4
- TCP_MAX_WINSHIFT = 0xe
- TCP_MINMSS = 0xd8
- TCP_MSS = 0x200
- TCP_NODELAY = 0x1
- TCP_NOOPT = 0x8
- TCP_NOPUSH = 0x4
- TCP_NOTSENT_LOWAT = 0x201
- TCP_RXT_CONNDROPTIME = 0x80
- TCP_RXT_FINDROP = 0x100
- TCP_SENDMOREACKS = 0x103
- TCSAFLUSH = 0x2
- TIOCCBRK = 0x2000747a
- TIOCCDTR = 0x20007478
- TIOCCONS = 0x80047462
- TIOCDCDTIMESTAMP = 0x40107458
- TIOCDRAIN = 0x2000745e
- TIOCDSIMICROCODE = 0x20007455
- TIOCEXCL = 0x2000740d
- TIOCEXT = 0x80047460
- TIOCFLUSH = 0x80047410
- TIOCGDRAINWAIT = 0x40047456
- TIOCGETA = 0x40487413
- TIOCGETD = 0x4004741a
- TIOCGPGRP = 0x40047477
- TIOCGWINSZ = 0x40087468
- TIOCIXOFF = 0x20007480
- TIOCIXON = 0x20007481
- TIOCMBIC = 0x8004746b
- TIOCMBIS = 0x8004746c
- TIOCMGDTRWAIT = 0x4004745a
- TIOCMGET = 0x4004746a
- TIOCMODG = 0x40047403
- TIOCMODS = 0x80047404
- TIOCMSDTRWAIT = 0x8004745b
- TIOCMSET = 0x8004746d
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x20007471
- TIOCNXCL = 0x2000740e
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x80047470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCPTYGNAME = 0x40807453
- TIOCPTYGRANT = 0x20007454
- TIOCPTYUNLK = 0x20007452
- TIOCREMOTE = 0x80047469
- TIOCSBRK = 0x2000747b
- TIOCSCONS = 0x20007463
- TIOCSCTTY = 0x20007461
- TIOCSDRAINWAIT = 0x80047457
- TIOCSDTR = 0x20007479
- TIOCSETA = 0x80487414
- TIOCSETAF = 0x80487416
- TIOCSETAW = 0x80487415
- TIOCSETD = 0x8004741b
- TIOCSIG = 0x2000745f
- TIOCSPGRP = 0x80047476
- TIOCSTART = 0x2000746e
- TIOCSTAT = 0x20007465
- TIOCSTI = 0x80017472
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCTIMESTAMP = 0x40107459
- TIOCUCNTL = 0x80047466
- TOSTOP = 0x400000
- VDISCARD = 0xf
- VDSUSP = 0xb
- VEOF = 0x0
- VEOL = 0x1
- VEOL2 = 0x2
- VERASE = 0x3
- VINTR = 0x8
- VKILL = 0x5
- VLNEXT = 0xe
- VMIN = 0x10
- VM_LOADAVG = 0x2
- VM_MACHFACTOR = 0x4
- VM_MAXID = 0x6
- VM_METER = 0x1
- VM_SWAPUSAGE = 0x5
- VQUIT = 0x9
- VREPRINT = 0x6
- VSTART = 0xc
- VSTATUS = 0x12
- VSTOP = 0xd
- VSUSP = 0xa
- VT0 = 0x0
- VT1 = 0x10000
- VTDLY = 0x10000
- VTIME = 0x11
- VWERASE = 0x4
- WCONTINUED = 0x10
- WCOREFLAG = 0x80
- WEXITED = 0x4
- WNOHANG = 0x1
- WNOWAIT = 0x20
- WORDSIZE = 0x40
- WSTOPPED = 0x8
- WUNTRACED = 0x2
- XATTR_CREATE = 0x2
- XATTR_NODEFAULT = 0x10
- XATTR_NOFOLLOW = 0x1
- XATTR_NOSECURITY = 0x8
- XATTR_REPLACE = 0x4
- XATTR_SHOWCOMPRESSION = 0x20
+ AF_APPLETALK = 0x10
+ AF_CCITT = 0xa
+ AF_CHAOS = 0x5
+ AF_CNT = 0x15
+ AF_COIP = 0x14
+ AF_DATAKIT = 0x9
+ AF_DECnet = 0xc
+ AF_DLI = 0xd
+ AF_E164 = 0x1c
+ AF_ECMA = 0x8
+ AF_HYLINK = 0xf
+ AF_IEEE80211 = 0x25
+ AF_IMPLINK = 0x3
+ AF_INET = 0x2
+ AF_INET6 = 0x1e
+ AF_IPX = 0x17
+ AF_ISDN = 0x1c
+ AF_ISO = 0x7
+ AF_LAT = 0xe
+ AF_LINK = 0x12
+ AF_LOCAL = 0x1
+ AF_MAX = 0x29
+ AF_NATM = 0x1f
+ AF_NDRV = 0x1b
+ AF_NETBIOS = 0x21
+ AF_NS = 0x6
+ AF_OSI = 0x7
+ AF_PPP = 0x22
+ AF_PUP = 0x4
+ AF_RESERVED_36 = 0x24
+ AF_ROUTE = 0x11
+ AF_SIP = 0x18
+ AF_SNA = 0xb
+ AF_SYSTEM = 0x20
+ AF_SYS_CONTROL = 0x2
+ AF_UNIX = 0x1
+ AF_UNSPEC = 0x0
+ AF_UTUN = 0x26
+ AF_VSOCK = 0x28
+ ALTWERASE = 0x200
+ ATTR_BIT_MAP_COUNT = 0x5
+ ATTR_CMN_ACCESSMASK = 0x20000
+ ATTR_CMN_ACCTIME = 0x1000
+ ATTR_CMN_ADDEDTIME = 0x10000000
+ ATTR_CMN_BKUPTIME = 0x2000
+ ATTR_CMN_CHGTIME = 0x800
+ ATTR_CMN_CRTIME = 0x200
+ ATTR_CMN_DATA_PROTECT_FLAGS = 0x40000000
+ ATTR_CMN_DEVID = 0x2
+ ATTR_CMN_DOCUMENT_ID = 0x100000
+ ATTR_CMN_ERROR = 0x20000000
+ ATTR_CMN_EXTENDED_SECURITY = 0x400000
+ ATTR_CMN_FILEID = 0x2000000
+ ATTR_CMN_FLAGS = 0x40000
+ ATTR_CMN_FNDRINFO = 0x4000
+ ATTR_CMN_FSID = 0x4
+ ATTR_CMN_FULLPATH = 0x8000000
+ ATTR_CMN_GEN_COUNT = 0x80000
+ ATTR_CMN_GRPID = 0x10000
+ ATTR_CMN_GRPUUID = 0x1000000
+ ATTR_CMN_MODTIME = 0x400
+ ATTR_CMN_NAME = 0x1
+ ATTR_CMN_NAMEDATTRCOUNT = 0x80000
+ ATTR_CMN_NAMEDATTRLIST = 0x100000
+ ATTR_CMN_OBJID = 0x20
+ ATTR_CMN_OBJPERMANENTID = 0x40
+ ATTR_CMN_OBJTAG = 0x10
+ ATTR_CMN_OBJTYPE = 0x8
+ ATTR_CMN_OWNERID = 0x8000
+ ATTR_CMN_PARENTID = 0x4000000
+ ATTR_CMN_PAROBJID = 0x80
+ ATTR_CMN_RETURNED_ATTRS = 0x80000000
+ ATTR_CMN_SCRIPT = 0x100
+ ATTR_CMN_SETMASK = 0x51c7ff00
+ ATTR_CMN_USERACCESS = 0x200000
+ ATTR_CMN_UUID = 0x800000
+ ATTR_CMN_VALIDMASK = 0xffffffff
+ ATTR_CMN_VOLSETMASK = 0x6700
+ ATTR_FILE_ALLOCSIZE = 0x4
+ ATTR_FILE_CLUMPSIZE = 0x10
+ ATTR_FILE_DATAALLOCSIZE = 0x400
+ ATTR_FILE_DATAEXTENTS = 0x800
+ ATTR_FILE_DATALENGTH = 0x200
+ ATTR_FILE_DEVTYPE = 0x20
+ ATTR_FILE_FILETYPE = 0x40
+ ATTR_FILE_FORKCOUNT = 0x80
+ ATTR_FILE_FORKLIST = 0x100
+ ATTR_FILE_IOBLOCKSIZE = 0x8
+ ATTR_FILE_LINKCOUNT = 0x1
+ ATTR_FILE_RSRCALLOCSIZE = 0x2000
+ ATTR_FILE_RSRCEXTENTS = 0x4000
+ ATTR_FILE_RSRCLENGTH = 0x1000
+ ATTR_FILE_SETMASK = 0x20
+ ATTR_FILE_TOTALSIZE = 0x2
+ ATTR_FILE_VALIDMASK = 0x37ff
+ ATTR_VOL_ALLOCATIONCLUMP = 0x40
+ ATTR_VOL_ATTRIBUTES = 0x40000000
+ ATTR_VOL_CAPABILITIES = 0x20000
+ ATTR_VOL_DIRCOUNT = 0x400
+ ATTR_VOL_ENCODINGSUSED = 0x10000
+ ATTR_VOL_FILECOUNT = 0x200
+ ATTR_VOL_FSTYPE = 0x1
+ ATTR_VOL_INFO = 0x80000000
+ ATTR_VOL_IOBLOCKSIZE = 0x80
+ ATTR_VOL_MAXOBJCOUNT = 0x800
+ ATTR_VOL_MINALLOCATION = 0x20
+ ATTR_VOL_MOUNTEDDEVICE = 0x8000
+ ATTR_VOL_MOUNTFLAGS = 0x4000
+ ATTR_VOL_MOUNTPOINT = 0x1000
+ ATTR_VOL_NAME = 0x2000
+ ATTR_VOL_OBJCOUNT = 0x100
+ ATTR_VOL_QUOTA_SIZE = 0x10000000
+ ATTR_VOL_RESERVED_SIZE = 0x20000000
+ ATTR_VOL_SETMASK = 0x80002000
+ ATTR_VOL_SIGNATURE = 0x2
+ ATTR_VOL_SIZE = 0x4
+ ATTR_VOL_SPACEAVAIL = 0x10
+ ATTR_VOL_SPACEFREE = 0x8
+ ATTR_VOL_SPACEUSED = 0x800000
+ ATTR_VOL_UUID = 0x40000
+ ATTR_VOL_VALIDMASK = 0xf087ffff
+ B0 = 0x0
+ B110 = 0x6e
+ B115200 = 0x1c200
+ B1200 = 0x4b0
+ B134 = 0x86
+ B14400 = 0x3840
+ B150 = 0x96
+ B1800 = 0x708
+ B19200 = 0x4b00
+ B200 = 0xc8
+ B230400 = 0x38400
+ B2400 = 0x960
+ B28800 = 0x7080
+ B300 = 0x12c
+ B38400 = 0x9600
+ B4800 = 0x12c0
+ B50 = 0x32
+ B57600 = 0xe100
+ B600 = 0x258
+ B7200 = 0x1c20
+ B75 = 0x4b
+ B76800 = 0x12c00
+ B9600 = 0x2580
+ BIOCFLUSH = 0x20004268
+ BIOCGBLEN = 0x40044266
+ BIOCGDLT = 0x4004426a
+ BIOCGDLTLIST = 0xc00c4279
+ BIOCGETIF = 0x4020426b
+ BIOCGHDRCMPLT = 0x40044274
+ BIOCGRSIG = 0x40044272
+ BIOCGRTIMEOUT = 0x4010426e
+ BIOCGSEESENT = 0x40044276
+ BIOCGSTATS = 0x4008426f
+ BIOCIMMEDIATE = 0x80044270
+ BIOCPROMISC = 0x20004269
+ BIOCSBLEN = 0xc0044266
+ BIOCSDLT = 0x80044278
+ BIOCSETF = 0x80104267
+ BIOCSETFNR = 0x8010427e
+ BIOCSETIF = 0x8020426c
+ BIOCSHDRCMPLT = 0x80044275
+ BIOCSRSIG = 0x80044273
+ BIOCSRTIMEOUT = 0x8010426d
+ BIOCSSEESENT = 0x80044277
+ BIOCVERSION = 0x40044271
+ BPF_A = 0x10
+ BPF_ABS = 0x20
+ BPF_ADD = 0x0
+ BPF_ALIGNMENT = 0x4
+ BPF_ALU = 0x4
+ BPF_AND = 0x50
+ BPF_B = 0x10
+ BPF_DIV = 0x30
+ BPF_H = 0x8
+ BPF_IMM = 0x0
+ BPF_IND = 0x40
+ BPF_JA = 0x0
+ BPF_JEQ = 0x10
+ BPF_JGE = 0x30
+ BPF_JGT = 0x20
+ BPF_JMP = 0x5
+ BPF_JSET = 0x40
+ BPF_K = 0x0
+ BPF_LD = 0x0
+ BPF_LDX = 0x1
+ BPF_LEN = 0x80
+ BPF_LSH = 0x60
+ BPF_MAJOR_VERSION = 0x1
+ BPF_MAXBUFSIZE = 0x80000
+ BPF_MAXINSNS = 0x200
+ BPF_MEM = 0x60
+ BPF_MEMWORDS = 0x10
+ BPF_MINBUFSIZE = 0x20
+ BPF_MINOR_VERSION = 0x1
+ BPF_MISC = 0x7
+ BPF_MSH = 0xa0
+ BPF_MUL = 0x20
+ BPF_NEG = 0x80
+ BPF_OR = 0x40
+ BPF_RELEASE = 0x30bb6
+ BPF_RET = 0x6
+ BPF_RSH = 0x70
+ BPF_ST = 0x2
+ BPF_STX = 0x3
+ BPF_SUB = 0x10
+ BPF_TAX = 0x0
+ BPF_TXA = 0x80
+ BPF_W = 0x0
+ BPF_X = 0x8
+ BRKINT = 0x2
+ BS0 = 0x0
+ BS1 = 0x8000
+ BSDLY = 0x8000
+ CFLUSH = 0xf
+ CLOCAL = 0x8000
+ CLOCK_MONOTONIC = 0x6
+ CLOCK_MONOTONIC_RAW = 0x4
+ CLOCK_MONOTONIC_RAW_APPROX = 0x5
+ CLOCK_PROCESS_CPUTIME_ID = 0xc
+ CLOCK_REALTIME = 0x0
+ CLOCK_THREAD_CPUTIME_ID = 0x10
+ CLOCK_UPTIME_RAW = 0x8
+ CLOCK_UPTIME_RAW_APPROX = 0x9
+ CLONE_NOFOLLOW = 0x1
+ CLONE_NOOWNERCOPY = 0x2
+ CR0 = 0x0
+ CR1 = 0x1000
+ CR2 = 0x2000
+ CR3 = 0x3000
+ CRDLY = 0x3000
+ CREAD = 0x800
+ CRTSCTS = 0x30000
+ CS5 = 0x0
+ CS6 = 0x100
+ CS7 = 0x200
+ CS8 = 0x300
+ CSIZE = 0x300
+ CSTART = 0x11
+ CSTATUS = 0x14
+ CSTOP = 0x13
+ CSTOPB = 0x400
+ CSUSP = 0x1a
+ CTLIOCGINFO = 0xc0644e03
+ CTL_HW = 0x6
+ CTL_KERN = 0x1
+ CTL_MAXNAME = 0xc
+ CTL_NET = 0x4
+ DLT_A429 = 0xb8
+ DLT_A653_ICM = 0xb9
+ DLT_AIRONET_HEADER = 0x78
+ DLT_AOS = 0xde
+ DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
+ DLT_ARCNET = 0x7
+ DLT_ARCNET_LINUX = 0x81
+ DLT_ATM_CLIP = 0x13
+ DLT_ATM_RFC1483 = 0xb
+ DLT_AURORA = 0x7e
+ DLT_AX25 = 0x3
+ DLT_AX25_KISS = 0xca
+ DLT_BACNET_MS_TP = 0xa5
+ DLT_BLUETOOTH_HCI_H4 = 0xbb
+ DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
+ DLT_CAN20B = 0xbe
+ DLT_CAN_SOCKETCAN = 0xe3
+ DLT_CHAOS = 0x5
+ DLT_CHDLC = 0x68
+ DLT_CISCO_IOS = 0x76
+ DLT_C_HDLC = 0x68
+ DLT_C_HDLC_WITH_DIR = 0xcd
+ DLT_DBUS = 0xe7
+ DLT_DECT = 0xdd
+ DLT_DOCSIS = 0x8f
+ DLT_DVB_CI = 0xeb
+ DLT_ECONET = 0x73
+ DLT_EN10MB = 0x1
+ DLT_EN3MB = 0x2
+ DLT_ENC = 0x6d
+ DLT_ERF = 0xc5
+ DLT_ERF_ETH = 0xaf
+ DLT_ERF_POS = 0xb0
+ DLT_FC_2 = 0xe0
+ DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
+ DLT_FDDI = 0xa
+ DLT_FLEXRAY = 0xd2
+ DLT_FRELAY = 0x6b
+ DLT_FRELAY_WITH_DIR = 0xce
+ DLT_GCOM_SERIAL = 0xad
+ DLT_GCOM_T1E1 = 0xac
+ DLT_GPF_F = 0xab
+ DLT_GPF_T = 0xaa
+ DLT_GPRS_LLC = 0xa9
+ DLT_GSMTAP_ABIS = 0xda
+ DLT_GSMTAP_UM = 0xd9
+ DLT_HHDLC = 0x79
+ DLT_IBM_SN = 0x92
+ DLT_IBM_SP = 0x91
+ DLT_IEEE802 = 0x6
+ DLT_IEEE802_11 = 0x69
+ DLT_IEEE802_11_RADIO = 0x7f
+ DLT_IEEE802_11_RADIO_AVS = 0xa3
+ DLT_IEEE802_15_4 = 0xc3
+ DLT_IEEE802_15_4_LINUX = 0xbf
+ DLT_IEEE802_15_4_NOFCS = 0xe6
+ DLT_IEEE802_15_4_NONASK_PHY = 0xd7
+ DLT_IEEE802_16_MAC_CPS = 0xbc
+ DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
+ DLT_IPFILTER = 0x74
+ DLT_IPMB = 0xc7
+ DLT_IPMB_LINUX = 0xd1
+ DLT_IPNET = 0xe2
+ DLT_IPOIB = 0xf2
+ DLT_IPV4 = 0xe4
+ DLT_IPV6 = 0xe5
+ DLT_IP_OVER_FC = 0x7a
+ DLT_JUNIPER_ATM1 = 0x89
+ DLT_JUNIPER_ATM2 = 0x87
+ DLT_JUNIPER_ATM_CEMIC = 0xee
+ DLT_JUNIPER_CHDLC = 0xb5
+ DLT_JUNIPER_ES = 0x84
+ DLT_JUNIPER_ETHER = 0xb2
+ DLT_JUNIPER_FIBRECHANNEL = 0xea
+ DLT_JUNIPER_FRELAY = 0xb4
+ DLT_JUNIPER_GGSN = 0x85
+ DLT_JUNIPER_ISM = 0xc2
+ DLT_JUNIPER_MFR = 0x86
+ DLT_JUNIPER_MLFR = 0x83
+ DLT_JUNIPER_MLPPP = 0x82
+ DLT_JUNIPER_MONITOR = 0xa4
+ DLT_JUNIPER_PIC_PEER = 0xae
+ DLT_JUNIPER_PPP = 0xb3
+ DLT_JUNIPER_PPPOE = 0xa7
+ DLT_JUNIPER_PPPOE_ATM = 0xa8
+ DLT_JUNIPER_SERVICES = 0x88
+ DLT_JUNIPER_SRX_E2E = 0xe9
+ DLT_JUNIPER_ST = 0xc8
+ DLT_JUNIPER_VP = 0xb7
+ DLT_JUNIPER_VS = 0xe8
+ DLT_LAPB_WITH_DIR = 0xcf
+ DLT_LAPD = 0xcb
+ DLT_LIN = 0xd4
+ DLT_LINUX_EVDEV = 0xd8
+ DLT_LINUX_IRDA = 0x90
+ DLT_LINUX_LAPD = 0xb1
+ DLT_LINUX_PPP_WITHDIRECTION = 0xa6
+ DLT_LINUX_SLL = 0x71
+ DLT_LOOP = 0x6c
+ DLT_LTALK = 0x72
+ DLT_MATCHING_MAX = 0x10a
+ DLT_MATCHING_MIN = 0x68
+ DLT_MFR = 0xb6
+ DLT_MOST = 0xd3
+ DLT_MPEG_2_TS = 0xf3
+ DLT_MPLS = 0xdb
+ DLT_MTP2 = 0x8c
+ DLT_MTP2_WITH_PHDR = 0x8b
+ DLT_MTP3 = 0x8d
+ DLT_MUX27010 = 0xec
+ DLT_NETANALYZER = 0xf0
+ DLT_NETANALYZER_TRANSPARENT = 0xf1
+ DLT_NFC_LLCP = 0xf5
+ DLT_NFLOG = 0xef
+ DLT_NG40 = 0xf4
+ DLT_NULL = 0x0
+ DLT_PCI_EXP = 0x7d
+ DLT_PFLOG = 0x75
+ DLT_PFSYNC = 0x12
+ DLT_PPI = 0xc0
+ DLT_PPP = 0x9
+ DLT_PPP_BSDOS = 0x10
+ DLT_PPP_ETHER = 0x33
+ DLT_PPP_PPPD = 0xa6
+ DLT_PPP_SERIAL = 0x32
+ DLT_PPP_WITH_DIR = 0xcc
+ DLT_PPP_WITH_DIRECTION = 0xa6
+ DLT_PRISM_HEADER = 0x77
+ DLT_PRONET = 0x4
+ DLT_RAIF1 = 0xc6
+ DLT_RAW = 0xc
+ DLT_RIO = 0x7c
+ DLT_SCCP = 0x8e
+ DLT_SITA = 0xc4
+ DLT_SLIP = 0x8
+ DLT_SLIP_BSDOS = 0xf
+ DLT_STANAG_5066_D_PDU = 0xed
+ DLT_SUNATM = 0x7b
+ DLT_SYMANTEC_FIREWALL = 0x63
+ DLT_TZSP = 0x80
+ DLT_USB = 0xba
+ DLT_USB_DARWIN = 0x10a
+ DLT_USB_LINUX = 0xbd
+ DLT_USB_LINUX_MMAPPED = 0xdc
+ DLT_USER0 = 0x93
+ DLT_USER1 = 0x94
+ DLT_USER10 = 0x9d
+ DLT_USER11 = 0x9e
+ DLT_USER12 = 0x9f
+ DLT_USER13 = 0xa0
+ DLT_USER14 = 0xa1
+ DLT_USER15 = 0xa2
+ DLT_USER2 = 0x95
+ DLT_USER3 = 0x96
+ DLT_USER4 = 0x97
+ DLT_USER5 = 0x98
+ DLT_USER6 = 0x99
+ DLT_USER7 = 0x9a
+ DLT_USER8 = 0x9b
+ DLT_USER9 = 0x9c
+ DLT_WIHART = 0xdf
+ DLT_X2E_SERIAL = 0xd5
+ DLT_X2E_XORAYA = 0xd6
+ DT_BLK = 0x6
+ DT_CHR = 0x2
+ DT_DIR = 0x4
+ DT_FIFO = 0x1
+ DT_LNK = 0xa
+ DT_REG = 0x8
+ DT_SOCK = 0xc
+ DT_UNKNOWN = 0x0
+ DT_WHT = 0xe
+ ECHO = 0x8
+ ECHOCTL = 0x40
+ ECHOE = 0x2
+ ECHOK = 0x4
+ ECHOKE = 0x1
+ ECHONL = 0x10
+ ECHOPRT = 0x20
+ EVFILT_AIO = -0x3
+ EVFILT_EXCEPT = -0xf
+ EVFILT_FS = -0x9
+ EVFILT_MACHPORT = -0x8
+ EVFILT_PROC = -0x5
+ EVFILT_READ = -0x1
+ EVFILT_SIGNAL = -0x6
+ EVFILT_SYSCOUNT = 0x11
+ EVFILT_THREADMARKER = 0x11
+ EVFILT_TIMER = -0x7
+ EVFILT_USER = -0xa
+ EVFILT_VM = -0xc
+ EVFILT_VNODE = -0x4
+ EVFILT_WRITE = -0x2
+ EV_ADD = 0x1
+ EV_CLEAR = 0x20
+ EV_DELETE = 0x2
+ EV_DISABLE = 0x8
+ EV_DISPATCH = 0x80
+ EV_DISPATCH2 = 0x180
+ EV_ENABLE = 0x4
+ EV_EOF = 0x8000
+ EV_ERROR = 0x4000
+ EV_FLAG0 = 0x1000
+ EV_FLAG1 = 0x2000
+ EV_ONESHOT = 0x10
+ EV_OOBAND = 0x2000
+ EV_POLL = 0x1000
+ EV_RECEIPT = 0x40
+ EV_SYSFLAGS = 0xf000
+ EV_UDATA_SPECIFIC = 0x100
+ EV_VANISHED = 0x200
+ EXTA = 0x4b00
+ EXTB = 0x9600
+ EXTPROC = 0x800
+ FD_CLOEXEC = 0x1
+ FD_SETSIZE = 0x400
+ FF0 = 0x0
+ FF1 = 0x4000
+ FFDLY = 0x4000
+ FLUSHO = 0x800000
+ FSOPT_ATTR_CMN_EXTENDED = 0x20
+ FSOPT_NOFOLLOW = 0x1
+ FSOPT_NOINMEMUPDATE = 0x2
+ FSOPT_PACK_INVAL_ATTRS = 0x8
+ FSOPT_REPORT_FULLSIZE = 0x4
+ FSOPT_RETURN_REALDEV = 0x200
+ F_ADDFILESIGS = 0x3d
+ F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
+ F_ADDFILESIGS_INFO = 0x67
+ F_ADDFILESIGS_RETURN = 0x61
+ F_ADDFILESUPPL = 0x68
+ F_ADDSIGS = 0x3b
+ F_ALLOCATEALL = 0x4
+ F_ALLOCATECONTIG = 0x2
+ F_BARRIERFSYNC = 0x55
+ F_CHECK_LV = 0x62
+ F_CHKCLEAN = 0x29
+ F_DUPFD = 0x0
+ F_DUPFD_CLOEXEC = 0x43
+ F_FINDSIGS = 0x4e
+ F_FLUSH_DATA = 0x28
+ F_FREEZE_FS = 0x35
+ F_FULLFSYNC = 0x33
+ F_GETCODEDIR = 0x48
+ F_GETFD = 0x1
+ F_GETFL = 0x3
+ F_GETLK = 0x7
+ F_GETLKPID = 0x42
+ F_GETNOSIGPIPE = 0x4a
+ F_GETOWN = 0x5
+ F_GETPATH = 0x32
+ F_GETPATH_MTMINFO = 0x47
+ F_GETPATH_NOFIRMLINK = 0x66
+ F_GETPROTECTIONCLASS = 0x3f
+ F_GETPROTECTIONLEVEL = 0x4d
+ F_GETSIGSINFO = 0x69
+ F_GLOBAL_NOCACHE = 0x37
+ F_LOG2PHYS = 0x31
+ F_LOG2PHYS_EXT = 0x41
+ F_NOCACHE = 0x30
+ F_NODIRECT = 0x3e
+ F_OK = 0x0
+ F_PATHPKG_CHECK = 0x34
+ F_PEOFPOSMODE = 0x3
+ F_PREALLOCATE = 0x2a
+ F_PUNCHHOLE = 0x63
+ F_RDADVISE = 0x2c
+ F_RDAHEAD = 0x2d
+ F_RDLCK = 0x1
+ F_SETBACKINGSTORE = 0x46
+ F_SETFD = 0x2
+ F_SETFL = 0x4
+ F_SETLK = 0x8
+ F_SETLKW = 0x9
+ F_SETLKWTIMEOUT = 0xa
+ F_SETNOSIGPIPE = 0x49
+ F_SETOWN = 0x6
+ F_SETPROTECTIONCLASS = 0x40
+ F_SETSIZE = 0x2b
+ F_SINGLE_WRITER = 0x4c
+ F_SPECULATIVE_READ = 0x65
+ F_THAW_FS = 0x36
+ F_TRANSCODEKEY = 0x4b
+ F_TRIM_ACTIVE_FILE = 0x64
+ F_UNLCK = 0x2
+ F_VOLPOSMODE = 0x4
+ F_WRLCK = 0x3
+ HUPCL = 0x4000
+ HW_MACHINE = 0x1
+ ICANON = 0x100
+ ICMP6_FILTER = 0x12
+ ICRNL = 0x100
+ IEXTEN = 0x400
+ IFF_ALLMULTI = 0x200
+ IFF_ALTPHYS = 0x4000
+ IFF_BROADCAST = 0x2
+ IFF_DEBUG = 0x4
+ IFF_LINK0 = 0x1000
+ IFF_LINK1 = 0x2000
+ IFF_LINK2 = 0x4000
+ IFF_LOOPBACK = 0x8
+ IFF_MULTICAST = 0x8000
+ IFF_NOARP = 0x80
+ IFF_NOTRAILERS = 0x20
+ IFF_OACTIVE = 0x400
+ IFF_POINTOPOINT = 0x10
+ IFF_PROMISC = 0x100
+ IFF_RUNNING = 0x40
+ IFF_SIMPLEX = 0x800
+ IFF_UP = 0x1
+ IFNAMSIZ = 0x10
+ IFT_1822 = 0x2
+ IFT_6LOWPAN = 0x40
+ IFT_AAL5 = 0x31
+ IFT_ARCNET = 0x23
+ IFT_ARCNETPLUS = 0x24
+ IFT_ATM = 0x25
+ IFT_BRIDGE = 0xd1
+ IFT_CARP = 0xf8
+ IFT_CELLULAR = 0xff
+ IFT_CEPT = 0x13
+ IFT_DS3 = 0x1e
+ IFT_ENC = 0xf4
+ IFT_EON = 0x19
+ IFT_ETHER = 0x6
+ IFT_FAITH = 0x38
+ IFT_FDDI = 0xf
+ IFT_FRELAY = 0x20
+ IFT_FRELAYDCE = 0x2c
+ IFT_GIF = 0x37
+ IFT_HDH1822 = 0x3
+ IFT_HIPPI = 0x2f
+ IFT_HSSI = 0x2e
+ IFT_HY = 0xe
+ IFT_IEEE1394 = 0x90
+ IFT_IEEE8023ADLAG = 0x88
+ IFT_ISDNBASIC = 0x14
+ IFT_ISDNPRIMARY = 0x15
+ IFT_ISO88022LLC = 0x29
+ IFT_ISO88023 = 0x7
+ IFT_ISO88024 = 0x8
+ IFT_ISO88025 = 0x9
+ IFT_ISO88026 = 0xa
+ IFT_L2VLAN = 0x87
+ IFT_LAPB = 0x10
+ IFT_LOCALTALK = 0x2a
+ IFT_LOOP = 0x18
+ IFT_MIOX25 = 0x26
+ IFT_MODEM = 0x30
+ IFT_NSIP = 0x1b
+ IFT_OTHER = 0x1
+ IFT_P10 = 0xc
+ IFT_P80 = 0xd
+ IFT_PARA = 0x22
+ IFT_PDP = 0xff
+ IFT_PFLOG = 0xf5
+ IFT_PFSYNC = 0xf6
+ IFT_PKTAP = 0xfe
+ IFT_PPP = 0x17
+ IFT_PROPMUX = 0x36
+ IFT_PROPVIRTUAL = 0x35
+ IFT_PTPSERIAL = 0x16
+ IFT_RS232 = 0x21
+ IFT_SDLC = 0x11
+ IFT_SIP = 0x1f
+ IFT_SLIP = 0x1c
+ IFT_SMDSDXI = 0x2b
+ IFT_SMDSICIP = 0x34
+ IFT_SONET = 0x27
+ IFT_SONETPATH = 0x32
+ IFT_SONETVT = 0x33
+ IFT_STARLAN = 0xb
+ IFT_STF = 0x39
+ IFT_T1 = 0x12
+ IFT_ULTRA = 0x1d
+ IFT_V35 = 0x2d
+ IFT_X25 = 0x5
+ IFT_X25DDN = 0x4
+ IFT_X25PLE = 0x28
+ IFT_XETHER = 0x1a
+ IGNBRK = 0x1
+ IGNCR = 0x80
+ IGNPAR = 0x4
+ IMAXBEL = 0x2000
+ INLCR = 0x40
+ INPCK = 0x10
+ IN_CLASSA_HOST = 0xffffff
+ IN_CLASSA_MAX = 0x80
+ IN_CLASSA_NET = 0xff000000
+ IN_CLASSA_NSHIFT = 0x18
+ IN_CLASSB_HOST = 0xffff
+ IN_CLASSB_MAX = 0x10000
+ IN_CLASSB_NET = 0xffff0000
+ IN_CLASSB_NSHIFT = 0x10
+ IN_CLASSC_HOST = 0xff
+ IN_CLASSC_NET = 0xffffff00
+ IN_CLASSC_NSHIFT = 0x8
+ IN_CLASSD_HOST = 0xfffffff
+ IN_CLASSD_NET = 0xf0000000
+ IN_CLASSD_NSHIFT = 0x1c
+ IN_LINKLOCALNETNUM = 0xa9fe0000
+ IN_LOOPBACKNET = 0x7f
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x400473d1
+ IPPROTO_3PC = 0x22
+ IPPROTO_ADFS = 0x44
+ IPPROTO_AH = 0x33
+ IPPROTO_AHIP = 0x3d
+ IPPROTO_APES = 0x63
+ IPPROTO_ARGUS = 0xd
+ IPPROTO_AX25 = 0x5d
+ IPPROTO_BHA = 0x31
+ IPPROTO_BLT = 0x1e
+ IPPROTO_BRSATMON = 0x4c
+ IPPROTO_CFTP = 0x3e
+ IPPROTO_CHAOS = 0x10
+ IPPROTO_CMTP = 0x26
+ IPPROTO_CPHB = 0x49
+ IPPROTO_CPNX = 0x48
+ IPPROTO_DDP = 0x25
+ IPPROTO_DGP = 0x56
+ IPPROTO_DIVERT = 0xfe
+ IPPROTO_DONE = 0x101
+ IPPROTO_DSTOPTS = 0x3c
+ IPPROTO_EGP = 0x8
+ IPPROTO_EMCON = 0xe
+ IPPROTO_ENCAP = 0x62
+ IPPROTO_EON = 0x50
+ IPPROTO_ESP = 0x32
+ IPPROTO_ETHERIP = 0x61
+ IPPROTO_FRAGMENT = 0x2c
+ IPPROTO_GGP = 0x3
+ IPPROTO_GMTP = 0x64
+ IPPROTO_GRE = 0x2f
+ IPPROTO_HELLO = 0x3f
+ IPPROTO_HMP = 0x14
+ IPPROTO_HOPOPTS = 0x0
+ IPPROTO_ICMP = 0x1
+ IPPROTO_ICMPV6 = 0x3a
+ IPPROTO_IDP = 0x16
+ IPPROTO_IDPR = 0x23
+ IPPROTO_IDRP = 0x2d
+ IPPROTO_IGMP = 0x2
+ IPPROTO_IGP = 0x55
+ IPPROTO_IGRP = 0x58
+ IPPROTO_IL = 0x28
+ IPPROTO_INLSP = 0x34
+ IPPROTO_INP = 0x20
+ IPPROTO_IP = 0x0
+ IPPROTO_IPCOMP = 0x6c
+ IPPROTO_IPCV = 0x47
+ IPPROTO_IPEIP = 0x5e
+ IPPROTO_IPIP = 0x4
+ IPPROTO_IPPC = 0x43
+ IPPROTO_IPV4 = 0x4
+ IPPROTO_IPV6 = 0x29
+ IPPROTO_IRTP = 0x1c
+ IPPROTO_KRYPTOLAN = 0x41
+ IPPROTO_LARP = 0x5b
+ IPPROTO_LEAF1 = 0x19
+ IPPROTO_LEAF2 = 0x1a
+ IPPROTO_MAX = 0x100
+ IPPROTO_MAXID = 0x34
+ IPPROTO_MEAS = 0x13
+ IPPROTO_MHRP = 0x30
+ IPPROTO_MICP = 0x5f
+ IPPROTO_MTP = 0x5c
+ IPPROTO_MUX = 0x12
+ IPPROTO_ND = 0x4d
+ IPPROTO_NHRP = 0x36
+ IPPROTO_NONE = 0x3b
+ IPPROTO_NSP = 0x1f
+ IPPROTO_NVPII = 0xb
+ IPPROTO_OSPFIGP = 0x59
+ IPPROTO_PGM = 0x71
+ IPPROTO_PIGP = 0x9
+ IPPROTO_PIM = 0x67
+ IPPROTO_PRM = 0x15
+ IPPROTO_PUP = 0xc
+ IPPROTO_PVP = 0x4b
+ IPPROTO_RAW = 0xff
+ IPPROTO_RCCMON = 0xa
+ IPPROTO_RDP = 0x1b
+ IPPROTO_ROUTING = 0x2b
+ IPPROTO_RSVP = 0x2e
+ IPPROTO_RVD = 0x42
+ IPPROTO_SATEXPAK = 0x40
+ IPPROTO_SATMON = 0x45
+ IPPROTO_SCCSP = 0x60
+ IPPROTO_SCTP = 0x84
+ IPPROTO_SDRP = 0x2a
+ IPPROTO_SEP = 0x21
+ IPPROTO_SRPC = 0x5a
+ IPPROTO_ST = 0x7
+ IPPROTO_SVMTP = 0x52
+ IPPROTO_SWIPE = 0x35
+ IPPROTO_TCF = 0x57
+ IPPROTO_TCP = 0x6
+ IPPROTO_TP = 0x1d
+ IPPROTO_TPXX = 0x27
+ IPPROTO_TRUNK1 = 0x17
+ IPPROTO_TRUNK2 = 0x18
+ IPPROTO_TTP = 0x54
+ IPPROTO_UDP = 0x11
+ IPPROTO_VINES = 0x53
+ IPPROTO_VISA = 0x46
+ IPPROTO_VMTP = 0x51
+ IPPROTO_WBEXPAK = 0x4f
+ IPPROTO_WBMON = 0x4e
+ IPPROTO_WSN = 0x4a
+ IPPROTO_XNET = 0xf
+ IPPROTO_XTP = 0x24
+ IPV6_2292DSTOPTS = 0x17
+ IPV6_2292HOPLIMIT = 0x14
+ IPV6_2292HOPOPTS = 0x16
+ IPV6_2292NEXTHOP = 0x15
+ IPV6_2292PKTINFO = 0x13
+ IPV6_2292PKTOPTIONS = 0x19
+ IPV6_2292RTHDR = 0x18
+ IPV6_3542DSTOPTS = 0x32
+ IPV6_3542HOPLIMIT = 0x2f
+ IPV6_3542HOPOPTS = 0x31
+ IPV6_3542NEXTHOP = 0x30
+ IPV6_3542PKTINFO = 0x2e
+ IPV6_3542RTHDR = 0x33
+ IPV6_ADDR_MC_FLAGS_PREFIX = 0x20
+ IPV6_ADDR_MC_FLAGS_TRANSIENT = 0x10
+ IPV6_ADDR_MC_FLAGS_UNICAST_BASED = 0x30
+ IPV6_AUTOFLOWLABEL = 0x3b
+ IPV6_BINDV6ONLY = 0x1b
+ IPV6_BOUND_IF = 0x7d
+ IPV6_CHECKSUM = 0x1a
+ IPV6_DEFAULT_MULTICAST_HOPS = 0x1
+ IPV6_DEFAULT_MULTICAST_LOOP = 0x1
+ IPV6_DEFHLIM = 0x40
+ IPV6_DONTFRAG = 0x3e
+ IPV6_DSTOPTS = 0x32
+ IPV6_FAITH = 0x1d
+ IPV6_FLOWINFO_MASK = 0xffffff0f
+ IPV6_FLOWLABEL_MASK = 0xffff0f00
+ IPV6_FLOW_ECN_MASK = 0x3000
+ IPV6_FRAGTTL = 0x3c
+ IPV6_FW_ADD = 0x1e
+ IPV6_FW_DEL = 0x1f
+ IPV6_FW_FLUSH = 0x20
+ IPV6_FW_GET = 0x22
+ IPV6_FW_ZERO = 0x21
+ IPV6_HLIMDEC = 0x1
+ IPV6_HOPLIMIT = 0x2f
+ IPV6_HOPOPTS = 0x31
+ IPV6_IPSEC_POLICY = 0x1c
+ IPV6_JOIN_GROUP = 0xc
+ IPV6_LEAVE_GROUP = 0xd
+ IPV6_MAXHLIM = 0xff
+ IPV6_MAXOPTHDR = 0x800
+ IPV6_MAXPACKET = 0xffff
+ IPV6_MAX_GROUP_SRC_FILTER = 0x200
+ IPV6_MAX_MEMBERSHIPS = 0xfff
+ IPV6_MAX_SOCK_SRC_FILTER = 0x80
+ IPV6_MIN_MEMBERSHIPS = 0x1f
+ IPV6_MMTU = 0x500
+ IPV6_MSFILTER = 0x4a
+ IPV6_MULTICAST_HOPS = 0xa
+ IPV6_MULTICAST_IF = 0x9
+ IPV6_MULTICAST_LOOP = 0xb
+ IPV6_NEXTHOP = 0x30
+ IPV6_PATHMTU = 0x2c
+ IPV6_PKTINFO = 0x2e
+ IPV6_PORTRANGE = 0xe
+ IPV6_PORTRANGE_DEFAULT = 0x0
+ IPV6_PORTRANGE_HIGH = 0x1
+ IPV6_PORTRANGE_LOW = 0x2
+ IPV6_PREFER_TEMPADDR = 0x3f
+ IPV6_RECVDSTOPTS = 0x28
+ IPV6_RECVHOPLIMIT = 0x25
+ IPV6_RECVHOPOPTS = 0x27
+ IPV6_RECVPATHMTU = 0x2b
+ IPV6_RECVPKTINFO = 0x3d
+ IPV6_RECVRTHDR = 0x26
+ IPV6_RECVTCLASS = 0x23
+ IPV6_RTHDR = 0x33
+ IPV6_RTHDRDSTOPTS = 0x39
+ IPV6_RTHDR_LOOSE = 0x0
+ IPV6_RTHDR_STRICT = 0x1
+ IPV6_RTHDR_TYPE_0 = 0x0
+ IPV6_SOCKOPT_RESERVED1 = 0x3
+ IPV6_TCLASS = 0x24
+ IPV6_UNICAST_HOPS = 0x4
+ IPV6_USE_MIN_MTU = 0x2a
+ IPV6_V6ONLY = 0x1b
+ IPV6_VERSION = 0x60
+ IPV6_VERSION_MASK = 0xf0
+ IP_ADD_MEMBERSHIP = 0xc
+ IP_ADD_SOURCE_MEMBERSHIP = 0x46
+ IP_BLOCK_SOURCE = 0x48
+ IP_BOUND_IF = 0x19
+ IP_DEFAULT_MULTICAST_LOOP = 0x1
+ IP_DEFAULT_MULTICAST_TTL = 0x1
+ IP_DF = 0x4000
+ IP_DONTFRAG = 0x1c
+ IP_DROP_MEMBERSHIP = 0xd
+ IP_DROP_SOURCE_MEMBERSHIP = 0x47
+ IP_DUMMYNET_CONFIGURE = 0x3c
+ IP_DUMMYNET_DEL = 0x3d
+ IP_DUMMYNET_FLUSH = 0x3e
+ IP_DUMMYNET_GET = 0x40
+ IP_FAITH = 0x16
+ IP_FW_ADD = 0x28
+ IP_FW_DEL = 0x29
+ IP_FW_FLUSH = 0x2a
+ IP_FW_GET = 0x2c
+ IP_FW_RESETLOG = 0x2d
+ IP_FW_ZERO = 0x2b
+ IP_HDRINCL = 0x2
+ IP_IPSEC_POLICY = 0x15
+ IP_MAXPACKET = 0xffff
+ IP_MAX_GROUP_SRC_FILTER = 0x200
+ IP_MAX_MEMBERSHIPS = 0xfff
+ IP_MAX_SOCK_MUTE_FILTER = 0x80
+ IP_MAX_SOCK_SRC_FILTER = 0x80
+ IP_MF = 0x2000
+ IP_MIN_MEMBERSHIPS = 0x1f
+ IP_MSFILTER = 0x4a
+ IP_MSS = 0x240
+ IP_MULTICAST_IF = 0x9
+ IP_MULTICAST_IFINDEX = 0x42
+ IP_MULTICAST_LOOP = 0xb
+ IP_MULTICAST_TTL = 0xa
+ IP_MULTICAST_VIF = 0xe
+ IP_NAT__XXX = 0x37
+ IP_OFFMASK = 0x1fff
+ IP_OLD_FW_ADD = 0x32
+ IP_OLD_FW_DEL = 0x33
+ IP_OLD_FW_FLUSH = 0x34
+ IP_OLD_FW_GET = 0x36
+ IP_OLD_FW_RESETLOG = 0x38
+ IP_OLD_FW_ZERO = 0x35
+ IP_OPTIONS = 0x1
+ IP_PKTINFO = 0x1a
+ IP_PORTRANGE = 0x13
+ IP_PORTRANGE_DEFAULT = 0x0
+ IP_PORTRANGE_HIGH = 0x1
+ IP_PORTRANGE_LOW = 0x2
+ IP_RECVDSTADDR = 0x7
+ IP_RECVIF = 0x14
+ IP_RECVOPTS = 0x5
+ IP_RECVPKTINFO = 0x1a
+ IP_RECVRETOPTS = 0x6
+ IP_RECVTOS = 0x1b
+ IP_RECVTTL = 0x18
+ IP_RETOPTS = 0x8
+ IP_RF = 0x8000
+ IP_RSVP_OFF = 0x10
+ IP_RSVP_ON = 0xf
+ IP_RSVP_VIF_OFF = 0x12
+ IP_RSVP_VIF_ON = 0x11
+ IP_STRIPHDR = 0x17
+ IP_TOS = 0x3
+ IP_TRAFFIC_MGT_BACKGROUND = 0x41
+ IP_TTL = 0x4
+ IP_UNBLOCK_SOURCE = 0x49
+ ISIG = 0x80
+ ISTRIP = 0x20
+ IUTF8 = 0x4000
+ IXANY = 0x800
+ IXOFF = 0x400
+ IXON = 0x200
+ KERN_HOSTNAME = 0xa
+ KERN_OSRELEASE = 0x2
+ KERN_OSTYPE = 0x1
+ KERN_VERSION = 0x4
+ LOCAL_PEERCRED = 0x1
+ LOCAL_PEEREPID = 0x3
+ LOCAL_PEEREUUID = 0x5
+ LOCAL_PEERPID = 0x2
+ LOCAL_PEERTOKEN = 0x6
+ LOCAL_PEERUUID = 0x4
+ LOCK_EX = 0x2
+ LOCK_NB = 0x4
+ LOCK_SH = 0x1
+ LOCK_UN = 0x8
+ MADV_CAN_REUSE = 0x9
+ MADV_DONTNEED = 0x4
+ MADV_FREE = 0x5
+ MADV_FREE_REUSABLE = 0x7
+ MADV_FREE_REUSE = 0x8
+ MADV_NORMAL = 0x0
+ MADV_PAGEOUT = 0xa
+ MADV_RANDOM = 0x1
+ MADV_SEQUENTIAL = 0x2
+ MADV_WILLNEED = 0x3
+ MADV_ZERO_WIRED_PAGES = 0x6
+ MAP_32BIT = 0x8000
+ MAP_ANON = 0x1000
+ MAP_ANONYMOUS = 0x1000
+ MAP_COPY = 0x2
+ MAP_FILE = 0x0
+ MAP_FIXED = 0x10
+ MAP_HASSEMAPHORE = 0x200
+ MAP_JIT = 0x800
+ MAP_NOCACHE = 0x400
+ MAP_NOEXTEND = 0x100
+ MAP_NORESERVE = 0x40
+ MAP_PRIVATE = 0x2
+ MAP_RENAME = 0x20
+ MAP_RESERVED0080 = 0x80
+ MAP_RESILIENT_CODESIGN = 0x2000
+ MAP_RESILIENT_MEDIA = 0x4000
+ MAP_SHARED = 0x1
+ MAP_TRANSLATED_ALLOW_EXECUTE = 0x20000
+ MAP_UNIX03 = 0x40000
+ MCAST_BLOCK_SOURCE = 0x54
+ MCAST_EXCLUDE = 0x2
+ MCAST_INCLUDE = 0x1
+ MCAST_JOIN_GROUP = 0x50
+ MCAST_JOIN_SOURCE_GROUP = 0x52
+ MCAST_LEAVE_GROUP = 0x51
+ MCAST_LEAVE_SOURCE_GROUP = 0x53
+ MCAST_UNBLOCK_SOURCE = 0x55
+ MCAST_UNDEFINED = 0x0
+ MCL_CURRENT = 0x1
+ MCL_FUTURE = 0x2
+ MNT_ASYNC = 0x40
+ MNT_AUTOMOUNTED = 0x400000
+ MNT_CMDFLAGS = 0xf0000
+ MNT_CPROTECT = 0x80
+ MNT_DEFWRITE = 0x2000000
+ MNT_DONTBROWSE = 0x100000
+ MNT_DOVOLFS = 0x8000
+ MNT_DWAIT = 0x4
+ MNT_EXPORTED = 0x100
+ MNT_EXT_ROOT_DATA_VOL = 0x1
+ MNT_FORCE = 0x80000
+ MNT_IGNORE_OWNERSHIP = 0x200000
+ MNT_JOURNALED = 0x800000
+ MNT_LOCAL = 0x1000
+ MNT_MULTILABEL = 0x4000000
+ MNT_NOATIME = 0x10000000
+ MNT_NOBLOCK = 0x20000
+ MNT_NODEV = 0x10
+ MNT_NOEXEC = 0x4
+ MNT_NOSUID = 0x8
+ MNT_NOUSERXATTR = 0x1000000
+ MNT_NOWAIT = 0x2
+ MNT_QUARANTINE = 0x400
+ MNT_QUOTA = 0x2000
+ MNT_RDONLY = 0x1
+ MNT_RELOAD = 0x40000
+ MNT_REMOVABLE = 0x200
+ MNT_ROOTFS = 0x4000
+ MNT_SNAPSHOT = 0x40000000
+ MNT_STRICTATIME = 0x80000000
+ MNT_SYNCHRONOUS = 0x2
+ MNT_UNION = 0x20
+ MNT_UNKNOWNPERMISSIONS = 0x200000
+ MNT_UPDATE = 0x10000
+ MNT_VISFLAGMASK = 0xd7f0f7ff
+ MNT_WAIT = 0x1
+ MSG_CTRUNC = 0x20
+ MSG_DONTROUTE = 0x4
+ MSG_DONTWAIT = 0x80
+ MSG_EOF = 0x100
+ MSG_EOR = 0x8
+ MSG_FLUSH = 0x400
+ MSG_HAVEMORE = 0x2000
+ MSG_HOLD = 0x800
+ MSG_NEEDSA = 0x10000
+ MSG_NOSIGNAL = 0x80000
+ MSG_OOB = 0x1
+ MSG_PEEK = 0x2
+ MSG_RCVMORE = 0x4000
+ MSG_SEND = 0x1000
+ MSG_TRUNC = 0x10
+ MSG_WAITALL = 0x40
+ MSG_WAITSTREAM = 0x200
+ MS_ASYNC = 0x1
+ MS_DEACTIVATE = 0x8
+ MS_INVALIDATE = 0x2
+ MS_KILLPAGES = 0x4
+ MS_SYNC = 0x10
+ NAME_MAX = 0xff
+ NET_RT_DUMP = 0x1
+ NET_RT_DUMP2 = 0x7
+ NET_RT_FLAGS = 0x2
+ NET_RT_FLAGS_PRIV = 0xa
+ NET_RT_IFLIST = 0x3
+ NET_RT_IFLIST2 = 0x6
+ NET_RT_MAXID = 0xb
+ NET_RT_STAT = 0x4
+ NET_RT_TRASH = 0x5
+ NFDBITS = 0x20
+ NL0 = 0x0
+ NL1 = 0x100
+ NL2 = 0x200
+ NL3 = 0x300
+ NLDLY = 0x300
+ NOFLSH = 0x80000000
+ NOKERNINFO = 0x2000000
+ NOTE_ABSOLUTE = 0x8
+ NOTE_ATTRIB = 0x8
+ NOTE_BACKGROUND = 0x40
+ NOTE_CHILD = 0x4
+ NOTE_CRITICAL = 0x20
+ NOTE_DELETE = 0x1
+ NOTE_EXEC = 0x20000000
+ NOTE_EXIT = 0x80000000
+ NOTE_EXITSTATUS = 0x4000000
+ NOTE_EXIT_CSERROR = 0x40000
+ NOTE_EXIT_DECRYPTFAIL = 0x10000
+ NOTE_EXIT_DETAIL = 0x2000000
+ NOTE_EXIT_DETAIL_MASK = 0x70000
+ NOTE_EXIT_MEMORY = 0x20000
+ NOTE_EXIT_REPARENTED = 0x80000
+ NOTE_EXTEND = 0x4
+ NOTE_FFAND = 0x40000000
+ NOTE_FFCOPY = 0xc0000000
+ NOTE_FFCTRLMASK = 0xc0000000
+ NOTE_FFLAGSMASK = 0xffffff
+ NOTE_FFNOP = 0x0
+ NOTE_FFOR = 0x80000000
+ NOTE_FORK = 0x40000000
+ NOTE_FUNLOCK = 0x100
+ NOTE_LEEWAY = 0x10
+ NOTE_LINK = 0x10
+ NOTE_LOWAT = 0x1
+ NOTE_MACHTIME = 0x100
+ NOTE_MACH_CONTINUOUS_TIME = 0x80
+ NOTE_NONE = 0x80
+ NOTE_NSECONDS = 0x4
+ NOTE_OOB = 0x2
+ NOTE_PCTRLMASK = -0x100000
+ NOTE_PDATAMASK = 0xfffff
+ NOTE_REAP = 0x10000000
+ NOTE_RENAME = 0x20
+ NOTE_REVOKE = 0x40
+ NOTE_SECONDS = 0x1
+ NOTE_SIGNAL = 0x8000000
+ NOTE_TRACK = 0x1
+ NOTE_TRACKERR = 0x2
+ NOTE_TRIGGER = 0x1000000
+ NOTE_USECONDS = 0x2
+ NOTE_VM_ERROR = 0x10000000
+ NOTE_VM_PRESSURE = 0x80000000
+ NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000
+ NOTE_VM_PRESSURE_TERMINATE = 0x40000000
+ NOTE_WRITE = 0x2
+ OCRNL = 0x10
+ OFDEL = 0x20000
+ OFILL = 0x80
+ ONLCR = 0x2
+ ONLRET = 0x40
+ ONOCR = 0x20
+ ONOEOT = 0x8
+ OPOST = 0x1
+ OXTABS = 0x4
+ O_ACCMODE = 0x3
+ O_ALERT = 0x20000000
+ O_APPEND = 0x8
+ O_ASYNC = 0x40
+ O_CLOEXEC = 0x1000000
+ O_CREAT = 0x200
+ O_DIRECTORY = 0x100000
+ O_DP_GETRAWENCRYPTED = 0x1
+ O_DP_GETRAWUNENCRYPTED = 0x2
+ O_DSYNC = 0x400000
+ O_EVTONLY = 0x8000
+ O_EXCL = 0x800
+ O_EXLOCK = 0x20
+ O_FSYNC = 0x80
+ O_NDELAY = 0x4
+ O_NOCTTY = 0x20000
+ O_NOFOLLOW = 0x100
+ O_NOFOLLOW_ANY = 0x20000000
+ O_NONBLOCK = 0x4
+ O_POPUP = 0x80000000
+ O_RDONLY = 0x0
+ O_RDWR = 0x2
+ O_SHLOCK = 0x10
+ O_SYMLINK = 0x200000
+ O_SYNC = 0x80
+ O_TRUNC = 0x400
+ O_WRONLY = 0x1
+ PARENB = 0x1000
+ PARMRK = 0x8
+ PARODD = 0x2000
+ PENDIN = 0x20000000
+ PRIO_PGRP = 0x1
+ PRIO_PROCESS = 0x0
+ PRIO_USER = 0x2
+ PROT_EXEC = 0x4
+ PROT_NONE = 0x0
+ PROT_READ = 0x1
+ PROT_WRITE = 0x2
+ PT_ATTACH = 0xa
+ PT_ATTACHEXC = 0xe
+ PT_CONTINUE = 0x7
+ PT_DENY_ATTACH = 0x1f
+ PT_DETACH = 0xb
+ PT_FIRSTMACH = 0x20
+ PT_FORCEQUOTA = 0x1e
+ PT_KILL = 0x8
+ PT_READ_D = 0x2
+ PT_READ_I = 0x1
+ PT_READ_U = 0x3
+ PT_SIGEXC = 0xc
+ PT_STEP = 0x9
+ PT_THUPDATE = 0xd
+ PT_TRACE_ME = 0x0
+ PT_WRITE_D = 0x5
+ PT_WRITE_I = 0x4
+ PT_WRITE_U = 0x6
+ RLIMIT_AS = 0x5
+ RLIMIT_CORE = 0x4
+ RLIMIT_CPU = 0x0
+ RLIMIT_CPU_USAGE_MONITOR = 0x2
+ RLIMIT_DATA = 0x2
+ RLIMIT_FSIZE = 0x1
+ RLIMIT_MEMLOCK = 0x6
+ RLIMIT_NOFILE = 0x8
+ RLIMIT_NPROC = 0x7
+ RLIMIT_RSS = 0x5
+ RLIMIT_STACK = 0x3
+ RLIM_INFINITY = 0x7fffffffffffffff
+ RTAX_AUTHOR = 0x6
+ RTAX_BRD = 0x7
+ RTAX_DST = 0x0
+ RTAX_GATEWAY = 0x1
+ RTAX_GENMASK = 0x3
+ RTAX_IFA = 0x5
+ RTAX_IFP = 0x4
+ RTAX_MAX = 0x8
+ RTAX_NETMASK = 0x2
+ RTA_AUTHOR = 0x40
+ RTA_BRD = 0x80
+ RTA_DST = 0x1
+ RTA_GATEWAY = 0x2
+ RTA_GENMASK = 0x8
+ RTA_IFA = 0x20
+ RTA_IFP = 0x10
+ RTA_NETMASK = 0x4
+ RTF_BLACKHOLE = 0x1000
+ RTF_BROADCAST = 0x400000
+ RTF_CLONING = 0x100
+ RTF_CONDEMNED = 0x2000000
+ RTF_DEAD = 0x20000000
+ RTF_DELCLONE = 0x80
+ RTF_DONE = 0x40
+ RTF_DYNAMIC = 0x10
+ RTF_GATEWAY = 0x2
+ RTF_GLOBAL = 0x40000000
+ RTF_HOST = 0x4
+ RTF_IFREF = 0x4000000
+ RTF_IFSCOPE = 0x1000000
+ RTF_LLDATA = 0x400
+ RTF_LLINFO = 0x400
+ RTF_LOCAL = 0x200000
+ RTF_MODIFIED = 0x20
+ RTF_MULTICAST = 0x800000
+ RTF_NOIFREF = 0x2000
+ RTF_PINNED = 0x100000
+ RTF_PRCLONING = 0x10000
+ RTF_PROTO1 = 0x8000
+ RTF_PROTO2 = 0x4000
+ RTF_PROTO3 = 0x40000
+ RTF_PROXY = 0x8000000
+ RTF_REJECT = 0x8
+ RTF_ROUTER = 0x10000000
+ RTF_STATIC = 0x800
+ RTF_UP = 0x1
+ RTF_WASCLONED = 0x20000
+ RTF_XRESOLVE = 0x200
+ RTM_ADD = 0x1
+ RTM_CHANGE = 0x3
+ RTM_DELADDR = 0xd
+ RTM_DELETE = 0x2
+ RTM_DELMADDR = 0x10
+ RTM_GET = 0x4
+ RTM_GET2 = 0x14
+ RTM_IFINFO = 0xe
+ RTM_IFINFO2 = 0x12
+ RTM_LOCK = 0x8
+ RTM_LOSING = 0x5
+ RTM_MISS = 0x7
+ RTM_NEWADDR = 0xc
+ RTM_NEWMADDR = 0xf
+ RTM_NEWMADDR2 = 0x13
+ RTM_OLDADD = 0x9
+ RTM_OLDDEL = 0xa
+ RTM_REDIRECT = 0x6
+ RTM_RESOLVE = 0xb
+ RTM_RTTUNIT = 0xf4240
+ RTM_VERSION = 0x5
+ RTV_EXPIRE = 0x4
+ RTV_HOPCOUNT = 0x2
+ RTV_MTU = 0x1
+ RTV_RPIPE = 0x8
+ RTV_RTT = 0x40
+ RTV_RTTVAR = 0x80
+ RTV_SPIPE = 0x10
+ RTV_SSTHRESH = 0x20
+ RUSAGE_CHILDREN = -0x1
+ RUSAGE_SELF = 0x0
+ SCM_CREDS = 0x3
+ SCM_RIGHTS = 0x1
+ SCM_TIMESTAMP = 0x2
+ SCM_TIMESTAMP_MONOTONIC = 0x4
+ SEEK_CUR = 0x1
+ SEEK_DATA = 0x4
+ SEEK_END = 0x2
+ SEEK_HOLE = 0x3
+ SEEK_SET = 0x0
+ SHUT_RD = 0x0
+ SHUT_RDWR = 0x2
+ SHUT_WR = 0x1
+ SIOCADDMULTI = 0x80206931
+ SIOCAIFADDR = 0x8040691a
+ SIOCARPIPLL = 0xc0206928
+ SIOCATMARK = 0x40047307
+ SIOCAUTOADDR = 0xc0206926
+ SIOCAUTONETMASK = 0x80206927
+ SIOCDELMULTI = 0x80206932
+ SIOCDIFADDR = 0x80206919
+ SIOCDIFPHYADDR = 0x80206941
+ SIOCGDRVSPEC = 0xc028697b
+ SIOCGETVLAN = 0xc020697f
+ SIOCGHIWAT = 0x40047301
+ SIOCGIF6LOWPAN = 0xc02069c5
+ SIOCGIFADDR = 0xc0206921
+ SIOCGIFALTMTU = 0xc0206948
+ SIOCGIFASYNCMAP = 0xc020697c
+ SIOCGIFBOND = 0xc0206947
+ SIOCGIFBRDADDR = 0xc0206923
+ SIOCGIFCAP = 0xc020695b
+ SIOCGIFCONF = 0xc00c6924
+ SIOCGIFDEVMTU = 0xc0206944
+ SIOCGIFDSTADDR = 0xc0206922
+ SIOCGIFFLAGS = 0xc0206911
+ SIOCGIFFUNCTIONALTYPE = 0xc02069ad
+ SIOCGIFGENERIC = 0xc020693a
+ SIOCGIFKPI = 0xc0206987
+ SIOCGIFMAC = 0xc0206982
+ SIOCGIFMEDIA = 0xc02c6938
+ SIOCGIFMETRIC = 0xc0206917
+ SIOCGIFMTU = 0xc0206933
+ SIOCGIFNETMASK = 0xc0206925
+ SIOCGIFPDSTADDR = 0xc0206940
+ SIOCGIFPHYS = 0xc0206935
+ SIOCGIFPSRCADDR = 0xc020693f
+ SIOCGIFSTATUS = 0xc331693d
+ SIOCGIFVLAN = 0xc020697f
+ SIOCGIFWAKEFLAGS = 0xc0206988
+ SIOCGIFXMEDIA = 0xc02c6948
+ SIOCGLOWAT = 0x40047303
+ SIOCGPGRP = 0x40047309
+ SIOCIFCREATE = 0xc0206978
+ SIOCIFCREATE2 = 0xc020697a
+ SIOCIFDESTROY = 0x80206979
+ SIOCIFGCLONERS = 0xc0106981
+ SIOCRSLVMULTI = 0xc010693b
+ SIOCSDRVSPEC = 0x8028697b
+ SIOCSETVLAN = 0x8020697e
+ SIOCSHIWAT = 0x80047300
+ SIOCSIF6LOWPAN = 0x802069c4
+ SIOCSIFADDR = 0x8020690c
+ SIOCSIFALTMTU = 0x80206945
+ SIOCSIFASYNCMAP = 0x8020697d
+ SIOCSIFBOND = 0x80206946
+ SIOCSIFBRDADDR = 0x80206913
+ SIOCSIFCAP = 0x8020695a
+ SIOCSIFDSTADDR = 0x8020690e
+ SIOCSIFFLAGS = 0x80206910
+ SIOCSIFGENERIC = 0x80206939
+ SIOCSIFKPI = 0x80206986
+ SIOCSIFLLADDR = 0x8020693c
+ SIOCSIFMAC = 0x80206983
+ SIOCSIFMEDIA = 0xc0206937
+ SIOCSIFMETRIC = 0x80206918
+ SIOCSIFMTU = 0x80206934
+ SIOCSIFNETMASK = 0x80206916
+ SIOCSIFPHYADDR = 0x8040693e
+ SIOCSIFPHYS = 0x80206936
+ SIOCSIFVLAN = 0x8020697e
+ SIOCSLOWAT = 0x80047302
+ SIOCSPGRP = 0x80047308
+ SOCK_DGRAM = 0x2
+ SOCK_MAXADDRLEN = 0xff
+ SOCK_RAW = 0x3
+ SOCK_RDM = 0x4
+ SOCK_SEQPACKET = 0x5
+ SOCK_STREAM = 0x1
+ SOL_LOCAL = 0x0
+ SOL_SOCKET = 0xffff
+ SOMAXCONN = 0x80
+ SO_ACCEPTCONN = 0x2
+ SO_BROADCAST = 0x20
+ SO_DEBUG = 0x1
+ SO_DONTROUTE = 0x10
+ SO_DONTTRUNC = 0x2000
+ SO_ERROR = 0x1007
+ SO_KEEPALIVE = 0x8
+ SO_LABEL = 0x1010
+ SO_LINGER = 0x80
+ SO_LINGER_SEC = 0x1080
+ SO_NETSVC_MARKING_LEVEL = 0x1119
+ SO_NET_SERVICE_TYPE = 0x1116
+ SO_NKE = 0x1021
+ SO_NOADDRERR = 0x1023
+ SO_NOSIGPIPE = 0x1022
+ SO_NOTIFYCONFLICT = 0x1026
+ SO_NP_EXTENSIONS = 0x1083
+ SO_NREAD = 0x1020
+ SO_NUMRCVPKT = 0x1112
+ SO_NWRITE = 0x1024
+ SO_OOBINLINE = 0x100
+ SO_PEERLABEL = 0x1011
+ SO_RANDOMPORT = 0x1082
+ SO_RCVBUF = 0x1002
+ SO_RCVLOWAT = 0x1004
+ SO_RCVTIMEO = 0x1006
+ SO_REUSEADDR = 0x4
+ SO_REUSEPORT = 0x200
+ SO_REUSESHAREUID = 0x1025
+ SO_SNDBUF = 0x1001
+ SO_SNDLOWAT = 0x1003
+ SO_SNDTIMEO = 0x1005
+ SO_TIMESTAMP = 0x400
+ SO_TIMESTAMP_MONOTONIC = 0x800
+ SO_TRACKER_ATTRIBUTE_FLAGS_APP_APPROVED = 0x1
+ SO_TRACKER_ATTRIBUTE_FLAGS_DOMAIN_SHORT = 0x4
+ SO_TRACKER_ATTRIBUTE_FLAGS_TRACKER = 0x2
+ SO_TRACKER_TRANSPARENCY_VERSION = 0x3
+ SO_TYPE = 0x1008
+ SO_UPCALLCLOSEWAIT = 0x1027
+ SO_USELOOPBACK = 0x40
+ SO_WANTMORE = 0x4000
+ SO_WANTOOBFLAG = 0x8000
+ S_IEXEC = 0x40
+ S_IFBLK = 0x6000
+ S_IFCHR = 0x2000
+ S_IFDIR = 0x4000
+ S_IFIFO = 0x1000
+ S_IFLNK = 0xa000
+ S_IFMT = 0xf000
+ S_IFREG = 0x8000
+ S_IFSOCK = 0xc000
+ S_IFWHT = 0xe000
+ S_IREAD = 0x100
+ S_IRGRP = 0x20
+ S_IROTH = 0x4
+ S_IRUSR = 0x100
+ S_IRWXG = 0x38
+ S_IRWXO = 0x7
+ S_IRWXU = 0x1c0
+ S_ISGID = 0x400
+ S_ISTXT = 0x200
+ S_ISUID = 0x800
+ S_ISVTX = 0x200
+ S_IWGRP = 0x10
+ S_IWOTH = 0x2
+ S_IWRITE = 0x80
+ S_IWUSR = 0x80
+ S_IXGRP = 0x8
+ S_IXOTH = 0x1
+ S_IXUSR = 0x40
+ TAB0 = 0x0
+ TAB1 = 0x400
+ TAB2 = 0x800
+ TAB3 = 0x4
+ TABDLY = 0xc04
+ TCIFLUSH = 0x1
+ TCIOFF = 0x3
+ TCIOFLUSH = 0x3
+ TCION = 0x4
+ TCOFLUSH = 0x2
+ TCOOFF = 0x1
+ TCOON = 0x2
+ TCPOPT_CC = 0xb
+ TCPOPT_CCECHO = 0xd
+ TCPOPT_CCNEW = 0xc
+ TCPOPT_EOL = 0x0
+ TCPOPT_FASTOPEN = 0x22
+ TCPOPT_MAXSEG = 0x2
+ TCPOPT_NOP = 0x1
+ TCPOPT_SACK = 0x5
+ TCPOPT_SACK_HDR = 0x1010500
+ TCPOPT_SACK_PERMITTED = 0x4
+ TCPOPT_SACK_PERMIT_HDR = 0x1010402
+ TCPOPT_SIGNATURE = 0x13
+ TCPOPT_TIMESTAMP = 0x8
+ TCPOPT_TSTAMP_HDR = 0x101080a
+ TCPOPT_WINDOW = 0x3
+ TCP_CONNECTIONTIMEOUT = 0x20
+ TCP_CONNECTION_INFO = 0x106
+ TCP_ENABLE_ECN = 0x104
+ TCP_FASTOPEN = 0x105
+ TCP_KEEPALIVE = 0x10
+ TCP_KEEPCNT = 0x102
+ TCP_KEEPINTVL = 0x101
+ TCP_MAXHLEN = 0x3c
+ TCP_MAXOLEN = 0x28
+ TCP_MAXSEG = 0x2
+ TCP_MAXWIN = 0xffff
+ TCP_MAX_SACK = 0x4
+ TCP_MAX_WINSHIFT = 0xe
+ TCP_MINMSS = 0xd8
+ TCP_MSS = 0x200
+ TCP_NODELAY = 0x1
+ TCP_NOOPT = 0x8
+ TCP_NOPUSH = 0x4
+ TCP_NOTSENT_LOWAT = 0x201
+ TCP_RXT_CONNDROPTIME = 0x80
+ TCP_RXT_FINDROP = 0x100
+ TCP_SENDMOREACKS = 0x103
+ TCSAFLUSH = 0x2
+ TIOCCBRK = 0x2000747a
+ TIOCCDTR = 0x20007478
+ TIOCCONS = 0x80047462
+ TIOCDCDTIMESTAMP = 0x40107458
+ TIOCDRAIN = 0x2000745e
+ TIOCDSIMICROCODE = 0x20007455
+ TIOCEXCL = 0x2000740d
+ TIOCEXT = 0x80047460
+ TIOCFLUSH = 0x80047410
+ TIOCGDRAINWAIT = 0x40047456
+ TIOCGETA = 0x40487413
+ TIOCGETD = 0x4004741a
+ TIOCGPGRP = 0x40047477
+ TIOCGWINSZ = 0x40087468
+ TIOCIXOFF = 0x20007480
+ TIOCIXON = 0x20007481
+ TIOCMBIC = 0x8004746b
+ TIOCMBIS = 0x8004746c
+ TIOCMGDTRWAIT = 0x4004745a
+ TIOCMGET = 0x4004746a
+ TIOCMODG = 0x40047403
+ TIOCMODS = 0x80047404
+ TIOCMSDTRWAIT = 0x8004745b
+ TIOCMSET = 0x8004746d
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_DTR = 0x2
+ TIOCM_LE = 0x1
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_RTS = 0x4
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x20007471
+ TIOCNXCL = 0x2000740e
+ TIOCOUTQ = 0x40047473
+ TIOCPKT = 0x80047470
+ TIOCPKT_DATA = 0x0
+ TIOCPKT_DOSTOP = 0x20
+ TIOCPKT_FLUSHREAD = 0x1
+ TIOCPKT_FLUSHWRITE = 0x2
+ TIOCPKT_IOCTL = 0x40
+ TIOCPKT_NOSTOP = 0x10
+ TIOCPKT_START = 0x8
+ TIOCPKT_STOP = 0x4
+ TIOCPTYGNAME = 0x40807453
+ TIOCPTYGRANT = 0x20007454
+ TIOCPTYUNLK = 0x20007452
+ TIOCREMOTE = 0x80047469
+ TIOCSBRK = 0x2000747b
+ TIOCSCONS = 0x20007463
+ TIOCSCTTY = 0x20007461
+ TIOCSDRAINWAIT = 0x80047457
+ TIOCSDTR = 0x20007479
+ TIOCSETA = 0x80487414
+ TIOCSETAF = 0x80487416
+ TIOCSETAW = 0x80487415
+ TIOCSETD = 0x8004741b
+ TIOCSIG = 0x2000745f
+ TIOCSPGRP = 0x80047476
+ TIOCSTART = 0x2000746e
+ TIOCSTAT = 0x20007465
+ TIOCSTI = 0x80017472
+ TIOCSTOP = 0x2000746f
+ TIOCSWINSZ = 0x80087467
+ TIOCTIMESTAMP = 0x40107459
+ TIOCUCNTL = 0x80047466
+ TOSTOP = 0x400000
+ VDISCARD = 0xf
+ VDSUSP = 0xb
+ VEOF = 0x0
+ VEOL = 0x1
+ VEOL2 = 0x2
+ VERASE = 0x3
+ VINTR = 0x8
+ VKILL = 0x5
+ VLNEXT = 0xe
+ VMADDR_CID_ANY = 0xffffffff
+ VMADDR_CID_HOST = 0x2
+ VMADDR_CID_HYPERVISOR = 0x0
+ VMADDR_CID_RESERVED = 0x1
+ VMADDR_PORT_ANY = 0xffffffff
+ VMIN = 0x10
+ VM_LOADAVG = 0x2
+ VM_MACHFACTOR = 0x4
+ VM_MAXID = 0x6
+ VM_METER = 0x1
+ VM_SWAPUSAGE = 0x5
+ VQUIT = 0x9
+ VREPRINT = 0x6
+ VSTART = 0xc
+ VSTATUS = 0x12
+ VSTOP = 0xd
+ VSUSP = 0xa
+ VT0 = 0x0
+ VT1 = 0x10000
+ VTDLY = 0x10000
+ VTIME = 0x11
+ VWERASE = 0x4
+ WCONTINUED = 0x10
+ WCOREFLAG = 0x80
+ WEXITED = 0x4
+ WNOHANG = 0x1
+ WNOWAIT = 0x20
+ WORDSIZE = 0x40
+ WSTOPPED = 0x8
+ WUNTRACED = 0x2
+ XATTR_CREATE = 0x2
+ XATTR_NODEFAULT = 0x10
+ XATTR_NOFOLLOW = 0x1
+ XATTR_NOSECURITY = 0x8
+ XATTR_REPLACE = 0x4
+ XATTR_SHOWCOMPRESSION = 0x20
)
// Errors
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
index 31009d7f053c..e36f5178d600 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
@@ -12,1556 +12,1582 @@ package unix
import "syscall"
const (
- AF_APPLETALK = 0x10
- AF_CCITT = 0xa
- AF_CHAOS = 0x5
- AF_CNT = 0x15
- AF_COIP = 0x14
- AF_DATAKIT = 0x9
- AF_DECnet = 0xc
- AF_DLI = 0xd
- AF_E164 = 0x1c
- AF_ECMA = 0x8
- AF_HYLINK = 0xf
- AF_IEEE80211 = 0x25
- AF_IMPLINK = 0x3
- AF_INET = 0x2
- AF_INET6 = 0x1e
- AF_IPX = 0x17
- AF_ISDN = 0x1c
- AF_ISO = 0x7
- AF_LAT = 0xe
- AF_LINK = 0x12
- AF_LOCAL = 0x1
- AF_MAX = 0x29
- AF_NATM = 0x1f
- AF_NDRV = 0x1b
- AF_NETBIOS = 0x21
- AF_NS = 0x6
- AF_OSI = 0x7
- AF_PPP = 0x22
- AF_PUP = 0x4
- AF_RESERVED_36 = 0x24
- AF_ROUTE = 0x11
- AF_SIP = 0x18
- AF_SNA = 0xb
- AF_SYSTEM = 0x20
- AF_SYS_CONTROL = 0x2
- AF_UNIX = 0x1
- AF_UNSPEC = 0x0
- AF_UTUN = 0x26
- AF_VSOCK = 0x28
- ALTWERASE = 0x200
- ATTR_BIT_MAP_COUNT = 0x5
- ATTR_CMN_ACCESSMASK = 0x20000
- ATTR_CMN_ACCTIME = 0x1000
- ATTR_CMN_ADDEDTIME = 0x10000000
- ATTR_CMN_BKUPTIME = 0x2000
- ATTR_CMN_CHGTIME = 0x800
- ATTR_CMN_CRTIME = 0x200
- ATTR_CMN_DATA_PROTECT_FLAGS = 0x40000000
- ATTR_CMN_DEVID = 0x2
- ATTR_CMN_DOCUMENT_ID = 0x100000
- ATTR_CMN_ERROR = 0x20000000
- ATTR_CMN_EXTENDED_SECURITY = 0x400000
- ATTR_CMN_FILEID = 0x2000000
- ATTR_CMN_FLAGS = 0x40000
- ATTR_CMN_FNDRINFO = 0x4000
- ATTR_CMN_FSID = 0x4
- ATTR_CMN_FULLPATH = 0x8000000
- ATTR_CMN_GEN_COUNT = 0x80000
- ATTR_CMN_GRPID = 0x10000
- ATTR_CMN_GRPUUID = 0x1000000
- ATTR_CMN_MODTIME = 0x400
- ATTR_CMN_NAME = 0x1
- ATTR_CMN_NAMEDATTRCOUNT = 0x80000
- ATTR_CMN_NAMEDATTRLIST = 0x100000
- ATTR_CMN_OBJID = 0x20
- ATTR_CMN_OBJPERMANENTID = 0x40
- ATTR_CMN_OBJTAG = 0x10
- ATTR_CMN_OBJTYPE = 0x8
- ATTR_CMN_OWNERID = 0x8000
- ATTR_CMN_PARENTID = 0x4000000
- ATTR_CMN_PAROBJID = 0x80
- ATTR_CMN_RETURNED_ATTRS = 0x80000000
- ATTR_CMN_SCRIPT = 0x100
- ATTR_CMN_SETMASK = 0x51c7ff00
- ATTR_CMN_USERACCESS = 0x200000
- ATTR_CMN_UUID = 0x800000
- ATTR_CMN_VALIDMASK = 0xffffffff
- ATTR_CMN_VOLSETMASK = 0x6700
- ATTR_FILE_ALLOCSIZE = 0x4
- ATTR_FILE_CLUMPSIZE = 0x10
- ATTR_FILE_DATAALLOCSIZE = 0x400
- ATTR_FILE_DATAEXTENTS = 0x800
- ATTR_FILE_DATALENGTH = 0x200
- ATTR_FILE_DEVTYPE = 0x20
- ATTR_FILE_FILETYPE = 0x40
- ATTR_FILE_FORKCOUNT = 0x80
- ATTR_FILE_FORKLIST = 0x100
- ATTR_FILE_IOBLOCKSIZE = 0x8
- ATTR_FILE_LINKCOUNT = 0x1
- ATTR_FILE_RSRCALLOCSIZE = 0x2000
- ATTR_FILE_RSRCEXTENTS = 0x4000
- ATTR_FILE_RSRCLENGTH = 0x1000
- ATTR_FILE_SETMASK = 0x20
- ATTR_FILE_TOTALSIZE = 0x2
- ATTR_FILE_VALIDMASK = 0x37ff
- ATTR_VOL_ALLOCATIONCLUMP = 0x40
- ATTR_VOL_ATTRIBUTES = 0x40000000
- ATTR_VOL_CAPABILITIES = 0x20000
- ATTR_VOL_DIRCOUNT = 0x400
- ATTR_VOL_ENCODINGSUSED = 0x10000
- ATTR_VOL_FILECOUNT = 0x200
- ATTR_VOL_FSTYPE = 0x1
- ATTR_VOL_INFO = 0x80000000
- ATTR_VOL_IOBLOCKSIZE = 0x80
- ATTR_VOL_MAXOBJCOUNT = 0x800
- ATTR_VOL_MINALLOCATION = 0x20
- ATTR_VOL_MOUNTEDDEVICE = 0x8000
- ATTR_VOL_MOUNTFLAGS = 0x4000
- ATTR_VOL_MOUNTPOINT = 0x1000
- ATTR_VOL_NAME = 0x2000
- ATTR_VOL_OBJCOUNT = 0x100
- ATTR_VOL_QUOTA_SIZE = 0x10000000
- ATTR_VOL_RESERVED_SIZE = 0x20000000
- ATTR_VOL_SETMASK = 0x80002000
- ATTR_VOL_SIGNATURE = 0x2
- ATTR_VOL_SIZE = 0x4
- ATTR_VOL_SPACEAVAIL = 0x10
- ATTR_VOL_SPACEFREE = 0x8
- ATTR_VOL_UUID = 0x40000
- ATTR_VOL_VALIDMASK = 0xf007ffff
- B0 = 0x0
- B110 = 0x6e
- B115200 = 0x1c200
- B1200 = 0x4b0
- B134 = 0x86
- B14400 = 0x3840
- B150 = 0x96
- B1800 = 0x708
- B19200 = 0x4b00
- B200 = 0xc8
- B230400 = 0x38400
- B2400 = 0x960
- B28800 = 0x7080
- B300 = 0x12c
- B38400 = 0x9600
- B4800 = 0x12c0
- B50 = 0x32
- B57600 = 0xe100
- B600 = 0x258
- B7200 = 0x1c20
- B75 = 0x4b
- B76800 = 0x12c00
- B9600 = 0x2580
- BIOCFLUSH = 0x20004268
- BIOCGBLEN = 0x40044266
- BIOCGDLT = 0x4004426a
- BIOCGDLTLIST = 0xc00c4279
- BIOCGETIF = 0x4020426b
- BIOCGHDRCMPLT = 0x40044274
- BIOCGRSIG = 0x40044272
- BIOCGRTIMEOUT = 0x4010426e
- BIOCGSEESENT = 0x40044276
- BIOCGSTATS = 0x4008426f
- BIOCIMMEDIATE = 0x80044270
- BIOCPROMISC = 0x20004269
- BIOCSBLEN = 0xc0044266
- BIOCSDLT = 0x80044278
- BIOCSETF = 0x80104267
- BIOCSETFNR = 0x8010427e
- BIOCSETIF = 0x8020426c
- BIOCSHDRCMPLT = 0x80044275
- BIOCSRSIG = 0x80044273
- BIOCSRTIMEOUT = 0x8010426d
- BIOCSSEESENT = 0x80044277
- BIOCVERSION = 0x40044271
- BPF_A = 0x10
- BPF_ABS = 0x20
- BPF_ADD = 0x0
- BPF_ALIGNMENT = 0x4
- BPF_ALU = 0x4
- BPF_AND = 0x50
- BPF_B = 0x10
- BPF_DIV = 0x30
- BPF_H = 0x8
- BPF_IMM = 0x0
- BPF_IND = 0x40
- BPF_JA = 0x0
- BPF_JEQ = 0x10
- BPF_JGE = 0x30
- BPF_JGT = 0x20
- BPF_JMP = 0x5
- BPF_JSET = 0x40
- BPF_K = 0x0
- BPF_LD = 0x0
- BPF_LDX = 0x1
- BPF_LEN = 0x80
- BPF_LSH = 0x60
- BPF_MAJOR_VERSION = 0x1
- BPF_MAXBUFSIZE = 0x80000
- BPF_MAXINSNS = 0x200
- BPF_MEM = 0x60
- BPF_MEMWORDS = 0x10
- BPF_MINBUFSIZE = 0x20
- BPF_MINOR_VERSION = 0x1
- BPF_MISC = 0x7
- BPF_MSH = 0xa0
- BPF_MUL = 0x20
- BPF_NEG = 0x80
- BPF_OR = 0x40
- BPF_RELEASE = 0x30bb6
- BPF_RET = 0x6
- BPF_RSH = 0x70
- BPF_ST = 0x2
- BPF_STX = 0x3
- BPF_SUB = 0x10
- BPF_TAX = 0x0
- BPF_TXA = 0x80
- BPF_W = 0x0
- BPF_X = 0x8
- BRKINT = 0x2
- BS0 = 0x0
- BS1 = 0x8000
- BSDLY = 0x8000
- CFLUSH = 0xf
- CLOCAL = 0x8000
- CLOCK_MONOTONIC = 0x6
- CLOCK_MONOTONIC_RAW = 0x4
- CLOCK_MONOTONIC_RAW_APPROX = 0x5
- CLOCK_PROCESS_CPUTIME_ID = 0xc
- CLOCK_REALTIME = 0x0
- CLOCK_THREAD_CPUTIME_ID = 0x10
- CLOCK_UPTIME_RAW = 0x8
- CLOCK_UPTIME_RAW_APPROX = 0x9
- CLONE_NOFOLLOW = 0x1
- CLONE_NOOWNERCOPY = 0x2
- CR0 = 0x0
- CR1 = 0x1000
- CR2 = 0x2000
- CR3 = 0x3000
- CRDLY = 0x3000
- CREAD = 0x800
- CRTSCTS = 0x30000
- CS5 = 0x0
- CS6 = 0x100
- CS7 = 0x200
- CS8 = 0x300
- CSIZE = 0x300
- CSTART = 0x11
- CSTATUS = 0x14
- CSTOP = 0x13
- CSTOPB = 0x400
- CSUSP = 0x1a
- CTLIOCGINFO = 0xc0644e03
- CTL_HW = 0x6
- CTL_KERN = 0x1
- CTL_MAXNAME = 0xc
- CTL_NET = 0x4
- DLT_A429 = 0xb8
- DLT_A653_ICM = 0xb9
- DLT_AIRONET_HEADER = 0x78
- DLT_AOS = 0xde
- DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
- DLT_ARCNET = 0x7
- DLT_ARCNET_LINUX = 0x81
- DLT_ATM_CLIP = 0x13
- DLT_ATM_RFC1483 = 0xb
- DLT_AURORA = 0x7e
- DLT_AX25 = 0x3
- DLT_AX25_KISS = 0xca
- DLT_BACNET_MS_TP = 0xa5
- DLT_BLUETOOTH_HCI_H4 = 0xbb
- DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
- DLT_CAN20B = 0xbe
- DLT_CAN_SOCKETCAN = 0xe3
- DLT_CHAOS = 0x5
- DLT_CHDLC = 0x68
- DLT_CISCO_IOS = 0x76
- DLT_C_HDLC = 0x68
- DLT_C_HDLC_WITH_DIR = 0xcd
- DLT_DBUS = 0xe7
- DLT_DECT = 0xdd
- DLT_DOCSIS = 0x8f
- DLT_DVB_CI = 0xeb
- DLT_ECONET = 0x73
- DLT_EN10MB = 0x1
- DLT_EN3MB = 0x2
- DLT_ENC = 0x6d
- DLT_ERF = 0xc5
- DLT_ERF_ETH = 0xaf
- DLT_ERF_POS = 0xb0
- DLT_FC_2 = 0xe0
- DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
- DLT_FDDI = 0xa
- DLT_FLEXRAY = 0xd2
- DLT_FRELAY = 0x6b
- DLT_FRELAY_WITH_DIR = 0xce
- DLT_GCOM_SERIAL = 0xad
- DLT_GCOM_T1E1 = 0xac
- DLT_GPF_F = 0xab
- DLT_GPF_T = 0xaa
- DLT_GPRS_LLC = 0xa9
- DLT_GSMTAP_ABIS = 0xda
- DLT_GSMTAP_UM = 0xd9
- DLT_HHDLC = 0x79
- DLT_IBM_SN = 0x92
- DLT_IBM_SP = 0x91
- DLT_IEEE802 = 0x6
- DLT_IEEE802_11 = 0x69
- DLT_IEEE802_11_RADIO = 0x7f
- DLT_IEEE802_11_RADIO_AVS = 0xa3
- DLT_IEEE802_15_4 = 0xc3
- DLT_IEEE802_15_4_LINUX = 0xbf
- DLT_IEEE802_15_4_NOFCS = 0xe6
- DLT_IEEE802_15_4_NONASK_PHY = 0xd7
- DLT_IEEE802_16_MAC_CPS = 0xbc
- DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
- DLT_IPFILTER = 0x74
- DLT_IPMB = 0xc7
- DLT_IPMB_LINUX = 0xd1
- DLT_IPNET = 0xe2
- DLT_IPOIB = 0xf2
- DLT_IPV4 = 0xe4
- DLT_IPV6 = 0xe5
- DLT_IP_OVER_FC = 0x7a
- DLT_JUNIPER_ATM1 = 0x89
- DLT_JUNIPER_ATM2 = 0x87
- DLT_JUNIPER_ATM_CEMIC = 0xee
- DLT_JUNIPER_CHDLC = 0xb5
- DLT_JUNIPER_ES = 0x84
- DLT_JUNIPER_ETHER = 0xb2
- DLT_JUNIPER_FIBRECHANNEL = 0xea
- DLT_JUNIPER_FRELAY = 0xb4
- DLT_JUNIPER_GGSN = 0x85
- DLT_JUNIPER_ISM = 0xc2
- DLT_JUNIPER_MFR = 0x86
- DLT_JUNIPER_MLFR = 0x83
- DLT_JUNIPER_MLPPP = 0x82
- DLT_JUNIPER_MONITOR = 0xa4
- DLT_JUNIPER_PIC_PEER = 0xae
- DLT_JUNIPER_PPP = 0xb3
- DLT_JUNIPER_PPPOE = 0xa7
- DLT_JUNIPER_PPPOE_ATM = 0xa8
- DLT_JUNIPER_SERVICES = 0x88
- DLT_JUNIPER_SRX_E2E = 0xe9
- DLT_JUNIPER_ST = 0xc8
- DLT_JUNIPER_VP = 0xb7
- DLT_JUNIPER_VS = 0xe8
- DLT_LAPB_WITH_DIR = 0xcf
- DLT_LAPD = 0xcb
- DLT_LIN = 0xd4
- DLT_LINUX_EVDEV = 0xd8
- DLT_LINUX_IRDA = 0x90
- DLT_LINUX_LAPD = 0xb1
- DLT_LINUX_PPP_WITHDIRECTION = 0xa6
- DLT_LINUX_SLL = 0x71
- DLT_LOOP = 0x6c
- DLT_LTALK = 0x72
- DLT_MATCHING_MAX = 0x10a
- DLT_MATCHING_MIN = 0x68
- DLT_MFR = 0xb6
- DLT_MOST = 0xd3
- DLT_MPEG_2_TS = 0xf3
- DLT_MPLS = 0xdb
- DLT_MTP2 = 0x8c
- DLT_MTP2_WITH_PHDR = 0x8b
- DLT_MTP3 = 0x8d
- DLT_MUX27010 = 0xec
- DLT_NETANALYZER = 0xf0
- DLT_NETANALYZER_TRANSPARENT = 0xf1
- DLT_NFC_LLCP = 0xf5
- DLT_NFLOG = 0xef
- DLT_NG40 = 0xf4
- DLT_NULL = 0x0
- DLT_PCI_EXP = 0x7d
- DLT_PFLOG = 0x75
- DLT_PFSYNC = 0x12
- DLT_PPI = 0xc0
- DLT_PPP = 0x9
- DLT_PPP_BSDOS = 0x10
- DLT_PPP_ETHER = 0x33
- DLT_PPP_PPPD = 0xa6
- DLT_PPP_SERIAL = 0x32
- DLT_PPP_WITH_DIR = 0xcc
- DLT_PPP_WITH_DIRECTION = 0xa6
- DLT_PRISM_HEADER = 0x77
- DLT_PRONET = 0x4
- DLT_RAIF1 = 0xc6
- DLT_RAW = 0xc
- DLT_RIO = 0x7c
- DLT_SCCP = 0x8e
- DLT_SITA = 0xc4
- DLT_SLIP = 0x8
- DLT_SLIP_BSDOS = 0xf
- DLT_STANAG_5066_D_PDU = 0xed
- DLT_SUNATM = 0x7b
- DLT_SYMANTEC_FIREWALL = 0x63
- DLT_TZSP = 0x80
- DLT_USB = 0xba
- DLT_USB_DARWIN = 0x10a
- DLT_USB_LINUX = 0xbd
- DLT_USB_LINUX_MMAPPED = 0xdc
- DLT_USER0 = 0x93
- DLT_USER1 = 0x94
- DLT_USER10 = 0x9d
- DLT_USER11 = 0x9e
- DLT_USER12 = 0x9f
- DLT_USER13 = 0xa0
- DLT_USER14 = 0xa1
- DLT_USER15 = 0xa2
- DLT_USER2 = 0x95
- DLT_USER3 = 0x96
- DLT_USER4 = 0x97
- DLT_USER5 = 0x98
- DLT_USER6 = 0x99
- DLT_USER7 = 0x9a
- DLT_USER8 = 0x9b
- DLT_USER9 = 0x9c
- DLT_WIHART = 0xdf
- DLT_X2E_SERIAL = 0xd5
- DLT_X2E_XORAYA = 0xd6
- DT_BLK = 0x6
- DT_CHR = 0x2
- DT_DIR = 0x4
- DT_FIFO = 0x1
- DT_LNK = 0xa
- DT_REG = 0x8
- DT_SOCK = 0xc
- DT_UNKNOWN = 0x0
- DT_WHT = 0xe
- ECHO = 0x8
- ECHOCTL = 0x40
- ECHOE = 0x2
- ECHOK = 0x4
- ECHOKE = 0x1
- ECHONL = 0x10
- ECHOPRT = 0x20
- EVFILT_AIO = -0x3
- EVFILT_EXCEPT = -0xf
- EVFILT_FS = -0x9
- EVFILT_MACHPORT = -0x8
- EVFILT_PROC = -0x5
- EVFILT_READ = -0x1
- EVFILT_SIGNAL = -0x6
- EVFILT_SYSCOUNT = 0x11
- EVFILT_THREADMARKER = 0x11
- EVFILT_TIMER = -0x7
- EVFILT_USER = -0xa
- EVFILT_VM = -0xc
- EVFILT_VNODE = -0x4
- EVFILT_WRITE = -0x2
- EV_ADD = 0x1
- EV_CLEAR = 0x20
- EV_DELETE = 0x2
- EV_DISABLE = 0x8
- EV_DISPATCH = 0x80
- EV_DISPATCH2 = 0x180
- EV_ENABLE = 0x4
- EV_EOF = 0x8000
- EV_ERROR = 0x4000
- EV_FLAG0 = 0x1000
- EV_FLAG1 = 0x2000
- EV_ONESHOT = 0x10
- EV_OOBAND = 0x2000
- EV_POLL = 0x1000
- EV_RECEIPT = 0x40
- EV_SYSFLAGS = 0xf000
- EV_UDATA_SPECIFIC = 0x100
- EV_VANISHED = 0x200
- EXTA = 0x4b00
- EXTB = 0x9600
- EXTPROC = 0x800
- FD_CLOEXEC = 0x1
- FD_SETSIZE = 0x400
- FF0 = 0x0
- FF1 = 0x4000
- FFDLY = 0x4000
- FLUSHO = 0x800000
- FSOPT_ATTR_CMN_EXTENDED = 0x20
- FSOPT_NOFOLLOW = 0x1
- FSOPT_NOINMEMUPDATE = 0x2
- FSOPT_PACK_INVAL_ATTRS = 0x8
- FSOPT_REPORT_FULLSIZE = 0x4
- FSOPT_RETURN_REALDEV = 0x200
- F_ADDFILESIGS = 0x3d
- F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
- F_ADDFILESIGS_INFO = 0x67
- F_ADDFILESIGS_RETURN = 0x61
- F_ADDFILESUPPL = 0x68
- F_ADDSIGS = 0x3b
- F_ALLOCATEALL = 0x4
- F_ALLOCATECONTIG = 0x2
- F_BARRIERFSYNC = 0x55
- F_CHECK_LV = 0x62
- F_CHKCLEAN = 0x29
- F_DUPFD = 0x0
- F_DUPFD_CLOEXEC = 0x43
- F_FINDSIGS = 0x4e
- F_FLUSH_DATA = 0x28
- F_FREEZE_FS = 0x35
- F_FULLFSYNC = 0x33
- F_GETCODEDIR = 0x48
- F_GETFD = 0x1
- F_GETFL = 0x3
- F_GETLK = 0x7
- F_GETLKPID = 0x42
- F_GETNOSIGPIPE = 0x4a
- F_GETOWN = 0x5
- F_GETPATH = 0x32
- F_GETPATH_MTMINFO = 0x47
- F_GETPATH_NOFIRMLINK = 0x66
- F_GETPROTECTIONCLASS = 0x3f
- F_GETPROTECTIONLEVEL = 0x4d
- F_GETSIGSINFO = 0x69
- F_GLOBAL_NOCACHE = 0x37
- F_LOG2PHYS = 0x31
- F_LOG2PHYS_EXT = 0x41
- F_NOCACHE = 0x30
- F_NODIRECT = 0x3e
- F_OK = 0x0
- F_PATHPKG_CHECK = 0x34
- F_PEOFPOSMODE = 0x3
- F_PREALLOCATE = 0x2a
- F_PUNCHHOLE = 0x63
- F_RDADVISE = 0x2c
- F_RDAHEAD = 0x2d
- F_RDLCK = 0x1
- F_SETBACKINGSTORE = 0x46
- F_SETFD = 0x2
- F_SETFL = 0x4
- F_SETLK = 0x8
- F_SETLKW = 0x9
- F_SETLKWTIMEOUT = 0xa
- F_SETNOSIGPIPE = 0x49
- F_SETOWN = 0x6
- F_SETPROTECTIONCLASS = 0x40
- F_SETSIZE = 0x2b
- F_SINGLE_WRITER = 0x4c
- F_SPECULATIVE_READ = 0x65
- F_THAW_FS = 0x36
- F_TRANSCODEKEY = 0x4b
- F_TRIM_ACTIVE_FILE = 0x64
- F_UNLCK = 0x2
- F_VOLPOSMODE = 0x4
- F_WRLCK = 0x3
- HUPCL = 0x4000
- HW_MACHINE = 0x1
- ICANON = 0x100
- ICMP6_FILTER = 0x12
- ICRNL = 0x100
- IEXTEN = 0x400
- IFF_ALLMULTI = 0x200
- IFF_ALTPHYS = 0x4000
- IFF_BROADCAST = 0x2
- IFF_DEBUG = 0x4
- IFF_LINK0 = 0x1000
- IFF_LINK1 = 0x2000
- IFF_LINK2 = 0x4000
- IFF_LOOPBACK = 0x8
- IFF_MULTICAST = 0x8000
- IFF_NOARP = 0x80
- IFF_NOTRAILERS = 0x20
- IFF_OACTIVE = 0x400
- IFF_POINTOPOINT = 0x10
- IFF_PROMISC = 0x100
- IFF_RUNNING = 0x40
- IFF_SIMPLEX = 0x800
- IFF_UP = 0x1
- IFNAMSIZ = 0x10
- IFT_1822 = 0x2
- IFT_6LOWPAN = 0x40
- IFT_AAL5 = 0x31
- IFT_ARCNET = 0x23
- IFT_ARCNETPLUS = 0x24
- IFT_ATM = 0x25
- IFT_BRIDGE = 0xd1
- IFT_CARP = 0xf8
- IFT_CELLULAR = 0xff
- IFT_CEPT = 0x13
- IFT_DS3 = 0x1e
- IFT_ENC = 0xf4
- IFT_EON = 0x19
- IFT_ETHER = 0x6
- IFT_FAITH = 0x38
- IFT_FDDI = 0xf
- IFT_FRELAY = 0x20
- IFT_FRELAYDCE = 0x2c
- IFT_GIF = 0x37
- IFT_HDH1822 = 0x3
- IFT_HIPPI = 0x2f
- IFT_HSSI = 0x2e
- IFT_HY = 0xe
- IFT_IEEE1394 = 0x90
- IFT_IEEE8023ADLAG = 0x88
- IFT_ISDNBASIC = 0x14
- IFT_ISDNPRIMARY = 0x15
- IFT_ISO88022LLC = 0x29
- IFT_ISO88023 = 0x7
- IFT_ISO88024 = 0x8
- IFT_ISO88025 = 0x9
- IFT_ISO88026 = 0xa
- IFT_L2VLAN = 0x87
- IFT_LAPB = 0x10
- IFT_LOCALTALK = 0x2a
- IFT_LOOP = 0x18
- IFT_MIOX25 = 0x26
- IFT_MODEM = 0x30
- IFT_NSIP = 0x1b
- IFT_OTHER = 0x1
- IFT_P10 = 0xc
- IFT_P80 = 0xd
- IFT_PARA = 0x22
- IFT_PDP = 0xff
- IFT_PFLOG = 0xf5
- IFT_PFSYNC = 0xf6
- IFT_PKTAP = 0xfe
- IFT_PPP = 0x17
- IFT_PROPMUX = 0x36
- IFT_PROPVIRTUAL = 0x35
- IFT_PTPSERIAL = 0x16
- IFT_RS232 = 0x21
- IFT_SDLC = 0x11
- IFT_SIP = 0x1f
- IFT_SLIP = 0x1c
- IFT_SMDSDXI = 0x2b
- IFT_SMDSICIP = 0x34
- IFT_SONET = 0x27
- IFT_SONETPATH = 0x32
- IFT_SONETVT = 0x33
- IFT_STARLAN = 0xb
- IFT_STF = 0x39
- IFT_T1 = 0x12
- IFT_ULTRA = 0x1d
- IFT_V35 = 0x2d
- IFT_X25 = 0x5
- IFT_X25DDN = 0x4
- IFT_X25PLE = 0x28
- IFT_XETHER = 0x1a
- IGNBRK = 0x1
- IGNCR = 0x80
- IGNPAR = 0x4
- IMAXBEL = 0x2000
- INLCR = 0x40
- INPCK = 0x10
- IN_CLASSA_HOST = 0xffffff
- IN_CLASSA_MAX = 0x80
- IN_CLASSA_NET = 0xff000000
- IN_CLASSA_NSHIFT = 0x18
- IN_CLASSB_HOST = 0xffff
- IN_CLASSB_MAX = 0x10000
- IN_CLASSB_NET = 0xffff0000
- IN_CLASSB_NSHIFT = 0x10
- IN_CLASSC_HOST = 0xff
- IN_CLASSC_NET = 0xffffff00
- IN_CLASSC_NSHIFT = 0x8
- IN_CLASSD_HOST = 0xfffffff
- IN_CLASSD_NET = 0xf0000000
- IN_CLASSD_NSHIFT = 0x1c
- IN_LINKLOCALNETNUM = 0xa9fe0000
- IN_LOOPBACKNET = 0x7f
- IPPROTO_3PC = 0x22
- IPPROTO_ADFS = 0x44
- IPPROTO_AH = 0x33
- IPPROTO_AHIP = 0x3d
- IPPROTO_APES = 0x63
- IPPROTO_ARGUS = 0xd
- IPPROTO_AX25 = 0x5d
- IPPROTO_BHA = 0x31
- IPPROTO_BLT = 0x1e
- IPPROTO_BRSATMON = 0x4c
- IPPROTO_CFTP = 0x3e
- IPPROTO_CHAOS = 0x10
- IPPROTO_CMTP = 0x26
- IPPROTO_CPHB = 0x49
- IPPROTO_CPNX = 0x48
- IPPROTO_DDP = 0x25
- IPPROTO_DGP = 0x56
- IPPROTO_DIVERT = 0xfe
- IPPROTO_DONE = 0x101
- IPPROTO_DSTOPTS = 0x3c
- IPPROTO_EGP = 0x8
- IPPROTO_EMCON = 0xe
- IPPROTO_ENCAP = 0x62
- IPPROTO_EON = 0x50
- IPPROTO_ESP = 0x32
- IPPROTO_ETHERIP = 0x61
- IPPROTO_FRAGMENT = 0x2c
- IPPROTO_GGP = 0x3
- IPPROTO_GMTP = 0x64
- IPPROTO_GRE = 0x2f
- IPPROTO_HELLO = 0x3f
- IPPROTO_HMP = 0x14
- IPPROTO_HOPOPTS = 0x0
- IPPROTO_ICMP = 0x1
- IPPROTO_ICMPV6 = 0x3a
- IPPROTO_IDP = 0x16
- IPPROTO_IDPR = 0x23
- IPPROTO_IDRP = 0x2d
- IPPROTO_IGMP = 0x2
- IPPROTO_IGP = 0x55
- IPPROTO_IGRP = 0x58
- IPPROTO_IL = 0x28
- IPPROTO_INLSP = 0x34
- IPPROTO_INP = 0x20
- IPPROTO_IP = 0x0
- IPPROTO_IPCOMP = 0x6c
- IPPROTO_IPCV = 0x47
- IPPROTO_IPEIP = 0x5e
- IPPROTO_IPIP = 0x4
- IPPROTO_IPPC = 0x43
- IPPROTO_IPV4 = 0x4
- IPPROTO_IPV6 = 0x29
- IPPROTO_IRTP = 0x1c
- IPPROTO_KRYPTOLAN = 0x41
- IPPROTO_LARP = 0x5b
- IPPROTO_LEAF1 = 0x19
- IPPROTO_LEAF2 = 0x1a
- IPPROTO_MAX = 0x100
- IPPROTO_MAXID = 0x34
- IPPROTO_MEAS = 0x13
- IPPROTO_MHRP = 0x30
- IPPROTO_MICP = 0x5f
- IPPROTO_MTP = 0x5c
- IPPROTO_MUX = 0x12
- IPPROTO_ND = 0x4d
- IPPROTO_NHRP = 0x36
- IPPROTO_NONE = 0x3b
- IPPROTO_NSP = 0x1f
- IPPROTO_NVPII = 0xb
- IPPROTO_OSPFIGP = 0x59
- IPPROTO_PGM = 0x71
- IPPROTO_PIGP = 0x9
- IPPROTO_PIM = 0x67
- IPPROTO_PRM = 0x15
- IPPROTO_PUP = 0xc
- IPPROTO_PVP = 0x4b
- IPPROTO_RAW = 0xff
- IPPROTO_RCCMON = 0xa
- IPPROTO_RDP = 0x1b
- IPPROTO_ROUTING = 0x2b
- IPPROTO_RSVP = 0x2e
- IPPROTO_RVD = 0x42
- IPPROTO_SATEXPAK = 0x40
- IPPROTO_SATMON = 0x45
- IPPROTO_SCCSP = 0x60
- IPPROTO_SCTP = 0x84
- IPPROTO_SDRP = 0x2a
- IPPROTO_SEP = 0x21
- IPPROTO_SRPC = 0x5a
- IPPROTO_ST = 0x7
- IPPROTO_SVMTP = 0x52
- IPPROTO_SWIPE = 0x35
- IPPROTO_TCF = 0x57
- IPPROTO_TCP = 0x6
- IPPROTO_TP = 0x1d
- IPPROTO_TPXX = 0x27
- IPPROTO_TRUNK1 = 0x17
- IPPROTO_TRUNK2 = 0x18
- IPPROTO_TTP = 0x54
- IPPROTO_UDP = 0x11
- IPPROTO_VINES = 0x53
- IPPROTO_VISA = 0x46
- IPPROTO_VMTP = 0x51
- IPPROTO_WBEXPAK = 0x4f
- IPPROTO_WBMON = 0x4e
- IPPROTO_WSN = 0x4a
- IPPROTO_XNET = 0xf
- IPPROTO_XTP = 0x24
- IPV6_2292DSTOPTS = 0x17
- IPV6_2292HOPLIMIT = 0x14
- IPV6_2292HOPOPTS = 0x16
- IPV6_2292NEXTHOP = 0x15
- IPV6_2292PKTINFO = 0x13
- IPV6_2292PKTOPTIONS = 0x19
- IPV6_2292RTHDR = 0x18
- IPV6_3542DSTOPTS = 0x32
- IPV6_3542HOPLIMIT = 0x2f
- IPV6_3542HOPOPTS = 0x31
- IPV6_3542NEXTHOP = 0x30
- IPV6_3542PKTINFO = 0x2e
- IPV6_3542RTHDR = 0x33
- IPV6_ADDR_MC_FLAGS_PREFIX = 0x20
- IPV6_ADDR_MC_FLAGS_TRANSIENT = 0x10
- IPV6_ADDR_MC_FLAGS_UNICAST_BASED = 0x30
- IPV6_AUTOFLOWLABEL = 0x3b
- IPV6_BINDV6ONLY = 0x1b
- IPV6_BOUND_IF = 0x7d
- IPV6_CHECKSUM = 0x1a
- IPV6_DEFAULT_MULTICAST_HOPS = 0x1
- IPV6_DEFAULT_MULTICAST_LOOP = 0x1
- IPV6_DEFHLIM = 0x40
- IPV6_DONTFRAG = 0x3e
- IPV6_DSTOPTS = 0x32
- IPV6_FAITH = 0x1d
- IPV6_FLOWINFO_MASK = 0xffffff0f
- IPV6_FLOWLABEL_MASK = 0xffff0f00
- IPV6_FLOW_ECN_MASK = 0x3000
- IPV6_FRAGTTL = 0x3c
- IPV6_FW_ADD = 0x1e
- IPV6_FW_DEL = 0x1f
- IPV6_FW_FLUSH = 0x20
- IPV6_FW_GET = 0x22
- IPV6_FW_ZERO = 0x21
- IPV6_HLIMDEC = 0x1
- IPV6_HOPLIMIT = 0x2f
- IPV6_HOPOPTS = 0x31
- IPV6_IPSEC_POLICY = 0x1c
- IPV6_JOIN_GROUP = 0xc
- IPV6_LEAVE_GROUP = 0xd
- IPV6_MAXHLIM = 0xff
- IPV6_MAXOPTHDR = 0x800
- IPV6_MAXPACKET = 0xffff
- IPV6_MAX_GROUP_SRC_FILTER = 0x200
- IPV6_MAX_MEMBERSHIPS = 0xfff
- IPV6_MAX_SOCK_SRC_FILTER = 0x80
- IPV6_MIN_MEMBERSHIPS = 0x1f
- IPV6_MMTU = 0x500
- IPV6_MSFILTER = 0x4a
- IPV6_MULTICAST_HOPS = 0xa
- IPV6_MULTICAST_IF = 0x9
- IPV6_MULTICAST_LOOP = 0xb
- IPV6_NEXTHOP = 0x30
- IPV6_PATHMTU = 0x2c
- IPV6_PKTINFO = 0x2e
- IPV6_PORTRANGE = 0xe
- IPV6_PORTRANGE_DEFAULT = 0x0
- IPV6_PORTRANGE_HIGH = 0x1
- IPV6_PORTRANGE_LOW = 0x2
- IPV6_PREFER_TEMPADDR = 0x3f
- IPV6_RECVDSTOPTS = 0x28
- IPV6_RECVHOPLIMIT = 0x25
- IPV6_RECVHOPOPTS = 0x27
- IPV6_RECVPATHMTU = 0x2b
- IPV6_RECVPKTINFO = 0x3d
- IPV6_RECVRTHDR = 0x26
- IPV6_RECVTCLASS = 0x23
- IPV6_RTHDR = 0x33
- IPV6_RTHDRDSTOPTS = 0x39
- IPV6_RTHDR_LOOSE = 0x0
- IPV6_RTHDR_STRICT = 0x1
- IPV6_RTHDR_TYPE_0 = 0x0
- IPV6_SOCKOPT_RESERVED1 = 0x3
- IPV6_TCLASS = 0x24
- IPV6_UNICAST_HOPS = 0x4
- IPV6_USE_MIN_MTU = 0x2a
- IPV6_V6ONLY = 0x1b
- IPV6_VERSION = 0x60
- IPV6_VERSION_MASK = 0xf0
- IP_ADD_MEMBERSHIP = 0xc
- IP_ADD_SOURCE_MEMBERSHIP = 0x46
- IP_BLOCK_SOURCE = 0x48
- IP_BOUND_IF = 0x19
- IP_DEFAULT_MULTICAST_LOOP = 0x1
- IP_DEFAULT_MULTICAST_TTL = 0x1
- IP_DF = 0x4000
- IP_DONTFRAG = 0x1c
- IP_DROP_MEMBERSHIP = 0xd
- IP_DROP_SOURCE_MEMBERSHIP = 0x47
- IP_DUMMYNET_CONFIGURE = 0x3c
- IP_DUMMYNET_DEL = 0x3d
- IP_DUMMYNET_FLUSH = 0x3e
- IP_DUMMYNET_GET = 0x40
- IP_FAITH = 0x16
- IP_FW_ADD = 0x28
- IP_FW_DEL = 0x29
- IP_FW_FLUSH = 0x2a
- IP_FW_GET = 0x2c
- IP_FW_RESETLOG = 0x2d
- IP_FW_ZERO = 0x2b
- IP_HDRINCL = 0x2
- IP_IPSEC_POLICY = 0x15
- IP_MAXPACKET = 0xffff
- IP_MAX_GROUP_SRC_FILTER = 0x200
- IP_MAX_MEMBERSHIPS = 0xfff
- IP_MAX_SOCK_MUTE_FILTER = 0x80
- IP_MAX_SOCK_SRC_FILTER = 0x80
- IP_MF = 0x2000
- IP_MIN_MEMBERSHIPS = 0x1f
- IP_MSFILTER = 0x4a
- IP_MSS = 0x240
- IP_MULTICAST_IF = 0x9
- IP_MULTICAST_IFINDEX = 0x42
- IP_MULTICAST_LOOP = 0xb
- IP_MULTICAST_TTL = 0xa
- IP_MULTICAST_VIF = 0xe
- IP_NAT__XXX = 0x37
- IP_OFFMASK = 0x1fff
- IP_OLD_FW_ADD = 0x32
- IP_OLD_FW_DEL = 0x33
- IP_OLD_FW_FLUSH = 0x34
- IP_OLD_FW_GET = 0x36
- IP_OLD_FW_RESETLOG = 0x38
- IP_OLD_FW_ZERO = 0x35
- IP_OPTIONS = 0x1
- IP_PKTINFO = 0x1a
- IP_PORTRANGE = 0x13
- IP_PORTRANGE_DEFAULT = 0x0
- IP_PORTRANGE_HIGH = 0x1
- IP_PORTRANGE_LOW = 0x2
- IP_RECVDSTADDR = 0x7
- IP_RECVIF = 0x14
- IP_RECVOPTS = 0x5
- IP_RECVPKTINFO = 0x1a
- IP_RECVRETOPTS = 0x6
- IP_RECVTOS = 0x1b
- IP_RECVTTL = 0x18
- IP_RETOPTS = 0x8
- IP_RF = 0x8000
- IP_RSVP_OFF = 0x10
- IP_RSVP_ON = 0xf
- IP_RSVP_VIF_OFF = 0x12
- IP_RSVP_VIF_ON = 0x11
- IP_STRIPHDR = 0x17
- IP_TOS = 0x3
- IP_TRAFFIC_MGT_BACKGROUND = 0x41
- IP_TTL = 0x4
- IP_UNBLOCK_SOURCE = 0x49
- ISIG = 0x80
- ISTRIP = 0x20
- IUTF8 = 0x4000
- IXANY = 0x800
- IXOFF = 0x400
- IXON = 0x200
- KERN_HOSTNAME = 0xa
- KERN_OSRELEASE = 0x2
- KERN_OSTYPE = 0x1
- KERN_VERSION = 0x4
- LOCAL_PEERCRED = 0x1
- LOCAL_PEEREPID = 0x3
- LOCAL_PEEREUUID = 0x5
- LOCAL_PEERPID = 0x2
- LOCAL_PEERTOKEN = 0x6
- LOCAL_PEERUUID = 0x4
- LOCK_EX = 0x2
- LOCK_NB = 0x4
- LOCK_SH = 0x1
- LOCK_UN = 0x8
- MADV_CAN_REUSE = 0x9
- MADV_DONTNEED = 0x4
- MADV_FREE = 0x5
- MADV_FREE_REUSABLE = 0x7
- MADV_FREE_REUSE = 0x8
- MADV_NORMAL = 0x0
- MADV_PAGEOUT = 0xa
- MADV_RANDOM = 0x1
- MADV_SEQUENTIAL = 0x2
- MADV_WILLNEED = 0x3
- MADV_ZERO_WIRED_PAGES = 0x6
- MAP_32BIT = 0x8000
- MAP_ANON = 0x1000
- MAP_ANONYMOUS = 0x1000
- MAP_COPY = 0x2
- MAP_FILE = 0x0
- MAP_FIXED = 0x10
- MAP_HASSEMAPHORE = 0x200
- MAP_JIT = 0x800
- MAP_NOCACHE = 0x400
- MAP_NOEXTEND = 0x100
- MAP_NORESERVE = 0x40
- MAP_PRIVATE = 0x2
- MAP_RENAME = 0x20
- MAP_RESERVED0080 = 0x80
- MAP_RESILIENT_CODESIGN = 0x2000
- MAP_RESILIENT_MEDIA = 0x4000
- MAP_SHARED = 0x1
- MAP_TRANSLATED_ALLOW_EXECUTE = 0x20000
- MAP_UNIX03 = 0x40000
- MCAST_BLOCK_SOURCE = 0x54
- MCAST_EXCLUDE = 0x2
- MCAST_INCLUDE = 0x1
- MCAST_JOIN_GROUP = 0x50
- MCAST_JOIN_SOURCE_GROUP = 0x52
- MCAST_LEAVE_GROUP = 0x51
- MCAST_LEAVE_SOURCE_GROUP = 0x53
- MCAST_UNBLOCK_SOURCE = 0x55
- MCAST_UNDEFINED = 0x0
- MCL_CURRENT = 0x1
- MCL_FUTURE = 0x2
- MNT_ASYNC = 0x40
- MNT_AUTOMOUNTED = 0x400000
- MNT_CMDFLAGS = 0xf0000
- MNT_CPROTECT = 0x80
- MNT_DEFWRITE = 0x2000000
- MNT_DONTBROWSE = 0x100000
- MNT_DOVOLFS = 0x8000
- MNT_DWAIT = 0x4
- MNT_EXPORTED = 0x100
- MNT_EXT_ROOT_DATA_VOL = 0x1
- MNT_FORCE = 0x80000
- MNT_IGNORE_OWNERSHIP = 0x200000
- MNT_JOURNALED = 0x800000
- MNT_LOCAL = 0x1000
- MNT_MULTILABEL = 0x4000000
- MNT_NOATIME = 0x10000000
- MNT_NOBLOCK = 0x20000
- MNT_NODEV = 0x10
- MNT_NOEXEC = 0x4
- MNT_NOSUID = 0x8
- MNT_NOUSERXATTR = 0x1000000
- MNT_NOWAIT = 0x2
- MNT_QUARANTINE = 0x400
- MNT_QUOTA = 0x2000
- MNT_RDONLY = 0x1
- MNT_RELOAD = 0x40000
- MNT_REMOVABLE = 0x200
- MNT_ROOTFS = 0x4000
- MNT_SNAPSHOT = 0x40000000
- MNT_STRICTATIME = 0x80000000
- MNT_SYNCHRONOUS = 0x2
- MNT_UNION = 0x20
- MNT_UNKNOWNPERMISSIONS = 0x200000
- MNT_UPDATE = 0x10000
- MNT_VISFLAGMASK = 0xd7f0f7ff
- MNT_WAIT = 0x1
- MSG_CTRUNC = 0x20
- MSG_DONTROUTE = 0x4
- MSG_DONTWAIT = 0x80
- MSG_EOF = 0x100
- MSG_EOR = 0x8
- MSG_FLUSH = 0x400
- MSG_HAVEMORE = 0x2000
- MSG_HOLD = 0x800
- MSG_NEEDSA = 0x10000
- MSG_NOSIGNAL = 0x80000
- MSG_OOB = 0x1
- MSG_PEEK = 0x2
- MSG_RCVMORE = 0x4000
- MSG_SEND = 0x1000
- MSG_TRUNC = 0x10
- MSG_WAITALL = 0x40
- MSG_WAITSTREAM = 0x200
- MS_ASYNC = 0x1
- MS_DEACTIVATE = 0x8
- MS_INVALIDATE = 0x2
- MS_KILLPAGES = 0x4
- MS_SYNC = 0x10
- NAME_MAX = 0xff
- NET_RT_DUMP = 0x1
- NET_RT_DUMP2 = 0x7
- NET_RT_FLAGS = 0x2
- NET_RT_FLAGS_PRIV = 0xa
- NET_RT_IFLIST = 0x3
- NET_RT_IFLIST2 = 0x6
- NET_RT_MAXID = 0xb
- NET_RT_STAT = 0x4
- NET_RT_TRASH = 0x5
- NFDBITS = 0x20
- NL0 = 0x0
- NL1 = 0x100
- NL2 = 0x200
- NL3 = 0x300
- NLDLY = 0x300
- NOFLSH = 0x80000000
- NOKERNINFO = 0x2000000
- NOTE_ABSOLUTE = 0x8
- NOTE_ATTRIB = 0x8
- NOTE_BACKGROUND = 0x40
- NOTE_CHILD = 0x4
- NOTE_CRITICAL = 0x20
- NOTE_DELETE = 0x1
- NOTE_EXEC = 0x20000000
- NOTE_EXIT = 0x80000000
- NOTE_EXITSTATUS = 0x4000000
- NOTE_EXIT_CSERROR = 0x40000
- NOTE_EXIT_DECRYPTFAIL = 0x10000
- NOTE_EXIT_DETAIL = 0x2000000
- NOTE_EXIT_DETAIL_MASK = 0x70000
- NOTE_EXIT_MEMORY = 0x20000
- NOTE_EXIT_REPARENTED = 0x80000
- NOTE_EXTEND = 0x4
- NOTE_FFAND = 0x40000000
- NOTE_FFCOPY = 0xc0000000
- NOTE_FFCTRLMASK = 0xc0000000
- NOTE_FFLAGSMASK = 0xffffff
- NOTE_FFNOP = 0x0
- NOTE_FFOR = 0x80000000
- NOTE_FORK = 0x40000000
- NOTE_FUNLOCK = 0x100
- NOTE_LEEWAY = 0x10
- NOTE_LINK = 0x10
- NOTE_LOWAT = 0x1
- NOTE_MACHTIME = 0x100
- NOTE_MACH_CONTINUOUS_TIME = 0x80
- NOTE_NONE = 0x80
- NOTE_NSECONDS = 0x4
- NOTE_OOB = 0x2
- NOTE_PCTRLMASK = -0x100000
- NOTE_PDATAMASK = 0xfffff
- NOTE_REAP = 0x10000000
- NOTE_RENAME = 0x20
- NOTE_REVOKE = 0x40
- NOTE_SECONDS = 0x1
- NOTE_SIGNAL = 0x8000000
- NOTE_TRACK = 0x1
- NOTE_TRACKERR = 0x2
- NOTE_TRIGGER = 0x1000000
- NOTE_USECONDS = 0x2
- NOTE_VM_ERROR = 0x10000000
- NOTE_VM_PRESSURE = 0x80000000
- NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000
- NOTE_VM_PRESSURE_TERMINATE = 0x40000000
- NOTE_WRITE = 0x2
- OCRNL = 0x10
- OFDEL = 0x20000
- OFILL = 0x80
- ONLCR = 0x2
- ONLRET = 0x40
- ONOCR = 0x20
- ONOEOT = 0x8
- OPOST = 0x1
- OXTABS = 0x4
- O_ACCMODE = 0x3
- O_ALERT = 0x20000000
- O_APPEND = 0x8
- O_ASYNC = 0x40
- O_CLOEXEC = 0x1000000
- O_CREAT = 0x200
- O_DIRECTORY = 0x100000
- O_DP_GETRAWENCRYPTED = 0x1
- O_DP_GETRAWUNENCRYPTED = 0x2
- O_DSYNC = 0x400000
- O_EVTONLY = 0x8000
- O_EXCL = 0x800
- O_EXLOCK = 0x20
- O_FSYNC = 0x80
- O_NDELAY = 0x4
- O_NOCTTY = 0x20000
- O_NOFOLLOW = 0x100
- O_NOFOLLOW_ANY = 0x20000000
- O_NONBLOCK = 0x4
- O_POPUP = 0x80000000
- O_RDONLY = 0x0
- O_RDWR = 0x2
- O_SHLOCK = 0x10
- O_SYMLINK = 0x200000
- O_SYNC = 0x80
- O_TRUNC = 0x400
- O_WRONLY = 0x1
- PARENB = 0x1000
- PARMRK = 0x8
- PARODD = 0x2000
- PENDIN = 0x20000000
- PRIO_PGRP = 0x1
- PRIO_PROCESS = 0x0
- PRIO_USER = 0x2
- PROT_EXEC = 0x4
- PROT_NONE = 0x0
- PROT_READ = 0x1
- PROT_WRITE = 0x2
- PT_ATTACH = 0xa
- PT_ATTACHEXC = 0xe
- PT_CONTINUE = 0x7
- PT_DENY_ATTACH = 0x1f
- PT_DETACH = 0xb
- PT_FIRSTMACH = 0x20
- PT_FORCEQUOTA = 0x1e
- PT_KILL = 0x8
- PT_READ_D = 0x2
- PT_READ_I = 0x1
- PT_READ_U = 0x3
- PT_SIGEXC = 0xc
- PT_STEP = 0x9
- PT_THUPDATE = 0xd
- PT_TRACE_ME = 0x0
- PT_WRITE_D = 0x5
- PT_WRITE_I = 0x4
- PT_WRITE_U = 0x6
- RLIMIT_AS = 0x5
- RLIMIT_CORE = 0x4
- RLIMIT_CPU = 0x0
- RLIMIT_CPU_USAGE_MONITOR = 0x2
- RLIMIT_DATA = 0x2
- RLIMIT_FSIZE = 0x1
- RLIMIT_MEMLOCK = 0x6
- RLIMIT_NOFILE = 0x8
- RLIMIT_NPROC = 0x7
- RLIMIT_RSS = 0x5
- RLIMIT_STACK = 0x3
- RLIM_INFINITY = 0x7fffffffffffffff
- RTAX_AUTHOR = 0x6
- RTAX_BRD = 0x7
- RTAX_DST = 0x0
- RTAX_GATEWAY = 0x1
- RTAX_GENMASK = 0x3
- RTAX_IFA = 0x5
- RTAX_IFP = 0x4
- RTAX_MAX = 0x8
- RTAX_NETMASK = 0x2
- RTA_AUTHOR = 0x40
- RTA_BRD = 0x80
- RTA_DST = 0x1
- RTA_GATEWAY = 0x2
- RTA_GENMASK = 0x8
- RTA_IFA = 0x20
- RTA_IFP = 0x10
- RTA_NETMASK = 0x4
- RTF_BLACKHOLE = 0x1000
- RTF_BROADCAST = 0x400000
- RTF_CLONING = 0x100
- RTF_CONDEMNED = 0x2000000
- RTF_DEAD = 0x20000000
- RTF_DELCLONE = 0x80
- RTF_DONE = 0x40
- RTF_DYNAMIC = 0x10
- RTF_GATEWAY = 0x2
- RTF_GLOBAL = 0x40000000
- RTF_HOST = 0x4
- RTF_IFREF = 0x4000000
- RTF_IFSCOPE = 0x1000000
- RTF_LLDATA = 0x400
- RTF_LLINFO = 0x400
- RTF_LOCAL = 0x200000
- RTF_MODIFIED = 0x20
- RTF_MULTICAST = 0x800000
- RTF_NOIFREF = 0x2000
- RTF_PINNED = 0x100000
- RTF_PRCLONING = 0x10000
- RTF_PROTO1 = 0x8000
- RTF_PROTO2 = 0x4000
- RTF_PROTO3 = 0x40000
- RTF_PROXY = 0x8000000
- RTF_REJECT = 0x8
- RTF_ROUTER = 0x10000000
- RTF_STATIC = 0x800
- RTF_UP = 0x1
- RTF_WASCLONED = 0x20000
- RTF_XRESOLVE = 0x200
- RTM_ADD = 0x1
- RTM_CHANGE = 0x3
- RTM_DELADDR = 0xd
- RTM_DELETE = 0x2
- RTM_DELMADDR = 0x10
- RTM_GET = 0x4
- RTM_GET2 = 0x14
- RTM_IFINFO = 0xe
- RTM_IFINFO2 = 0x12
- RTM_LOCK = 0x8
- RTM_LOSING = 0x5
- RTM_MISS = 0x7
- RTM_NEWADDR = 0xc
- RTM_NEWMADDR = 0xf
- RTM_NEWMADDR2 = 0x13
- RTM_OLDADD = 0x9
- RTM_OLDDEL = 0xa
- RTM_REDIRECT = 0x6
- RTM_RESOLVE = 0xb
- RTM_RTTUNIT = 0xf4240
- RTM_VERSION = 0x5
- RTV_EXPIRE = 0x4
- RTV_HOPCOUNT = 0x2
- RTV_MTU = 0x1
- RTV_RPIPE = 0x8
- RTV_RTT = 0x40
- RTV_RTTVAR = 0x80
- RTV_SPIPE = 0x10
- RTV_SSTHRESH = 0x20
- RUSAGE_CHILDREN = -0x1
- RUSAGE_SELF = 0x0
- SCM_CREDS = 0x3
- SCM_RIGHTS = 0x1
- SCM_TIMESTAMP = 0x2
- SCM_TIMESTAMP_MONOTONIC = 0x4
- SEEK_CUR = 0x1
- SEEK_DATA = 0x4
- SEEK_END = 0x2
- SEEK_HOLE = 0x3
- SEEK_SET = 0x0
- SHUT_RD = 0x0
- SHUT_RDWR = 0x2
- SHUT_WR = 0x1
- SIOCADDMULTI = 0x80206931
- SIOCAIFADDR = 0x8040691a
- SIOCARPIPLL = 0xc0206928
- SIOCATMARK = 0x40047307
- SIOCAUTOADDR = 0xc0206926
- SIOCAUTONETMASK = 0x80206927
- SIOCDELMULTI = 0x80206932
- SIOCDIFADDR = 0x80206919
- SIOCDIFPHYADDR = 0x80206941
- SIOCGDRVSPEC = 0xc028697b
- SIOCGETVLAN = 0xc020697f
- SIOCGHIWAT = 0x40047301
- SIOCGIF6LOWPAN = 0xc02069c5
- SIOCGIFADDR = 0xc0206921
- SIOCGIFALTMTU = 0xc0206948
- SIOCGIFASYNCMAP = 0xc020697c
- SIOCGIFBOND = 0xc0206947
- SIOCGIFBRDADDR = 0xc0206923
- SIOCGIFCAP = 0xc020695b
- SIOCGIFCONF = 0xc00c6924
- SIOCGIFDEVMTU = 0xc0206944
- SIOCGIFDSTADDR = 0xc0206922
- SIOCGIFFLAGS = 0xc0206911
- SIOCGIFFUNCTIONALTYPE = 0xc02069ad
- SIOCGIFGENERIC = 0xc020693a
- SIOCGIFKPI = 0xc0206987
- SIOCGIFMAC = 0xc0206982
- SIOCGIFMEDIA = 0xc02c6938
- SIOCGIFMETRIC = 0xc0206917
- SIOCGIFMTU = 0xc0206933
- SIOCGIFNETMASK = 0xc0206925
- SIOCGIFPDSTADDR = 0xc0206940
- SIOCGIFPHYS = 0xc0206935
- SIOCGIFPSRCADDR = 0xc020693f
- SIOCGIFSTATUS = 0xc331693d
- SIOCGIFVLAN = 0xc020697f
- SIOCGIFWAKEFLAGS = 0xc0206988
- SIOCGIFXMEDIA = 0xc02c6948
- SIOCGLOWAT = 0x40047303
- SIOCGPGRP = 0x40047309
- SIOCIFCREATE = 0xc0206978
- SIOCIFCREATE2 = 0xc020697a
- SIOCIFDESTROY = 0x80206979
- SIOCIFGCLONERS = 0xc0106981
- SIOCRSLVMULTI = 0xc010693b
- SIOCSDRVSPEC = 0x8028697b
- SIOCSETVLAN = 0x8020697e
- SIOCSHIWAT = 0x80047300
- SIOCSIF6LOWPAN = 0x802069c4
- SIOCSIFADDR = 0x8020690c
- SIOCSIFALTMTU = 0x80206945
- SIOCSIFASYNCMAP = 0x8020697d
- SIOCSIFBOND = 0x80206946
- SIOCSIFBRDADDR = 0x80206913
- SIOCSIFCAP = 0x8020695a
- SIOCSIFDSTADDR = 0x8020690e
- SIOCSIFFLAGS = 0x80206910
- SIOCSIFGENERIC = 0x80206939
- SIOCSIFKPI = 0x80206986
- SIOCSIFLLADDR = 0x8020693c
- SIOCSIFMAC = 0x80206983
- SIOCSIFMEDIA = 0xc0206937
- SIOCSIFMETRIC = 0x80206918
- SIOCSIFMTU = 0x80206934
- SIOCSIFNETMASK = 0x80206916
- SIOCSIFPHYADDR = 0x8040693e
- SIOCSIFPHYS = 0x80206936
- SIOCSIFVLAN = 0x8020697e
- SIOCSLOWAT = 0x80047302
- SIOCSPGRP = 0x80047308
- SOCK_DGRAM = 0x2
- SOCK_MAXADDRLEN = 0xff
- SOCK_RAW = 0x3
- SOCK_RDM = 0x4
- SOCK_SEQPACKET = 0x5
- SOCK_STREAM = 0x1
- SOL_LOCAL = 0x0
- SOL_SOCKET = 0xffff
- SOMAXCONN = 0x80
- SO_ACCEPTCONN = 0x2
- SO_BROADCAST = 0x20
- SO_DEBUG = 0x1
- SO_DONTROUTE = 0x10
- SO_DONTTRUNC = 0x2000
- SO_ERROR = 0x1007
- SO_KEEPALIVE = 0x8
- SO_LABEL = 0x1010
- SO_LINGER = 0x80
- SO_LINGER_SEC = 0x1080
- SO_NETSVC_MARKING_LEVEL = 0x1119
- SO_NET_SERVICE_TYPE = 0x1116
- SO_NKE = 0x1021
- SO_NOADDRERR = 0x1023
- SO_NOSIGPIPE = 0x1022
- SO_NOTIFYCONFLICT = 0x1026
- SO_NP_EXTENSIONS = 0x1083
- SO_NREAD = 0x1020
- SO_NUMRCVPKT = 0x1112
- SO_NWRITE = 0x1024
- SO_OOBINLINE = 0x100
- SO_PEERLABEL = 0x1011
- SO_RANDOMPORT = 0x1082
- SO_RCVBUF = 0x1002
- SO_RCVLOWAT = 0x1004
- SO_RCVTIMEO = 0x1006
- SO_REUSEADDR = 0x4
- SO_REUSEPORT = 0x200
- SO_REUSESHAREUID = 0x1025
- SO_SNDBUF = 0x1001
- SO_SNDLOWAT = 0x1003
- SO_SNDTIMEO = 0x1005
- SO_TIMESTAMP = 0x400
- SO_TIMESTAMP_MONOTONIC = 0x800
- SO_TYPE = 0x1008
- SO_UPCALLCLOSEWAIT = 0x1027
- SO_USELOOPBACK = 0x40
- SO_WANTMORE = 0x4000
- SO_WANTOOBFLAG = 0x8000
- S_IEXEC = 0x40
- S_IFBLK = 0x6000
- S_IFCHR = 0x2000
- S_IFDIR = 0x4000
- S_IFIFO = 0x1000
- S_IFLNK = 0xa000
- S_IFMT = 0xf000
- S_IFREG = 0x8000
- S_IFSOCK = 0xc000
- S_IFWHT = 0xe000
- S_IREAD = 0x100
- S_IRGRP = 0x20
- S_IROTH = 0x4
- S_IRUSR = 0x100
- S_IRWXG = 0x38
- S_IRWXO = 0x7
- S_IRWXU = 0x1c0
- S_ISGID = 0x400
- S_ISTXT = 0x200
- S_ISUID = 0x800
- S_ISVTX = 0x200
- S_IWGRP = 0x10
- S_IWOTH = 0x2
- S_IWRITE = 0x80
- S_IWUSR = 0x80
- S_IXGRP = 0x8
- S_IXOTH = 0x1
- S_IXUSR = 0x40
- TAB0 = 0x0
- TAB1 = 0x400
- TAB2 = 0x800
- TAB3 = 0x4
- TABDLY = 0xc04
- TCIFLUSH = 0x1
- TCIOFF = 0x3
- TCIOFLUSH = 0x3
- TCION = 0x4
- TCOFLUSH = 0x2
- TCOOFF = 0x1
- TCOON = 0x2
- TCP_CONNECTIONTIMEOUT = 0x20
- TCP_CONNECTION_INFO = 0x106
- TCP_ENABLE_ECN = 0x104
- TCP_FASTOPEN = 0x105
- TCP_KEEPALIVE = 0x10
- TCP_KEEPCNT = 0x102
- TCP_KEEPINTVL = 0x101
- TCP_MAXHLEN = 0x3c
- TCP_MAXOLEN = 0x28
- TCP_MAXSEG = 0x2
- TCP_MAXWIN = 0xffff
- TCP_MAX_SACK = 0x4
- TCP_MAX_WINSHIFT = 0xe
- TCP_MINMSS = 0xd8
- TCP_MSS = 0x200
- TCP_NODELAY = 0x1
- TCP_NOOPT = 0x8
- TCP_NOPUSH = 0x4
- TCP_NOTSENT_LOWAT = 0x201
- TCP_RXT_CONNDROPTIME = 0x80
- TCP_RXT_FINDROP = 0x100
- TCP_SENDMOREACKS = 0x103
- TCSAFLUSH = 0x2
- TIOCCBRK = 0x2000747a
- TIOCCDTR = 0x20007478
- TIOCCONS = 0x80047462
- TIOCDCDTIMESTAMP = 0x40107458
- TIOCDRAIN = 0x2000745e
- TIOCDSIMICROCODE = 0x20007455
- TIOCEXCL = 0x2000740d
- TIOCEXT = 0x80047460
- TIOCFLUSH = 0x80047410
- TIOCGDRAINWAIT = 0x40047456
- TIOCGETA = 0x40487413
- TIOCGETD = 0x4004741a
- TIOCGPGRP = 0x40047477
- TIOCGWINSZ = 0x40087468
- TIOCIXOFF = 0x20007480
- TIOCIXON = 0x20007481
- TIOCMBIC = 0x8004746b
- TIOCMBIS = 0x8004746c
- TIOCMGDTRWAIT = 0x4004745a
- TIOCMGET = 0x4004746a
- TIOCMODG = 0x40047403
- TIOCMODS = 0x80047404
- TIOCMSDTRWAIT = 0x8004745b
- TIOCMSET = 0x8004746d
- TIOCM_CAR = 0x40
- TIOCM_CD = 0x40
- TIOCM_CTS = 0x20
- TIOCM_DSR = 0x100
- TIOCM_DTR = 0x2
- TIOCM_LE = 0x1
- TIOCM_RI = 0x80
- TIOCM_RNG = 0x80
- TIOCM_RTS = 0x4
- TIOCM_SR = 0x10
- TIOCM_ST = 0x8
- TIOCNOTTY = 0x20007471
- TIOCNXCL = 0x2000740e
- TIOCOUTQ = 0x40047473
- TIOCPKT = 0x80047470
- TIOCPKT_DATA = 0x0
- TIOCPKT_DOSTOP = 0x20
- TIOCPKT_FLUSHREAD = 0x1
- TIOCPKT_FLUSHWRITE = 0x2
- TIOCPKT_IOCTL = 0x40
- TIOCPKT_NOSTOP = 0x10
- TIOCPKT_START = 0x8
- TIOCPKT_STOP = 0x4
- TIOCPTYGNAME = 0x40807453
- TIOCPTYGRANT = 0x20007454
- TIOCPTYUNLK = 0x20007452
- TIOCREMOTE = 0x80047469
- TIOCSBRK = 0x2000747b
- TIOCSCONS = 0x20007463
- TIOCSCTTY = 0x20007461
- TIOCSDRAINWAIT = 0x80047457
- TIOCSDTR = 0x20007479
- TIOCSETA = 0x80487414
- TIOCSETAF = 0x80487416
- TIOCSETAW = 0x80487415
- TIOCSETD = 0x8004741b
- TIOCSIG = 0x2000745f
- TIOCSPGRP = 0x80047476
- TIOCSTART = 0x2000746e
- TIOCSTAT = 0x20007465
- TIOCSTI = 0x80017472
- TIOCSTOP = 0x2000746f
- TIOCSWINSZ = 0x80087467
- TIOCTIMESTAMP = 0x40107459
- TIOCUCNTL = 0x80047466
- TOSTOP = 0x400000
- VDISCARD = 0xf
- VDSUSP = 0xb
- VEOF = 0x0
- VEOL = 0x1
- VEOL2 = 0x2
- VERASE = 0x3
- VINTR = 0x8
- VKILL = 0x5
- VLNEXT = 0xe
- VMIN = 0x10
- VM_LOADAVG = 0x2
- VM_MACHFACTOR = 0x4
- VM_MAXID = 0x6
- VM_METER = 0x1
- VM_SWAPUSAGE = 0x5
- VQUIT = 0x9
- VREPRINT = 0x6
- VSTART = 0xc
- VSTATUS = 0x12
- VSTOP = 0xd
- VSUSP = 0xa
- VT0 = 0x0
- VT1 = 0x10000
- VTDLY = 0x10000
- VTIME = 0x11
- VWERASE = 0x4
- WCONTINUED = 0x10
- WCOREFLAG = 0x80
- WEXITED = 0x4
- WNOHANG = 0x1
- WNOWAIT = 0x20
- WORDSIZE = 0x40
- WSTOPPED = 0x8
- WUNTRACED = 0x2
- XATTR_CREATE = 0x2
- XATTR_NODEFAULT = 0x10
- XATTR_NOFOLLOW = 0x1
- XATTR_NOSECURITY = 0x8
- XATTR_REPLACE = 0x4
- XATTR_SHOWCOMPRESSION = 0x20
+ AF_APPLETALK = 0x10
+ AF_CCITT = 0xa
+ AF_CHAOS = 0x5
+ AF_CNT = 0x15
+ AF_COIP = 0x14
+ AF_DATAKIT = 0x9
+ AF_DECnet = 0xc
+ AF_DLI = 0xd
+ AF_E164 = 0x1c
+ AF_ECMA = 0x8
+ AF_HYLINK = 0xf
+ AF_IEEE80211 = 0x25
+ AF_IMPLINK = 0x3
+ AF_INET = 0x2
+ AF_INET6 = 0x1e
+ AF_IPX = 0x17
+ AF_ISDN = 0x1c
+ AF_ISO = 0x7
+ AF_LAT = 0xe
+ AF_LINK = 0x12
+ AF_LOCAL = 0x1
+ AF_MAX = 0x29
+ AF_NATM = 0x1f
+ AF_NDRV = 0x1b
+ AF_NETBIOS = 0x21
+ AF_NS = 0x6
+ AF_OSI = 0x7
+ AF_PPP = 0x22
+ AF_PUP = 0x4
+ AF_RESERVED_36 = 0x24
+ AF_ROUTE = 0x11
+ AF_SIP = 0x18
+ AF_SNA = 0xb
+ AF_SYSTEM = 0x20
+ AF_SYS_CONTROL = 0x2
+ AF_UNIX = 0x1
+ AF_UNSPEC = 0x0
+ AF_UTUN = 0x26
+ AF_VSOCK = 0x28
+ ALTWERASE = 0x200
+ ATTR_BIT_MAP_COUNT = 0x5
+ ATTR_CMN_ACCESSMASK = 0x20000
+ ATTR_CMN_ACCTIME = 0x1000
+ ATTR_CMN_ADDEDTIME = 0x10000000
+ ATTR_CMN_BKUPTIME = 0x2000
+ ATTR_CMN_CHGTIME = 0x800
+ ATTR_CMN_CRTIME = 0x200
+ ATTR_CMN_DATA_PROTECT_FLAGS = 0x40000000
+ ATTR_CMN_DEVID = 0x2
+ ATTR_CMN_DOCUMENT_ID = 0x100000
+ ATTR_CMN_ERROR = 0x20000000
+ ATTR_CMN_EXTENDED_SECURITY = 0x400000
+ ATTR_CMN_FILEID = 0x2000000
+ ATTR_CMN_FLAGS = 0x40000
+ ATTR_CMN_FNDRINFO = 0x4000
+ ATTR_CMN_FSID = 0x4
+ ATTR_CMN_FULLPATH = 0x8000000
+ ATTR_CMN_GEN_COUNT = 0x80000
+ ATTR_CMN_GRPID = 0x10000
+ ATTR_CMN_GRPUUID = 0x1000000
+ ATTR_CMN_MODTIME = 0x400
+ ATTR_CMN_NAME = 0x1
+ ATTR_CMN_NAMEDATTRCOUNT = 0x80000
+ ATTR_CMN_NAMEDATTRLIST = 0x100000
+ ATTR_CMN_OBJID = 0x20
+ ATTR_CMN_OBJPERMANENTID = 0x40
+ ATTR_CMN_OBJTAG = 0x10
+ ATTR_CMN_OBJTYPE = 0x8
+ ATTR_CMN_OWNERID = 0x8000
+ ATTR_CMN_PARENTID = 0x4000000
+ ATTR_CMN_PAROBJID = 0x80
+ ATTR_CMN_RETURNED_ATTRS = 0x80000000
+ ATTR_CMN_SCRIPT = 0x100
+ ATTR_CMN_SETMASK = 0x51c7ff00
+ ATTR_CMN_USERACCESS = 0x200000
+ ATTR_CMN_UUID = 0x800000
+ ATTR_CMN_VALIDMASK = 0xffffffff
+ ATTR_CMN_VOLSETMASK = 0x6700
+ ATTR_FILE_ALLOCSIZE = 0x4
+ ATTR_FILE_CLUMPSIZE = 0x10
+ ATTR_FILE_DATAALLOCSIZE = 0x400
+ ATTR_FILE_DATAEXTENTS = 0x800
+ ATTR_FILE_DATALENGTH = 0x200
+ ATTR_FILE_DEVTYPE = 0x20
+ ATTR_FILE_FILETYPE = 0x40
+ ATTR_FILE_FORKCOUNT = 0x80
+ ATTR_FILE_FORKLIST = 0x100
+ ATTR_FILE_IOBLOCKSIZE = 0x8
+ ATTR_FILE_LINKCOUNT = 0x1
+ ATTR_FILE_RSRCALLOCSIZE = 0x2000
+ ATTR_FILE_RSRCEXTENTS = 0x4000
+ ATTR_FILE_RSRCLENGTH = 0x1000
+ ATTR_FILE_SETMASK = 0x20
+ ATTR_FILE_TOTALSIZE = 0x2
+ ATTR_FILE_VALIDMASK = 0x37ff
+ ATTR_VOL_ALLOCATIONCLUMP = 0x40
+ ATTR_VOL_ATTRIBUTES = 0x40000000
+ ATTR_VOL_CAPABILITIES = 0x20000
+ ATTR_VOL_DIRCOUNT = 0x400
+ ATTR_VOL_ENCODINGSUSED = 0x10000
+ ATTR_VOL_FILECOUNT = 0x200
+ ATTR_VOL_FSTYPE = 0x1
+ ATTR_VOL_INFO = 0x80000000
+ ATTR_VOL_IOBLOCKSIZE = 0x80
+ ATTR_VOL_MAXOBJCOUNT = 0x800
+ ATTR_VOL_MINALLOCATION = 0x20
+ ATTR_VOL_MOUNTEDDEVICE = 0x8000
+ ATTR_VOL_MOUNTFLAGS = 0x4000
+ ATTR_VOL_MOUNTPOINT = 0x1000
+ ATTR_VOL_NAME = 0x2000
+ ATTR_VOL_OBJCOUNT = 0x100
+ ATTR_VOL_QUOTA_SIZE = 0x10000000
+ ATTR_VOL_RESERVED_SIZE = 0x20000000
+ ATTR_VOL_SETMASK = 0x80002000
+ ATTR_VOL_SIGNATURE = 0x2
+ ATTR_VOL_SIZE = 0x4
+ ATTR_VOL_SPACEAVAIL = 0x10
+ ATTR_VOL_SPACEFREE = 0x8
+ ATTR_VOL_SPACEUSED = 0x800000
+ ATTR_VOL_UUID = 0x40000
+ ATTR_VOL_VALIDMASK = 0xf087ffff
+ B0 = 0x0
+ B110 = 0x6e
+ B115200 = 0x1c200
+ B1200 = 0x4b0
+ B134 = 0x86
+ B14400 = 0x3840
+ B150 = 0x96
+ B1800 = 0x708
+ B19200 = 0x4b00
+ B200 = 0xc8
+ B230400 = 0x38400
+ B2400 = 0x960
+ B28800 = 0x7080
+ B300 = 0x12c
+ B38400 = 0x9600
+ B4800 = 0x12c0
+ B50 = 0x32
+ B57600 = 0xe100
+ B600 = 0x258
+ B7200 = 0x1c20
+ B75 = 0x4b
+ B76800 = 0x12c00
+ B9600 = 0x2580
+ BIOCFLUSH = 0x20004268
+ BIOCGBLEN = 0x40044266
+ BIOCGDLT = 0x4004426a
+ BIOCGDLTLIST = 0xc00c4279
+ BIOCGETIF = 0x4020426b
+ BIOCGHDRCMPLT = 0x40044274
+ BIOCGRSIG = 0x40044272
+ BIOCGRTIMEOUT = 0x4010426e
+ BIOCGSEESENT = 0x40044276
+ BIOCGSTATS = 0x4008426f
+ BIOCIMMEDIATE = 0x80044270
+ BIOCPROMISC = 0x20004269
+ BIOCSBLEN = 0xc0044266
+ BIOCSDLT = 0x80044278
+ BIOCSETF = 0x80104267
+ BIOCSETFNR = 0x8010427e
+ BIOCSETIF = 0x8020426c
+ BIOCSHDRCMPLT = 0x80044275
+ BIOCSRSIG = 0x80044273
+ BIOCSRTIMEOUT = 0x8010426d
+ BIOCSSEESENT = 0x80044277
+ BIOCVERSION = 0x40044271
+ BPF_A = 0x10
+ BPF_ABS = 0x20
+ BPF_ADD = 0x0
+ BPF_ALIGNMENT = 0x4
+ BPF_ALU = 0x4
+ BPF_AND = 0x50
+ BPF_B = 0x10
+ BPF_DIV = 0x30
+ BPF_H = 0x8
+ BPF_IMM = 0x0
+ BPF_IND = 0x40
+ BPF_JA = 0x0
+ BPF_JEQ = 0x10
+ BPF_JGE = 0x30
+ BPF_JGT = 0x20
+ BPF_JMP = 0x5
+ BPF_JSET = 0x40
+ BPF_K = 0x0
+ BPF_LD = 0x0
+ BPF_LDX = 0x1
+ BPF_LEN = 0x80
+ BPF_LSH = 0x60
+ BPF_MAJOR_VERSION = 0x1
+ BPF_MAXBUFSIZE = 0x80000
+ BPF_MAXINSNS = 0x200
+ BPF_MEM = 0x60
+ BPF_MEMWORDS = 0x10
+ BPF_MINBUFSIZE = 0x20
+ BPF_MINOR_VERSION = 0x1
+ BPF_MISC = 0x7
+ BPF_MSH = 0xa0
+ BPF_MUL = 0x20
+ BPF_NEG = 0x80
+ BPF_OR = 0x40
+ BPF_RELEASE = 0x30bb6
+ BPF_RET = 0x6
+ BPF_RSH = 0x70
+ BPF_ST = 0x2
+ BPF_STX = 0x3
+ BPF_SUB = 0x10
+ BPF_TAX = 0x0
+ BPF_TXA = 0x80
+ BPF_W = 0x0
+ BPF_X = 0x8
+ BRKINT = 0x2
+ BS0 = 0x0
+ BS1 = 0x8000
+ BSDLY = 0x8000
+ CFLUSH = 0xf
+ CLOCAL = 0x8000
+ CLOCK_MONOTONIC = 0x6
+ CLOCK_MONOTONIC_RAW = 0x4
+ CLOCK_MONOTONIC_RAW_APPROX = 0x5
+ CLOCK_PROCESS_CPUTIME_ID = 0xc
+ CLOCK_REALTIME = 0x0
+ CLOCK_THREAD_CPUTIME_ID = 0x10
+ CLOCK_UPTIME_RAW = 0x8
+ CLOCK_UPTIME_RAW_APPROX = 0x9
+ CLONE_NOFOLLOW = 0x1
+ CLONE_NOOWNERCOPY = 0x2
+ CR0 = 0x0
+ CR1 = 0x1000
+ CR2 = 0x2000
+ CR3 = 0x3000
+ CRDLY = 0x3000
+ CREAD = 0x800
+ CRTSCTS = 0x30000
+ CS5 = 0x0
+ CS6 = 0x100
+ CS7 = 0x200
+ CS8 = 0x300
+ CSIZE = 0x300
+ CSTART = 0x11
+ CSTATUS = 0x14
+ CSTOP = 0x13
+ CSTOPB = 0x400
+ CSUSP = 0x1a
+ CTLIOCGINFO = 0xc0644e03
+ CTL_HW = 0x6
+ CTL_KERN = 0x1
+ CTL_MAXNAME = 0xc
+ CTL_NET = 0x4
+ DLT_A429 = 0xb8
+ DLT_A653_ICM = 0xb9
+ DLT_AIRONET_HEADER = 0x78
+ DLT_AOS = 0xde
+ DLT_APPLE_IP_OVER_IEEE1394 = 0x8a
+ DLT_ARCNET = 0x7
+ DLT_ARCNET_LINUX = 0x81
+ DLT_ATM_CLIP = 0x13
+ DLT_ATM_RFC1483 = 0xb
+ DLT_AURORA = 0x7e
+ DLT_AX25 = 0x3
+ DLT_AX25_KISS = 0xca
+ DLT_BACNET_MS_TP = 0xa5
+ DLT_BLUETOOTH_HCI_H4 = 0xbb
+ DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9
+ DLT_CAN20B = 0xbe
+ DLT_CAN_SOCKETCAN = 0xe3
+ DLT_CHAOS = 0x5
+ DLT_CHDLC = 0x68
+ DLT_CISCO_IOS = 0x76
+ DLT_C_HDLC = 0x68
+ DLT_C_HDLC_WITH_DIR = 0xcd
+ DLT_DBUS = 0xe7
+ DLT_DECT = 0xdd
+ DLT_DOCSIS = 0x8f
+ DLT_DVB_CI = 0xeb
+ DLT_ECONET = 0x73
+ DLT_EN10MB = 0x1
+ DLT_EN3MB = 0x2
+ DLT_ENC = 0x6d
+ DLT_ERF = 0xc5
+ DLT_ERF_ETH = 0xaf
+ DLT_ERF_POS = 0xb0
+ DLT_FC_2 = 0xe0
+ DLT_FC_2_WITH_FRAME_DELIMS = 0xe1
+ DLT_FDDI = 0xa
+ DLT_FLEXRAY = 0xd2
+ DLT_FRELAY = 0x6b
+ DLT_FRELAY_WITH_DIR = 0xce
+ DLT_GCOM_SERIAL = 0xad
+ DLT_GCOM_T1E1 = 0xac
+ DLT_GPF_F = 0xab
+ DLT_GPF_T = 0xaa
+ DLT_GPRS_LLC = 0xa9
+ DLT_GSMTAP_ABIS = 0xda
+ DLT_GSMTAP_UM = 0xd9
+ DLT_HHDLC = 0x79
+ DLT_IBM_SN = 0x92
+ DLT_IBM_SP = 0x91
+ DLT_IEEE802 = 0x6
+ DLT_IEEE802_11 = 0x69
+ DLT_IEEE802_11_RADIO = 0x7f
+ DLT_IEEE802_11_RADIO_AVS = 0xa3
+ DLT_IEEE802_15_4 = 0xc3
+ DLT_IEEE802_15_4_LINUX = 0xbf
+ DLT_IEEE802_15_4_NOFCS = 0xe6
+ DLT_IEEE802_15_4_NONASK_PHY = 0xd7
+ DLT_IEEE802_16_MAC_CPS = 0xbc
+ DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1
+ DLT_IPFILTER = 0x74
+ DLT_IPMB = 0xc7
+ DLT_IPMB_LINUX = 0xd1
+ DLT_IPNET = 0xe2
+ DLT_IPOIB = 0xf2
+ DLT_IPV4 = 0xe4
+ DLT_IPV6 = 0xe5
+ DLT_IP_OVER_FC = 0x7a
+ DLT_JUNIPER_ATM1 = 0x89
+ DLT_JUNIPER_ATM2 = 0x87
+ DLT_JUNIPER_ATM_CEMIC = 0xee
+ DLT_JUNIPER_CHDLC = 0xb5
+ DLT_JUNIPER_ES = 0x84
+ DLT_JUNIPER_ETHER = 0xb2
+ DLT_JUNIPER_FIBRECHANNEL = 0xea
+ DLT_JUNIPER_FRELAY = 0xb4
+ DLT_JUNIPER_GGSN = 0x85
+ DLT_JUNIPER_ISM = 0xc2
+ DLT_JUNIPER_MFR = 0x86
+ DLT_JUNIPER_MLFR = 0x83
+ DLT_JUNIPER_MLPPP = 0x82
+ DLT_JUNIPER_MONITOR = 0xa4
+ DLT_JUNIPER_PIC_PEER = 0xae
+ DLT_JUNIPER_PPP = 0xb3
+ DLT_JUNIPER_PPPOE = 0xa7
+ DLT_JUNIPER_PPPOE_ATM = 0xa8
+ DLT_JUNIPER_SERVICES = 0x88
+ DLT_JUNIPER_SRX_E2E = 0xe9
+ DLT_JUNIPER_ST = 0xc8
+ DLT_JUNIPER_VP = 0xb7
+ DLT_JUNIPER_VS = 0xe8
+ DLT_LAPB_WITH_DIR = 0xcf
+ DLT_LAPD = 0xcb
+ DLT_LIN = 0xd4
+ DLT_LINUX_EVDEV = 0xd8
+ DLT_LINUX_IRDA = 0x90
+ DLT_LINUX_LAPD = 0xb1
+ DLT_LINUX_PPP_WITHDIRECTION = 0xa6
+ DLT_LINUX_SLL = 0x71
+ DLT_LOOP = 0x6c
+ DLT_LTALK = 0x72
+ DLT_MATCHING_MAX = 0x10a
+ DLT_MATCHING_MIN = 0x68
+ DLT_MFR = 0xb6
+ DLT_MOST = 0xd3
+ DLT_MPEG_2_TS = 0xf3
+ DLT_MPLS = 0xdb
+ DLT_MTP2 = 0x8c
+ DLT_MTP2_WITH_PHDR = 0x8b
+ DLT_MTP3 = 0x8d
+ DLT_MUX27010 = 0xec
+ DLT_NETANALYZER = 0xf0
+ DLT_NETANALYZER_TRANSPARENT = 0xf1
+ DLT_NFC_LLCP = 0xf5
+ DLT_NFLOG = 0xef
+ DLT_NG40 = 0xf4
+ DLT_NULL = 0x0
+ DLT_PCI_EXP = 0x7d
+ DLT_PFLOG = 0x75
+ DLT_PFSYNC = 0x12
+ DLT_PPI = 0xc0
+ DLT_PPP = 0x9
+ DLT_PPP_BSDOS = 0x10
+ DLT_PPP_ETHER = 0x33
+ DLT_PPP_PPPD = 0xa6
+ DLT_PPP_SERIAL = 0x32
+ DLT_PPP_WITH_DIR = 0xcc
+ DLT_PPP_WITH_DIRECTION = 0xa6
+ DLT_PRISM_HEADER = 0x77
+ DLT_PRONET = 0x4
+ DLT_RAIF1 = 0xc6
+ DLT_RAW = 0xc
+ DLT_RIO = 0x7c
+ DLT_SCCP = 0x8e
+ DLT_SITA = 0xc4
+ DLT_SLIP = 0x8
+ DLT_SLIP_BSDOS = 0xf
+ DLT_STANAG_5066_D_PDU = 0xed
+ DLT_SUNATM = 0x7b
+ DLT_SYMANTEC_FIREWALL = 0x63
+ DLT_TZSP = 0x80
+ DLT_USB = 0xba
+ DLT_USB_DARWIN = 0x10a
+ DLT_USB_LINUX = 0xbd
+ DLT_USB_LINUX_MMAPPED = 0xdc
+ DLT_USER0 = 0x93
+ DLT_USER1 = 0x94
+ DLT_USER10 = 0x9d
+ DLT_USER11 = 0x9e
+ DLT_USER12 = 0x9f
+ DLT_USER13 = 0xa0
+ DLT_USER14 = 0xa1
+ DLT_USER15 = 0xa2
+ DLT_USER2 = 0x95
+ DLT_USER3 = 0x96
+ DLT_USER4 = 0x97
+ DLT_USER5 = 0x98
+ DLT_USER6 = 0x99
+ DLT_USER7 = 0x9a
+ DLT_USER8 = 0x9b
+ DLT_USER9 = 0x9c
+ DLT_WIHART = 0xdf
+ DLT_X2E_SERIAL = 0xd5
+ DLT_X2E_XORAYA = 0xd6
+ DT_BLK = 0x6
+ DT_CHR = 0x2
+ DT_DIR = 0x4
+ DT_FIFO = 0x1
+ DT_LNK = 0xa
+ DT_REG = 0x8
+ DT_SOCK = 0xc
+ DT_UNKNOWN = 0x0
+ DT_WHT = 0xe
+ ECHO = 0x8
+ ECHOCTL = 0x40
+ ECHOE = 0x2
+ ECHOK = 0x4
+ ECHOKE = 0x1
+ ECHONL = 0x10
+ ECHOPRT = 0x20
+ EVFILT_AIO = -0x3
+ EVFILT_EXCEPT = -0xf
+ EVFILT_FS = -0x9
+ EVFILT_MACHPORT = -0x8
+ EVFILT_PROC = -0x5
+ EVFILT_READ = -0x1
+ EVFILT_SIGNAL = -0x6
+ EVFILT_SYSCOUNT = 0x11
+ EVFILT_THREADMARKER = 0x11
+ EVFILT_TIMER = -0x7
+ EVFILT_USER = -0xa
+ EVFILT_VM = -0xc
+ EVFILT_VNODE = -0x4
+ EVFILT_WRITE = -0x2
+ EV_ADD = 0x1
+ EV_CLEAR = 0x20
+ EV_DELETE = 0x2
+ EV_DISABLE = 0x8
+ EV_DISPATCH = 0x80
+ EV_DISPATCH2 = 0x180
+ EV_ENABLE = 0x4
+ EV_EOF = 0x8000
+ EV_ERROR = 0x4000
+ EV_FLAG0 = 0x1000
+ EV_FLAG1 = 0x2000
+ EV_ONESHOT = 0x10
+ EV_OOBAND = 0x2000
+ EV_POLL = 0x1000
+ EV_RECEIPT = 0x40
+ EV_SYSFLAGS = 0xf000
+ EV_UDATA_SPECIFIC = 0x100
+ EV_VANISHED = 0x200
+ EXTA = 0x4b00
+ EXTB = 0x9600
+ EXTPROC = 0x800
+ FD_CLOEXEC = 0x1
+ FD_SETSIZE = 0x400
+ FF0 = 0x0
+ FF1 = 0x4000
+ FFDLY = 0x4000
+ FLUSHO = 0x800000
+ FSOPT_ATTR_CMN_EXTENDED = 0x20
+ FSOPT_NOFOLLOW = 0x1
+ FSOPT_NOINMEMUPDATE = 0x2
+ FSOPT_PACK_INVAL_ATTRS = 0x8
+ FSOPT_REPORT_FULLSIZE = 0x4
+ FSOPT_RETURN_REALDEV = 0x200
+ F_ADDFILESIGS = 0x3d
+ F_ADDFILESIGS_FOR_DYLD_SIM = 0x53
+ F_ADDFILESIGS_INFO = 0x67
+ F_ADDFILESIGS_RETURN = 0x61
+ F_ADDFILESUPPL = 0x68
+ F_ADDSIGS = 0x3b
+ F_ALLOCATEALL = 0x4
+ F_ALLOCATECONTIG = 0x2
+ F_BARRIERFSYNC = 0x55
+ F_CHECK_LV = 0x62
+ F_CHKCLEAN = 0x29
+ F_DUPFD = 0x0
+ F_DUPFD_CLOEXEC = 0x43
+ F_FINDSIGS = 0x4e
+ F_FLUSH_DATA = 0x28
+ F_FREEZE_FS = 0x35
+ F_FULLFSYNC = 0x33
+ F_GETCODEDIR = 0x48
+ F_GETFD = 0x1
+ F_GETFL = 0x3
+ F_GETLK = 0x7
+ F_GETLKPID = 0x42
+ F_GETNOSIGPIPE = 0x4a
+ F_GETOWN = 0x5
+ F_GETPATH = 0x32
+ F_GETPATH_MTMINFO = 0x47
+ F_GETPATH_NOFIRMLINK = 0x66
+ F_GETPROTECTIONCLASS = 0x3f
+ F_GETPROTECTIONLEVEL = 0x4d
+ F_GETSIGSINFO = 0x69
+ F_GLOBAL_NOCACHE = 0x37
+ F_LOG2PHYS = 0x31
+ F_LOG2PHYS_EXT = 0x41
+ F_NOCACHE = 0x30
+ F_NODIRECT = 0x3e
+ F_OK = 0x0
+ F_PATHPKG_CHECK = 0x34
+ F_PEOFPOSMODE = 0x3
+ F_PREALLOCATE = 0x2a
+ F_PUNCHHOLE = 0x63
+ F_RDADVISE = 0x2c
+ F_RDAHEAD = 0x2d
+ F_RDLCK = 0x1
+ F_SETBACKINGSTORE = 0x46
+ F_SETFD = 0x2
+ F_SETFL = 0x4
+ F_SETLK = 0x8
+ F_SETLKW = 0x9
+ F_SETLKWTIMEOUT = 0xa
+ F_SETNOSIGPIPE = 0x49
+ F_SETOWN = 0x6
+ F_SETPROTECTIONCLASS = 0x40
+ F_SETSIZE = 0x2b
+ F_SINGLE_WRITER = 0x4c
+ F_SPECULATIVE_READ = 0x65
+ F_THAW_FS = 0x36
+ F_TRANSCODEKEY = 0x4b
+ F_TRIM_ACTIVE_FILE = 0x64
+ F_UNLCK = 0x2
+ F_VOLPOSMODE = 0x4
+ F_WRLCK = 0x3
+ HUPCL = 0x4000
+ HW_MACHINE = 0x1
+ ICANON = 0x100
+ ICMP6_FILTER = 0x12
+ ICRNL = 0x100
+ IEXTEN = 0x400
+ IFF_ALLMULTI = 0x200
+ IFF_ALTPHYS = 0x4000
+ IFF_BROADCAST = 0x2
+ IFF_DEBUG = 0x4
+ IFF_LINK0 = 0x1000
+ IFF_LINK1 = 0x2000
+ IFF_LINK2 = 0x4000
+ IFF_LOOPBACK = 0x8
+ IFF_MULTICAST = 0x8000
+ IFF_NOARP = 0x80
+ IFF_NOTRAILERS = 0x20
+ IFF_OACTIVE = 0x400
+ IFF_POINTOPOINT = 0x10
+ IFF_PROMISC = 0x100
+ IFF_RUNNING = 0x40
+ IFF_SIMPLEX = 0x800
+ IFF_UP = 0x1
+ IFNAMSIZ = 0x10
+ IFT_1822 = 0x2
+ IFT_6LOWPAN = 0x40
+ IFT_AAL5 = 0x31
+ IFT_ARCNET = 0x23
+ IFT_ARCNETPLUS = 0x24
+ IFT_ATM = 0x25
+ IFT_BRIDGE = 0xd1
+ IFT_CARP = 0xf8
+ IFT_CELLULAR = 0xff
+ IFT_CEPT = 0x13
+ IFT_DS3 = 0x1e
+ IFT_ENC = 0xf4
+ IFT_EON = 0x19
+ IFT_ETHER = 0x6
+ IFT_FAITH = 0x38
+ IFT_FDDI = 0xf
+ IFT_FRELAY = 0x20
+ IFT_FRELAYDCE = 0x2c
+ IFT_GIF = 0x37
+ IFT_HDH1822 = 0x3
+ IFT_HIPPI = 0x2f
+ IFT_HSSI = 0x2e
+ IFT_HY = 0xe
+ IFT_IEEE1394 = 0x90
+ IFT_IEEE8023ADLAG = 0x88
+ IFT_ISDNBASIC = 0x14
+ IFT_ISDNPRIMARY = 0x15
+ IFT_ISO88022LLC = 0x29
+ IFT_ISO88023 = 0x7
+ IFT_ISO88024 = 0x8
+ IFT_ISO88025 = 0x9
+ IFT_ISO88026 = 0xa
+ IFT_L2VLAN = 0x87
+ IFT_LAPB = 0x10
+ IFT_LOCALTALK = 0x2a
+ IFT_LOOP = 0x18
+ IFT_MIOX25 = 0x26
+ IFT_MODEM = 0x30
+ IFT_NSIP = 0x1b
+ IFT_OTHER = 0x1
+ IFT_P10 = 0xc
+ IFT_P80 = 0xd
+ IFT_PARA = 0x22
+ IFT_PDP = 0xff
+ IFT_PFLOG = 0xf5
+ IFT_PFSYNC = 0xf6
+ IFT_PKTAP = 0xfe
+ IFT_PPP = 0x17
+ IFT_PROPMUX = 0x36
+ IFT_PROPVIRTUAL = 0x35
+ IFT_PTPSERIAL = 0x16
+ IFT_RS232 = 0x21
+ IFT_SDLC = 0x11
+ IFT_SIP = 0x1f
+ IFT_SLIP = 0x1c
+ IFT_SMDSDXI = 0x2b
+ IFT_SMDSICIP = 0x34
+ IFT_SONET = 0x27
+ IFT_SONETPATH = 0x32
+ IFT_SONETVT = 0x33
+ IFT_STARLAN = 0xb
+ IFT_STF = 0x39
+ IFT_T1 = 0x12
+ IFT_ULTRA = 0x1d
+ IFT_V35 = 0x2d
+ IFT_X25 = 0x5
+ IFT_X25DDN = 0x4
+ IFT_X25PLE = 0x28
+ IFT_XETHER = 0x1a
+ IGNBRK = 0x1
+ IGNCR = 0x80
+ IGNPAR = 0x4
+ IMAXBEL = 0x2000
+ INLCR = 0x40
+ INPCK = 0x10
+ IN_CLASSA_HOST = 0xffffff
+ IN_CLASSA_MAX = 0x80
+ IN_CLASSA_NET = 0xff000000
+ IN_CLASSA_NSHIFT = 0x18
+ IN_CLASSB_HOST = 0xffff
+ IN_CLASSB_MAX = 0x10000
+ IN_CLASSB_NET = 0xffff0000
+ IN_CLASSB_NSHIFT = 0x10
+ IN_CLASSC_HOST = 0xff
+ IN_CLASSC_NET = 0xffffff00
+ IN_CLASSC_NSHIFT = 0x8
+ IN_CLASSD_HOST = 0xfffffff
+ IN_CLASSD_NET = 0xf0000000
+ IN_CLASSD_NSHIFT = 0x1c
+ IN_LINKLOCALNETNUM = 0xa9fe0000
+ IN_LOOPBACKNET = 0x7f
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x400473d1
+ IPPROTO_3PC = 0x22
+ IPPROTO_ADFS = 0x44
+ IPPROTO_AH = 0x33
+ IPPROTO_AHIP = 0x3d
+ IPPROTO_APES = 0x63
+ IPPROTO_ARGUS = 0xd
+ IPPROTO_AX25 = 0x5d
+ IPPROTO_BHA = 0x31
+ IPPROTO_BLT = 0x1e
+ IPPROTO_BRSATMON = 0x4c
+ IPPROTO_CFTP = 0x3e
+ IPPROTO_CHAOS = 0x10
+ IPPROTO_CMTP = 0x26
+ IPPROTO_CPHB = 0x49
+ IPPROTO_CPNX = 0x48
+ IPPROTO_DDP = 0x25
+ IPPROTO_DGP = 0x56
+ IPPROTO_DIVERT = 0xfe
+ IPPROTO_DONE = 0x101
+ IPPROTO_DSTOPTS = 0x3c
+ IPPROTO_EGP = 0x8
+ IPPROTO_EMCON = 0xe
+ IPPROTO_ENCAP = 0x62
+ IPPROTO_EON = 0x50
+ IPPROTO_ESP = 0x32
+ IPPROTO_ETHERIP = 0x61
+ IPPROTO_FRAGMENT = 0x2c
+ IPPROTO_GGP = 0x3
+ IPPROTO_GMTP = 0x64
+ IPPROTO_GRE = 0x2f
+ IPPROTO_HELLO = 0x3f
+ IPPROTO_HMP = 0x14
+ IPPROTO_HOPOPTS = 0x0
+ IPPROTO_ICMP = 0x1
+ IPPROTO_ICMPV6 = 0x3a
+ IPPROTO_IDP = 0x16
+ IPPROTO_IDPR = 0x23
+ IPPROTO_IDRP = 0x2d
+ IPPROTO_IGMP = 0x2
+ IPPROTO_IGP = 0x55
+ IPPROTO_IGRP = 0x58
+ IPPROTO_IL = 0x28
+ IPPROTO_INLSP = 0x34
+ IPPROTO_INP = 0x20
+ IPPROTO_IP = 0x0
+ IPPROTO_IPCOMP = 0x6c
+ IPPROTO_IPCV = 0x47
+ IPPROTO_IPEIP = 0x5e
+ IPPROTO_IPIP = 0x4
+ IPPROTO_IPPC = 0x43
+ IPPROTO_IPV4 = 0x4
+ IPPROTO_IPV6 = 0x29
+ IPPROTO_IRTP = 0x1c
+ IPPROTO_KRYPTOLAN = 0x41
+ IPPROTO_LARP = 0x5b
+ IPPROTO_LEAF1 = 0x19
+ IPPROTO_LEAF2 = 0x1a
+ IPPROTO_MAX = 0x100
+ IPPROTO_MAXID = 0x34
+ IPPROTO_MEAS = 0x13
+ IPPROTO_MHRP = 0x30
+ IPPROTO_MICP = 0x5f
+ IPPROTO_MTP = 0x5c
+ IPPROTO_MUX = 0x12
+ IPPROTO_ND = 0x4d
+ IPPROTO_NHRP = 0x36
+ IPPROTO_NONE = 0x3b
+ IPPROTO_NSP = 0x1f
+ IPPROTO_NVPII = 0xb
+ IPPROTO_OSPFIGP = 0x59
+ IPPROTO_PGM = 0x71
+ IPPROTO_PIGP = 0x9
+ IPPROTO_PIM = 0x67
+ IPPROTO_PRM = 0x15
+ IPPROTO_PUP = 0xc
+ IPPROTO_PVP = 0x4b
+ IPPROTO_RAW = 0xff
+ IPPROTO_RCCMON = 0xa
+ IPPROTO_RDP = 0x1b
+ IPPROTO_ROUTING = 0x2b
+ IPPROTO_RSVP = 0x2e
+ IPPROTO_RVD = 0x42
+ IPPROTO_SATEXPAK = 0x40
+ IPPROTO_SATMON = 0x45
+ IPPROTO_SCCSP = 0x60
+ IPPROTO_SCTP = 0x84
+ IPPROTO_SDRP = 0x2a
+ IPPROTO_SEP = 0x21
+ IPPROTO_SRPC = 0x5a
+ IPPROTO_ST = 0x7
+ IPPROTO_SVMTP = 0x52
+ IPPROTO_SWIPE = 0x35
+ IPPROTO_TCF = 0x57
+ IPPROTO_TCP = 0x6
+ IPPROTO_TP = 0x1d
+ IPPROTO_TPXX = 0x27
+ IPPROTO_TRUNK1 = 0x17
+ IPPROTO_TRUNK2 = 0x18
+ IPPROTO_TTP = 0x54
+ IPPROTO_UDP = 0x11
+ IPPROTO_VINES = 0x53
+ IPPROTO_VISA = 0x46
+ IPPROTO_VMTP = 0x51
+ IPPROTO_WBEXPAK = 0x4f
+ IPPROTO_WBMON = 0x4e
+ IPPROTO_WSN = 0x4a
+ IPPROTO_XNET = 0xf
+ IPPROTO_XTP = 0x24
+ IPV6_2292DSTOPTS = 0x17
+ IPV6_2292HOPLIMIT = 0x14
+ IPV6_2292HOPOPTS = 0x16
+ IPV6_2292NEXTHOP = 0x15
+ IPV6_2292PKTINFO = 0x13
+ IPV6_2292PKTOPTIONS = 0x19
+ IPV6_2292RTHDR = 0x18
+ IPV6_3542DSTOPTS = 0x32
+ IPV6_3542HOPLIMIT = 0x2f
+ IPV6_3542HOPOPTS = 0x31
+ IPV6_3542NEXTHOP = 0x30
+ IPV6_3542PKTINFO = 0x2e
+ IPV6_3542RTHDR = 0x33
+ IPV6_ADDR_MC_FLAGS_PREFIX = 0x20
+ IPV6_ADDR_MC_FLAGS_TRANSIENT = 0x10
+ IPV6_ADDR_MC_FLAGS_UNICAST_BASED = 0x30
+ IPV6_AUTOFLOWLABEL = 0x3b
+ IPV6_BINDV6ONLY = 0x1b
+ IPV6_BOUND_IF = 0x7d
+ IPV6_CHECKSUM = 0x1a
+ IPV6_DEFAULT_MULTICAST_HOPS = 0x1
+ IPV6_DEFAULT_MULTICAST_LOOP = 0x1
+ IPV6_DEFHLIM = 0x40
+ IPV6_DONTFRAG = 0x3e
+ IPV6_DSTOPTS = 0x32
+ IPV6_FAITH = 0x1d
+ IPV6_FLOWINFO_MASK = 0xffffff0f
+ IPV6_FLOWLABEL_MASK = 0xffff0f00
+ IPV6_FLOW_ECN_MASK = 0x3000
+ IPV6_FRAGTTL = 0x3c
+ IPV6_FW_ADD = 0x1e
+ IPV6_FW_DEL = 0x1f
+ IPV6_FW_FLUSH = 0x20
+ IPV6_FW_GET = 0x22
+ IPV6_FW_ZERO = 0x21
+ IPV6_HLIMDEC = 0x1
+ IPV6_HOPLIMIT = 0x2f
+ IPV6_HOPOPTS = 0x31
+ IPV6_IPSEC_POLICY = 0x1c
+ IPV6_JOIN_GROUP = 0xc
+ IPV6_LEAVE_GROUP = 0xd
+ IPV6_MAXHLIM = 0xff
+ IPV6_MAXOPTHDR = 0x800
+ IPV6_MAXPACKET = 0xffff
+ IPV6_MAX_GROUP_SRC_FILTER = 0x200
+ IPV6_MAX_MEMBERSHIPS = 0xfff
+ IPV6_MAX_SOCK_SRC_FILTER = 0x80
+ IPV6_MIN_MEMBERSHIPS = 0x1f
+ IPV6_MMTU = 0x500
+ IPV6_MSFILTER = 0x4a
+ IPV6_MULTICAST_HOPS = 0xa
+ IPV6_MULTICAST_IF = 0x9
+ IPV6_MULTICAST_LOOP = 0xb
+ IPV6_NEXTHOP = 0x30
+ IPV6_PATHMTU = 0x2c
+ IPV6_PKTINFO = 0x2e
+ IPV6_PORTRANGE = 0xe
+ IPV6_PORTRANGE_DEFAULT = 0x0
+ IPV6_PORTRANGE_HIGH = 0x1
+ IPV6_PORTRANGE_LOW = 0x2
+ IPV6_PREFER_TEMPADDR = 0x3f
+ IPV6_RECVDSTOPTS = 0x28
+ IPV6_RECVHOPLIMIT = 0x25
+ IPV6_RECVHOPOPTS = 0x27
+ IPV6_RECVPATHMTU = 0x2b
+ IPV6_RECVPKTINFO = 0x3d
+ IPV6_RECVRTHDR = 0x26
+ IPV6_RECVTCLASS = 0x23
+ IPV6_RTHDR = 0x33
+ IPV6_RTHDRDSTOPTS = 0x39
+ IPV6_RTHDR_LOOSE = 0x0
+ IPV6_RTHDR_STRICT = 0x1
+ IPV6_RTHDR_TYPE_0 = 0x0
+ IPV6_SOCKOPT_RESERVED1 = 0x3
+ IPV6_TCLASS = 0x24
+ IPV6_UNICAST_HOPS = 0x4
+ IPV6_USE_MIN_MTU = 0x2a
+ IPV6_V6ONLY = 0x1b
+ IPV6_VERSION = 0x60
+ IPV6_VERSION_MASK = 0xf0
+ IP_ADD_MEMBERSHIP = 0xc
+ IP_ADD_SOURCE_MEMBERSHIP = 0x46
+ IP_BLOCK_SOURCE = 0x48
+ IP_BOUND_IF = 0x19
+ IP_DEFAULT_MULTICAST_LOOP = 0x1
+ IP_DEFAULT_MULTICAST_TTL = 0x1
+ IP_DF = 0x4000
+ IP_DONTFRAG = 0x1c
+ IP_DROP_MEMBERSHIP = 0xd
+ IP_DROP_SOURCE_MEMBERSHIP = 0x47
+ IP_DUMMYNET_CONFIGURE = 0x3c
+ IP_DUMMYNET_DEL = 0x3d
+ IP_DUMMYNET_FLUSH = 0x3e
+ IP_DUMMYNET_GET = 0x40
+ IP_FAITH = 0x16
+ IP_FW_ADD = 0x28
+ IP_FW_DEL = 0x29
+ IP_FW_FLUSH = 0x2a
+ IP_FW_GET = 0x2c
+ IP_FW_RESETLOG = 0x2d
+ IP_FW_ZERO = 0x2b
+ IP_HDRINCL = 0x2
+ IP_IPSEC_POLICY = 0x15
+ IP_MAXPACKET = 0xffff
+ IP_MAX_GROUP_SRC_FILTER = 0x200
+ IP_MAX_MEMBERSHIPS = 0xfff
+ IP_MAX_SOCK_MUTE_FILTER = 0x80
+ IP_MAX_SOCK_SRC_FILTER = 0x80
+ IP_MF = 0x2000
+ IP_MIN_MEMBERSHIPS = 0x1f
+ IP_MSFILTER = 0x4a
+ IP_MSS = 0x240
+ IP_MULTICAST_IF = 0x9
+ IP_MULTICAST_IFINDEX = 0x42
+ IP_MULTICAST_LOOP = 0xb
+ IP_MULTICAST_TTL = 0xa
+ IP_MULTICAST_VIF = 0xe
+ IP_NAT__XXX = 0x37
+ IP_OFFMASK = 0x1fff
+ IP_OLD_FW_ADD = 0x32
+ IP_OLD_FW_DEL = 0x33
+ IP_OLD_FW_FLUSH = 0x34
+ IP_OLD_FW_GET = 0x36
+ IP_OLD_FW_RESETLOG = 0x38
+ IP_OLD_FW_ZERO = 0x35
+ IP_OPTIONS = 0x1
+ IP_PKTINFO = 0x1a
+ IP_PORTRANGE = 0x13
+ IP_PORTRANGE_DEFAULT = 0x0
+ IP_PORTRANGE_HIGH = 0x1
+ IP_PORTRANGE_LOW = 0x2
+ IP_RECVDSTADDR = 0x7
+ IP_RECVIF = 0x14
+ IP_RECVOPTS = 0x5
+ IP_RECVPKTINFO = 0x1a
+ IP_RECVRETOPTS = 0x6
+ IP_RECVTOS = 0x1b
+ IP_RECVTTL = 0x18
+ IP_RETOPTS = 0x8
+ IP_RF = 0x8000
+ IP_RSVP_OFF = 0x10
+ IP_RSVP_ON = 0xf
+ IP_RSVP_VIF_OFF = 0x12
+ IP_RSVP_VIF_ON = 0x11
+ IP_STRIPHDR = 0x17
+ IP_TOS = 0x3
+ IP_TRAFFIC_MGT_BACKGROUND = 0x41
+ IP_TTL = 0x4
+ IP_UNBLOCK_SOURCE = 0x49
+ ISIG = 0x80
+ ISTRIP = 0x20
+ IUTF8 = 0x4000
+ IXANY = 0x800
+ IXOFF = 0x400
+ IXON = 0x200
+ KERN_HOSTNAME = 0xa
+ KERN_OSRELEASE = 0x2
+ KERN_OSTYPE = 0x1
+ KERN_VERSION = 0x4
+ LOCAL_PEERCRED = 0x1
+ LOCAL_PEEREPID = 0x3
+ LOCAL_PEEREUUID = 0x5
+ LOCAL_PEERPID = 0x2
+ LOCAL_PEERTOKEN = 0x6
+ LOCAL_PEERUUID = 0x4
+ LOCK_EX = 0x2
+ LOCK_NB = 0x4
+ LOCK_SH = 0x1
+ LOCK_UN = 0x8
+ MADV_CAN_REUSE = 0x9
+ MADV_DONTNEED = 0x4
+ MADV_FREE = 0x5
+ MADV_FREE_REUSABLE = 0x7
+ MADV_FREE_REUSE = 0x8
+ MADV_NORMAL = 0x0
+ MADV_PAGEOUT = 0xa
+ MADV_RANDOM = 0x1
+ MADV_SEQUENTIAL = 0x2
+ MADV_WILLNEED = 0x3
+ MADV_ZERO_WIRED_PAGES = 0x6
+ MAP_32BIT = 0x8000
+ MAP_ANON = 0x1000
+ MAP_ANONYMOUS = 0x1000
+ MAP_COPY = 0x2
+ MAP_FILE = 0x0
+ MAP_FIXED = 0x10
+ MAP_HASSEMAPHORE = 0x200
+ MAP_JIT = 0x800
+ MAP_NOCACHE = 0x400
+ MAP_NOEXTEND = 0x100
+ MAP_NORESERVE = 0x40
+ MAP_PRIVATE = 0x2
+ MAP_RENAME = 0x20
+ MAP_RESERVED0080 = 0x80
+ MAP_RESILIENT_CODESIGN = 0x2000
+ MAP_RESILIENT_MEDIA = 0x4000
+ MAP_SHARED = 0x1
+ MAP_TRANSLATED_ALLOW_EXECUTE = 0x20000
+ MAP_UNIX03 = 0x40000
+ MCAST_BLOCK_SOURCE = 0x54
+ MCAST_EXCLUDE = 0x2
+ MCAST_INCLUDE = 0x1
+ MCAST_JOIN_GROUP = 0x50
+ MCAST_JOIN_SOURCE_GROUP = 0x52
+ MCAST_LEAVE_GROUP = 0x51
+ MCAST_LEAVE_SOURCE_GROUP = 0x53
+ MCAST_UNBLOCK_SOURCE = 0x55
+ MCAST_UNDEFINED = 0x0
+ MCL_CURRENT = 0x1
+ MCL_FUTURE = 0x2
+ MNT_ASYNC = 0x40
+ MNT_AUTOMOUNTED = 0x400000
+ MNT_CMDFLAGS = 0xf0000
+ MNT_CPROTECT = 0x80
+ MNT_DEFWRITE = 0x2000000
+ MNT_DONTBROWSE = 0x100000
+ MNT_DOVOLFS = 0x8000
+ MNT_DWAIT = 0x4
+ MNT_EXPORTED = 0x100
+ MNT_EXT_ROOT_DATA_VOL = 0x1
+ MNT_FORCE = 0x80000
+ MNT_IGNORE_OWNERSHIP = 0x200000
+ MNT_JOURNALED = 0x800000
+ MNT_LOCAL = 0x1000
+ MNT_MULTILABEL = 0x4000000
+ MNT_NOATIME = 0x10000000
+ MNT_NOBLOCK = 0x20000
+ MNT_NODEV = 0x10
+ MNT_NOEXEC = 0x4
+ MNT_NOSUID = 0x8
+ MNT_NOUSERXATTR = 0x1000000
+ MNT_NOWAIT = 0x2
+ MNT_QUARANTINE = 0x400
+ MNT_QUOTA = 0x2000
+ MNT_RDONLY = 0x1
+ MNT_RELOAD = 0x40000
+ MNT_REMOVABLE = 0x200
+ MNT_ROOTFS = 0x4000
+ MNT_SNAPSHOT = 0x40000000
+ MNT_STRICTATIME = 0x80000000
+ MNT_SYNCHRONOUS = 0x2
+ MNT_UNION = 0x20
+ MNT_UNKNOWNPERMISSIONS = 0x200000
+ MNT_UPDATE = 0x10000
+ MNT_VISFLAGMASK = 0xd7f0f7ff
+ MNT_WAIT = 0x1
+ MSG_CTRUNC = 0x20
+ MSG_DONTROUTE = 0x4
+ MSG_DONTWAIT = 0x80
+ MSG_EOF = 0x100
+ MSG_EOR = 0x8
+ MSG_FLUSH = 0x400
+ MSG_HAVEMORE = 0x2000
+ MSG_HOLD = 0x800
+ MSG_NEEDSA = 0x10000
+ MSG_NOSIGNAL = 0x80000
+ MSG_OOB = 0x1
+ MSG_PEEK = 0x2
+ MSG_RCVMORE = 0x4000
+ MSG_SEND = 0x1000
+ MSG_TRUNC = 0x10
+ MSG_WAITALL = 0x40
+ MSG_WAITSTREAM = 0x200
+ MS_ASYNC = 0x1
+ MS_DEACTIVATE = 0x8
+ MS_INVALIDATE = 0x2
+ MS_KILLPAGES = 0x4
+ MS_SYNC = 0x10
+ NAME_MAX = 0xff
+ NET_RT_DUMP = 0x1
+ NET_RT_DUMP2 = 0x7
+ NET_RT_FLAGS = 0x2
+ NET_RT_FLAGS_PRIV = 0xa
+ NET_RT_IFLIST = 0x3
+ NET_RT_IFLIST2 = 0x6
+ NET_RT_MAXID = 0xb
+ NET_RT_STAT = 0x4
+ NET_RT_TRASH = 0x5
+ NFDBITS = 0x20
+ NL0 = 0x0
+ NL1 = 0x100
+ NL2 = 0x200
+ NL3 = 0x300
+ NLDLY = 0x300
+ NOFLSH = 0x80000000
+ NOKERNINFO = 0x2000000
+ NOTE_ABSOLUTE = 0x8
+ NOTE_ATTRIB = 0x8
+ NOTE_BACKGROUND = 0x40
+ NOTE_CHILD = 0x4
+ NOTE_CRITICAL = 0x20
+ NOTE_DELETE = 0x1
+ NOTE_EXEC = 0x20000000
+ NOTE_EXIT = 0x80000000
+ NOTE_EXITSTATUS = 0x4000000
+ NOTE_EXIT_CSERROR = 0x40000
+ NOTE_EXIT_DECRYPTFAIL = 0x10000
+ NOTE_EXIT_DETAIL = 0x2000000
+ NOTE_EXIT_DETAIL_MASK = 0x70000
+ NOTE_EXIT_MEMORY = 0x20000
+ NOTE_EXIT_REPARENTED = 0x80000
+ NOTE_EXTEND = 0x4
+ NOTE_FFAND = 0x40000000
+ NOTE_FFCOPY = 0xc0000000
+ NOTE_FFCTRLMASK = 0xc0000000
+ NOTE_FFLAGSMASK = 0xffffff
+ NOTE_FFNOP = 0x0
+ NOTE_FFOR = 0x80000000
+ NOTE_FORK = 0x40000000
+ NOTE_FUNLOCK = 0x100
+ NOTE_LEEWAY = 0x10
+ NOTE_LINK = 0x10
+ NOTE_LOWAT = 0x1
+ NOTE_MACHTIME = 0x100
+ NOTE_MACH_CONTINUOUS_TIME = 0x80
+ NOTE_NONE = 0x80
+ NOTE_NSECONDS = 0x4
+ NOTE_OOB = 0x2
+ NOTE_PCTRLMASK = -0x100000
+ NOTE_PDATAMASK = 0xfffff
+ NOTE_REAP = 0x10000000
+ NOTE_RENAME = 0x20
+ NOTE_REVOKE = 0x40
+ NOTE_SECONDS = 0x1
+ NOTE_SIGNAL = 0x8000000
+ NOTE_TRACK = 0x1
+ NOTE_TRACKERR = 0x2
+ NOTE_TRIGGER = 0x1000000
+ NOTE_USECONDS = 0x2
+ NOTE_VM_ERROR = 0x10000000
+ NOTE_VM_PRESSURE = 0x80000000
+ NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000
+ NOTE_VM_PRESSURE_TERMINATE = 0x40000000
+ NOTE_WRITE = 0x2
+ OCRNL = 0x10
+ OFDEL = 0x20000
+ OFILL = 0x80
+ ONLCR = 0x2
+ ONLRET = 0x40
+ ONOCR = 0x20
+ ONOEOT = 0x8
+ OPOST = 0x1
+ OXTABS = 0x4
+ O_ACCMODE = 0x3
+ O_ALERT = 0x20000000
+ O_APPEND = 0x8
+ O_ASYNC = 0x40
+ O_CLOEXEC = 0x1000000
+ O_CREAT = 0x200
+ O_DIRECTORY = 0x100000
+ O_DP_GETRAWENCRYPTED = 0x1
+ O_DP_GETRAWUNENCRYPTED = 0x2
+ O_DSYNC = 0x400000
+ O_EVTONLY = 0x8000
+ O_EXCL = 0x800
+ O_EXLOCK = 0x20
+ O_FSYNC = 0x80
+ O_NDELAY = 0x4
+ O_NOCTTY = 0x20000
+ O_NOFOLLOW = 0x100
+ O_NOFOLLOW_ANY = 0x20000000
+ O_NONBLOCK = 0x4
+ O_POPUP = 0x80000000
+ O_RDONLY = 0x0
+ O_RDWR = 0x2
+ O_SHLOCK = 0x10
+ O_SYMLINK = 0x200000
+ O_SYNC = 0x80
+ O_TRUNC = 0x400
+ O_WRONLY = 0x1
+ PARENB = 0x1000
+ PARMRK = 0x8
+ PARODD = 0x2000
+ PENDIN = 0x20000000
+ PRIO_PGRP = 0x1
+ PRIO_PROCESS = 0x0
+ PRIO_USER = 0x2
+ PROT_EXEC = 0x4
+ PROT_NONE = 0x0
+ PROT_READ = 0x1
+ PROT_WRITE = 0x2
+ PT_ATTACH = 0xa
+ PT_ATTACHEXC = 0xe
+ PT_CONTINUE = 0x7
+ PT_DENY_ATTACH = 0x1f
+ PT_DETACH = 0xb
+ PT_FIRSTMACH = 0x20
+ PT_FORCEQUOTA = 0x1e
+ PT_KILL = 0x8
+ PT_READ_D = 0x2
+ PT_READ_I = 0x1
+ PT_READ_U = 0x3
+ PT_SIGEXC = 0xc
+ PT_STEP = 0x9
+ PT_THUPDATE = 0xd
+ PT_TRACE_ME = 0x0
+ PT_WRITE_D = 0x5
+ PT_WRITE_I = 0x4
+ PT_WRITE_U = 0x6
+ RLIMIT_AS = 0x5
+ RLIMIT_CORE = 0x4
+ RLIMIT_CPU = 0x0
+ RLIMIT_CPU_USAGE_MONITOR = 0x2
+ RLIMIT_DATA = 0x2
+ RLIMIT_FSIZE = 0x1
+ RLIMIT_MEMLOCK = 0x6
+ RLIMIT_NOFILE = 0x8
+ RLIMIT_NPROC = 0x7
+ RLIMIT_RSS = 0x5
+ RLIMIT_STACK = 0x3
+ RLIM_INFINITY = 0x7fffffffffffffff
+ RTAX_AUTHOR = 0x6
+ RTAX_BRD = 0x7
+ RTAX_DST = 0x0
+ RTAX_GATEWAY = 0x1
+ RTAX_GENMASK = 0x3
+ RTAX_IFA = 0x5
+ RTAX_IFP = 0x4
+ RTAX_MAX = 0x8
+ RTAX_NETMASK = 0x2
+ RTA_AUTHOR = 0x40
+ RTA_BRD = 0x80
+ RTA_DST = 0x1
+ RTA_GATEWAY = 0x2
+ RTA_GENMASK = 0x8
+ RTA_IFA = 0x20
+ RTA_IFP = 0x10
+ RTA_NETMASK = 0x4
+ RTF_BLACKHOLE = 0x1000
+ RTF_BROADCAST = 0x400000
+ RTF_CLONING = 0x100
+ RTF_CONDEMNED = 0x2000000
+ RTF_DEAD = 0x20000000
+ RTF_DELCLONE = 0x80
+ RTF_DONE = 0x40
+ RTF_DYNAMIC = 0x10
+ RTF_GATEWAY = 0x2
+ RTF_GLOBAL = 0x40000000
+ RTF_HOST = 0x4
+ RTF_IFREF = 0x4000000
+ RTF_IFSCOPE = 0x1000000
+ RTF_LLDATA = 0x400
+ RTF_LLINFO = 0x400
+ RTF_LOCAL = 0x200000
+ RTF_MODIFIED = 0x20
+ RTF_MULTICAST = 0x800000
+ RTF_NOIFREF = 0x2000
+ RTF_PINNED = 0x100000
+ RTF_PRCLONING = 0x10000
+ RTF_PROTO1 = 0x8000
+ RTF_PROTO2 = 0x4000
+ RTF_PROTO3 = 0x40000
+ RTF_PROXY = 0x8000000
+ RTF_REJECT = 0x8
+ RTF_ROUTER = 0x10000000
+ RTF_STATIC = 0x800
+ RTF_UP = 0x1
+ RTF_WASCLONED = 0x20000
+ RTF_XRESOLVE = 0x200
+ RTM_ADD = 0x1
+ RTM_CHANGE = 0x3
+ RTM_DELADDR = 0xd
+ RTM_DELETE = 0x2
+ RTM_DELMADDR = 0x10
+ RTM_GET = 0x4
+ RTM_GET2 = 0x14
+ RTM_IFINFO = 0xe
+ RTM_IFINFO2 = 0x12
+ RTM_LOCK = 0x8
+ RTM_LOSING = 0x5
+ RTM_MISS = 0x7
+ RTM_NEWADDR = 0xc
+ RTM_NEWMADDR = 0xf
+ RTM_NEWMADDR2 = 0x13
+ RTM_OLDADD = 0x9
+ RTM_OLDDEL = 0xa
+ RTM_REDIRECT = 0x6
+ RTM_RESOLVE = 0xb
+ RTM_RTTUNIT = 0xf4240
+ RTM_VERSION = 0x5
+ RTV_EXPIRE = 0x4
+ RTV_HOPCOUNT = 0x2
+ RTV_MTU = 0x1
+ RTV_RPIPE = 0x8
+ RTV_RTT = 0x40
+ RTV_RTTVAR = 0x80
+ RTV_SPIPE = 0x10
+ RTV_SSTHRESH = 0x20
+ RUSAGE_CHILDREN = -0x1
+ RUSAGE_SELF = 0x0
+ SCM_CREDS = 0x3
+ SCM_RIGHTS = 0x1
+ SCM_TIMESTAMP = 0x2
+ SCM_TIMESTAMP_MONOTONIC = 0x4
+ SEEK_CUR = 0x1
+ SEEK_DATA = 0x4
+ SEEK_END = 0x2
+ SEEK_HOLE = 0x3
+ SEEK_SET = 0x0
+ SHUT_RD = 0x0
+ SHUT_RDWR = 0x2
+ SHUT_WR = 0x1
+ SIOCADDMULTI = 0x80206931
+ SIOCAIFADDR = 0x8040691a
+ SIOCARPIPLL = 0xc0206928
+ SIOCATMARK = 0x40047307
+ SIOCAUTOADDR = 0xc0206926
+ SIOCAUTONETMASK = 0x80206927
+ SIOCDELMULTI = 0x80206932
+ SIOCDIFADDR = 0x80206919
+ SIOCDIFPHYADDR = 0x80206941
+ SIOCGDRVSPEC = 0xc028697b
+ SIOCGETVLAN = 0xc020697f
+ SIOCGHIWAT = 0x40047301
+ SIOCGIF6LOWPAN = 0xc02069c5
+ SIOCGIFADDR = 0xc0206921
+ SIOCGIFALTMTU = 0xc0206948
+ SIOCGIFASYNCMAP = 0xc020697c
+ SIOCGIFBOND = 0xc0206947
+ SIOCGIFBRDADDR = 0xc0206923
+ SIOCGIFCAP = 0xc020695b
+ SIOCGIFCONF = 0xc00c6924
+ SIOCGIFDEVMTU = 0xc0206944
+ SIOCGIFDSTADDR = 0xc0206922
+ SIOCGIFFLAGS = 0xc0206911
+ SIOCGIFFUNCTIONALTYPE = 0xc02069ad
+ SIOCGIFGENERIC = 0xc020693a
+ SIOCGIFKPI = 0xc0206987
+ SIOCGIFMAC = 0xc0206982
+ SIOCGIFMEDIA = 0xc02c6938
+ SIOCGIFMETRIC = 0xc0206917
+ SIOCGIFMTU = 0xc0206933
+ SIOCGIFNETMASK = 0xc0206925
+ SIOCGIFPDSTADDR = 0xc0206940
+ SIOCGIFPHYS = 0xc0206935
+ SIOCGIFPSRCADDR = 0xc020693f
+ SIOCGIFSTATUS = 0xc331693d
+ SIOCGIFVLAN = 0xc020697f
+ SIOCGIFWAKEFLAGS = 0xc0206988
+ SIOCGIFXMEDIA = 0xc02c6948
+ SIOCGLOWAT = 0x40047303
+ SIOCGPGRP = 0x40047309
+ SIOCIFCREATE = 0xc0206978
+ SIOCIFCREATE2 = 0xc020697a
+ SIOCIFDESTROY = 0x80206979
+ SIOCIFGCLONERS = 0xc0106981
+ SIOCRSLVMULTI = 0xc010693b
+ SIOCSDRVSPEC = 0x8028697b
+ SIOCSETVLAN = 0x8020697e
+ SIOCSHIWAT = 0x80047300
+ SIOCSIF6LOWPAN = 0x802069c4
+ SIOCSIFADDR = 0x8020690c
+ SIOCSIFALTMTU = 0x80206945
+ SIOCSIFASYNCMAP = 0x8020697d
+ SIOCSIFBOND = 0x80206946
+ SIOCSIFBRDADDR = 0x80206913
+ SIOCSIFCAP = 0x8020695a
+ SIOCSIFDSTADDR = 0x8020690e
+ SIOCSIFFLAGS = 0x80206910
+ SIOCSIFGENERIC = 0x80206939
+ SIOCSIFKPI = 0x80206986
+ SIOCSIFLLADDR = 0x8020693c
+ SIOCSIFMAC = 0x80206983
+ SIOCSIFMEDIA = 0xc0206937
+ SIOCSIFMETRIC = 0x80206918
+ SIOCSIFMTU = 0x80206934
+ SIOCSIFNETMASK = 0x80206916
+ SIOCSIFPHYADDR = 0x8040693e
+ SIOCSIFPHYS = 0x80206936
+ SIOCSIFVLAN = 0x8020697e
+ SIOCSLOWAT = 0x80047302
+ SIOCSPGRP = 0x80047308
+ SOCK_DGRAM = 0x2
+ SOCK_MAXADDRLEN = 0xff
+ SOCK_RAW = 0x3
+ SOCK_RDM = 0x4
+ SOCK_SEQPACKET = 0x5
+ SOCK_STREAM = 0x1
+ SOL_LOCAL = 0x0
+ SOL_SOCKET = 0xffff
+ SOMAXCONN = 0x80
+ SO_ACCEPTCONN = 0x2
+ SO_BROADCAST = 0x20
+ SO_DEBUG = 0x1
+ SO_DONTROUTE = 0x10
+ SO_DONTTRUNC = 0x2000
+ SO_ERROR = 0x1007
+ SO_KEEPALIVE = 0x8
+ SO_LABEL = 0x1010
+ SO_LINGER = 0x80
+ SO_LINGER_SEC = 0x1080
+ SO_NETSVC_MARKING_LEVEL = 0x1119
+ SO_NET_SERVICE_TYPE = 0x1116
+ SO_NKE = 0x1021
+ SO_NOADDRERR = 0x1023
+ SO_NOSIGPIPE = 0x1022
+ SO_NOTIFYCONFLICT = 0x1026
+ SO_NP_EXTENSIONS = 0x1083
+ SO_NREAD = 0x1020
+ SO_NUMRCVPKT = 0x1112
+ SO_NWRITE = 0x1024
+ SO_OOBINLINE = 0x100
+ SO_PEERLABEL = 0x1011
+ SO_RANDOMPORT = 0x1082
+ SO_RCVBUF = 0x1002
+ SO_RCVLOWAT = 0x1004
+ SO_RCVTIMEO = 0x1006
+ SO_REUSEADDR = 0x4
+ SO_REUSEPORT = 0x200
+ SO_REUSESHAREUID = 0x1025
+ SO_SNDBUF = 0x1001
+ SO_SNDLOWAT = 0x1003
+ SO_SNDTIMEO = 0x1005
+ SO_TIMESTAMP = 0x400
+ SO_TIMESTAMP_MONOTONIC = 0x800
+ SO_TRACKER_ATTRIBUTE_FLAGS_APP_APPROVED = 0x1
+ SO_TRACKER_ATTRIBUTE_FLAGS_DOMAIN_SHORT = 0x4
+ SO_TRACKER_ATTRIBUTE_FLAGS_TRACKER = 0x2
+ SO_TRACKER_TRANSPARENCY_VERSION = 0x3
+ SO_TYPE = 0x1008
+ SO_UPCALLCLOSEWAIT = 0x1027
+ SO_USELOOPBACK = 0x40
+ SO_WANTMORE = 0x4000
+ SO_WANTOOBFLAG = 0x8000
+ S_IEXEC = 0x40
+ S_IFBLK = 0x6000
+ S_IFCHR = 0x2000
+ S_IFDIR = 0x4000
+ S_IFIFO = 0x1000
+ S_IFLNK = 0xa000
+ S_IFMT = 0xf000
+ S_IFREG = 0x8000
+ S_IFSOCK = 0xc000
+ S_IFWHT = 0xe000
+ S_IREAD = 0x100
+ S_IRGRP = 0x20
+ S_IROTH = 0x4
+ S_IRUSR = 0x100
+ S_IRWXG = 0x38
+ S_IRWXO = 0x7
+ S_IRWXU = 0x1c0
+ S_ISGID = 0x400
+ S_ISTXT = 0x200
+ S_ISUID = 0x800
+ S_ISVTX = 0x200
+ S_IWGRP = 0x10
+ S_IWOTH = 0x2
+ S_IWRITE = 0x80
+ S_IWUSR = 0x80
+ S_IXGRP = 0x8
+ S_IXOTH = 0x1
+ S_IXUSR = 0x40
+ TAB0 = 0x0
+ TAB1 = 0x400
+ TAB2 = 0x800
+ TAB3 = 0x4
+ TABDLY = 0xc04
+ TCIFLUSH = 0x1
+ TCIOFF = 0x3
+ TCIOFLUSH = 0x3
+ TCION = 0x4
+ TCOFLUSH = 0x2
+ TCOOFF = 0x1
+ TCOON = 0x2
+ TCPOPT_CC = 0xb
+ TCPOPT_CCECHO = 0xd
+ TCPOPT_CCNEW = 0xc
+ TCPOPT_EOL = 0x0
+ TCPOPT_FASTOPEN = 0x22
+ TCPOPT_MAXSEG = 0x2
+ TCPOPT_NOP = 0x1
+ TCPOPT_SACK = 0x5
+ TCPOPT_SACK_HDR = 0x1010500
+ TCPOPT_SACK_PERMITTED = 0x4
+ TCPOPT_SACK_PERMIT_HDR = 0x1010402
+ TCPOPT_SIGNATURE = 0x13
+ TCPOPT_TIMESTAMP = 0x8
+ TCPOPT_TSTAMP_HDR = 0x101080a
+ TCPOPT_WINDOW = 0x3
+ TCP_CONNECTIONTIMEOUT = 0x20
+ TCP_CONNECTION_INFO = 0x106
+ TCP_ENABLE_ECN = 0x104
+ TCP_FASTOPEN = 0x105
+ TCP_KEEPALIVE = 0x10
+ TCP_KEEPCNT = 0x102
+ TCP_KEEPINTVL = 0x101
+ TCP_MAXHLEN = 0x3c
+ TCP_MAXOLEN = 0x28
+ TCP_MAXSEG = 0x2
+ TCP_MAXWIN = 0xffff
+ TCP_MAX_SACK = 0x4
+ TCP_MAX_WINSHIFT = 0xe
+ TCP_MINMSS = 0xd8
+ TCP_MSS = 0x200
+ TCP_NODELAY = 0x1
+ TCP_NOOPT = 0x8
+ TCP_NOPUSH = 0x4
+ TCP_NOTSENT_LOWAT = 0x201
+ TCP_RXT_CONNDROPTIME = 0x80
+ TCP_RXT_FINDROP = 0x100
+ TCP_SENDMOREACKS = 0x103
+ TCSAFLUSH = 0x2
+ TIOCCBRK = 0x2000747a
+ TIOCCDTR = 0x20007478
+ TIOCCONS = 0x80047462
+ TIOCDCDTIMESTAMP = 0x40107458
+ TIOCDRAIN = 0x2000745e
+ TIOCDSIMICROCODE = 0x20007455
+ TIOCEXCL = 0x2000740d
+ TIOCEXT = 0x80047460
+ TIOCFLUSH = 0x80047410
+ TIOCGDRAINWAIT = 0x40047456
+ TIOCGETA = 0x40487413
+ TIOCGETD = 0x4004741a
+ TIOCGPGRP = 0x40047477
+ TIOCGWINSZ = 0x40087468
+ TIOCIXOFF = 0x20007480
+ TIOCIXON = 0x20007481
+ TIOCMBIC = 0x8004746b
+ TIOCMBIS = 0x8004746c
+ TIOCMGDTRWAIT = 0x4004745a
+ TIOCMGET = 0x4004746a
+ TIOCMODG = 0x40047403
+ TIOCMODS = 0x80047404
+ TIOCMSDTRWAIT = 0x8004745b
+ TIOCMSET = 0x8004746d
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_DTR = 0x2
+ TIOCM_LE = 0x1
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_RTS = 0x4
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x20007471
+ TIOCNXCL = 0x2000740e
+ TIOCOUTQ = 0x40047473
+ TIOCPKT = 0x80047470
+ TIOCPKT_DATA = 0x0
+ TIOCPKT_DOSTOP = 0x20
+ TIOCPKT_FLUSHREAD = 0x1
+ TIOCPKT_FLUSHWRITE = 0x2
+ TIOCPKT_IOCTL = 0x40
+ TIOCPKT_NOSTOP = 0x10
+ TIOCPKT_START = 0x8
+ TIOCPKT_STOP = 0x4
+ TIOCPTYGNAME = 0x40807453
+ TIOCPTYGRANT = 0x20007454
+ TIOCPTYUNLK = 0x20007452
+ TIOCREMOTE = 0x80047469
+ TIOCSBRK = 0x2000747b
+ TIOCSCONS = 0x20007463
+ TIOCSCTTY = 0x20007461
+ TIOCSDRAINWAIT = 0x80047457
+ TIOCSDTR = 0x20007479
+ TIOCSETA = 0x80487414
+ TIOCSETAF = 0x80487416
+ TIOCSETAW = 0x80487415
+ TIOCSETD = 0x8004741b
+ TIOCSIG = 0x2000745f
+ TIOCSPGRP = 0x80047476
+ TIOCSTART = 0x2000746e
+ TIOCSTAT = 0x20007465
+ TIOCSTI = 0x80017472
+ TIOCSTOP = 0x2000746f
+ TIOCSWINSZ = 0x80087467
+ TIOCTIMESTAMP = 0x40107459
+ TIOCUCNTL = 0x80047466
+ TOSTOP = 0x400000
+ VDISCARD = 0xf
+ VDSUSP = 0xb
+ VEOF = 0x0
+ VEOL = 0x1
+ VEOL2 = 0x2
+ VERASE = 0x3
+ VINTR = 0x8
+ VKILL = 0x5
+ VLNEXT = 0xe
+ VMADDR_CID_ANY = 0xffffffff
+ VMADDR_CID_HOST = 0x2
+ VMADDR_CID_HYPERVISOR = 0x0
+ VMADDR_CID_RESERVED = 0x1
+ VMADDR_PORT_ANY = 0xffffffff
+ VMIN = 0x10
+ VM_LOADAVG = 0x2
+ VM_MACHFACTOR = 0x4
+ VM_MAXID = 0x6
+ VM_METER = 0x1
+ VM_SWAPUSAGE = 0x5
+ VQUIT = 0x9
+ VREPRINT = 0x6
+ VSTART = 0xc
+ VSTATUS = 0x12
+ VSTOP = 0xd
+ VSUSP = 0xa
+ VT0 = 0x0
+ VT1 = 0x10000
+ VTDLY = 0x10000
+ VTIME = 0x11
+ VWERASE = 0x4
+ WCONTINUED = 0x10
+ WCOREFLAG = 0x80
+ WEXITED = 0x4
+ WNOHANG = 0x1
+ WNOWAIT = 0x20
+ WORDSIZE = 0x40
+ WSTOPPED = 0x8
+ WUNTRACED = 0x2
+ XATTR_CREATE = 0x2
+ XATTR_NODEFAULT = 0x10
+ XATTR_NOFOLLOW = 0x1
+ XATTR_NOSECURITY = 0x8
+ XATTR_REPLACE = 0x4
+ XATTR_SHOWCOMPRESSION = 0x20
)
// Errors
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux.go
index 8894c4af44a2..3de79fa25766 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux.go
@@ -1,4 +1,4 @@
-// Code generated by mkmerge.go; DO NOT EDIT.
+// Code generated by mkmerge; DO NOT EDIT.
//go:build linux
// +build linux
@@ -38,7 +38,8 @@ const (
AF_KEY = 0xf
AF_LLC = 0x1a
AF_LOCAL = 0x1
- AF_MAX = 0x2d
+ AF_MAX = 0x2e
+ AF_MCTP = 0x2d
AF_MPLS = 0x1c
AF_NETBEUI = 0xd
AF_NETLINK = 0x10
@@ -116,6 +117,7 @@ const (
ARPHRD_LAPB = 0x204
ARPHRD_LOCALTLK = 0x305
ARPHRD_LOOPBACK = 0x304
+ ARPHRD_MCTP = 0x122
ARPHRD_METRICOM = 0x17
ARPHRD_NETLINK = 0x338
ARPHRD_NETROM = 0x0
@@ -258,6 +260,17 @@ const (
BUS_USB = 0x3
BUS_VIRTUAL = 0x6
CAN_BCM = 0x2
+ CAN_CTRLMODE_3_SAMPLES = 0x4
+ CAN_CTRLMODE_BERR_REPORTING = 0x10
+ CAN_CTRLMODE_CC_LEN8_DLC = 0x100
+ CAN_CTRLMODE_FD = 0x20
+ CAN_CTRLMODE_FD_NON_ISO = 0x80
+ CAN_CTRLMODE_LISTENONLY = 0x2
+ CAN_CTRLMODE_LOOPBACK = 0x1
+ CAN_CTRLMODE_ONE_SHOT = 0x8
+ CAN_CTRLMODE_PRESUME_ACK = 0x40
+ CAN_CTRLMODE_TDC_AUTO = 0x200
+ CAN_CTRLMODE_TDC_MANUAL = 0x400
CAN_EFF_FLAG = 0x80000000
CAN_EFF_ID_BITS = 0x1d
CAN_EFF_MASK = 0x1fffffff
@@ -335,6 +348,7 @@ const (
CAN_RTR_FLAG = 0x40000000
CAN_SFF_ID_BITS = 0xb
CAN_SFF_MASK = 0x7ff
+ CAN_TERMINATION_DISABLED = 0x0
CAN_TP16 = 0x3
CAN_TP20 = 0x4
CAP_AUDIT_CONTROL = 0x1e
@@ -379,9 +393,11 @@ const (
CAP_SYS_TIME = 0x19
CAP_SYS_TTY_CONFIG = 0x1a
CAP_WAKE_ALARM = 0x23
+ CEPH_SUPER_MAGIC = 0xc36400
CFLUSH = 0xf
CGROUP2_SUPER_MAGIC = 0x63677270
CGROUP_SUPER_MAGIC = 0x27e0eb
+ CIFS_SUPER_MAGIC = 0xff534d42
CLOCK_BOOTTIME = 0x7
CLOCK_BOOTTIME_ALARM = 0x9
CLOCK_DEFAULT = 0x0
@@ -472,6 +488,7 @@ const (
DM_DEV_WAIT = 0xc138fd08
DM_DIR = "mapper"
DM_GET_TARGET_VERSION = 0xc138fd11
+ DM_IMA_MEASUREMENT_FLAG = 0x80000
DM_INACTIVE_PRESENT_FLAG = 0x40
DM_INTERNAL_SUSPEND_FLAG = 0x40000
DM_IOCTL = 0xfd
@@ -716,6 +733,7 @@ const (
ETH_P_LOOPBACK = 0x9000
ETH_P_MACSEC = 0x88e5
ETH_P_MAP = 0xf9
+ ETH_P_MCTP = 0xfa
ETH_P_MOBITEX = 0x15
ETH_P_MPLS_MC = 0x8848
ETH_P_MPLS_UC = 0x8847
@@ -738,6 +756,7 @@ const (
ETH_P_QINQ2 = 0x9200
ETH_P_QINQ3 = 0x9300
ETH_P_RARP = 0x8035
+ ETH_P_REALTEK = 0x8899
ETH_P_SCA = 0x6007
ETH_P_SLOW = 0x8809
ETH_P_SNAP = 0x5
@@ -751,7 +770,23 @@ const (
ETH_P_WCCP = 0x883e
ETH_P_X25 = 0x805
ETH_P_XDSA = 0xf8
+ EV_ABS = 0x3
+ EV_CNT = 0x20
+ EV_FF = 0x15
+ EV_FF_STATUS = 0x17
+ EV_KEY = 0x1
+ EV_LED = 0x11
+ EV_MAX = 0x1f
+ EV_MSC = 0x4
+ EV_PWR = 0x16
+ EV_REL = 0x2
+ EV_REP = 0x14
+ EV_SND = 0x12
+ EV_SW = 0x5
+ EV_SYN = 0x0
+ EV_VERSION = 0x10001
EXABYTE_ENABLE_NEST = 0xf0
+ EXFAT_SUPER_MAGIC = 0x2011bab0
EXT2_SUPER_MAGIC = 0xef53
EXT3_SUPER_MAGIC = 0xef53
EXT4_SUPER_MAGIC = 0xef53
@@ -789,11 +824,17 @@ const (
FAN_DELETE_SELF = 0x400
FAN_DENY = 0x2
FAN_ENABLE_AUDIT = 0x40
+ FAN_EPIDFD = -0x2
FAN_EVENT_INFO_TYPE_DFID = 0x3
FAN_EVENT_INFO_TYPE_DFID_NAME = 0x2
+ FAN_EVENT_INFO_TYPE_ERROR = 0x5
FAN_EVENT_INFO_TYPE_FID = 0x1
+ FAN_EVENT_INFO_TYPE_NEW_DFID_NAME = 0xc
+ FAN_EVENT_INFO_TYPE_OLD_DFID_NAME = 0xa
+ FAN_EVENT_INFO_TYPE_PIDFD = 0x4
FAN_EVENT_METADATA_LEN = 0x18
FAN_EVENT_ON_CHILD = 0x8000000
+ FAN_FS_ERROR = 0x8000
FAN_MARK_ADD = 0x1
FAN_MARK_DONT_FOLLOW = 0x4
FAN_MARK_FILESYSTEM = 0x100
@@ -811,22 +852,34 @@ const (
FAN_MOVE_SELF = 0x800
FAN_NOFD = -0x1
FAN_NONBLOCK = 0x2
+ FAN_NOPIDFD = -0x1
FAN_ONDIR = 0x40000000
FAN_OPEN = 0x20
FAN_OPEN_EXEC = 0x1000
FAN_OPEN_EXEC_PERM = 0x40000
FAN_OPEN_PERM = 0x10000
FAN_Q_OVERFLOW = 0x4000
+ FAN_RENAME = 0x10000000
FAN_REPORT_DFID_NAME = 0xc00
+ FAN_REPORT_DFID_NAME_TARGET = 0x1e00
FAN_REPORT_DIR_FID = 0x400
FAN_REPORT_FID = 0x200
FAN_REPORT_NAME = 0x800
+ FAN_REPORT_PIDFD = 0x80
+ FAN_REPORT_TARGET_FID = 0x1000
FAN_REPORT_TID = 0x100
FAN_UNLIMITED_MARKS = 0x20
FAN_UNLIMITED_QUEUE = 0x10
FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400
FF0 = 0x0
+ FIB_RULE_DEV_DETACHED = 0x8
+ FIB_RULE_FIND_SADDR = 0x10000
+ FIB_RULE_IIF_DETACHED = 0x8
+ FIB_RULE_INVERT = 0x2
+ FIB_RULE_OIF_DETACHED = 0x10
+ FIB_RULE_PERMANENT = 0x1
+ FIB_RULE_UNRESOLVED = 0x4
FIDEDUPERANGE = 0xc0189436
FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
@@ -889,6 +942,7 @@ const (
FS_VERITY_METADATA_TYPE_DESCRIPTOR = 0x2
FS_VERITY_METADATA_TYPE_MERKLE_TREE = 0x1
FS_VERITY_METADATA_TYPE_SIGNATURE = 0x3
+ FUSE_SUPER_MAGIC = 0x65735546
FUTEXFS_SUPER_MAGIC = 0xbad1dea
F_ADD_SEALS = 0x409
F_DUPFD = 0x0
@@ -1242,9 +1296,14 @@ const (
IP_XFRM_POLICY = 0x11
ISOFS_SUPER_MAGIC = 0x9660
ISTRIP = 0x20
+ ITIMER_PROF = 0x2
+ ITIMER_REAL = 0x0
+ ITIMER_VIRTUAL = 0x1
IUTF8 = 0x4000
IXANY = 0x800
JFFS2_SUPER_MAGIC = 0x72b6
+ KCMPROTO_CONNECTED = 0x0
+ KCM_RECV_DISABLE = 0x1
KEXEC_ARCH_386 = 0x30000
KEXEC_ARCH_68K = 0x40000
KEXEC_ARCH_AARCH64 = 0xb70000
@@ -1333,6 +1392,20 @@ const (
KEY_SPEC_THREAD_KEYRING = -0x1
KEY_SPEC_USER_KEYRING = -0x4
KEY_SPEC_USER_SESSION_KEYRING = -0x5
+ LANDLOCK_ACCESS_FS_EXECUTE = 0x1
+ LANDLOCK_ACCESS_FS_MAKE_BLOCK = 0x800
+ LANDLOCK_ACCESS_FS_MAKE_CHAR = 0x40
+ LANDLOCK_ACCESS_FS_MAKE_DIR = 0x80
+ LANDLOCK_ACCESS_FS_MAKE_FIFO = 0x400
+ LANDLOCK_ACCESS_FS_MAKE_REG = 0x100
+ LANDLOCK_ACCESS_FS_MAKE_SOCK = 0x200
+ LANDLOCK_ACCESS_FS_MAKE_SYM = 0x1000
+ LANDLOCK_ACCESS_FS_READ_DIR = 0x8
+ LANDLOCK_ACCESS_FS_READ_FILE = 0x4
+ LANDLOCK_ACCESS_FS_REMOVE_DIR = 0x10
+ LANDLOCK_ACCESS_FS_REMOVE_FILE = 0x20
+ LANDLOCK_ACCESS_FS_WRITE_FILE = 0x2
+ LANDLOCK_CREATE_RULESET_VERSION = 0x1
LINUX_REBOOT_CMD_CAD_OFF = 0x0
LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef
LINUX_REBOOT_CMD_HALT = 0xcdef0123
@@ -1383,6 +1456,8 @@ const (
MADV_NOHUGEPAGE = 0xf
MADV_NORMAL = 0x0
MADV_PAGEOUT = 0x15
+ MADV_POPULATE_READ = 0x16
+ MADV_POPULATE_WRITE = 0x17
MADV_RANDOM = 0x1
MADV_REMOVE = 0x9
MADV_SEQUENTIAL = 0x2
@@ -1436,8 +1511,21 @@ const (
MNT_DETACH = 0x2
MNT_EXPIRE = 0x4
MNT_FORCE = 0x1
+ MODULE_INIT_COMPRESSED_FILE = 0x4
MODULE_INIT_IGNORE_MODVERSIONS = 0x1
MODULE_INIT_IGNORE_VERMAGIC = 0x2
+ MOUNT_ATTR_IDMAP = 0x100000
+ MOUNT_ATTR_NOATIME = 0x10
+ MOUNT_ATTR_NODEV = 0x4
+ MOUNT_ATTR_NODIRATIME = 0x80
+ MOUNT_ATTR_NOEXEC = 0x8
+ MOUNT_ATTR_NOSUID = 0x2
+ MOUNT_ATTR_NOSYMFOLLOW = 0x200000
+ MOUNT_ATTR_RDONLY = 0x1
+ MOUNT_ATTR_RELATIME = 0x0
+ MOUNT_ATTR_SIZE_VER0 = 0x20
+ MOUNT_ATTR_STRICTATIME = 0x20
+ MOUNT_ATTR__ATIME = 0x70
MSDOS_SUPER_MAGIC = 0x4d44
MSG_BATCH = 0x40000
MSG_CMSG_CLOEXEC = 0x40000000
@@ -1777,6 +1865,11 @@ const (
PERF_MEM_BLK_DATA = 0x2
PERF_MEM_BLK_NA = 0x1
PERF_MEM_BLK_SHIFT = 0x28
+ PERF_MEM_HOPS_0 = 0x1
+ PERF_MEM_HOPS_1 = 0x2
+ PERF_MEM_HOPS_2 = 0x3
+ PERF_MEM_HOPS_3 = 0x4
+ PERF_MEM_HOPS_SHIFT = 0x2b
PERF_MEM_LOCK_LOCKED = 0x2
PERF_MEM_LOCK_NA = 0x1
PERF_MEM_LOCK_SHIFT = 0x18
@@ -1936,6 +2029,9 @@ const (
PR_SCHED_CORE_CREATE = 0x1
PR_SCHED_CORE_GET = 0x0
PR_SCHED_CORE_MAX = 0x4
+ PR_SCHED_CORE_SCOPE_PROCESS_GROUP = 0x2
+ PR_SCHED_CORE_SCOPE_THREAD = 0x0
+ PR_SCHED_CORE_SCOPE_THREAD_GROUP = 0x1
PR_SCHED_CORE_SHARE_FROM = 0x3
PR_SCHED_CORE_SHARE_TO = 0x2
PR_SET_CHILD_SUBREAPER = 0x24
@@ -1976,11 +2072,14 @@ const (
PR_SET_TIMING = 0xe
PR_SET_TSC = 0x1a
PR_SET_UNALIGN = 0x6
+ PR_SET_VMA = 0x53564d41
+ PR_SET_VMA_ANON_NAME = 0x0
PR_SPEC_DISABLE = 0x4
PR_SPEC_DISABLE_NOEXEC = 0x10
PR_SPEC_ENABLE = 0x2
PR_SPEC_FORCE_DISABLE = 0x8
PR_SPEC_INDIRECT_BRANCH = 0x1
+ PR_SPEC_L1D_FLUSH = 0x2
PR_SPEC_NOT_AFFECTED = 0x0
PR_SPEC_PRCTL = 0x1
PR_SPEC_STORE_BYPASS = 0x0
@@ -2058,6 +2157,10 @@ const (
PTRACE_SYSCALL_INFO_NONE = 0x0
PTRACE_SYSCALL_INFO_SECCOMP = 0x3
PTRACE_TRACEME = 0x0
+ P_ALL = 0x0
+ P_PGID = 0x2
+ P_PID = 0x1
+ P_PIDFD = 0x3
QNX4_SUPER_MAGIC = 0x2f
QNX6_SUPER_MAGIC = 0x68191122
RAMFS_MAGIC = 0x858458f6
@@ -2116,12 +2219,23 @@ const (
RTCF_NAT = 0x800000
RTCF_VALVE = 0x200000
RTC_AF = 0x20
+ RTC_BSM_DIRECT = 0x1
+ RTC_BSM_DISABLED = 0x0
+ RTC_BSM_LEVEL = 0x2
+ RTC_BSM_STANDBY = 0x3
RTC_FEATURE_ALARM = 0x0
+ RTC_FEATURE_ALARM_RES_2S = 0x3
RTC_FEATURE_ALARM_RES_MINUTE = 0x1
- RTC_FEATURE_CNT = 0x3
+ RTC_FEATURE_BACKUP_SWITCH_MODE = 0x6
+ RTC_FEATURE_CNT = 0x7
+ RTC_FEATURE_CORRECTION = 0x5
RTC_FEATURE_NEED_WEEK_DAY = 0x2
+ RTC_FEATURE_UPDATE_INTERRUPT = 0x4
RTC_IRQF = 0x80
RTC_MAX_FREQ = 0x2000
+ RTC_PARAM_BACKUP_SWITCH_MODE = 0x2
+ RTC_PARAM_CORRECTION = 0x1
+ RTC_PARAM_FEATURES = 0x0
RTC_PF = 0x40
RTC_UF = 0x10
RTF_ADDRCLASSMASK = 0xf8000000
@@ -2372,6 +2486,9 @@ const (
SIOCGSTAMPNS = 0x8907
SIOCGSTAMPNS_OLD = 0x8907
SIOCGSTAMP_OLD = 0x8906
+ SIOCKCMATTACH = 0x89e0
+ SIOCKCMCLONE = 0x89e2
+ SIOCKCMUNATTACH = 0x89e1
SIOCOUTQNSD = 0x894b
SIOCPROTOPRIVATE = 0x89e0
SIOCRTMSG = 0x890d
@@ -2414,14 +2531,18 @@ const (
SMART_STATUS = 0xda
SMART_WRITE_LOG_SECTOR = 0xd6
SMART_WRITE_THRESHOLDS = 0xd7
+ SMB2_SUPER_MAGIC = 0xfe534d42
SMB_SUPER_MAGIC = 0x517b
SOCKFS_MAGIC = 0x534f434b
+ SOCK_BUF_LOCK_MASK = 0x3
SOCK_DCCP = 0x6
SOCK_IOC_TYPE = 0x89
SOCK_PACKET = 0xa
SOCK_RAW = 0x3
+ SOCK_RCVBUF_LOCK = 0x2
SOCK_RDM = 0x4
SOCK_SEQPACKET = 0x5
+ SOCK_SNDBUF_LOCK = 0x1
SOL_AAL = 0x109
SOL_ALG = 0x117
SOL_ATM = 0x108
@@ -2478,6 +2599,8 @@ const (
SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
SO_VM_SOCKETS_BUFFER_SIZE = 0x0
SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
+ SO_VM_SOCKETS_CONNECT_TIMEOUT_NEW = 0x8
+ SO_VM_SOCKETS_CONNECT_TIMEOUT_OLD = 0x6
SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
SO_VM_SOCKETS_TRUSTED = 0x5
@@ -2550,7 +2673,7 @@ const (
TASKSTATS_GENL_NAME = "TASKSTATS"
TASKSTATS_GENL_VERSION = 0x1
TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0xa
+ TASKSTATS_VERSION = 0xb
TCIFLUSH = 0x0
TCIOFF = 0x2
TCIOFLUSH = 0x2
@@ -2772,6 +2895,13 @@ const (
WDIOS_TEMPPANIC = 0x4
WDIOS_UNKNOWN = -0x1
WEXITED = 0x4
+ WGALLOWEDIP_A_MAX = 0x3
+ WGDEVICE_A_MAX = 0x8
+ WGPEER_A_MAX = 0xa
+ WG_CMD_MAX = 0x1
+ WG_GENL_NAME = "wireguard"
+ WG_GENL_VERSION = 0x1
+ WG_KEY_LEN = 0x20
WIN_ACKMEDIACHANGE = 0xdb
WIN_CHECKPOWERMODE1 = 0xe5
WIN_CHECKPOWERMODE2 = 0x98
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
index 697811a46008..234fd4a5d1ad 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
@@ -5,7 +5,7 @@
// +build 386,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 /build/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 /build/unix/_const.go
package unix
@@ -250,6 +250,8 @@ const (
RTC_EPOCH_SET = 0x4004700e
RTC_IRQP_READ = 0x8004700b
RTC_IRQP_SET = 0x4004700c
+ RTC_PARAM_GET = 0x40187013
+ RTC_PARAM_SET = 0x40187014
RTC_PIE_OFF = 0x7006
RTC_PIE_ON = 0x7005
RTC_PLL_GET = 0x801c7011
@@ -293,6 +295,7 @@ const (
SO_BPF_EXTENSIONS = 0x30
SO_BROADCAST = 0x6
SO_BSDCOMPAT = 0xe
+ SO_BUF_LOCK = 0x48
SO_BUSY_POLL = 0x2e
SO_BUSY_POLL_BUDGET = 0x46
SO_CNX_ADVICE = 0x35
@@ -326,6 +329,7 @@ const (
SO_RCVTIMEO = 0x14
SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x14
+ SO_RESERVE_MEM = 0x49
SO_REUSEADDR = 0x2
SO_REUSEPORT = 0xf
SO_RXQ_OVFL = 0x28
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
index 7d8d93bfc4b0..58619b7589b0 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
@@ -5,7 +5,7 @@
// +build amd64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 /build/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 /build/unix/_const.go
package unix
@@ -251,6 +251,8 @@ const (
RTC_EPOCH_SET = 0x4008700e
RTC_IRQP_READ = 0x8008700b
RTC_IRQP_SET = 0x4008700c
+ RTC_PARAM_GET = 0x40187013
+ RTC_PARAM_SET = 0x40187014
RTC_PIE_OFF = 0x7006
RTC_PIE_ON = 0x7005
RTC_PLL_GET = 0x80207011
@@ -294,6 +296,7 @@ const (
SO_BPF_EXTENSIONS = 0x30
SO_BROADCAST = 0x6
SO_BSDCOMPAT = 0xe
+ SO_BUF_LOCK = 0x48
SO_BUSY_POLL = 0x2e
SO_BUSY_POLL_BUDGET = 0x46
SO_CNX_ADVICE = 0x35
@@ -327,6 +330,7 @@ const (
SO_RCVTIMEO = 0x14
SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x14
+ SO_RESERVE_MEM = 0x49
SO_REUSEADDR = 0x2
SO_REUSEPORT = 0xf
SO_RXQ_OVFL = 0x28
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
index f707d508941d..3a64ff59dcec 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
@@ -5,7 +5,7 @@
// +build arm,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
package unix
@@ -257,6 +257,8 @@ const (
RTC_EPOCH_SET = 0x4004700e
RTC_IRQP_READ = 0x8004700b
RTC_IRQP_SET = 0x4004700c
+ RTC_PARAM_GET = 0x40187013
+ RTC_PARAM_SET = 0x40187014
RTC_PIE_OFF = 0x7006
RTC_PIE_ON = 0x7005
RTC_PLL_GET = 0x801c7011
@@ -300,6 +302,7 @@ const (
SO_BPF_EXTENSIONS = 0x30
SO_BROADCAST = 0x6
SO_BSDCOMPAT = 0xe
+ SO_BUF_LOCK = 0x48
SO_BUSY_POLL = 0x2e
SO_BUSY_POLL_BUDGET = 0x46
SO_CNX_ADVICE = 0x35
@@ -333,6 +336,7 @@ const (
SO_RCVTIMEO = 0x14
SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x14
+ SO_RESERVE_MEM = 0x49
SO_REUSEADDR = 0x2
SO_REUSEPORT = 0xf
SO_RXQ_OVFL = 0x28
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
index 3a67a9c85211..abe0b925789f 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
@@ -5,7 +5,7 @@
// +build arm64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/unix/_const.go
package unix
@@ -247,6 +247,8 @@ const (
RTC_EPOCH_SET = 0x4008700e
RTC_IRQP_READ = 0x8008700b
RTC_IRQP_SET = 0x4008700c
+ RTC_PARAM_GET = 0x40187013
+ RTC_PARAM_SET = 0x40187014
RTC_PIE_OFF = 0x7006
RTC_PIE_ON = 0x7005
RTC_PLL_GET = 0x80207011
@@ -290,6 +292,7 @@ const (
SO_BPF_EXTENSIONS = 0x30
SO_BROADCAST = 0x6
SO_BSDCOMPAT = 0xe
+ SO_BUF_LOCK = 0x48
SO_BUSY_POLL = 0x2e
SO_BUSY_POLL_BUDGET = 0x46
SO_CNX_ADVICE = 0x35
@@ -323,6 +326,7 @@ const (
SO_RCVTIMEO = 0x14
SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x14
+ SO_RESERVE_MEM = 0x49
SO_REUSEADDR = 0x2
SO_REUSEPORT = 0xf
SO_RXQ_OVFL = 0x28
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
index a7ccef56c52a..14d7a84399de 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
@@ -5,7 +5,7 @@
// +build mips,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
package unix
@@ -250,6 +250,8 @@ const (
RTC_EPOCH_SET = 0x8004700e
RTC_IRQP_READ = 0x4004700b
RTC_IRQP_SET = 0x8004700c
+ RTC_PARAM_GET = 0x80187013
+ RTC_PARAM_SET = 0x80187014
RTC_PIE_OFF = 0x20007006
RTC_PIE_ON = 0x20007005
RTC_PLL_GET = 0x401c7011
@@ -293,6 +295,7 @@ const (
SO_BPF_EXTENSIONS = 0x30
SO_BROADCAST = 0x20
SO_BSDCOMPAT = 0xe
+ SO_BUF_LOCK = 0x48
SO_BUSY_POLL = 0x2e
SO_BUSY_POLL_BUDGET = 0x46
SO_CNX_ADVICE = 0x35
@@ -326,6 +329,7 @@ const (
SO_RCVTIMEO = 0x1006
SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x1006
+ SO_RESERVE_MEM = 0x49
SO_REUSEADDR = 0x4
SO_REUSEPORT = 0x200
SO_RXQ_OVFL = 0x28
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
index f7b7cec910f0..99e7c4ac0b45 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
@@ -5,7 +5,7 @@
// +build mips64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
package unix
@@ -250,6 +250,8 @@ const (
RTC_EPOCH_SET = 0x8008700e
RTC_IRQP_READ = 0x4008700b
RTC_IRQP_SET = 0x8008700c
+ RTC_PARAM_GET = 0x80187013
+ RTC_PARAM_SET = 0x80187014
RTC_PIE_OFF = 0x20007006
RTC_PIE_ON = 0x20007005
RTC_PLL_GET = 0x40207011
@@ -293,6 +295,7 @@ const (
SO_BPF_EXTENSIONS = 0x30
SO_BROADCAST = 0x20
SO_BSDCOMPAT = 0xe
+ SO_BUF_LOCK = 0x48
SO_BUSY_POLL = 0x2e
SO_BUSY_POLL_BUDGET = 0x46
SO_CNX_ADVICE = 0x35
@@ -326,6 +329,7 @@ const (
SO_RCVTIMEO = 0x1006
SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x1006
+ SO_RESERVE_MEM = 0x49
SO_REUSEADDR = 0x4
SO_REUSEPORT = 0x200
SO_RXQ_OVFL = 0x28
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
index 4fcacf95849b..496364c33cc6 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
@@ -5,7 +5,7 @@
// +build mips64le,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
package unix
@@ -250,6 +250,8 @@ const (
RTC_EPOCH_SET = 0x8008700e
RTC_IRQP_READ = 0x4008700b
RTC_IRQP_SET = 0x8008700c
+ RTC_PARAM_GET = 0x80187013
+ RTC_PARAM_SET = 0x80187014
RTC_PIE_OFF = 0x20007006
RTC_PIE_ON = 0x20007005
RTC_PLL_GET = 0x40207011
@@ -293,6 +295,7 @@ const (
SO_BPF_EXTENSIONS = 0x30
SO_BROADCAST = 0x20
SO_BSDCOMPAT = 0xe
+ SO_BUF_LOCK = 0x48
SO_BUSY_POLL = 0x2e
SO_BUSY_POLL_BUDGET = 0x46
SO_CNX_ADVICE = 0x35
@@ -326,6 +329,7 @@ const (
SO_RCVTIMEO = 0x1006
SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x1006
+ SO_RESERVE_MEM = 0x49
SO_REUSEADDR = 0x4
SO_REUSEPORT = 0x200
SO_RXQ_OVFL = 0x28
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
index 6f6c223a2cb6..3e40830857dd 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
@@ -5,7 +5,7 @@
// +build mipsle,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
package unix
@@ -250,6 +250,8 @@ const (
RTC_EPOCH_SET = 0x8004700e
RTC_IRQP_READ = 0x4004700b
RTC_IRQP_SET = 0x8004700c
+ RTC_PARAM_GET = 0x80187013
+ RTC_PARAM_SET = 0x80187014
RTC_PIE_OFF = 0x20007006
RTC_PIE_ON = 0x20007005
RTC_PLL_GET = 0x401c7011
@@ -293,6 +295,7 @@ const (
SO_BPF_EXTENSIONS = 0x30
SO_BROADCAST = 0x20
SO_BSDCOMPAT = 0xe
+ SO_BUF_LOCK = 0x48
SO_BUSY_POLL = 0x2e
SO_BUSY_POLL_BUDGET = 0x46
SO_CNX_ADVICE = 0x35
@@ -326,6 +329,7 @@ const (
SO_RCVTIMEO = 0x1006
SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x1006
+ SO_RESERVE_MEM = 0x49
SO_REUSEADDR = 0x4
SO_REUSEPORT = 0x200
SO_RXQ_OVFL = 0x28
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
index 59e522bcf4e0..1151a7dfab33 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
@@ -5,7 +5,7 @@
// +build ppc,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
package unix
@@ -305,6 +305,8 @@ const (
RTC_EPOCH_SET = 0x8004700e
RTC_IRQP_READ = 0x4004700b
RTC_IRQP_SET = 0x8004700c
+ RTC_PARAM_GET = 0x80187013
+ RTC_PARAM_SET = 0x80187014
RTC_PIE_OFF = 0x20007006
RTC_PIE_ON = 0x20007005
RTC_PLL_GET = 0x401c7011
@@ -348,6 +350,7 @@ const (
SO_BPF_EXTENSIONS = 0x30
SO_BROADCAST = 0x6
SO_BSDCOMPAT = 0xe
+ SO_BUF_LOCK = 0x48
SO_BUSY_POLL = 0x2e
SO_BUSY_POLL_BUDGET = 0x46
SO_CNX_ADVICE = 0x35
@@ -381,6 +384,7 @@ const (
SO_RCVTIMEO = 0x12
SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x12
+ SO_RESERVE_MEM = 0x49
SO_REUSEADDR = 0x2
SO_REUSEPORT = 0xf
SO_RXQ_OVFL = 0x28
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
index d4264a0f73e7..ed17f249e758 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
@@ -5,7 +5,7 @@
// +build ppc64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
package unix
@@ -309,6 +309,8 @@ const (
RTC_EPOCH_SET = 0x8008700e
RTC_IRQP_READ = 0x4008700b
RTC_IRQP_SET = 0x8008700c
+ RTC_PARAM_GET = 0x80187013
+ RTC_PARAM_SET = 0x80187014
RTC_PIE_OFF = 0x20007006
RTC_PIE_ON = 0x20007005
RTC_PLL_GET = 0x40207011
@@ -352,6 +354,7 @@ const (
SO_BPF_EXTENSIONS = 0x30
SO_BROADCAST = 0x6
SO_BSDCOMPAT = 0xe
+ SO_BUF_LOCK = 0x48
SO_BUSY_POLL = 0x2e
SO_BUSY_POLL_BUDGET = 0x46
SO_CNX_ADVICE = 0x35
@@ -385,6 +388,7 @@ const (
SO_RCVTIMEO = 0x12
SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x12
+ SO_RESERVE_MEM = 0x49
SO_REUSEADDR = 0x2
SO_REUSEPORT = 0xf
SO_RXQ_OVFL = 0x28
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
index 21cbec1dd35f..d84a37c1ac23 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
@@ -5,7 +5,7 @@
// +build ppc64le,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
package unix
@@ -309,6 +309,8 @@ const (
RTC_EPOCH_SET = 0x8008700e
RTC_IRQP_READ = 0x4008700b
RTC_IRQP_SET = 0x8008700c
+ RTC_PARAM_GET = 0x80187013
+ RTC_PARAM_SET = 0x80187014
RTC_PIE_OFF = 0x20007006
RTC_PIE_ON = 0x20007005
RTC_PLL_GET = 0x40207011
@@ -352,6 +354,7 @@ const (
SO_BPF_EXTENSIONS = 0x30
SO_BROADCAST = 0x6
SO_BSDCOMPAT = 0xe
+ SO_BUF_LOCK = 0x48
SO_BUSY_POLL = 0x2e
SO_BUSY_POLL_BUDGET = 0x46
SO_CNX_ADVICE = 0x35
@@ -385,6 +388,7 @@ const (
SO_RCVTIMEO = 0x12
SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x12
+ SO_RESERVE_MEM = 0x49
SO_REUSEADDR = 0x2
SO_REUSEPORT = 0xf
SO_RXQ_OVFL = 0x28
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
index 9b05bf12fc34..5cafba83f6b4 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
@@ -5,7 +5,7 @@
// +build riscv64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
package unix
@@ -238,6 +238,8 @@ const (
RTC_EPOCH_SET = 0x4008700e
RTC_IRQP_READ = 0x8008700b
RTC_IRQP_SET = 0x4008700c
+ RTC_PARAM_GET = 0x40187013
+ RTC_PARAM_SET = 0x40187014
RTC_PIE_OFF = 0x7006
RTC_PIE_ON = 0x7005
RTC_PLL_GET = 0x80207011
@@ -281,6 +283,7 @@ const (
SO_BPF_EXTENSIONS = 0x30
SO_BROADCAST = 0x6
SO_BSDCOMPAT = 0xe
+ SO_BUF_LOCK = 0x48
SO_BUSY_POLL = 0x2e
SO_BUSY_POLL_BUDGET = 0x46
SO_CNX_ADVICE = 0x35
@@ -314,6 +317,7 @@ const (
SO_RCVTIMEO = 0x14
SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x14
+ SO_RESERVE_MEM = 0x49
SO_REUSEADDR = 0x2
SO_REUSEPORT = 0xf
SO_RXQ_OVFL = 0x28
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
index bd82ace09a57..6d122da41c53 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
@@ -5,7 +5,7 @@
// +build s390x,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/unix/_const.go
package unix
@@ -313,6 +313,8 @@ const (
RTC_EPOCH_SET = 0x4008700e
RTC_IRQP_READ = 0x8008700b
RTC_IRQP_SET = 0x4008700c
+ RTC_PARAM_GET = 0x40187013
+ RTC_PARAM_SET = 0x40187014
RTC_PIE_OFF = 0x7006
RTC_PIE_ON = 0x7005
RTC_PLL_GET = 0x80207011
@@ -356,6 +358,7 @@ const (
SO_BPF_EXTENSIONS = 0x30
SO_BROADCAST = 0x6
SO_BSDCOMPAT = 0xe
+ SO_BUF_LOCK = 0x48
SO_BUSY_POLL = 0x2e
SO_BUSY_POLL_BUDGET = 0x46
SO_CNX_ADVICE = 0x35
@@ -389,6 +392,7 @@ const (
SO_RCVTIMEO = 0x14
SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x14
+ SO_RESERVE_MEM = 0x49
SO_REUSEADDR = 0x2
SO_REUSEPORT = 0xf
SO_RXQ_OVFL = 0x28
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
index 1f8bded56bbc..6bd19e51dbb9 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
@@ -5,7 +5,7 @@
// +build sparc64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
package unix
@@ -304,6 +304,8 @@ const (
RTC_EPOCH_SET = 0x8008700e
RTC_IRQP_READ = 0x4008700b
RTC_IRQP_SET = 0x8008700c
+ RTC_PARAM_GET = 0x80187013
+ RTC_PARAM_SET = 0x80187014
RTC_PIE_OFF = 0x20007006
RTC_PIE_ON = 0x20007005
RTC_PLL_GET = 0x40207011
@@ -347,6 +349,7 @@ const (
SO_BPF_EXTENSIONS = 0x32
SO_BROADCAST = 0x20
SO_BSDCOMPAT = 0x400
+ SO_BUF_LOCK = 0x51
SO_BUSY_POLL = 0x30
SO_BUSY_POLL_BUDGET = 0x49
SO_CNX_ADVICE = 0x37
@@ -380,6 +383,7 @@ const (
SO_RCVTIMEO = 0x2000
SO_RCVTIMEO_NEW = 0x44
SO_RCVTIMEO_OLD = 0x2000
+ SO_RESERVE_MEM = 0x52
SO_REUSEADDR = 0x4
SO_REUSEPORT = 0x200
SO_RXQ_OVFL = 0x24
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
index 91a23cc72874..870215d2c479 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
@@ -17,6 +17,7 @@ int getdirent(int, uintptr_t, size_t);
int wait4(int, uintptr_t, int, uintptr_t);
int ioctl(int, int, uintptr_t);
int fcntl(uintptr_t, int, uintptr_t);
+int fsync_range(int, int, long long, long long);
int acct(uintptr_t);
int chdir(uintptr_t);
int chroot(uintptr_t);
@@ -29,7 +30,6 @@ int fchmod(int, unsigned int);
int fchmodat(int, uintptr_t, unsigned int, int);
int fchownat(int, uintptr_t, int, int, int);
int fdatasync(int);
-int fsync(int);
int getpgid(int);
int getpgrp();
int getpid();
@@ -255,6 +255,16 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func fsyncRange(fd int, how int, start int64, length int64) (err error) {
+ r0, er := C.fsync_range(C.int(fd), C.int(how), C.longlong(start), C.longlong(length))
+ if r0 == -1 && er != nil {
+ err = er
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Acct(path string) (err error) {
_p0 := uintptr(unsafe.Pointer(C.CString(path)))
r0, er := C.acct(C.uintptr_t(_p0))
@@ -379,16 +389,6 @@ func Fdatasync(fd int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fsync(fd int) (err error) {
- r0, er := C.fsync(C.int(fd))
- if r0 == -1 && er != nil {
- err = er
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Getpgid(pid int) (pgid int, err error) {
r0, er := C.getpgid(C.int(pid))
pgid = int(r0)
@@ -975,7 +975,7 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 *byte
if len(p) > 0 {
_p0 = &p[0]
@@ -992,7 +992,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 *byte
if len(p) > 0 {
_p0 = &p[0]
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
index 33c2609b8b40..a89b0bfa53ca 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
@@ -135,6 +135,16 @@ func fcntl(fd int, cmd int, arg int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func fsyncRange(fd int, how int, start int64, length int64) (err error) {
+ _, e1 := callfsync_range(fd, how, start, length)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Acct(path string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -283,16 +293,6 @@ func Fdatasync(fd int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Fsync(fd int) (err error) {
- _, e1 := callfsync(fd)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Getpgid(pid int) (pgid int, err error) {
r0, e1 := callgetpgid(pid)
pgid = int(r0)
@@ -931,7 +931,7 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 *byte
if len(p) > 0 {
_p0 = &p[0]
@@ -946,7 +946,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 *byte
if len(p) > 0 {
_p0 = &p[0]
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go
index 8b737fa971e8..2caa5adf9509 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go
@@ -18,6 +18,7 @@ import (
//go:cgo_import_dynamic libc_wait4 wait4 "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_ioctl ioctl "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_fcntl fcntl "libc.a/shr_64.o"
+//go:cgo_import_dynamic libc_fsync_range fsync_range "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_acct acct "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_chdir chdir "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_chroot chroot "libc.a/shr_64.o"
@@ -30,7 +31,6 @@ import (
//go:cgo_import_dynamic libc_fchmodat fchmodat "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_fchownat fchownat "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_fdatasync fdatasync "libc.a/shr_64.o"
-//go:cgo_import_dynamic libc_fsync fsync "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_getpgid getpgid "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_getpgrp getpgrp "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_getpid getpid "libc.a/shr_64.o"
@@ -136,6 +136,7 @@ import (
//go:linkname libc_wait4 libc_wait4
//go:linkname libc_ioctl libc_ioctl
//go:linkname libc_fcntl libc_fcntl
+//go:linkname libc_fsync_range libc_fsync_range
//go:linkname libc_acct libc_acct
//go:linkname libc_chdir libc_chdir
//go:linkname libc_chroot libc_chroot
@@ -148,7 +149,6 @@ import (
//go:linkname libc_fchmodat libc_fchmodat
//go:linkname libc_fchownat libc_fchownat
//go:linkname libc_fdatasync libc_fdatasync
-//go:linkname libc_fsync libc_fsync
//go:linkname libc_getpgid libc_getpgid
//go:linkname libc_getpgrp libc_getpgrp
//go:linkname libc_getpid libc_getpid
@@ -257,6 +257,7 @@ var (
libc_wait4,
libc_ioctl,
libc_fcntl,
+ libc_fsync_range,
libc_acct,
libc_chdir,
libc_chroot,
@@ -269,7 +270,6 @@ var (
libc_fchmodat,
libc_fchownat,
libc_fdatasync,
- libc_fsync,
libc_getpgid,
libc_getpgrp,
libc_getpid,
@@ -430,6 +430,13 @@ func callfcntl(fd uintptr, cmd int, arg uintptr) (r1 uintptr, e1 Errno) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func callfsync_range(fd int, how int, start int64, length int64) (r1 uintptr, e1 Errno) {
+ r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fsync_range)), 4, uintptr(fd), uintptr(how), uintptr(start), uintptr(length), 0, 0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func callacct(_p0 uintptr) (r1 uintptr, e1 Errno) {
r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_acct)), 1, _p0, 0, 0, 0, 0, 0)
return
@@ -514,13 +521,6 @@ func callfdatasync(fd int) (r1 uintptr, e1 Errno) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func callfsync(fd int) (r1 uintptr, e1 Errno) {
- r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_fsync)), 1, uintptr(fd), 0, 0, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func callgetpgid(pid int) (r1 uintptr, e1 Errno) {
r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_getpgid)), 1, uintptr(pid), 0, 0, 0, 0, 0)
return
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go
index 3c260917ed59..944a714b1ad4 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go
@@ -16,6 +16,7 @@ int getdirent(int, uintptr_t, size_t);
int wait4(int, uintptr_t, int, uintptr_t);
int ioctl(int, int, uintptr_t);
int fcntl(uintptr_t, int, uintptr_t);
+int fsync_range(int, int, long long, long long);
int acct(uintptr_t);
int chdir(uintptr_t);
int chroot(uintptr_t);
@@ -28,7 +29,6 @@ int fchmod(int, unsigned int);
int fchmodat(int, uintptr_t, unsigned int, int);
int fchownat(int, uintptr_t, int, int, int);
int fdatasync(int);
-int fsync(int);
int getpgid(int);
int getpgrp();
int getpid();
@@ -199,6 +199,14 @@ func callfcntl(fd uintptr, cmd int, arg uintptr) (r1 uintptr, e1 Errno) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func callfsync_range(fd int, how int, start int64, length int64) (r1 uintptr, e1 Errno) {
+ r1 = uintptr(C.fsync_range(C.int(fd), C.int(how), C.longlong(start), C.longlong(length)))
+ e1 = syscall.GetErrno()
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func callacct(_p0 uintptr) (r1 uintptr, e1 Errno) {
r1 = uintptr(C.acct(C.uintptr_t(_p0)))
e1 = syscall.GetErrno()
@@ -295,14 +303,6 @@ func callfdatasync(fd int) (r1 uintptr, e1 Errno) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func callfsync(fd int) (r1 uintptr, e1 Errno) {
- r1 = uintptr(C.fsync(C.int(fd)))
- e1 = syscall.GetErrno()
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func callgetpgid(pid int) (r1 uintptr, e1 Errno) {
r1 = uintptr(C.getpgid(C.int(pid)))
e1 = syscall.GetErrno()
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
index d4efe8d457ac..879376589646 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
@@ -643,17 +643,22 @@ var libc_flistxattr_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
- _, _, e1 := syscall_syscall6(libc_setattrlist_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
+func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-var libc_setattrlist_trampoline_addr uintptr
+var libc_utimensat_trampoline_addr uintptr
-//go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib"
+//go:cgo_import_dynamic libc_utimensat utimensat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -734,6 +739,65 @@ var libc_sendfile_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) {
+ r0, _, e1 := syscall_syscall(libc_shmat_trampoline_addr, uintptr(id), uintptr(addr), uintptr(flag))
+ ret = uintptr(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_shmat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shmat shmat "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) {
+ r0, _, e1 := syscall_syscall(libc_shmctl_trampoline_addr, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf)))
+ result = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_shmctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shmctl shmctl "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func shmdt(addr uintptr) (err error) {
+ _, _, e1 := syscall_syscall(libc_shmdt_trampoline_addr, uintptr(addr), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_shmdt_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shmdt shmdt "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func shmget(key int, size int, flag int) (id int, err error) {
+ r0, _, e1 := syscall_syscall(libc_shmget_trampoline_addr, uintptr(key), uintptr(size), uintptr(flag))
+ id = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_shmget_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shmget shmget "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Access(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -1639,7 +1703,7 @@ var libc_pathconf_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -1660,7 +1724,7 @@ var libc_pread_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
index bc169c2ab9ca..8da90cf0e4fa 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
@@ -228,11 +228,11 @@ TEXT libc_flistxattr_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_flistxattr_trampoline_addr(SB), RODATA, $8
DATA ·libc_flistxattr_trampoline_addr(SB)/8, $libc_flistxattr_trampoline<>(SB)
-TEXT libc_setattrlist_trampoline<>(SB),NOSPLIT,$0-0
- JMP libc_setattrlist(SB)
+TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_utimensat(SB)
-GLOBL ·libc_setattrlist_trampoline_addr(SB), RODATA, $8
-DATA ·libc_setattrlist_trampoline_addr(SB)/8, $libc_setattrlist_trampoline<>(SB)
+GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)
TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fcntl(SB)
@@ -264,6 +264,30 @@ TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8
DATA ·libc_sendfile_trampoline_addr(SB)/8, $libc_sendfile_trampoline<>(SB)
+TEXT libc_shmat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_shmat(SB)
+
+GLOBL ·libc_shmat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_shmat_trampoline_addr(SB)/8, $libc_shmat_trampoline<>(SB)
+
+TEXT libc_shmctl_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_shmctl(SB)
+
+GLOBL ·libc_shmctl_trampoline_addr(SB), RODATA, $8
+DATA ·libc_shmctl_trampoline_addr(SB)/8, $libc_shmctl_trampoline<>(SB)
+
+TEXT libc_shmdt_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_shmdt(SB)
+
+GLOBL ·libc_shmdt_trampoline_addr(SB), RODATA, $8
+DATA ·libc_shmdt_trampoline_addr(SB)/8, $libc_shmdt_trampoline<>(SB)
+
+TEXT libc_shmget_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_shmget(SB)
+
+GLOBL ·libc_shmget_trampoline_addr(SB), RODATA, $8
+DATA ·libc_shmget_trampoline_addr(SB)/8, $libc_shmget_trampoline<>(SB)
+
TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_access(SB)
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
index f2ee2bd33b93..f47eedd5a867 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
@@ -643,17 +643,22 @@ var libc_flistxattr_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
- _, _, e1 := syscall_syscall6(libc_setattrlist_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
+func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-var libc_setattrlist_trampoline_addr uintptr
+var libc_utimensat_trampoline_addr uintptr
-//go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib"
+//go:cgo_import_dynamic libc_utimensat utimensat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -734,6 +739,65 @@ var libc_sendfile_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) {
+ r0, _, e1 := syscall_syscall(libc_shmat_trampoline_addr, uintptr(id), uintptr(addr), uintptr(flag))
+ ret = uintptr(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_shmat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shmat shmat "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) {
+ r0, _, e1 := syscall_syscall(libc_shmctl_trampoline_addr, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf)))
+ result = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_shmctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shmctl shmctl "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func shmdt(addr uintptr) (err error) {
+ _, _, e1 := syscall_syscall(libc_shmdt_trampoline_addr, uintptr(addr), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_shmdt_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shmdt shmdt "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func shmget(key int, size int, flag int) (id int, err error) {
+ r0, _, e1 := syscall_syscall(libc_shmget_trampoline_addr, uintptr(key), uintptr(size), uintptr(flag))
+ id = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_shmget_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shmget shmget "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Access(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -1639,7 +1703,7 @@ var libc_pathconf_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -1660,7 +1724,7 @@ var libc_pread_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
index 33e19776db4e..4d26f7d014e0 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
@@ -228,11 +228,11 @@ TEXT libc_flistxattr_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_flistxattr_trampoline_addr(SB), RODATA, $8
DATA ·libc_flistxattr_trampoline_addr(SB)/8, $libc_flistxattr_trampoline<>(SB)
-TEXT libc_setattrlist_trampoline<>(SB),NOSPLIT,$0-0
- JMP libc_setattrlist(SB)
+TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_utimensat(SB)
-GLOBL ·libc_setattrlist_trampoline_addr(SB), RODATA, $8
-DATA ·libc_setattrlist_trampoline_addr(SB)/8, $libc_setattrlist_trampoline<>(SB)
+GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)
TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fcntl(SB)
@@ -264,6 +264,30 @@ TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8
DATA ·libc_sendfile_trampoline_addr(SB)/8, $libc_sendfile_trampoline<>(SB)
+TEXT libc_shmat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_shmat(SB)
+
+GLOBL ·libc_shmat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_shmat_trampoline_addr(SB)/8, $libc_shmat_trampoline<>(SB)
+
+TEXT libc_shmctl_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_shmctl(SB)
+
+GLOBL ·libc_shmctl_trampoline_addr(SB), RODATA, $8
+DATA ·libc_shmctl_trampoline_addr(SB)/8, $libc_shmctl_trampoline<>(SB)
+
+TEXT libc_shmdt_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_shmdt(SB)
+
+GLOBL ·libc_shmdt_trampoline_addr(SB), RODATA, $8
+DATA ·libc_shmdt_trampoline_addr(SB)/8, $libc_shmdt_trampoline<>(SB)
+
+TEXT libc_shmget_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_shmget(SB)
+
+GLOBL ·libc_shmget_trampoline_addr(SB), RODATA, $8
+DATA ·libc_shmget_trampoline_addr(SB)/8, $libc_shmget_trampoline<>(SB)
+
TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_access(SB)
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
index 3e9bddb7b224..e9d9997eeda9 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
@@ -1420,7 +1420,7 @@ func Pathconf(path string, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -1437,7 +1437,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
index c72a462b91e1..edd373b1a562 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
@@ -1420,7 +1420,7 @@ func Pathconf(path string, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -1437,7 +1437,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
index 530d5df90c0c..82e9764b2571 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
@@ -1420,7 +1420,7 @@ func Pathconf(path string, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -1437,7 +1437,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go
index 71e7df9e8558..a6479acd1fc8 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go
@@ -1420,7 +1420,7 @@ func Pathconf(path string, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -1437,7 +1437,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux.go
index 2dbe3da7a095..bc4a2753114a 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux.go
@@ -1,4 +1,4 @@
-// Code generated by mkmerge.go; DO NOT EDIT.
+// Code generated by mkmerge; DO NOT EDIT.
//go:build linux
// +build linux
@@ -110,6 +110,16 @@ func openat2(dirfd int, path string, open_how *OpenHow, size int) (fd int, err e
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func pipe2(p *[2]_C_int, flags int) (err error) {
+ _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
n = int(r0)
@@ -221,6 +231,16 @@ func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Waitid(idType int, id int, info *Siginfo, options int, rusage *Rusage) (err error) {
+ _, _, e1 := Syscall6(SYS_WAITID, uintptr(idType), uintptr(id), uintptr(unsafe.Pointer(info)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
ret = int(r0)
@@ -399,6 +419,21 @@ func mount(source string, target string, fstype string, flags uintptr, data *byt
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func mountSetattr(dirfd int, pathname string, flags uint, attr *MountAttr, size uintptr) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(pathname)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_MOUNT_SETATTR, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(unsafe.Pointer(attr)), uintptr(size), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Acct(path string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -793,6 +828,49 @@ func Fsync(fd int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Fsmount(fd int, flags int, mountAttrs int) (fsfd int, err error) {
+ r0, _, e1 := Syscall(SYS_FSMOUNT, uintptr(fd), uintptr(flags), uintptr(mountAttrs))
+ fsfd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fsopen(fsName string, flags int) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(fsName)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall(SYS_FSOPEN, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fspick(dirfd int, pathName string, flags int) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(pathName)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall(SYS_FSPICK, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Getdents(fd int, buf []byte) (n int, err error) {
var _p0 unsafe.Pointer
if len(buf) > 0 {
@@ -1170,6 +1248,26 @@ func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func MoveMount(fromDirfd int, fromPathName string, toDirfd int, toPathName string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(fromPathName)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(toPathName)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_MOVE_MOUNT, uintptr(fromDirfd), uintptr(unsafe.Pointer(_p0)), uintptr(toDirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
if e1 != 0 {
@@ -1180,6 +1278,22 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func OpenTree(dfd int, fileName string, flags uint) (r int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(fileName)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall(SYS_OPEN_TREE, uintptr(dfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
+ r = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
fd = int(r0)
@@ -1945,8 +2059,93 @@ func ProcessVMWritev(pid int, localIov []Iovec, remoteIov []RemoteIovec, flags u
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
+func PidfdOpen(pid int, flags int) (fd int, err error) {
+ r0, _, e1 := Syscall(SYS_PIDFD_OPEN, uintptr(pid), uintptr(flags), 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func PidfdGetfd(pidfd int, targetfd int, flags int) (fd int, err error) {
+ r0, _, e1 := Syscall(SYS_PIDFD_GETFD, uintptr(pidfd), uintptr(targetfd), uintptr(flags))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func PidfdSendSignal(pidfd int, sig Signal, info *Siginfo, flags int) (err error) {
+ _, _, e1 := Syscall6(SYS_PIDFD_SEND_SIGNAL, uintptr(pidfd), uintptr(sig), uintptr(unsafe.Pointer(info)), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) {
+ r0, _, e1 := Syscall(SYS_SHMAT, uintptr(id), uintptr(addr), uintptr(flag))
+ ret = uintptr(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) {
+ r0, _, e1 := Syscall(SYS_SHMCTL, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf)))
+ result = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func shmdt(addr uintptr) (err error) {
+ _, _, e1 := Syscall(SYS_SHMDT, uintptr(addr), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func shmget(key int, size int, flag int) (id int, err error) {
+ r0, _, e1 := Syscall(SYS_SHMGET, uintptr(key), uintptr(size), uintptr(flag))
+ id = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getitimer(which int, currValue *Itimerval) (err error) {
+ _, _, e1 := Syscall(SYS_GETITIMER, uintptr(which), uintptr(unsafe.Pointer(currValue)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setitimer(which int, newValue *Itimerval, oldValue *Itimerval) (err error) {
+ _, _, e1 := Syscall(SYS_SETITIMER, uintptr(which), uintptr(unsafe.Pointer(newValue)), uintptr(unsafe.Pointer(oldValue)))
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
index e37096e4decc..88af526b7e23 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
@@ -1,4 +1,4 @@
-// go run mksyscall.go -l32 -tags linux,386 syscall_linux.go syscall_linux_386.go
+// go run mksyscall.go -l32 -tags linux,386 syscall_linux.go syscall_linux_386.go syscall_linux_alarm.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && 386
@@ -46,37 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe(p *[2]_C_int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer
if len(events) > 0 {
@@ -181,17 +150,6 @@ func Getuid() (uid int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func InotifyInit() (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Ioperm(from int, num int, on int) (err error) {
_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
if e1 != 0 {
@@ -242,7 +200,7 @@ func Lstat(path string, stat *Stat_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -259,7 +217,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -569,9 +527,9 @@ func utimes(path string, times *[2]Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
+func Alarm(seconds uint) (remaining uint, err error) {
+ r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
+ remaining = uint(r0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
index 9919d8486d41..2a0c4aa6a634 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
@@ -1,4 +1,4 @@
-// go run mksyscall.go -tags linux,amd64 syscall_linux.go syscall_linux_amd64.go
+// go run mksyscall.go -tags linux,amd64 syscall_linux.go syscall_linux_amd64.go syscall_linux_alarm.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && amd64
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer
if len(events) > 0 {
@@ -191,17 +170,6 @@ func Getuid() (uid int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func inotifyInit() (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Ioperm(from int, num int, on int) (err error) {
_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
if e1 != 0 {
@@ -247,6 +215,17 @@ func Listen(s int, n int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func MemfdSecret(flags int) (fd int, err error) {
+ r0, _, e1 := Syscall(SYS_MEMFD_SECRET, uintptr(flags), 0, 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Pause() (err error) {
_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
if e1 != 0 {
@@ -257,7 +236,7 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -274,7 +253,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -476,17 +455,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
fd = int(r0)
@@ -711,19 +679,13 @@ func utimes(path string, times *[2]Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe(p *[2]_C_int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
+func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(cmdline)
+ if err != nil {
+ return
}
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
+ _, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -732,13 +694,9 @@ func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(cmdline)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+func Alarm(seconds uint) (remaining uint, err error) {
+ r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
+ remaining = uint(r0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
index 076754d48d1d..4882bde3af0f 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe(p *[2]_C_int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
fd = int(r0)
@@ -235,27 +214,6 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer
if len(events) > 0 {
@@ -340,17 +298,6 @@ func Getuid() (uid int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func InotifyInit() (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Lchown(path string, uid int, gid int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -591,7 +538,7 @@ func utimes(path string, times *[2]Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -608,7 +555,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -681,17 +628,6 @@ func setrlimit(resource int, rlim *rlimit32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func armSyncFileRange(fd int, flags int, off int64, n int64) (err error) {
_, _, e1 := Syscall6(SYS_ARM_SYNC_FILE_RANGE, uintptr(fd), uintptr(flags), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32))
if e1 != 0 {
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
index e893f987f91d..9f8c24e43438 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
@@ -180,7 +180,18 @@ func Listen(s int, n int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func MemfdSecret(flags int) (fd int, err error) {
+ r0, _, e1 := Syscall(SYS_MEMFD_SECRET, uintptr(flags), 0, 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -197,7 +208,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -389,17 +400,6 @@ func Truncate(path string, length int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
fd = int(r0)
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
index 4703cf3c3385..d7d6f42441be 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
@@ -1,4 +1,4 @@
-// go run mksyscall.go -b32 -arm -tags linux,mips syscall_linux.go syscall_linux_mipsx.go
+// go run mksyscall.go -b32 -arm -tags linux,mips syscall_linux.go syscall_linux_mipsx.go syscall_linux_alarm.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && mips
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer
if len(events) > 0 {
@@ -171,7 +150,7 @@ func Listen(s int, n int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -188,7 +167,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -365,17 +344,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
fd = int(r0)
@@ -544,17 +512,6 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func InotifyInit() (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Ioperm(from int, num int, on int) (err error) {
_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
if e1 != 0 {
@@ -706,18 +663,6 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe() (p1 int, p2 int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- p1 = int(r0)
- p2 = int(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {
r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))
xaddr = uintptr(r0)
@@ -749,9 +694,9 @@ func setrlimit(resource int, rlim *rlimit32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
+func Alarm(seconds uint) (remaining uint, err error) {
+ r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
+ remaining = uint(r0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
index a134f9a4d2e0..7f1f8e653390 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
@@ -1,4 +1,4 @@
-// go run mksyscall.go -tags linux,mips64 syscall_linux.go syscall_linux_mips64x.go
+// go run mksyscall.go -tags linux,mips64 syscall_linux.go syscall_linux_mips64x.go syscall_linux_alarm.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && mips64
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer
if len(events) > 0 {
@@ -201,7 +180,7 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -218,7 +197,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -420,17 +399,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
fd = int(r0)
@@ -720,9 +688,9 @@ func stat(path string, st *stat_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
+func Alarm(seconds uint) (remaining uint, err error) {
+ r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
+ remaining = uint(r0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
index b1fff2d946a2..f933d0f51a18 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer
if len(events) > 0 {
@@ -201,7 +180,7 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -218,7 +197,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -420,17 +399,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
fd = int(r0)
@@ -717,14 +685,3 @@ func stat(path string, st *stat_t) (err error) {
}
return
}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
index d13d6da01ef8..297d0a998220 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
@@ -1,4 +1,4 @@
-// go run mksyscall.go -l32 -arm -tags linux,mipsle syscall_linux.go syscall_linux_mipsx.go
+// go run mksyscall.go -l32 -arm -tags linux,mipsle syscall_linux.go syscall_linux_mipsx.go syscall_linux_alarm.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && mipsle
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer
if len(events) > 0 {
@@ -171,7 +150,7 @@ func Listen(s int, n int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -188,7 +167,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -365,17 +344,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
fd = int(r0)
@@ -544,17 +512,6 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func InotifyInit() (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Ioperm(from int, num int, on int) (err error) {
_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
if e1 != 0 {
@@ -706,18 +663,6 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe() (p1 int, p2 int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- p1 = int(r0)
- p2 = int(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {
r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))
xaddr = uintptr(r0)
@@ -749,9 +694,9 @@ func setrlimit(resource int, rlim *rlimit32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
+func Alarm(seconds uint) (remaining uint, err error) {
+ r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
+ remaining = uint(r0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go
index 927cf1a00f0d..2e32e7a449fd 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go
@@ -1,4 +1,4 @@
-// go run mksyscall.go -b32 -tags linux,ppc syscall_linux.go syscall_linux_ppc.go
+// go run mksyscall.go -b32 -tags linux,ppc syscall_linux.go syscall_linux_ppc.go syscall_linux_alarm.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && ppc
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer
if len(events) > 0 {
@@ -161,17 +140,6 @@ func Getuid() (uid int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func InotifyInit() (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Ioperm(from int, num int, on int) (err error) {
_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
if e1 != 0 {
@@ -242,7 +210,7 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -259,7 +227,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -441,17 +409,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
fd = int(r0)
@@ -717,27 +674,6 @@ func setrlimit(resource int, rlim *rlimit32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe(p *[2]_C_int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off>>32), uintptr(off), uintptr(n>>32), uintptr(n))
if e1 != 0 {
@@ -760,3 +696,14 @@ func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, f
}
return
}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Alarm(seconds uint) (remaining uint, err error) {
+ r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
+ remaining = uint(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
index da8ec0396665..3c531704647d 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
@@ -1,4 +1,4 @@
-// go run mksyscall.go -tags linux,ppc64 syscall_linux.go syscall_linux_ppc64x.go
+// go run mksyscall.go -tags linux,ppc64 syscall_linux.go syscall_linux_ppc64x.go syscall_linux_alarm.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && ppc64
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer
if len(events) > 0 {
@@ -191,17 +170,6 @@ func Getuid() (uid int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func InotifyInit() (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Ioperm(from int, num int, on int) (err error) {
_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
if e1 != 0 {
@@ -272,7 +240,7 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -289,7 +257,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -507,17 +475,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
fd = int(r0)
@@ -763,27 +720,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe(p *[2]_C_int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off), uintptr(n), 0, 0)
if e1 != 0 {
@@ -806,3 +742,14 @@ func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, f
}
return
}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Alarm(seconds uint) (remaining uint, err error) {
+ r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
+ remaining = uint(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
index 083f493bb6f4..a00c6744ecbd 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
@@ -1,4 +1,4 @@
-// go run mksyscall.go -tags linux,ppc64le syscall_linux.go syscall_linux_ppc64x.go
+// go run mksyscall.go -tags linux,ppc64le syscall_linux.go syscall_linux_ppc64x.go syscall_linux_alarm.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && ppc64le
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer
if len(events) > 0 {
@@ -191,17 +170,6 @@ func Getuid() (uid int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func InotifyInit() (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Ioperm(from int, num int, on int) (err error) {
_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
if e1 != 0 {
@@ -272,7 +240,7 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -289,7 +257,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -507,17 +475,6 @@ func Ustat(dev int, ubuf *Ustat_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
fd = int(r0)
@@ -763,27 +720,6 @@ func utimes(path string, times *[2]Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe(p *[2]_C_int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off), uintptr(n), 0, 0)
if e1 != 0 {
@@ -806,3 +742,14 @@ func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, f
}
return
}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Alarm(seconds uint) (remaining uint, err error) {
+ r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
+ remaining = uint(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
index 63b393b8027d..a1a9bcbbdf61 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
@@ -180,7 +180,7 @@ func Listen(s int, n int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -197,7 +197,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -369,17 +369,6 @@ func Truncate(path string, length int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
fd = int(r0)
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
index bb347407d3d4..e0dabc60278d 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
@@ -1,4 +1,4 @@
-// go run mksyscall.go -tags linux,s390x syscall_linux.go syscall_linux_s390x.go
+// go run mksyscall.go -tags linux,s390x syscall_linux.go syscall_linux_s390x.go syscall_linux_alarm.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && s390x
@@ -46,27 +46,6 @@ func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func EpollCreate(size int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer
if len(events) > 0 {
@@ -191,17 +170,6 @@ func Getuid() (uid int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func InotifyInit() (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Lchown(path string, uid int, gid int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -242,7 +210,7 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -259,7 +227,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -553,9 +521,13 @@ func utimes(path string, times *[2]Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
+func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(cmdline)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -564,13 +536,9 @@ func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
- var _p0 *byte
- _p0, err = BytePtrFromString(cmdline)
- if err != nil {
- return
- }
- _, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+func Alarm(seconds uint) (remaining uint, err error) {
+ r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
+ remaining = uint(r0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
index 8edc517e1e65..368623c0f2e9 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
@@ -1,4 +1,4 @@
-// go run mksyscall.go -tags linux,sparc64 syscall_linux.go syscall_linux_sparc64.go
+// go run mksyscall.go -tags linux,sparc64 syscall_linux.go syscall_linux_sparc64.go syscall_linux_alarm.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build linux && sparc64
@@ -73,16 +73,6 @@ func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func dup2(oldfd int, newfd int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Fchown(fd int, uid int, gid int) (err error) {
_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
if e1 != 0 {
@@ -180,17 +170,6 @@ func Getuid() (uid int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func InotifyInit() (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Lchown(path string, uid int, gid int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -241,7 +220,7 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -258,7 +237,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -476,17 +455,6 @@ func Truncate(path string, length int64) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
- fd = int(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
fd = int(r0)
@@ -721,19 +689,9 @@ func utimes(path string, times *[2]Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe(p *[2]_C_int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
- n = int(r0)
+func Alarm(seconds uint) (remaining uint, err error) {
+ r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
+ remaining = uint(r0)
if e1 != 0 {
err = errnoErr(e1)
}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
index 4726ab30a8fa..4af561a48d8c 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
@@ -351,18 +351,6 @@ func Munlockall() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe() (fd1 int, fd2 int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- fd1 = int(r0)
- fd2 = int(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func pipe2(p *[2]_C_int, flags int) (err error) {
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
if e1 != 0 {
@@ -1342,7 +1330,7 @@ func Pathconf(path string, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -1359,7 +1347,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
index fe71456dbc0f..3b90e9448add 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
@@ -351,18 +351,6 @@ func Munlockall() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe() (fd1 int, fd2 int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- fd1 = int(r0)
- fd2 = int(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func pipe2(p *[2]_C_int, flags int) (err error) {
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
if e1 != 0 {
@@ -1342,7 +1330,7 @@ func Pathconf(path string, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -1359,7 +1347,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
index 0b5b2f0143be..890f4ccd131c 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
@@ -351,18 +351,6 @@ func Munlockall() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe() (fd1 int, fd2 int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- fd1 = int(r0)
- fd2 = int(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func pipe2(p *[2]_C_int, flags int) (err error) {
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
if e1 != 0 {
@@ -1342,7 +1330,7 @@ func Pathconf(path string, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -1359,7 +1347,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go
index bfca28648fb5..c79f071fc6a8 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go
@@ -351,18 +351,6 @@ func Munlockall() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func pipe() (fd1 int, fd2 int, err error) {
- r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
- fd1 = int(r0)
- fd2 = int(r1)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func pipe2(p *[2]_C_int, flags int) (err error) {
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
if e1 != 0 {
@@ -1342,7 +1330,7 @@ func Pathconf(path string, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -1359,7 +1347,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
index 8f80f4ade511..a057fc5d3511 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
@@ -1128,7 +1128,7 @@ func Pathconf(path string, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -1145,7 +1145,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
index 3a47aca7bf70..04db8fa2fea8 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
@@ -1128,7 +1128,7 @@ func Pathconf(path string, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -1145,7 +1145,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
index 883a9b45e8e2..69f80300674b 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
@@ -1128,7 +1128,7 @@ func Pathconf(path string, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -1145,7 +1145,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
index aac7fdc95e28..c96a505178f9 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
@@ -1128,7 +1128,7 @@ func Pathconf(path string, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -1145,7 +1145,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go
index 8776187462b7..016d959bc664 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go
@@ -1128,7 +1128,7 @@ func Pathconf(path string, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -1145,7 +1145,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
index b5f926cee2a9..d12f4fbfea5f 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
@@ -227,8 +227,8 @@ import (
//go:linkname procOpenat libc_openat
//go:linkname procPathconf libc_pathconf
//go:linkname procPause libc_pause
-//go:linkname procPread libc_pread
-//go:linkname procPwrite libc_pwrite
+//go:linkname procpread libc_pread
+//go:linkname procpwrite libc_pwrite
//go:linkname procread libc_read
//go:linkname procReadlink libc_readlink
//go:linkname procRename libc_rename
@@ -364,8 +364,8 @@ var (
procOpenat,
procPathconf,
procPause,
- procPread,
- procPwrite,
+ procpread,
+ procpwrite,
procread,
procReadlink,
procRename,
@@ -1380,12 +1380,12 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 *byte
if len(p) > 0 {
_p0 = &p[0]
}
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPread)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)
+ r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procpread)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)
n = int(r0)
if e1 != 0 {
err = e1
@@ -1395,12 +1395,12 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 *byte
if len(p) > 0 {
_p0 = &p[0]
}
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPwrite)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)
+ r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procpwrite)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)
n = int(r0)
if e1 != 0 {
err = e1
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
index aa7ce85d1550..62192e1de2a7 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
@@ -444,4 +444,7 @@ const (
SYS_LANDLOCK_ADD_RULE = 445
SYS_LANDLOCK_RESTRICT_SELF = 446
SYS_MEMFD_SECRET = 447
+ SYS_PROCESS_MRELEASE = 448
+ SYS_FUTEX_WAITV = 449
+ SYS_SET_MEMPOLICY_HOME_NODE = 450
)
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
index b830326386cd..490aab5d215e 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
@@ -366,4 +366,7 @@ const (
SYS_LANDLOCK_ADD_RULE = 445
SYS_LANDLOCK_RESTRICT_SELF = 446
SYS_MEMFD_SECRET = 447
+ SYS_PROCESS_MRELEASE = 448
+ SYS_FUTEX_WAITV = 449
+ SYS_SET_MEMPOLICY_HOME_NODE = 450
)
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
index d75f65a0aa70..aca17b6fad41 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
@@ -7,6 +7,7 @@
package unix
const (
+ SYS_SYSCALL_MASK = 0
SYS_RESTART_SYSCALL = 0
SYS_EXIT = 1
SYS_FORK = 2
@@ -407,4 +408,7 @@ const (
SYS_LANDLOCK_CREATE_RULESET = 444
SYS_LANDLOCK_ADD_RULE = 445
SYS_LANDLOCK_RESTRICT_SELF = 446
+ SYS_PROCESS_MRELEASE = 448
+ SYS_FUTEX_WAITV = 449
+ SYS_SET_MEMPOLICY_HOME_NODE = 450
)
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
index 8b02f09e9b5c..54b4dfa547f1 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
@@ -311,4 +311,7 @@ const (
SYS_LANDLOCK_ADD_RULE = 445
SYS_LANDLOCK_RESTRICT_SELF = 446
SYS_MEMFD_SECRET = 447
+ SYS_PROCESS_MRELEASE = 448
+ SYS_FUTEX_WAITV = 449
+ SYS_SET_MEMPOLICY_HOME_NODE = 450
)
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
index 026695abb1a7..65a99efc236b 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
@@ -428,4 +428,7 @@ const (
SYS_LANDLOCK_CREATE_RULESET = 4444
SYS_LANDLOCK_ADD_RULE = 4445
SYS_LANDLOCK_RESTRICT_SELF = 4446
+ SYS_PROCESS_MRELEASE = 4448
+ SYS_FUTEX_WAITV = 4449
+ SYS_SET_MEMPOLICY_HOME_NODE = 4450
)
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
index 7320ba95833a..841c8a668206 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
@@ -358,4 +358,7 @@ const (
SYS_LANDLOCK_CREATE_RULESET = 5444
SYS_LANDLOCK_ADD_RULE = 5445
SYS_LANDLOCK_RESTRICT_SELF = 5446
+ SYS_PROCESS_MRELEASE = 5448
+ SYS_FUTEX_WAITV = 5449
+ SYS_SET_MEMPOLICY_HOME_NODE = 5450
)
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
index 45082dd67fff..e26a7c7658e9 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
@@ -358,4 +358,7 @@ const (
SYS_LANDLOCK_CREATE_RULESET = 5444
SYS_LANDLOCK_ADD_RULE = 5445
SYS_LANDLOCK_RESTRICT_SELF = 5446
+ SYS_PROCESS_MRELEASE = 5448
+ SYS_FUTEX_WAITV = 5449
+ SYS_SET_MEMPOLICY_HOME_NODE = 5450
)
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
index 570a857a56ea..26447260a9ef 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
@@ -428,4 +428,7 @@ const (
SYS_LANDLOCK_CREATE_RULESET = 4444
SYS_LANDLOCK_ADD_RULE = 4445
SYS_LANDLOCK_RESTRICT_SELF = 4446
+ SYS_PROCESS_MRELEASE = 4448
+ SYS_FUTEX_WAITV = 4449
+ SYS_SET_MEMPOLICY_HOME_NODE = 4450
)
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
index 638498d62e22..26aefc1869ae 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
@@ -435,4 +435,7 @@ const (
SYS_LANDLOCK_CREATE_RULESET = 444
SYS_LANDLOCK_ADD_RULE = 445
SYS_LANDLOCK_RESTRICT_SELF = 446
+ SYS_PROCESS_MRELEASE = 448
+ SYS_FUTEX_WAITV = 449
+ SYS_SET_MEMPOLICY_HOME_NODE = 450
)
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
index 702beebfefe2..8d4cd9d99d48 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
@@ -407,4 +407,7 @@ const (
SYS_LANDLOCK_CREATE_RULESET = 444
SYS_LANDLOCK_ADD_RULE = 445
SYS_LANDLOCK_RESTRICT_SELF = 446
+ SYS_PROCESS_MRELEASE = 448
+ SYS_FUTEX_WAITV = 449
+ SYS_SET_MEMPOLICY_HOME_NODE = 450
)
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
index bfc87ea44439..3b405d1f82a8 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
@@ -407,4 +407,7 @@ const (
SYS_LANDLOCK_CREATE_RULESET = 444
SYS_LANDLOCK_ADD_RULE = 445
SYS_LANDLOCK_RESTRICT_SELF = 446
+ SYS_PROCESS_MRELEASE = 448
+ SYS_FUTEX_WAITV = 449
+ SYS_SET_MEMPOLICY_HOME_NODE = 450
)
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
index a390e147d3c2..c3a5af8623b8 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
@@ -309,4 +309,7 @@ const (
SYS_LANDLOCK_CREATE_RULESET = 444
SYS_LANDLOCK_ADD_RULE = 445
SYS_LANDLOCK_RESTRICT_SELF = 446
+ SYS_PROCESS_MRELEASE = 448
+ SYS_FUTEX_WAITV = 449
+ SYS_SET_MEMPOLICY_HOME_NODE = 450
)
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
index 3e791e6cd228..8ffa66469ef9 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
@@ -372,4 +372,7 @@ const (
SYS_LANDLOCK_CREATE_RULESET = 444
SYS_LANDLOCK_ADD_RULE = 445
SYS_LANDLOCK_RESTRICT_SELF = 446
+ SYS_PROCESS_MRELEASE = 448
+ SYS_FUTEX_WAITV = 449
+ SYS_SET_MEMPOLICY_HOME_NODE = 450
)
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
index 78802a5cf7cd..6a39640e76da 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
@@ -386,4 +386,7 @@ const (
SYS_LANDLOCK_CREATE_RULESET = 444
SYS_LANDLOCK_ADD_RULE = 445
SYS_LANDLOCK_RESTRICT_SELF = 446
+ SYS_PROCESS_MRELEASE = 448
+ SYS_FUTEX_WAITV = 449
+ SYS_SET_MEMPOLICY_HOME_NODE = 450
)
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
index 4c8dc0ba2e1f..885842c0eb40 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
@@ -209,6 +209,92 @@ type RawSockaddrCtl struct {
Sc_reserved [5]uint32
}
+type RawSockaddrVM struct {
+ Len uint8
+ Family uint8
+ Reserved1 uint16
+ Port uint32
+ Cid uint32
+}
+
+type XVSockPCB struct {
+ Xv_len uint32
+ Xv_vsockpp uint64
+ Xvp_local_cid uint32
+ Xvp_local_port uint32
+ Xvp_remote_cid uint32
+ Xvp_remote_port uint32
+ Xvp_rxcnt uint32
+ Xvp_txcnt uint32
+ Xvp_peer_rxhiwat uint32
+ Xvp_peer_rxcnt uint32
+ Xvp_last_pid int32
+ Xvp_gencnt uint64
+ Xv_socket XSocket
+ _ [4]byte
+}
+
+type XSocket struct {
+ Xso_len uint32
+ Xso_so uint32
+ So_type int16
+ So_options int16
+ So_linger int16
+ So_state int16
+ So_pcb uint32
+ Xso_protocol int32
+ Xso_family int32
+ So_qlen int16
+ So_incqlen int16
+ So_qlimit int16
+ So_timeo int16
+ So_error uint16
+ So_pgid int32
+ So_oobmark uint32
+ So_rcv XSockbuf
+ So_snd XSockbuf
+ So_uid uint32
+}
+
+type XSocket64 struct {
+ Xso_len uint32
+ _ [8]byte
+ So_type int16
+ So_options int16
+ So_linger int16
+ So_state int16
+ _ [8]byte
+ Xso_protocol int32
+ Xso_family int32
+ So_qlen int16
+ So_incqlen int16
+ So_qlimit int16
+ So_timeo int16
+ So_error uint16
+ So_pgid int32
+ So_oobmark uint32
+ So_rcv XSockbuf
+ So_snd XSockbuf
+ So_uid uint32
+}
+
+type XSockbuf struct {
+ Cc uint32
+ Hiwat uint32
+ Mbcnt uint32
+ Mbmax uint32
+ Lowat int32
+ Flags int16
+ Timeo int16
+}
+
+type XVSockPgen struct {
+ Len uint32
+ Count uint64
+ Gen uint64
+ Sogen uint64
+}
+
type _Socklen uint32
type Xucred struct {
@@ -287,6 +373,11 @@ const (
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x14
SizeofSockaddrCtl = 0x20
+ SizeofSockaddrVM = 0xc
+ SizeofXvsockpcb = 0xa8
+ SizeofXSocket = 0x64
+ SizeofXSockbuf = 0x18
+ SizeofXVSockPgen = 0x20
SizeofXucred = 0x4c
SizeofLinger = 0x8
SizeofIovec = 0x10
@@ -550,13 +641,13 @@ type Eproc struct {
Tdev int32
Tpgid int32
Tsess uintptr
- Wmesg [8]int8
+ Wmesg [8]byte
Xsize int32
Xrssize int16
Xccount int16
Xswrss int16
Flag int32
- Login [12]int8
+ Login [12]byte
Spare [4]int32
_ [4]byte
}
@@ -597,7 +688,7 @@ type ExternProc struct {
P_priority uint8
P_usrpri uint8
P_nice int8
- P_comm [17]int8
+ P_comm [17]byte
P_pgrp uintptr
P_addr uintptr
P_xstat uint16
@@ -639,3 +730,39 @@ type Ucred struct {
Ngroups int16
Groups [16]uint32
}
+
+type SysvIpcPerm struct {
+ Uid uint32
+ Gid uint32
+ Cuid uint32
+ Cgid uint32
+ Mode uint16
+ _ uint16
+ _ int32
+}
+type SysvShmDesc struct {
+ Perm SysvIpcPerm
+ Segsz uint64
+ Lpid int32
+ Cpid int32
+ Nattch uint16
+ _ [34]byte
+}
+
+const (
+ IPC_CREAT = 0x200
+ IPC_EXCL = 0x400
+ IPC_NOWAIT = 0x800
+ IPC_PRIVATE = 0x0
+)
+
+const (
+ IPC_RMID = 0x0
+ IPC_SET = 0x1
+ IPC_STAT = 0x2
+)
+
+const (
+ SHM_RDONLY = 0x1000
+ SHM_RND = 0x2000
+)
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
index 96f0e6ae2a2a..b23c02337db3 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
@@ -209,6 +209,92 @@ type RawSockaddrCtl struct {
Sc_reserved [5]uint32
}
+type RawSockaddrVM struct {
+ Len uint8
+ Family uint8
+ Reserved1 uint16
+ Port uint32
+ Cid uint32
+}
+
+type XVSockPCB struct {
+ Xv_len uint32
+ Xv_vsockpp uint64
+ Xvp_local_cid uint32
+ Xvp_local_port uint32
+ Xvp_remote_cid uint32
+ Xvp_remote_port uint32
+ Xvp_rxcnt uint32
+ Xvp_txcnt uint32
+ Xvp_peer_rxhiwat uint32
+ Xvp_peer_rxcnt uint32
+ Xvp_last_pid int32
+ Xvp_gencnt uint64
+ Xv_socket XSocket
+ _ [4]byte
+}
+
+type XSocket struct {
+ Xso_len uint32
+ Xso_so uint32
+ So_type int16
+ So_options int16
+ So_linger int16
+ So_state int16
+ So_pcb uint32
+ Xso_protocol int32
+ Xso_family int32
+ So_qlen int16
+ So_incqlen int16
+ So_qlimit int16
+ So_timeo int16
+ So_error uint16
+ So_pgid int32
+ So_oobmark uint32
+ So_rcv XSockbuf
+ So_snd XSockbuf
+ So_uid uint32
+}
+
+type XSocket64 struct {
+ Xso_len uint32
+ _ [8]byte
+ So_type int16
+ So_options int16
+ So_linger int16
+ So_state int16
+ _ [8]byte
+ Xso_protocol int32
+ Xso_family int32
+ So_qlen int16
+ So_incqlen int16
+ So_qlimit int16
+ So_timeo int16
+ So_error uint16
+ So_pgid int32
+ So_oobmark uint32
+ So_rcv XSockbuf
+ So_snd XSockbuf
+ So_uid uint32
+}
+
+type XSockbuf struct {
+ Cc uint32
+ Hiwat uint32
+ Mbcnt uint32
+ Mbmax uint32
+ Lowat int32
+ Flags int16
+ Timeo int16
+}
+
+type XVSockPgen struct {
+ Len uint32
+ Count uint64
+ Gen uint64
+ Sogen uint64
+}
+
type _Socklen uint32
type Xucred struct {
@@ -287,6 +373,11 @@ const (
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x14
SizeofSockaddrCtl = 0x20
+ SizeofSockaddrVM = 0xc
+ SizeofXvsockpcb = 0xa8
+ SizeofXSocket = 0x64
+ SizeofXSockbuf = 0x18
+ SizeofXVSockPgen = 0x20
SizeofXucred = 0x4c
SizeofLinger = 0x8
SizeofIovec = 0x10
@@ -550,13 +641,13 @@ type Eproc struct {
Tdev int32
Tpgid int32
Tsess uintptr
- Wmesg [8]int8
+ Wmesg [8]byte
Xsize int32
Xrssize int16
Xccount int16
Xswrss int16
Flag int32
- Login [12]int8
+ Login [12]byte
Spare [4]int32
_ [4]byte
}
@@ -597,7 +688,7 @@ type ExternProc struct {
P_priority uint8
P_usrpri uint8
P_nice int8
- P_comm [17]int8
+ P_comm [17]byte
P_pgrp uintptr
P_addr uintptr
P_xstat uint16
@@ -639,3 +730,39 @@ type Ucred struct {
Ngroups int16
Groups [16]uint32
}
+
+type SysvIpcPerm struct {
+ Uid uint32
+ Gid uint32
+ Cuid uint32
+ Cgid uint32
+ Mode uint16
+ _ uint16
+ _ int32
+}
+type SysvShmDesc struct {
+ Perm SysvIpcPerm
+ Segsz uint64
+ Lpid int32
+ Cpid int32
+ Nattch uint16
+ _ [34]byte
+}
+
+const (
+ IPC_CREAT = 0x200
+ IPC_EXCL = 0x400
+ IPC_NOWAIT = 0x800
+ IPC_PRIVATE = 0x0
+)
+
+const (
+ IPC_RMID = 0x0
+ IPC_SET = 0x1
+ IPC_STAT = 0x2
+)
+
+const (
+ SHM_RDONLY = 0x1000
+ SHM_RND = 0x2000
+)
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
index 1f99c024afd8..4eec078e5249 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
@@ -31,6 +31,8 @@ type Timeval struct {
Usec int32
}
+type Time_t int32
+
type Rusage struct {
Utime Timeval
Stime Timeval
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
index ddf0305a5d10..7622904a532f 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
@@ -31,6 +31,8 @@ type Timeval struct {
Usec int64
}
+type Time_t int64
+
type Rusage struct {
Utime Timeval
Stime Timeval
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
index dce0a5c80c57..19223ce8ecf9 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
@@ -33,6 +33,8 @@ type Timeval struct {
_ [4]byte
}
+type Time_t int32
+
type Rusage struct {
Utime Timeval
Stime Timeval
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
index e232447025e6..8e3e33f67905 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
@@ -31,6 +31,8 @@ type Timeval struct {
Usec int64
}
+type Time_t int64
+
type Rusage struct {
Utime Timeval
Stime Timeval
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_illumos_amd64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_illumos_amd64.go
index 236f37ef6f7e..4c485261d6df 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_illumos_amd64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_illumos_amd64.go
@@ -13,6 +13,8 @@ const (
I_STR = 0x5308
I_POP = 0x5303
I_PUSH = 0x5302
+ I_LINK = 0x530c
+ I_UNLINK = 0x530d
I_PLINK = 0x5316
I_PUNLINK = 0x5317
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux.go
index 4b73bb3b6386..9962d26bb30c 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux.go
@@ -1,4 +1,4 @@
-// Code generated by mkmerge.go; DO NOT EDIT.
+// Code generated by mkmerge; DO NOT EDIT.
//go:build linux
// +build linux
@@ -24,6 +24,11 @@ type ItimerSpec struct {
Value Timespec
}
+type Itimerval struct {
+ Interval Timeval
+ Value Timeval
+}
+
const (
TIME_OK = 0x0
TIME_INS = 0x1
@@ -743,10 +748,31 @@ const (
AT_STATX_FORCE_SYNC = 0x2000
AT_STATX_DONT_SYNC = 0x4000
+ AT_RECURSIVE = 0x8000
+
AT_SYMLINK_FOLLOW = 0x400
AT_SYMLINK_NOFOLLOW = 0x100
AT_EACCESS = 0x200
+
+ OPEN_TREE_CLONE = 0x1
+
+ MOVE_MOUNT_F_SYMLINKS = 0x1
+ MOVE_MOUNT_F_AUTOMOUNTS = 0x2
+ MOVE_MOUNT_F_EMPTY_PATH = 0x4
+ MOVE_MOUNT_T_SYMLINKS = 0x10
+ MOVE_MOUNT_T_AUTOMOUNTS = 0x20
+ MOVE_MOUNT_T_EMPTY_PATH = 0x40
+ MOVE_MOUNT_SET_GROUP = 0x100
+
+ FSOPEN_CLOEXEC = 0x1
+
+ FSPICK_CLOEXEC = 0x1
+ FSPICK_SYMLINK_NOFOLLOW = 0x2
+ FSPICK_NO_AUTOMOUNT = 0x4
+ FSPICK_EMPTY_PATH = 0x8
+
+ FSMOUNT_CLOEXEC = 0x1
)
type OpenHow struct {
@@ -865,6 +891,7 @@ const (
CTRL_CMD_NEWMCAST_GRP = 0x7
CTRL_CMD_DELMCAST_GRP = 0x8
CTRL_CMD_GETMCAST_GRP = 0x9
+ CTRL_CMD_GETPOLICY = 0xa
CTRL_ATTR_UNSPEC = 0x0
CTRL_ATTR_FAMILY_ID = 0x1
CTRL_ATTR_FAMILY_NAME = 0x2
@@ -873,12 +900,19 @@ const (
CTRL_ATTR_MAXATTR = 0x5
CTRL_ATTR_OPS = 0x6
CTRL_ATTR_MCAST_GROUPS = 0x7
+ CTRL_ATTR_POLICY = 0x8
+ CTRL_ATTR_OP_POLICY = 0x9
+ CTRL_ATTR_OP = 0xa
CTRL_ATTR_OP_UNSPEC = 0x0
CTRL_ATTR_OP_ID = 0x1
CTRL_ATTR_OP_FLAGS = 0x2
CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
CTRL_ATTR_MCAST_GRP_NAME = 0x1
CTRL_ATTR_MCAST_GRP_ID = 0x2
+ CTRL_ATTR_POLICY_UNSPEC = 0x0
+ CTRL_ATTR_POLICY_DO = 0x1
+ CTRL_ATTR_POLICY_DUMP = 0x2
+ CTRL_ATTR_POLICY_DUMP_MAX = 0x2
)
const (
@@ -1134,7 +1168,8 @@ const (
PERF_RECORD_BPF_EVENT = 0x12
PERF_RECORD_CGROUP = 0x13
PERF_RECORD_TEXT_POKE = 0x14
- PERF_RECORD_MAX = 0x15
+ PERF_RECORD_AUX_OUTPUT_HW_ID = 0x15
+ PERF_RECORD_MAX = 0x16
PERF_RECORD_KSYMBOL_TYPE_UNKNOWN = 0x0
PERF_RECORD_KSYMBOL_TYPE_BPF = 0x1
PERF_RECORD_KSYMBOL_TYPE_OOL = 0x2
@@ -1774,7 +1809,8 @@ const (
const (
NF_NETDEV_INGRESS = 0x0
- NF_NETDEV_NUMHOOKS = 0x1
+ NF_NETDEV_EGRESS = 0x1
+ NF_NETDEV_NUMHOOKS = 0x2
)
const (
@@ -3156,7 +3192,13 @@ const (
DEVLINK_ATTR_RELOAD_ACTION_INFO = 0xa2
DEVLINK_ATTR_RELOAD_ACTION_STATS = 0xa3
DEVLINK_ATTR_PORT_PCI_SF_NUMBER = 0xa4
- DEVLINK_ATTR_MAX = 0xa9
+ DEVLINK_ATTR_RATE_TYPE = 0xa5
+ DEVLINK_ATTR_RATE_TX_SHARE = 0xa6
+ DEVLINK_ATTR_RATE_TX_MAX = 0xa7
+ DEVLINK_ATTR_RATE_NODE_NAME = 0xa8
+ DEVLINK_ATTR_RATE_PARENT_NODE_NAME = 0xa9
+ DEVLINK_ATTR_REGION_MAX_SNAPSHOTS = 0xaa
+ DEVLINK_ATTR_MAX = 0xaa
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_NONE = 0x0
DEVLINK_DPIPE_FIELD_MAPPING_TYPE_IFINDEX = 0x1
DEVLINK_DPIPE_MATCH_TYPE_FIELD_EXACT = 0x0
@@ -3264,7 +3306,8 @@ const (
LWTUNNEL_ENCAP_BPF = 0x6
LWTUNNEL_ENCAP_SEG6_LOCAL = 0x7
LWTUNNEL_ENCAP_RPL = 0x8
- LWTUNNEL_ENCAP_MAX = 0x8
+ LWTUNNEL_ENCAP_IOAM6 = 0x9
+ LWTUNNEL_ENCAP_MAX = 0x9
MPLS_IPTUNNEL_UNSPEC = 0x0
MPLS_IPTUNNEL_DST = 0x1
@@ -3452,7 +3495,14 @@ const (
ETHTOOL_MSG_CABLE_TEST_ACT = 0x1a
ETHTOOL_MSG_CABLE_TEST_TDR_ACT = 0x1b
ETHTOOL_MSG_TUNNEL_INFO_GET = 0x1c
- ETHTOOL_MSG_USER_MAX = 0x21
+ ETHTOOL_MSG_FEC_GET = 0x1d
+ ETHTOOL_MSG_FEC_SET = 0x1e
+ ETHTOOL_MSG_MODULE_EEPROM_GET = 0x1f
+ ETHTOOL_MSG_STATS_GET = 0x20
+ ETHTOOL_MSG_PHC_VCLOCKS_GET = 0x21
+ ETHTOOL_MSG_MODULE_GET = 0x22
+ ETHTOOL_MSG_MODULE_SET = 0x23
+ ETHTOOL_MSG_USER_MAX = 0x23
ETHTOOL_MSG_KERNEL_NONE = 0x0
ETHTOOL_MSG_STRSET_GET_REPLY = 0x1
ETHTOOL_MSG_LINKINFO_GET_REPLY = 0x2
@@ -3483,7 +3533,14 @@ const (
ETHTOOL_MSG_CABLE_TEST_NTF = 0x1b
ETHTOOL_MSG_CABLE_TEST_TDR_NTF = 0x1c
ETHTOOL_MSG_TUNNEL_INFO_GET_REPLY = 0x1d
- ETHTOOL_MSG_KERNEL_MAX = 0x22
+ ETHTOOL_MSG_FEC_GET_REPLY = 0x1e
+ ETHTOOL_MSG_FEC_NTF = 0x1f
+ ETHTOOL_MSG_MODULE_EEPROM_GET_REPLY = 0x20
+ ETHTOOL_MSG_STATS_GET_REPLY = 0x21
+ ETHTOOL_MSG_PHC_VCLOCKS_GET_REPLY = 0x22
+ ETHTOOL_MSG_MODULE_GET_REPLY = 0x23
+ ETHTOOL_MSG_MODULE_NTF = 0x24
+ ETHTOOL_MSG_KERNEL_MAX = 0x24
ETHTOOL_A_HEADER_UNSPEC = 0x0
ETHTOOL_A_HEADER_DEV_INDEX = 0x1
ETHTOOL_A_HEADER_DEV_NAME = 0x2
@@ -3581,7 +3638,7 @@ const (
ETHTOOL_A_RINGS_RX_MINI = 0x7
ETHTOOL_A_RINGS_RX_JUMBO = 0x8
ETHTOOL_A_RINGS_TX = 0x9
- ETHTOOL_A_RINGS_MAX = 0x9
+ ETHTOOL_A_RINGS_MAX = 0xa
ETHTOOL_A_CHANNELS_UNSPEC = 0x0
ETHTOOL_A_CHANNELS_HEADER = 0x1
ETHTOOL_A_CHANNELS_RX_MAX = 0x2
@@ -3617,7 +3674,9 @@ const (
ETHTOOL_A_COALESCE_TX_USECS_HIGH = 0x15
ETHTOOL_A_COALESCE_TX_MAX_FRAMES_HIGH = 0x16
ETHTOOL_A_COALESCE_RATE_SAMPLE_INTERVAL = 0x17
- ETHTOOL_A_COALESCE_MAX = 0x17
+ ETHTOOL_A_COALESCE_USE_CQE_MODE_TX = 0x18
+ ETHTOOL_A_COALESCE_USE_CQE_MODE_RX = 0x19
+ ETHTOOL_A_COALESCE_MAX = 0x19
ETHTOOL_A_PAUSE_UNSPEC = 0x0
ETHTOOL_A_PAUSE_HEADER = 0x1
ETHTOOL_A_PAUSE_AUTONEG = 0x2
@@ -3731,6 +3790,8 @@ const (
ETHTOOL_A_TUNNEL_INFO_MAX = 0x2
)
+const SPEED_UNKNOWN = -0x1
+
type EthtoolDrvinfo struct {
Cmd uint32
Driver [32]byte
@@ -3923,3 +3984,1607 @@ const (
NFC_SDP_ATTR_URI = 0x1
NFC_SDP_ATTR_SAP = 0x2
)
+
+type LandlockRulesetAttr struct {
+ Access_fs uint64
+}
+
+type LandlockPathBeneathAttr struct {
+ Allowed_access uint64
+ Parent_fd int32
+}
+
+const (
+ LANDLOCK_RULE_PATH_BENEATH = 0x1
+)
+
+const (
+ IPC_CREAT = 0x200
+ IPC_EXCL = 0x400
+ IPC_NOWAIT = 0x800
+ IPC_PRIVATE = 0x0
+
+ ipc_64 = 0x100
+)
+
+const (
+ IPC_RMID = 0x0
+ IPC_SET = 0x1
+ IPC_STAT = 0x2
+)
+
+const (
+ SHM_RDONLY = 0x1000
+ SHM_RND = 0x2000
+)
+
+type MountAttr struct {
+ Attr_set uint64
+ Attr_clr uint64
+ Propagation uint64
+ Userns_fd uint64
+}
+
+const (
+ WG_CMD_GET_DEVICE = 0x0
+ WG_CMD_SET_DEVICE = 0x1
+ WGDEVICE_F_REPLACE_PEERS = 0x1
+ WGDEVICE_A_UNSPEC = 0x0
+ WGDEVICE_A_IFINDEX = 0x1
+ WGDEVICE_A_IFNAME = 0x2
+ WGDEVICE_A_PRIVATE_KEY = 0x3
+ WGDEVICE_A_PUBLIC_KEY = 0x4
+ WGDEVICE_A_FLAGS = 0x5
+ WGDEVICE_A_LISTEN_PORT = 0x6
+ WGDEVICE_A_FWMARK = 0x7
+ WGDEVICE_A_PEERS = 0x8
+ WGPEER_F_REMOVE_ME = 0x1
+ WGPEER_F_REPLACE_ALLOWEDIPS = 0x2
+ WGPEER_F_UPDATE_ONLY = 0x4
+ WGPEER_A_UNSPEC = 0x0
+ WGPEER_A_PUBLIC_KEY = 0x1
+ WGPEER_A_PRESHARED_KEY = 0x2
+ WGPEER_A_FLAGS = 0x3
+ WGPEER_A_ENDPOINT = 0x4
+ WGPEER_A_PERSISTENT_KEEPALIVE_INTERVAL = 0x5
+ WGPEER_A_LAST_HANDSHAKE_TIME = 0x6
+ WGPEER_A_RX_BYTES = 0x7
+ WGPEER_A_TX_BYTES = 0x8
+ WGPEER_A_ALLOWEDIPS = 0x9
+ WGPEER_A_PROTOCOL_VERSION = 0xa
+ WGALLOWEDIP_A_UNSPEC = 0x0
+ WGALLOWEDIP_A_FAMILY = 0x1
+ WGALLOWEDIP_A_IPADDR = 0x2
+ WGALLOWEDIP_A_CIDR_MASK = 0x3
+)
+
+const (
+ NL_ATTR_TYPE_INVALID = 0x0
+ NL_ATTR_TYPE_FLAG = 0x1
+ NL_ATTR_TYPE_U8 = 0x2
+ NL_ATTR_TYPE_U16 = 0x3
+ NL_ATTR_TYPE_U32 = 0x4
+ NL_ATTR_TYPE_U64 = 0x5
+ NL_ATTR_TYPE_S8 = 0x6
+ NL_ATTR_TYPE_S16 = 0x7
+ NL_ATTR_TYPE_S32 = 0x8
+ NL_ATTR_TYPE_S64 = 0x9
+ NL_ATTR_TYPE_BINARY = 0xa
+ NL_ATTR_TYPE_STRING = 0xb
+ NL_ATTR_TYPE_NUL_STRING = 0xc
+ NL_ATTR_TYPE_NESTED = 0xd
+ NL_ATTR_TYPE_NESTED_ARRAY = 0xe
+ NL_ATTR_TYPE_BITFIELD32 = 0xf
+
+ NL_POLICY_TYPE_ATTR_UNSPEC = 0x0
+ NL_POLICY_TYPE_ATTR_TYPE = 0x1
+ NL_POLICY_TYPE_ATTR_MIN_VALUE_S = 0x2
+ NL_POLICY_TYPE_ATTR_MAX_VALUE_S = 0x3
+ NL_POLICY_TYPE_ATTR_MIN_VALUE_U = 0x4
+ NL_POLICY_TYPE_ATTR_MAX_VALUE_U = 0x5
+ NL_POLICY_TYPE_ATTR_MIN_LENGTH = 0x6
+ NL_POLICY_TYPE_ATTR_MAX_LENGTH = 0x7
+ NL_POLICY_TYPE_ATTR_POLICY_IDX = 0x8
+ NL_POLICY_TYPE_ATTR_POLICY_MAXTYPE = 0x9
+ NL_POLICY_TYPE_ATTR_BITFIELD32_MASK = 0xa
+ NL_POLICY_TYPE_ATTR_PAD = 0xb
+ NL_POLICY_TYPE_ATTR_MASK = 0xc
+ NL_POLICY_TYPE_ATTR_MAX = 0xc
+)
+
+type CANBitTiming struct {
+ Bitrate uint32
+ Sample_point uint32
+ Tq uint32
+ Prop_seg uint32
+ Phase_seg1 uint32
+ Phase_seg2 uint32
+ Sjw uint32
+ Brp uint32
+}
+
+type CANBitTimingConst struct {
+ Name [16]uint8
+ Tseg1_min uint32
+ Tseg1_max uint32
+ Tseg2_min uint32
+ Tseg2_max uint32
+ Sjw_max uint32
+ Brp_min uint32
+ Brp_max uint32
+ Brp_inc uint32
+}
+
+type CANClock struct {
+ Freq uint32
+}
+
+type CANBusErrorCounters struct {
+ Txerr uint16
+ Rxerr uint16
+}
+
+type CANCtrlMode struct {
+ Mask uint32
+ Flags uint32
+}
+
+type CANDeviceStats struct {
+ Bus_error uint32
+ Error_warning uint32
+ Error_passive uint32
+ Bus_off uint32
+ Arbitration_lost uint32
+ Restarts uint32
+}
+
+const (
+ CAN_STATE_ERROR_ACTIVE = 0x0
+ CAN_STATE_ERROR_WARNING = 0x1
+ CAN_STATE_ERROR_PASSIVE = 0x2
+ CAN_STATE_BUS_OFF = 0x3
+ CAN_STATE_STOPPED = 0x4
+ CAN_STATE_SLEEPING = 0x5
+ CAN_STATE_MAX = 0x6
+)
+
+const (
+ IFLA_CAN_UNSPEC = 0x0
+ IFLA_CAN_BITTIMING = 0x1
+ IFLA_CAN_BITTIMING_CONST = 0x2
+ IFLA_CAN_CLOCK = 0x3
+ IFLA_CAN_STATE = 0x4
+ IFLA_CAN_CTRLMODE = 0x5
+ IFLA_CAN_RESTART_MS = 0x6
+ IFLA_CAN_RESTART = 0x7
+ IFLA_CAN_BERR_COUNTER = 0x8
+ IFLA_CAN_DATA_BITTIMING = 0x9
+ IFLA_CAN_DATA_BITTIMING_CONST = 0xa
+ IFLA_CAN_TERMINATION = 0xb
+ IFLA_CAN_TERMINATION_CONST = 0xc
+ IFLA_CAN_BITRATE_CONST = 0xd
+ IFLA_CAN_DATA_BITRATE_CONST = 0xe
+ IFLA_CAN_BITRATE_MAX = 0xf
+)
+
+type KCMAttach struct {
+ Fd int32
+ Bpf_fd int32
+}
+
+type KCMUnattach struct {
+ Fd int32
+}
+
+type KCMClone struct {
+ Fd int32
+}
+
+const (
+ NL80211_AC_BE = 0x2
+ NL80211_AC_BK = 0x3
+ NL80211_ACL_POLICY_ACCEPT_UNLESS_LISTED = 0x0
+ NL80211_ACL_POLICY_DENY_UNLESS_LISTED = 0x1
+ NL80211_AC_VI = 0x1
+ NL80211_AC_VO = 0x0
+ NL80211_ATTR_4ADDR = 0x53
+ NL80211_ATTR_ACK = 0x5c
+ NL80211_ATTR_ACK_SIGNAL = 0x107
+ NL80211_ATTR_ACL_POLICY = 0xa5
+ NL80211_ATTR_ADMITTED_TIME = 0xd4
+ NL80211_ATTR_AIRTIME_WEIGHT = 0x112
+ NL80211_ATTR_AKM_SUITES = 0x4c
+ NL80211_ATTR_AP_ISOLATE = 0x60
+ NL80211_ATTR_AUTH_DATA = 0x9c
+ NL80211_ATTR_AUTH_TYPE = 0x35
+ NL80211_ATTR_BANDS = 0xef
+ NL80211_ATTR_BEACON_HEAD = 0xe
+ NL80211_ATTR_BEACON_INTERVAL = 0xc
+ NL80211_ATTR_BEACON_TAIL = 0xf
+ NL80211_ATTR_BG_SCAN_PERIOD = 0x98
+ NL80211_ATTR_BSS_BASIC_RATES = 0x24
+ NL80211_ATTR_BSS = 0x2f
+ NL80211_ATTR_BSS_CTS_PROT = 0x1c
+ NL80211_ATTR_BSS_HT_OPMODE = 0x6d
+ NL80211_ATTR_BSSID = 0xf5
+ NL80211_ATTR_BSS_SELECT = 0xe3
+ NL80211_ATTR_BSS_SHORT_PREAMBLE = 0x1d
+ NL80211_ATTR_BSS_SHORT_SLOT_TIME = 0x1e
+ NL80211_ATTR_CENTER_FREQ1 = 0xa0
+ NL80211_ATTR_CENTER_FREQ1_OFFSET = 0x123
+ NL80211_ATTR_CENTER_FREQ2 = 0xa1
+ NL80211_ATTR_CHANNEL_WIDTH = 0x9f
+ NL80211_ATTR_CH_SWITCH_BLOCK_TX = 0xb8
+ NL80211_ATTR_CH_SWITCH_COUNT = 0xb7
+ NL80211_ATTR_CIPHER_SUITE_GROUP = 0x4a
+ NL80211_ATTR_CIPHER_SUITES = 0x39
+ NL80211_ATTR_CIPHER_SUITES_PAIRWISE = 0x49
+ NL80211_ATTR_CNTDWN_OFFS_BEACON = 0xba
+ NL80211_ATTR_CNTDWN_OFFS_PRESP = 0xbb
+ NL80211_ATTR_COALESCE_RULE = 0xb6
+ NL80211_ATTR_COALESCE_RULE_CONDITION = 0x2
+ NL80211_ATTR_COALESCE_RULE_DELAY = 0x1
+ NL80211_ATTR_COALESCE_RULE_MAX = 0x3
+ NL80211_ATTR_COALESCE_RULE_PKT_PATTERN = 0x3
+ NL80211_ATTR_CONN_FAILED_REASON = 0x9b
+ NL80211_ATTR_CONTROL_PORT = 0x44
+ NL80211_ATTR_CONTROL_PORT_ETHERTYPE = 0x66
+ NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT = 0x67
+ NL80211_ATTR_CONTROL_PORT_NO_PREAUTH = 0x11e
+ NL80211_ATTR_CONTROL_PORT_OVER_NL80211 = 0x108
+ NL80211_ATTR_COOKIE = 0x58
+ NL80211_ATTR_CQM_BEACON_LOSS_EVENT = 0x8
+ NL80211_ATTR_CQM = 0x5e
+ NL80211_ATTR_CQM_MAX = 0x9
+ NL80211_ATTR_CQM_PKT_LOSS_EVENT = 0x4
+ NL80211_ATTR_CQM_RSSI_HYST = 0x2
+ NL80211_ATTR_CQM_RSSI_LEVEL = 0x9
+ NL80211_ATTR_CQM_RSSI_THOLD = 0x1
+ NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT = 0x3
+ NL80211_ATTR_CQM_TXE_INTVL = 0x7
+ NL80211_ATTR_CQM_TXE_PKTS = 0x6
+ NL80211_ATTR_CQM_TXE_RATE = 0x5
+ NL80211_ATTR_CRIT_PROT_ID = 0xb3
+ NL80211_ATTR_CSA_C_OFF_BEACON = 0xba
+ NL80211_ATTR_CSA_C_OFF_PRESP = 0xbb
+ NL80211_ATTR_CSA_C_OFFSETS_TX = 0xcd
+ NL80211_ATTR_CSA_IES = 0xb9
+ NL80211_ATTR_DEVICE_AP_SME = 0x8d
+ NL80211_ATTR_DFS_CAC_TIME = 0x7
+ NL80211_ATTR_DFS_REGION = 0x92
+ NL80211_ATTR_DISABLE_HE = 0x12d
+ NL80211_ATTR_DISABLE_HT = 0x93
+ NL80211_ATTR_DISABLE_VHT = 0xaf
+ NL80211_ATTR_DISCONNECTED_BY_AP = 0x47
+ NL80211_ATTR_DONT_WAIT_FOR_ACK = 0x8e
+ NL80211_ATTR_DTIM_PERIOD = 0xd
+ NL80211_ATTR_DURATION = 0x57
+ NL80211_ATTR_EXT_CAPA = 0xa9
+ NL80211_ATTR_EXT_CAPA_MASK = 0xaa
+ NL80211_ATTR_EXTERNAL_AUTH_ACTION = 0x104
+ NL80211_ATTR_EXTERNAL_AUTH_SUPPORT = 0x105
+ NL80211_ATTR_EXT_FEATURES = 0xd9
+ NL80211_ATTR_FEATURE_FLAGS = 0x8f
+ NL80211_ATTR_FILS_CACHE_ID = 0xfd
+ NL80211_ATTR_FILS_DISCOVERY = 0x126
+ NL80211_ATTR_FILS_ERP_NEXT_SEQ_NUM = 0xfb
+ NL80211_ATTR_FILS_ERP_REALM = 0xfa
+ NL80211_ATTR_FILS_ERP_RRK = 0xfc
+ NL80211_ATTR_FILS_ERP_USERNAME = 0xf9
+ NL80211_ATTR_FILS_KEK = 0xf2
+ NL80211_ATTR_FILS_NONCES = 0xf3
+ NL80211_ATTR_FRAME = 0x33
+ NL80211_ATTR_FRAME_MATCH = 0x5b
+ NL80211_ATTR_FRAME_TYPE = 0x65
+ NL80211_ATTR_FREQ_AFTER = 0x3b
+ NL80211_ATTR_FREQ_BEFORE = 0x3a
+ NL80211_ATTR_FREQ_FIXED = 0x3c
+ NL80211_ATTR_FREQ_RANGE_END = 0x3
+ NL80211_ATTR_FREQ_RANGE_MAX_BW = 0x4
+ NL80211_ATTR_FREQ_RANGE_START = 0x2
+ NL80211_ATTR_FTM_RESPONDER = 0x10e
+ NL80211_ATTR_FTM_RESPONDER_STATS = 0x10f
+ NL80211_ATTR_GENERATION = 0x2e
+ NL80211_ATTR_HANDLE_DFS = 0xbf
+ NL80211_ATTR_HE_6GHZ_CAPABILITY = 0x125
+ NL80211_ATTR_HE_BSS_COLOR = 0x11b
+ NL80211_ATTR_HE_CAPABILITY = 0x10d
+ NL80211_ATTR_HE_OBSS_PD = 0x117
+ NL80211_ATTR_HIDDEN_SSID = 0x7e
+ NL80211_ATTR_HT_CAPABILITY = 0x1f
+ NL80211_ATTR_HT_CAPABILITY_MASK = 0x94
+ NL80211_ATTR_IE_ASSOC_RESP = 0x80
+ NL80211_ATTR_IE = 0x2a
+ NL80211_ATTR_IE_PROBE_RESP = 0x7f
+ NL80211_ATTR_IE_RIC = 0xb2
+ NL80211_ATTR_IFACE_SOCKET_OWNER = 0xcc
+ NL80211_ATTR_IFINDEX = 0x3
+ NL80211_ATTR_IFNAME = 0x4
+ NL80211_ATTR_IFTYPE_AKM_SUITES = 0x11c
+ NL80211_ATTR_IFTYPE = 0x5
+ NL80211_ATTR_IFTYPE_EXT_CAPA = 0xe6
+ NL80211_ATTR_INACTIVITY_TIMEOUT = 0x96
+ NL80211_ATTR_INTERFACE_COMBINATIONS = 0x78
+ NL80211_ATTR_KEY_CIPHER = 0x9
+ NL80211_ATTR_KEY = 0x50
+ NL80211_ATTR_KEY_DATA = 0x7
+ NL80211_ATTR_KEY_DEFAULT = 0xb
+ NL80211_ATTR_KEY_DEFAULT_MGMT = 0x28
+ NL80211_ATTR_KEY_DEFAULT_TYPES = 0x6e
+ NL80211_ATTR_KEY_IDX = 0x8
+ NL80211_ATTR_KEYS = 0x51
+ NL80211_ATTR_KEY_SEQ = 0xa
+ NL80211_ATTR_KEY_TYPE = 0x37
+ NL80211_ATTR_LOCAL_MESH_POWER_MODE = 0xa4
+ NL80211_ATTR_LOCAL_STATE_CHANGE = 0x5f
+ NL80211_ATTR_MAC_ACL_MAX = 0xa7
+ NL80211_ATTR_MAC_ADDRS = 0xa6
+ NL80211_ATTR_MAC = 0x6
+ NL80211_ATTR_MAC_HINT = 0xc8
+ NL80211_ATTR_MAC_MASK = 0xd7
+ NL80211_ATTR_MAX_AP_ASSOC_STA = 0xca
+ NL80211_ATTR_MAX = 0x135
+ NL80211_ATTR_MAX_CRIT_PROT_DURATION = 0xb4
+ NL80211_ATTR_MAX_CSA_COUNTERS = 0xce
+ NL80211_ATTR_MAX_MATCH_SETS = 0x85
+ NL80211_ATTR_MAX_NUM_PMKIDS = 0x56
+ NL80211_ATTR_MAX_NUM_SCAN_SSIDS = 0x2b
+ NL80211_ATTR_MAX_NUM_SCHED_SCAN_PLANS = 0xde
+ NL80211_ATTR_MAX_NUM_SCHED_SCAN_SSIDS = 0x7b
+ NL80211_ATTR_MAX_REMAIN_ON_CHANNEL_DURATION = 0x6f
+ NL80211_ATTR_MAX_SCAN_IE_LEN = 0x38
+ NL80211_ATTR_MAX_SCAN_PLAN_INTERVAL = 0xdf
+ NL80211_ATTR_MAX_SCAN_PLAN_ITERATIONS = 0xe0
+ NL80211_ATTR_MAX_SCHED_SCAN_IE_LEN = 0x7c
+ NL80211_ATTR_MCAST_RATE = 0x6b
+ NL80211_ATTR_MDID = 0xb1
+ NL80211_ATTR_MEASUREMENT_DURATION = 0xeb
+ NL80211_ATTR_MEASUREMENT_DURATION_MANDATORY = 0xec
+ NL80211_ATTR_MESH_CONFIG = 0x23
+ NL80211_ATTR_MESH_ID = 0x18
+ NL80211_ATTR_MESH_PEER_AID = 0xed
+ NL80211_ATTR_MESH_SETUP = 0x70
+ NL80211_ATTR_MGMT_SUBTYPE = 0x29
+ NL80211_ATTR_MNTR_FLAGS = 0x17
+ NL80211_ATTR_MPATH_INFO = 0x1b
+ NL80211_ATTR_MPATH_NEXT_HOP = 0x1a
+ NL80211_ATTR_MULTICAST_TO_UNICAST_ENABLED = 0xf4
+ NL80211_ATTR_MU_MIMO_FOLLOW_MAC_ADDR = 0xe8
+ NL80211_ATTR_MU_MIMO_GROUP_DATA = 0xe7
+ NL80211_ATTR_NAN_FUNC = 0xf0
+ NL80211_ATTR_NAN_MASTER_PREF = 0xee
+ NL80211_ATTR_NAN_MATCH = 0xf1
+ NL80211_ATTR_NETNS_FD = 0xdb
+ NL80211_ATTR_NOACK_MAP = 0x95
+ NL80211_ATTR_NSS = 0x106
+ NL80211_ATTR_OFFCHANNEL_TX_OK = 0x6c
+ NL80211_ATTR_OPER_CLASS = 0xd6
+ NL80211_ATTR_OPMODE_NOTIF = 0xc2
+ NL80211_ATTR_P2P_CTWINDOW = 0xa2
+ NL80211_ATTR_P2P_OPPPS = 0xa3
+ NL80211_ATTR_PAD = 0xe5
+ NL80211_ATTR_PBSS = 0xe2
+ NL80211_ATTR_PEER_AID = 0xb5
+ NL80211_ATTR_PEER_MEASUREMENTS = 0x111
+ NL80211_ATTR_PID = 0x52
+ NL80211_ATTR_PMK = 0xfe
+ NL80211_ATTR_PMKID = 0x55
+ NL80211_ATTR_PMK_LIFETIME = 0x11f
+ NL80211_ATTR_PMKR0_NAME = 0x102
+ NL80211_ATTR_PMK_REAUTH_THRESHOLD = 0x120
+ NL80211_ATTR_PMKSA_CANDIDATE = 0x86
+ NL80211_ATTR_PORT_AUTHORIZED = 0x103
+ NL80211_ATTR_POWER_RULE_MAX_ANT_GAIN = 0x5
+ NL80211_ATTR_POWER_RULE_MAX_EIRP = 0x6
+ NL80211_ATTR_PREV_BSSID = 0x4f
+ NL80211_ATTR_PRIVACY = 0x46
+ NL80211_ATTR_PROBE_RESP = 0x91
+ NL80211_ATTR_PROBE_RESP_OFFLOAD = 0x90
+ NL80211_ATTR_PROTOCOL_FEATURES = 0xad
+ NL80211_ATTR_PS_STATE = 0x5d
+ NL80211_ATTR_QOS_MAP = 0xc7
+ NL80211_ATTR_RADAR_EVENT = 0xa8
+ NL80211_ATTR_REASON_CODE = 0x36
+ NL80211_ATTR_RECEIVE_MULTICAST = 0x121
+ NL80211_ATTR_RECONNECT_REQUESTED = 0x12b
+ NL80211_ATTR_REG_ALPHA2 = 0x21
+ NL80211_ATTR_REG_INDOOR = 0xdd
+ NL80211_ATTR_REG_INITIATOR = 0x30
+ NL80211_ATTR_REG_RULE_FLAGS = 0x1
+ NL80211_ATTR_REG_RULES = 0x22
+ NL80211_ATTR_REG_TYPE = 0x31
+ NL80211_ATTR_REKEY_DATA = 0x7a
+ NL80211_ATTR_REQ_IE = 0x4d
+ NL80211_ATTR_RESP_IE = 0x4e
+ NL80211_ATTR_ROAM_SUPPORT = 0x83
+ NL80211_ATTR_RX_FRAME_TYPES = 0x64
+ NL80211_ATTR_RXMGMT_FLAGS = 0xbc
+ NL80211_ATTR_RX_SIGNAL_DBM = 0x97
+ NL80211_ATTR_S1G_CAPABILITY = 0x128
+ NL80211_ATTR_S1G_CAPABILITY_MASK = 0x129
+ NL80211_ATTR_SAE_DATA = 0x9c
+ NL80211_ATTR_SAE_PASSWORD = 0x115
+ NL80211_ATTR_SAE_PWE = 0x12a
+ NL80211_ATTR_SAR_SPEC = 0x12c
+ NL80211_ATTR_SCAN_FLAGS = 0x9e
+ NL80211_ATTR_SCAN_FREQ_KHZ = 0x124
+ NL80211_ATTR_SCAN_FREQUENCIES = 0x2c
+ NL80211_ATTR_SCAN_GENERATION = 0x2e
+ NL80211_ATTR_SCAN_SSIDS = 0x2d
+ NL80211_ATTR_SCAN_START_TIME_TSF_BSSID = 0xea
+ NL80211_ATTR_SCAN_START_TIME_TSF = 0xe9
+ NL80211_ATTR_SCAN_SUPP_RATES = 0x7d
+ NL80211_ATTR_SCHED_SCAN_DELAY = 0xdc
+ NL80211_ATTR_SCHED_SCAN_INTERVAL = 0x77
+ NL80211_ATTR_SCHED_SCAN_MATCH = 0x84
+ NL80211_ATTR_SCHED_SCAN_MATCH_SSID = 0x1
+ NL80211_ATTR_SCHED_SCAN_MAX_REQS = 0x100
+ NL80211_ATTR_SCHED_SCAN_MULTI = 0xff
+ NL80211_ATTR_SCHED_SCAN_PLANS = 0xe1
+ NL80211_ATTR_SCHED_SCAN_RELATIVE_RSSI = 0xf6
+ NL80211_ATTR_SCHED_SCAN_RSSI_ADJUST = 0xf7
+ NL80211_ATTR_SMPS_MODE = 0xd5
+ NL80211_ATTR_SOCKET_OWNER = 0xcc
+ NL80211_ATTR_SOFTWARE_IFTYPES = 0x79
+ NL80211_ATTR_SPLIT_WIPHY_DUMP = 0xae
+ NL80211_ATTR_SSID = 0x34
+ NL80211_ATTR_STA_AID = 0x10
+ NL80211_ATTR_STA_CAPABILITY = 0xab
+ NL80211_ATTR_STA_EXT_CAPABILITY = 0xac
+ NL80211_ATTR_STA_FLAGS2 = 0x43
+ NL80211_ATTR_STA_FLAGS = 0x11
+ NL80211_ATTR_STA_INFO = 0x15
+ NL80211_ATTR_STA_LISTEN_INTERVAL = 0x12
+ NL80211_ATTR_STA_PLINK_ACTION = 0x19
+ NL80211_ATTR_STA_PLINK_STATE = 0x74
+ NL80211_ATTR_STA_SUPPORTED_CHANNELS = 0xbd
+ NL80211_ATTR_STA_SUPPORTED_OPER_CLASSES = 0xbe
+ NL80211_ATTR_STA_SUPPORTED_RATES = 0x13
+ NL80211_ATTR_STA_SUPPORT_P2P_PS = 0xe4
+ NL80211_ATTR_STATUS_CODE = 0x48
+ NL80211_ATTR_STA_TX_POWER = 0x114
+ NL80211_ATTR_STA_TX_POWER_SETTING = 0x113
+ NL80211_ATTR_STA_VLAN = 0x14
+ NL80211_ATTR_STA_WME = 0x81
+ NL80211_ATTR_SUPPORT_10_MHZ = 0xc1
+ NL80211_ATTR_SUPPORT_5_MHZ = 0xc0
+ NL80211_ATTR_SUPPORT_AP_UAPSD = 0x82
+ NL80211_ATTR_SUPPORTED_COMMANDS = 0x32
+ NL80211_ATTR_SUPPORTED_IFTYPES = 0x20
+ NL80211_ATTR_SUPPORT_IBSS_RSN = 0x68
+ NL80211_ATTR_SUPPORT_MESH_AUTH = 0x73
+ NL80211_ATTR_SURVEY_INFO = 0x54
+ NL80211_ATTR_SURVEY_RADIO_STATS = 0xda
+ NL80211_ATTR_TDLS_ACTION = 0x88
+ NL80211_ATTR_TDLS_DIALOG_TOKEN = 0x89
+ NL80211_ATTR_TDLS_EXTERNAL_SETUP = 0x8c
+ NL80211_ATTR_TDLS_INITIATOR = 0xcf
+ NL80211_ATTR_TDLS_OPERATION = 0x8a
+ NL80211_ATTR_TDLS_PEER_CAPABILITY = 0xcb
+ NL80211_ATTR_TDLS_SUPPORT = 0x8b
+ NL80211_ATTR_TESTDATA = 0x45
+ NL80211_ATTR_TID_CONFIG = 0x11d
+ NL80211_ATTR_TIMED_OUT = 0x41
+ NL80211_ATTR_TIMEOUT = 0x110
+ NL80211_ATTR_TIMEOUT_REASON = 0xf8
+ NL80211_ATTR_TSID = 0xd2
+ NL80211_ATTR_TWT_RESPONDER = 0x116
+ NL80211_ATTR_TX_FRAME_TYPES = 0x63
+ NL80211_ATTR_TX_NO_CCK_RATE = 0x87
+ NL80211_ATTR_TXQ_LIMIT = 0x10a
+ NL80211_ATTR_TXQ_MEMORY_LIMIT = 0x10b
+ NL80211_ATTR_TXQ_QUANTUM = 0x10c
+ NL80211_ATTR_TXQ_STATS = 0x109
+ NL80211_ATTR_TX_RATES = 0x5a
+ NL80211_ATTR_UNSOL_BCAST_PROBE_RESP = 0x127
+ NL80211_ATTR_UNSPEC = 0x0
+ NL80211_ATTR_USE_MFP = 0x42
+ NL80211_ATTR_USER_PRIO = 0xd3
+ NL80211_ATTR_USER_REG_HINT_TYPE = 0x9a
+ NL80211_ATTR_USE_RRM = 0xd0
+ NL80211_ATTR_VENDOR_DATA = 0xc5
+ NL80211_ATTR_VENDOR_EVENTS = 0xc6
+ NL80211_ATTR_VENDOR_ID = 0xc3
+ NL80211_ATTR_VENDOR_SUBCMD = 0xc4
+ NL80211_ATTR_VHT_CAPABILITY = 0x9d
+ NL80211_ATTR_VHT_CAPABILITY_MASK = 0xb0
+ NL80211_ATTR_VLAN_ID = 0x11a
+ NL80211_ATTR_WANT_1X_4WAY_HS = 0x101
+ NL80211_ATTR_WDEV = 0x99
+ NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX = 0x72
+ NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX = 0x71
+ NL80211_ATTR_WIPHY_ANTENNA_RX = 0x6a
+ NL80211_ATTR_WIPHY_ANTENNA_TX = 0x69
+ NL80211_ATTR_WIPHY_BANDS = 0x16
+ NL80211_ATTR_WIPHY_CHANNEL_TYPE = 0x27
+ NL80211_ATTR_WIPHY = 0x1
+ NL80211_ATTR_WIPHY_COVERAGE_CLASS = 0x59
+ NL80211_ATTR_WIPHY_DYN_ACK = 0xd1
+ NL80211_ATTR_WIPHY_EDMG_BW_CONFIG = 0x119
+ NL80211_ATTR_WIPHY_EDMG_CHANNELS = 0x118
+ NL80211_ATTR_WIPHY_FRAG_THRESHOLD = 0x3f
+ NL80211_ATTR_WIPHY_FREQ = 0x26
+ NL80211_ATTR_WIPHY_FREQ_HINT = 0xc9
+ NL80211_ATTR_WIPHY_FREQ_OFFSET = 0x122
+ NL80211_ATTR_WIPHY_NAME = 0x2
+ NL80211_ATTR_WIPHY_RETRY_LONG = 0x3e
+ NL80211_ATTR_WIPHY_RETRY_SHORT = 0x3d
+ NL80211_ATTR_WIPHY_RTS_THRESHOLD = 0x40
+ NL80211_ATTR_WIPHY_SELF_MANAGED_REG = 0xd8
+ NL80211_ATTR_WIPHY_TX_POWER_LEVEL = 0x62
+ NL80211_ATTR_WIPHY_TX_POWER_SETTING = 0x61
+ NL80211_ATTR_WIPHY_TXQ_PARAMS = 0x25
+ NL80211_ATTR_WOWLAN_TRIGGERS = 0x75
+ NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED = 0x76
+ NL80211_ATTR_WPA_VERSIONS = 0x4b
+ NL80211_AUTHTYPE_AUTOMATIC = 0x8
+ NL80211_AUTHTYPE_FILS_PK = 0x7
+ NL80211_AUTHTYPE_FILS_SK = 0x5
+ NL80211_AUTHTYPE_FILS_SK_PFS = 0x6
+ NL80211_AUTHTYPE_FT = 0x2
+ NL80211_AUTHTYPE_MAX = 0x7
+ NL80211_AUTHTYPE_NETWORK_EAP = 0x3
+ NL80211_AUTHTYPE_OPEN_SYSTEM = 0x0
+ NL80211_AUTHTYPE_SAE = 0x4
+ NL80211_AUTHTYPE_SHARED_KEY = 0x1
+ NL80211_BAND_2GHZ = 0x0
+ NL80211_BAND_5GHZ = 0x1
+ NL80211_BAND_60GHZ = 0x2
+ NL80211_BAND_6GHZ = 0x3
+ NL80211_BAND_ATTR_EDMG_BW_CONFIG = 0xb
+ NL80211_BAND_ATTR_EDMG_CHANNELS = 0xa
+ NL80211_BAND_ATTR_FREQS = 0x1
+ NL80211_BAND_ATTR_HT_AMPDU_DENSITY = 0x6
+ NL80211_BAND_ATTR_HT_AMPDU_FACTOR = 0x5
+ NL80211_BAND_ATTR_HT_CAPA = 0x4
+ NL80211_BAND_ATTR_HT_MCS_SET = 0x3
+ NL80211_BAND_ATTR_IFTYPE_DATA = 0x9
+ NL80211_BAND_ATTR_MAX = 0xb
+ NL80211_BAND_ATTR_RATES = 0x2
+ NL80211_BAND_ATTR_VHT_CAPA = 0x8
+ NL80211_BAND_ATTR_VHT_MCS_SET = 0x7
+ NL80211_BAND_IFTYPE_ATTR_HE_6GHZ_CAPA = 0x6
+ NL80211_BAND_IFTYPE_ATTR_HE_CAP_MAC = 0x2
+ NL80211_BAND_IFTYPE_ATTR_HE_CAP_MCS_SET = 0x4
+ NL80211_BAND_IFTYPE_ATTR_HE_CAP_PHY = 0x3
+ NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE = 0x5
+ NL80211_BAND_IFTYPE_ATTR_IFTYPES = 0x1
+ NL80211_BAND_IFTYPE_ATTR_MAX = 0x7
+ NL80211_BAND_S1GHZ = 0x4
+ NL80211_BITRATE_ATTR_2GHZ_SHORTPREAMBLE = 0x2
+ NL80211_BITRATE_ATTR_MAX = 0x2
+ NL80211_BITRATE_ATTR_RATE = 0x1
+ NL80211_BSS_BEACON_IES = 0xb
+ NL80211_BSS_BEACON_INTERVAL = 0x4
+ NL80211_BSS_BEACON_TSF = 0xd
+ NL80211_BSS_BSSID = 0x1
+ NL80211_BSS_CAPABILITY = 0x5
+ NL80211_BSS_CHAIN_SIGNAL = 0x13
+ NL80211_BSS_CHAN_WIDTH_10 = 0x1
+ NL80211_BSS_CHAN_WIDTH_1 = 0x3
+ NL80211_BSS_CHAN_WIDTH_20 = 0x0
+ NL80211_BSS_CHAN_WIDTH_2 = 0x4
+ NL80211_BSS_CHAN_WIDTH_5 = 0x2
+ NL80211_BSS_CHAN_WIDTH = 0xc
+ NL80211_BSS_FREQUENCY = 0x2
+ NL80211_BSS_FREQUENCY_OFFSET = 0x14
+ NL80211_BSS_INFORMATION_ELEMENTS = 0x6
+ NL80211_BSS_LAST_SEEN_BOOTTIME = 0xf
+ NL80211_BSS_MAX = 0x14
+ NL80211_BSS_PAD = 0x10
+ NL80211_BSS_PARENT_BSSID = 0x12
+ NL80211_BSS_PARENT_TSF = 0x11
+ NL80211_BSS_PRESP_DATA = 0xe
+ NL80211_BSS_SEEN_MS_AGO = 0xa
+ NL80211_BSS_SELECT_ATTR_BAND_PREF = 0x2
+ NL80211_BSS_SELECT_ATTR_MAX = 0x3
+ NL80211_BSS_SELECT_ATTR_RSSI_ADJUST = 0x3
+ NL80211_BSS_SELECT_ATTR_RSSI = 0x1
+ NL80211_BSS_SIGNAL_MBM = 0x7
+ NL80211_BSS_SIGNAL_UNSPEC = 0x8
+ NL80211_BSS_STATUS_ASSOCIATED = 0x1
+ NL80211_BSS_STATUS_AUTHENTICATED = 0x0
+ NL80211_BSS_STATUS = 0x9
+ NL80211_BSS_STATUS_IBSS_JOINED = 0x2
+ NL80211_BSS_TSF = 0x3
+ NL80211_CHAN_HT20 = 0x1
+ NL80211_CHAN_HT40MINUS = 0x2
+ NL80211_CHAN_HT40PLUS = 0x3
+ NL80211_CHAN_NO_HT = 0x0
+ NL80211_CHAN_WIDTH_10 = 0x7
+ NL80211_CHAN_WIDTH_160 = 0x5
+ NL80211_CHAN_WIDTH_16 = 0xc
+ NL80211_CHAN_WIDTH_1 = 0x8
+ NL80211_CHAN_WIDTH_20 = 0x1
+ NL80211_CHAN_WIDTH_20_NOHT = 0x0
+ NL80211_CHAN_WIDTH_2 = 0x9
+ NL80211_CHAN_WIDTH_40 = 0x2
+ NL80211_CHAN_WIDTH_4 = 0xa
+ NL80211_CHAN_WIDTH_5 = 0x6
+ NL80211_CHAN_WIDTH_80 = 0x3
+ NL80211_CHAN_WIDTH_80P80 = 0x4
+ NL80211_CHAN_WIDTH_8 = 0xb
+ NL80211_CMD_ABORT_SCAN = 0x72
+ NL80211_CMD_ACTION = 0x3b
+ NL80211_CMD_ACTION_TX_STATUS = 0x3c
+ NL80211_CMD_ADD_NAN_FUNCTION = 0x75
+ NL80211_CMD_ADD_TX_TS = 0x69
+ NL80211_CMD_ASSOCIATE = 0x26
+ NL80211_CMD_AUTHENTICATE = 0x25
+ NL80211_CMD_CANCEL_REMAIN_ON_CHANNEL = 0x38
+ NL80211_CMD_CHANGE_NAN_CONFIG = 0x77
+ NL80211_CMD_CHANNEL_SWITCH = 0x66
+ NL80211_CMD_CH_SWITCH_NOTIFY = 0x58
+ NL80211_CMD_CH_SWITCH_STARTED_NOTIFY = 0x6e
+ NL80211_CMD_CONNECT = 0x2e
+ NL80211_CMD_CONN_FAILED = 0x5b
+ NL80211_CMD_CONTROL_PORT_FRAME = 0x81
+ NL80211_CMD_CONTROL_PORT_FRAME_TX_STATUS = 0x8b
+ NL80211_CMD_CRIT_PROTOCOL_START = 0x62
+ NL80211_CMD_CRIT_PROTOCOL_STOP = 0x63
+ NL80211_CMD_DEAUTHENTICATE = 0x27
+ NL80211_CMD_DEL_BEACON = 0x10
+ NL80211_CMD_DEL_INTERFACE = 0x8
+ NL80211_CMD_DEL_KEY = 0xc
+ NL80211_CMD_DEL_MPATH = 0x18
+ NL80211_CMD_DEL_NAN_FUNCTION = 0x76
+ NL80211_CMD_DEL_PMK = 0x7c
+ NL80211_CMD_DEL_PMKSA = 0x35
+ NL80211_CMD_DEL_STATION = 0x14
+ NL80211_CMD_DEL_TX_TS = 0x6a
+ NL80211_CMD_DEL_WIPHY = 0x4
+ NL80211_CMD_DISASSOCIATE = 0x28
+ NL80211_CMD_DISCONNECT = 0x30
+ NL80211_CMD_EXTERNAL_AUTH = 0x7f
+ NL80211_CMD_FLUSH_PMKSA = 0x36
+ NL80211_CMD_FRAME = 0x3b
+ NL80211_CMD_FRAME_TX_STATUS = 0x3c
+ NL80211_CMD_FRAME_WAIT_CANCEL = 0x43
+ NL80211_CMD_FT_EVENT = 0x61
+ NL80211_CMD_GET_BEACON = 0xd
+ NL80211_CMD_GET_COALESCE = 0x64
+ NL80211_CMD_GET_FTM_RESPONDER_STATS = 0x82
+ NL80211_CMD_GET_INTERFACE = 0x5
+ NL80211_CMD_GET_KEY = 0x9
+ NL80211_CMD_GET_MESH_CONFIG = 0x1c
+ NL80211_CMD_GET_MESH_PARAMS = 0x1c
+ NL80211_CMD_GET_MPATH = 0x15
+ NL80211_CMD_GET_MPP = 0x6b
+ NL80211_CMD_GET_POWER_SAVE = 0x3e
+ NL80211_CMD_GET_PROTOCOL_FEATURES = 0x5f
+ NL80211_CMD_GET_REG = 0x1f
+ NL80211_CMD_GET_SCAN = 0x20
+ NL80211_CMD_GET_STATION = 0x11
+ NL80211_CMD_GET_SURVEY = 0x32
+ NL80211_CMD_GET_WIPHY = 0x1
+ NL80211_CMD_GET_WOWLAN = 0x49
+ NL80211_CMD_JOIN_IBSS = 0x2b
+ NL80211_CMD_JOIN_MESH = 0x44
+ NL80211_CMD_JOIN_OCB = 0x6c
+ NL80211_CMD_LEAVE_IBSS = 0x2c
+ NL80211_CMD_LEAVE_MESH = 0x45
+ NL80211_CMD_LEAVE_OCB = 0x6d
+ NL80211_CMD_MAX = 0x93
+ NL80211_CMD_MICHAEL_MIC_FAILURE = 0x29
+ NL80211_CMD_NAN_MATCH = 0x78
+ NL80211_CMD_NEW_BEACON = 0xf
+ NL80211_CMD_NEW_INTERFACE = 0x7
+ NL80211_CMD_NEW_KEY = 0xb
+ NL80211_CMD_NEW_MPATH = 0x17
+ NL80211_CMD_NEW_PEER_CANDIDATE = 0x48
+ NL80211_CMD_NEW_SCAN_RESULTS = 0x22
+ NL80211_CMD_NEW_STATION = 0x13
+ NL80211_CMD_NEW_SURVEY_RESULTS = 0x33
+ NL80211_CMD_NEW_WIPHY = 0x3
+ NL80211_CMD_NOTIFY_CQM = 0x40
+ NL80211_CMD_NOTIFY_RADAR = 0x86
+ NL80211_CMD_PEER_MEASUREMENT_COMPLETE = 0x85
+ NL80211_CMD_PEER_MEASUREMENT_RESULT = 0x84
+ NL80211_CMD_PEER_MEASUREMENT_START = 0x83
+ NL80211_CMD_PMKSA_CANDIDATE = 0x50
+ NL80211_CMD_PORT_AUTHORIZED = 0x7d
+ NL80211_CMD_PROBE_CLIENT = 0x54
+ NL80211_CMD_PROBE_MESH_LINK = 0x88
+ NL80211_CMD_RADAR_DETECT = 0x5e
+ NL80211_CMD_REG_BEACON_HINT = 0x2a
+ NL80211_CMD_REG_CHANGE = 0x24
+ NL80211_CMD_REGISTER_ACTION = 0x3a
+ NL80211_CMD_REGISTER_BEACONS = 0x55
+ NL80211_CMD_REGISTER_FRAME = 0x3a
+ NL80211_CMD_RELOAD_REGDB = 0x7e
+ NL80211_CMD_REMAIN_ON_CHANNEL = 0x37
+ NL80211_CMD_REQ_SET_REG = 0x1b
+ NL80211_CMD_ROAM = 0x2f
+ NL80211_CMD_SCAN_ABORTED = 0x23
+ NL80211_CMD_SCHED_SCAN_RESULTS = 0x4d
+ NL80211_CMD_SCHED_SCAN_STOPPED = 0x4e
+ NL80211_CMD_SET_BEACON = 0xe
+ NL80211_CMD_SET_BSS = 0x19
+ NL80211_CMD_SET_CHANNEL = 0x41
+ NL80211_CMD_SET_COALESCE = 0x65
+ NL80211_CMD_SET_CQM = 0x3f
+ NL80211_CMD_SET_INTERFACE = 0x6
+ NL80211_CMD_SET_KEY = 0xa
+ NL80211_CMD_SET_MAC_ACL = 0x5d
+ NL80211_CMD_SET_MCAST_RATE = 0x5c
+ NL80211_CMD_SET_MESH_CONFIG = 0x1d
+ NL80211_CMD_SET_MESH_PARAMS = 0x1d
+ NL80211_CMD_SET_MGMT_EXTRA_IE = 0x1e
+ NL80211_CMD_SET_MPATH = 0x16
+ NL80211_CMD_SET_MULTICAST_TO_UNICAST = 0x79
+ NL80211_CMD_SET_NOACK_MAP = 0x57
+ NL80211_CMD_SET_PMK = 0x7b
+ NL80211_CMD_SET_PMKSA = 0x34
+ NL80211_CMD_SET_POWER_SAVE = 0x3d
+ NL80211_CMD_SET_QOS_MAP = 0x68
+ NL80211_CMD_SET_REG = 0x1a
+ NL80211_CMD_SET_REKEY_OFFLOAD = 0x4f
+ NL80211_CMD_SET_SAR_SPECS = 0x8c
+ NL80211_CMD_SET_STATION = 0x12
+ NL80211_CMD_SET_TID_CONFIG = 0x89
+ NL80211_CMD_SET_TX_BITRATE_MASK = 0x39
+ NL80211_CMD_SET_WDS_PEER = 0x42
+ NL80211_CMD_SET_WIPHY = 0x2
+ NL80211_CMD_SET_WIPHY_NETNS = 0x31
+ NL80211_CMD_SET_WOWLAN = 0x4a
+ NL80211_CMD_STA_OPMODE_CHANGED = 0x80
+ NL80211_CMD_START_AP = 0xf
+ NL80211_CMD_START_NAN = 0x73
+ NL80211_CMD_START_P2P_DEVICE = 0x59
+ NL80211_CMD_START_SCHED_SCAN = 0x4b
+ NL80211_CMD_STOP_AP = 0x10
+ NL80211_CMD_STOP_NAN = 0x74
+ NL80211_CMD_STOP_P2P_DEVICE = 0x5a
+ NL80211_CMD_STOP_SCHED_SCAN = 0x4c
+ NL80211_CMD_TDLS_CANCEL_CHANNEL_SWITCH = 0x70
+ NL80211_CMD_TDLS_CHANNEL_SWITCH = 0x6f
+ NL80211_CMD_TDLS_MGMT = 0x52
+ NL80211_CMD_TDLS_OPER = 0x51
+ NL80211_CMD_TESTMODE = 0x2d
+ NL80211_CMD_TRIGGER_SCAN = 0x21
+ NL80211_CMD_UNEXPECTED_4ADDR_FRAME = 0x56
+ NL80211_CMD_UNEXPECTED_FRAME = 0x53
+ NL80211_CMD_UNPROT_BEACON = 0x8a
+ NL80211_CMD_UNPROT_DEAUTHENTICATE = 0x46
+ NL80211_CMD_UNPROT_DISASSOCIATE = 0x47
+ NL80211_CMD_UNSPEC = 0x0
+ NL80211_CMD_UPDATE_CONNECT_PARAMS = 0x7a
+ NL80211_CMD_UPDATE_FT_IES = 0x60
+ NL80211_CMD_UPDATE_OWE_INFO = 0x87
+ NL80211_CMD_VENDOR = 0x67
+ NL80211_CMD_WIPHY_REG_CHANGE = 0x71
+ NL80211_COALESCE_CONDITION_MATCH = 0x0
+ NL80211_COALESCE_CONDITION_NO_MATCH = 0x1
+ NL80211_CONN_FAIL_BLOCKED_CLIENT = 0x1
+ NL80211_CONN_FAIL_MAX_CLIENTS = 0x0
+ NL80211_CQM_RSSI_BEACON_LOSS_EVENT = 0x2
+ NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH = 0x1
+ NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW = 0x0
+ NL80211_CQM_TXE_MAX_INTVL = 0x708
+ NL80211_CRIT_PROTO_APIPA = 0x3
+ NL80211_CRIT_PROTO_DHCP = 0x1
+ NL80211_CRIT_PROTO_EAPOL = 0x2
+ NL80211_CRIT_PROTO_MAX_DURATION = 0x1388
+ NL80211_CRIT_PROTO_UNSPEC = 0x0
+ NL80211_DFS_AVAILABLE = 0x2
+ NL80211_DFS_ETSI = 0x2
+ NL80211_DFS_FCC = 0x1
+ NL80211_DFS_JP = 0x3
+ NL80211_DFS_UNAVAILABLE = 0x1
+ NL80211_DFS_UNSET = 0x0
+ NL80211_DFS_USABLE = 0x0
+ NL80211_EDMG_BW_CONFIG_MAX = 0xf
+ NL80211_EDMG_BW_CONFIG_MIN = 0x4
+ NL80211_EDMG_CHANNELS_MAX = 0x3c
+ NL80211_EDMG_CHANNELS_MIN = 0x1
+ NL80211_EXTERNAL_AUTH_ABORT = 0x1
+ NL80211_EXTERNAL_AUTH_START = 0x0
+ NL80211_EXT_FEATURE_4WAY_HANDSHAKE_AP_PSK = 0x32
+ NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_1X = 0x10
+ NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_PSK = 0xf
+ NL80211_EXT_FEATURE_ACCEPT_BCAST_PROBE_RESP = 0x12
+ NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT = 0x1b
+ NL80211_EXT_FEATURE_AIRTIME_FAIRNESS = 0x21
+ NL80211_EXT_FEATURE_AP_PMKSA_CACHING = 0x22
+ NL80211_EXT_FEATURE_AQL = 0x28
+ NL80211_EXT_FEATURE_BEACON_PROTECTION_CLIENT = 0x2e
+ NL80211_EXT_FEATURE_BEACON_PROTECTION = 0x29
+ NL80211_EXT_FEATURE_BEACON_RATE_HE = 0x36
+ NL80211_EXT_FEATURE_BEACON_RATE_HT = 0x7
+ NL80211_EXT_FEATURE_BEACON_RATE_LEGACY = 0x6
+ NL80211_EXT_FEATURE_BEACON_RATE_VHT = 0x8
+ NL80211_EXT_FEATURE_BSS_PARENT_TSF = 0x4
+ NL80211_EXT_FEATURE_CAN_REPLACE_PTK0 = 0x1f
+ NL80211_EXT_FEATURE_CONTROL_PORT_NO_PREAUTH = 0x2a
+ NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211 = 0x1a
+ NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211_TX_STATUS = 0x30
+ NL80211_EXT_FEATURE_CQM_RSSI_LIST = 0xd
+ NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT = 0x1b
+ NL80211_EXT_FEATURE_DEL_IBSS_STA = 0x2c
+ NL80211_EXT_FEATURE_DFS_OFFLOAD = 0x19
+ NL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER = 0x20
+ NL80211_EXT_FEATURE_EXT_KEY_ID = 0x24
+ NL80211_EXT_FEATURE_FILS_DISCOVERY = 0x34
+ NL80211_EXT_FEATURE_FILS_MAX_CHANNEL_TIME = 0x11
+ NL80211_EXT_FEATURE_FILS_SK_OFFLOAD = 0xe
+ NL80211_EXT_FEATURE_FILS_STA = 0x9
+ NL80211_EXT_FEATURE_HIGH_ACCURACY_SCAN = 0x18
+ NL80211_EXT_FEATURE_LOW_POWER_SCAN = 0x17
+ NL80211_EXT_FEATURE_LOW_SPAN_SCAN = 0x16
+ NL80211_EXT_FEATURE_MFP_OPTIONAL = 0x15
+ NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA = 0xa
+ NL80211_EXT_FEATURE_MGMT_TX_RANDOM_TA_CONNECTED = 0xb
+ NL80211_EXT_FEATURE_MULTICAST_REGISTRATIONS = 0x2d
+ NL80211_EXT_FEATURE_MU_MIMO_AIR_SNIFFER = 0x2
+ NL80211_EXT_FEATURE_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION = 0x14
+ NL80211_EXT_FEATURE_OCE_PROBE_REQ_HIGH_TX_RATE = 0x13
+ NL80211_EXT_FEATURE_OPERATING_CHANNEL_VALIDATION = 0x31
+ NL80211_EXT_FEATURE_PROTECTED_TWT = 0x2b
+ NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE = 0x39
+ NL80211_EXT_FEATURE_RRM = 0x1
+ NL80211_EXT_FEATURE_SAE_OFFLOAD_AP = 0x33
+ NL80211_EXT_FEATURE_SAE_OFFLOAD = 0x26
+ NL80211_EXT_FEATURE_SCAN_FREQ_KHZ = 0x2f
+ NL80211_EXT_FEATURE_SCAN_MIN_PREQ_CONTENT = 0x1e
+ NL80211_EXT_FEATURE_SCAN_RANDOM_SN = 0x1d
+ NL80211_EXT_FEATURE_SCAN_START_TIME = 0x3
+ NL80211_EXT_FEATURE_SCHED_SCAN_BAND_SPECIFIC_RSSI_THOLD = 0x23
+ NL80211_EXT_FEATURE_SCHED_SCAN_RELATIVE_RSSI = 0xc
+ NL80211_EXT_FEATURE_SECURE_LTF = 0x37
+ NL80211_EXT_FEATURE_SECURE_RTT = 0x38
+ NL80211_EXT_FEATURE_SET_SCAN_DWELL = 0x5
+ NL80211_EXT_FEATURE_STA_TX_PWR = 0x25
+ NL80211_EXT_FEATURE_TXQS = 0x1c
+ NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP = 0x35
+ NL80211_EXT_FEATURE_VHT_IBSS = 0x0
+ NL80211_EXT_FEATURE_VLAN_OFFLOAD = 0x27
+ NL80211_FEATURE_ACKTO_ESTIMATION = 0x800000
+ NL80211_FEATURE_ACTIVE_MONITOR = 0x20000
+ NL80211_FEATURE_ADVERTISE_CHAN_LIMITS = 0x4000
+ NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE = 0x40000
+ NL80211_FEATURE_AP_SCAN = 0x100
+ NL80211_FEATURE_CELL_BASE_REG_HINTS = 0x8
+ NL80211_FEATURE_DS_PARAM_SET_IE_IN_PROBES = 0x80000
+ NL80211_FEATURE_DYNAMIC_SMPS = 0x2000000
+ NL80211_FEATURE_FULL_AP_CLIENT_STATE = 0x8000
+ NL80211_FEATURE_HT_IBSS = 0x2
+ NL80211_FEATURE_INACTIVITY_TIMER = 0x4
+ NL80211_FEATURE_LOW_PRIORITY_SCAN = 0x40
+ NL80211_FEATURE_MAC_ON_CREATE = 0x8000000
+ NL80211_FEATURE_ND_RANDOM_MAC_ADDR = 0x80000000
+ NL80211_FEATURE_NEED_OBSS_SCAN = 0x400
+ NL80211_FEATURE_P2P_DEVICE_NEEDS_CHANNEL = 0x10
+ NL80211_FEATURE_P2P_GO_CTWIN = 0x800
+ NL80211_FEATURE_P2P_GO_OPPPS = 0x1000
+ NL80211_FEATURE_QUIET = 0x200000
+ NL80211_FEATURE_SAE = 0x20
+ NL80211_FEATURE_SCAN_FLUSH = 0x80
+ NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR = 0x20000000
+ NL80211_FEATURE_SCHED_SCAN_RANDOM_MAC_ADDR = 0x40000000
+ NL80211_FEATURE_SK_TX_STATUS = 0x1
+ NL80211_FEATURE_STATIC_SMPS = 0x1000000
+ NL80211_FEATURE_SUPPORTS_WMM_ADMISSION = 0x4000000
+ NL80211_FEATURE_TDLS_CHANNEL_SWITCH = 0x10000000
+ NL80211_FEATURE_TX_POWER_INSERTION = 0x400000
+ NL80211_FEATURE_USERSPACE_MPM = 0x10000
+ NL80211_FEATURE_VIF_TXPOWER = 0x200
+ NL80211_FEATURE_WFA_TPC_IE_IN_PROBES = 0x100000
+ NL80211_FILS_DISCOVERY_ATTR_INT_MAX = 0x2
+ NL80211_FILS_DISCOVERY_ATTR_INT_MIN = 0x1
+ NL80211_FILS_DISCOVERY_ATTR_MAX = 0x3
+ NL80211_FILS_DISCOVERY_ATTR_TMPL = 0x3
+ NL80211_FILS_DISCOVERY_TMPL_MIN_LEN = 0x2a
+ NL80211_FREQUENCY_ATTR_16MHZ = 0x19
+ NL80211_FREQUENCY_ATTR_1MHZ = 0x15
+ NL80211_FREQUENCY_ATTR_2MHZ = 0x16
+ NL80211_FREQUENCY_ATTR_4MHZ = 0x17
+ NL80211_FREQUENCY_ATTR_8MHZ = 0x18
+ NL80211_FREQUENCY_ATTR_DFS_CAC_TIME = 0xd
+ NL80211_FREQUENCY_ATTR_DFS_STATE = 0x7
+ NL80211_FREQUENCY_ATTR_DFS_TIME = 0x8
+ NL80211_FREQUENCY_ATTR_DISABLED = 0x2
+ NL80211_FREQUENCY_ATTR_FREQ = 0x1
+ NL80211_FREQUENCY_ATTR_GO_CONCURRENT = 0xf
+ NL80211_FREQUENCY_ATTR_INDOOR_ONLY = 0xe
+ NL80211_FREQUENCY_ATTR_IR_CONCURRENT = 0xf
+ NL80211_FREQUENCY_ATTR_MAX = 0x19
+ NL80211_FREQUENCY_ATTR_MAX_TX_POWER = 0x6
+ NL80211_FREQUENCY_ATTR_NO_10MHZ = 0x11
+ NL80211_FREQUENCY_ATTR_NO_160MHZ = 0xc
+ NL80211_FREQUENCY_ATTR_NO_20MHZ = 0x10
+ NL80211_FREQUENCY_ATTR_NO_80MHZ = 0xb
+ NL80211_FREQUENCY_ATTR_NO_HE = 0x13
+ NL80211_FREQUENCY_ATTR_NO_HT40_MINUS = 0x9
+ NL80211_FREQUENCY_ATTR_NO_HT40_PLUS = 0xa
+ NL80211_FREQUENCY_ATTR_NO_IBSS = 0x3
+ NL80211_FREQUENCY_ATTR_NO_IR = 0x3
+ NL80211_FREQUENCY_ATTR_OFFSET = 0x14
+ NL80211_FREQUENCY_ATTR_PASSIVE_SCAN = 0x3
+ NL80211_FREQUENCY_ATTR_RADAR = 0x5
+ NL80211_FREQUENCY_ATTR_WMM = 0x12
+ NL80211_FTM_RESP_ATTR_CIVICLOC = 0x3
+ NL80211_FTM_RESP_ATTR_ENABLED = 0x1
+ NL80211_FTM_RESP_ATTR_LCI = 0x2
+ NL80211_FTM_RESP_ATTR_MAX = 0x3
+ NL80211_FTM_STATS_ASAP_NUM = 0x4
+ NL80211_FTM_STATS_FAILED_NUM = 0x3
+ NL80211_FTM_STATS_MAX = 0xa
+ NL80211_FTM_STATS_NON_ASAP_NUM = 0x5
+ NL80211_FTM_STATS_OUT_OF_WINDOW_TRIGGERS_NUM = 0x9
+ NL80211_FTM_STATS_PAD = 0xa
+ NL80211_FTM_STATS_PARTIAL_NUM = 0x2
+ NL80211_FTM_STATS_RESCHEDULE_REQUESTS_NUM = 0x8
+ NL80211_FTM_STATS_SUCCESS_NUM = 0x1
+ NL80211_FTM_STATS_TOTAL_DURATION_MSEC = 0x6
+ NL80211_FTM_STATS_UNKNOWN_TRIGGERS_NUM = 0x7
+ NL80211_GENL_NAME = "nl80211"
+ NL80211_HE_BSS_COLOR_ATTR_COLOR = 0x1
+ NL80211_HE_BSS_COLOR_ATTR_DISABLED = 0x2
+ NL80211_HE_BSS_COLOR_ATTR_MAX = 0x3
+ NL80211_HE_BSS_COLOR_ATTR_PARTIAL = 0x3
+ NL80211_HE_MAX_CAPABILITY_LEN = 0x36
+ NL80211_HE_MIN_CAPABILITY_LEN = 0x10
+ NL80211_HE_NSS_MAX = 0x8
+ NL80211_HE_OBSS_PD_ATTR_BSS_COLOR_BITMAP = 0x4
+ NL80211_HE_OBSS_PD_ATTR_MAX = 0x6
+ NL80211_HE_OBSS_PD_ATTR_MAX_OFFSET = 0x2
+ NL80211_HE_OBSS_PD_ATTR_MIN_OFFSET = 0x1
+ NL80211_HE_OBSS_PD_ATTR_NON_SRG_MAX_OFFSET = 0x3
+ NL80211_HE_OBSS_PD_ATTR_PARTIAL_BSSID_BITMAP = 0x5
+ NL80211_HE_OBSS_PD_ATTR_SR_CTRL = 0x6
+ NL80211_HIDDEN_SSID_NOT_IN_USE = 0x0
+ NL80211_HIDDEN_SSID_ZERO_CONTENTS = 0x2
+ NL80211_HIDDEN_SSID_ZERO_LEN = 0x1
+ NL80211_HT_CAPABILITY_LEN = 0x1a
+ NL80211_IFACE_COMB_BI_MIN_GCD = 0x7
+ NL80211_IFACE_COMB_LIMITS = 0x1
+ NL80211_IFACE_COMB_MAXNUM = 0x2
+ NL80211_IFACE_COMB_NUM_CHANNELS = 0x4
+ NL80211_IFACE_COMB_RADAR_DETECT_REGIONS = 0x6
+ NL80211_IFACE_COMB_RADAR_DETECT_WIDTHS = 0x5
+ NL80211_IFACE_COMB_STA_AP_BI_MATCH = 0x3
+ NL80211_IFACE_COMB_UNSPEC = 0x0
+ NL80211_IFACE_LIMIT_MAX = 0x1
+ NL80211_IFACE_LIMIT_TYPES = 0x2
+ NL80211_IFACE_LIMIT_UNSPEC = 0x0
+ NL80211_IFTYPE_ADHOC = 0x1
+ NL80211_IFTYPE_AKM_ATTR_IFTYPES = 0x1
+ NL80211_IFTYPE_AKM_ATTR_MAX = 0x2
+ NL80211_IFTYPE_AKM_ATTR_SUITES = 0x2
+ NL80211_IFTYPE_AP = 0x3
+ NL80211_IFTYPE_AP_VLAN = 0x4
+ NL80211_IFTYPE_MAX = 0xc
+ NL80211_IFTYPE_MESH_POINT = 0x7
+ NL80211_IFTYPE_MONITOR = 0x6
+ NL80211_IFTYPE_NAN = 0xc
+ NL80211_IFTYPE_OCB = 0xb
+ NL80211_IFTYPE_P2P_CLIENT = 0x8
+ NL80211_IFTYPE_P2P_DEVICE = 0xa
+ NL80211_IFTYPE_P2P_GO = 0x9
+ NL80211_IFTYPE_STATION = 0x2
+ NL80211_IFTYPE_UNSPECIFIED = 0x0
+ NL80211_IFTYPE_WDS = 0x5
+ NL80211_KCK_EXT_LEN = 0x18
+ NL80211_KCK_LEN = 0x10
+ NL80211_KEK_EXT_LEN = 0x20
+ NL80211_KEK_LEN = 0x10
+ NL80211_KEY_CIPHER = 0x3
+ NL80211_KEY_DATA = 0x1
+ NL80211_KEY_DEFAULT_BEACON = 0xa
+ NL80211_KEY_DEFAULT = 0x5
+ NL80211_KEY_DEFAULT_MGMT = 0x6
+ NL80211_KEY_DEFAULT_TYPE_MULTICAST = 0x2
+ NL80211_KEY_DEFAULT_TYPES = 0x8
+ NL80211_KEY_DEFAULT_TYPE_UNICAST = 0x1
+ NL80211_KEY_IDX = 0x2
+ NL80211_KEY_MAX = 0xa
+ NL80211_KEY_MODE = 0x9
+ NL80211_KEY_NO_TX = 0x1
+ NL80211_KEY_RX_TX = 0x0
+ NL80211_KEY_SEQ = 0x4
+ NL80211_KEY_SET_TX = 0x2
+ NL80211_KEY_TYPE = 0x7
+ NL80211_KEYTYPE_GROUP = 0x0
+ NL80211_KEYTYPE_PAIRWISE = 0x1
+ NL80211_KEYTYPE_PEERKEY = 0x2
+ NL80211_MAX_NR_AKM_SUITES = 0x2
+ NL80211_MAX_NR_CIPHER_SUITES = 0x5
+ NL80211_MAX_SUPP_HT_RATES = 0x4d
+ NL80211_MAX_SUPP_RATES = 0x20
+ NL80211_MAX_SUPP_REG_RULES = 0x80
+ NL80211_MESHCONF_ATTR_MAX = 0x1f
+ NL80211_MESHCONF_AUTO_OPEN_PLINKS = 0x7
+ NL80211_MESHCONF_AWAKE_WINDOW = 0x1b
+ NL80211_MESHCONF_CONFIRM_TIMEOUT = 0x2
+ NL80211_MESHCONF_CONNECTED_TO_AS = 0x1f
+ NL80211_MESHCONF_CONNECTED_TO_GATE = 0x1d
+ NL80211_MESHCONF_ELEMENT_TTL = 0xf
+ NL80211_MESHCONF_FORWARDING = 0x13
+ NL80211_MESHCONF_GATE_ANNOUNCEMENTS = 0x11
+ NL80211_MESHCONF_HOLDING_TIMEOUT = 0x3
+ NL80211_MESHCONF_HT_OPMODE = 0x16
+ NL80211_MESHCONF_HWMP_ACTIVE_PATH_TIMEOUT = 0xb
+ NL80211_MESHCONF_HWMP_CONFIRMATION_INTERVAL = 0x19
+ NL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES = 0x8
+ NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME = 0xd
+ NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT = 0x17
+ NL80211_MESHCONF_HWMP_PERR_MIN_INTERVAL = 0x12
+ NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL = 0xc
+ NL80211_MESHCONF_HWMP_RANN_INTERVAL = 0x10
+ NL80211_MESHCONF_HWMP_ROOT_INTERVAL = 0x18
+ NL80211_MESHCONF_HWMP_ROOTMODE = 0xe
+ NL80211_MESHCONF_MAX_PEER_LINKS = 0x4
+ NL80211_MESHCONF_MAX_RETRIES = 0x5
+ NL80211_MESHCONF_MIN_DISCOVERY_TIMEOUT = 0xa
+ NL80211_MESHCONF_NOLEARN = 0x1e
+ NL80211_MESHCONF_PATH_REFRESH_TIME = 0x9
+ NL80211_MESHCONF_PLINK_TIMEOUT = 0x1c
+ NL80211_MESHCONF_POWER_MODE = 0x1a
+ NL80211_MESHCONF_RETRY_TIMEOUT = 0x1
+ NL80211_MESHCONF_RSSI_THRESHOLD = 0x14
+ NL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR = 0x15
+ NL80211_MESHCONF_TTL = 0x6
+ NL80211_MESH_POWER_ACTIVE = 0x1
+ NL80211_MESH_POWER_DEEP_SLEEP = 0x3
+ NL80211_MESH_POWER_LIGHT_SLEEP = 0x2
+ NL80211_MESH_POWER_MAX = 0x3
+ NL80211_MESH_POWER_UNKNOWN = 0x0
+ NL80211_MESH_SETUP_ATTR_MAX = 0x8
+ NL80211_MESH_SETUP_AUTH_PROTOCOL = 0x8
+ NL80211_MESH_SETUP_ENABLE_VENDOR_METRIC = 0x2
+ NL80211_MESH_SETUP_ENABLE_VENDOR_PATH_SEL = 0x1
+ NL80211_MESH_SETUP_ENABLE_VENDOR_SYNC = 0x6
+ NL80211_MESH_SETUP_IE = 0x3
+ NL80211_MESH_SETUP_USERSPACE_AMPE = 0x5
+ NL80211_MESH_SETUP_USERSPACE_AUTH = 0x4
+ NL80211_MESH_SETUP_USERSPACE_MPM = 0x7
+ NL80211_MESH_SETUP_VENDOR_PATH_SEL_IE = 0x3
+ NL80211_MFP_NO = 0x0
+ NL80211_MFP_OPTIONAL = 0x2
+ NL80211_MFP_REQUIRED = 0x1
+ NL80211_MIN_REMAIN_ON_CHANNEL_TIME = 0xa
+ NL80211_MNTR_FLAG_ACTIVE = 0x6
+ NL80211_MNTR_FLAG_CONTROL = 0x3
+ NL80211_MNTR_FLAG_COOK_FRAMES = 0x5
+ NL80211_MNTR_FLAG_FCSFAIL = 0x1
+ NL80211_MNTR_FLAG_MAX = 0x6
+ NL80211_MNTR_FLAG_OTHER_BSS = 0x4
+ NL80211_MNTR_FLAG_PLCPFAIL = 0x2
+ NL80211_MPATH_FLAG_ACTIVE = 0x1
+ NL80211_MPATH_FLAG_FIXED = 0x8
+ NL80211_MPATH_FLAG_RESOLVED = 0x10
+ NL80211_MPATH_FLAG_RESOLVING = 0x2
+ NL80211_MPATH_FLAG_SN_VALID = 0x4
+ NL80211_MPATH_INFO_DISCOVERY_RETRIES = 0x7
+ NL80211_MPATH_INFO_DISCOVERY_TIMEOUT = 0x6
+ NL80211_MPATH_INFO_EXPTIME = 0x4
+ NL80211_MPATH_INFO_FLAGS = 0x5
+ NL80211_MPATH_INFO_FRAME_QLEN = 0x1
+ NL80211_MPATH_INFO_HOP_COUNT = 0x8
+ NL80211_MPATH_INFO_MAX = 0x9
+ NL80211_MPATH_INFO_METRIC = 0x3
+ NL80211_MPATH_INFO_PATH_CHANGE = 0x9
+ NL80211_MPATH_INFO_SN = 0x2
+ NL80211_MULTICAST_GROUP_CONFIG = "config"
+ NL80211_MULTICAST_GROUP_MLME = "mlme"
+ NL80211_MULTICAST_GROUP_NAN = "nan"
+ NL80211_MULTICAST_GROUP_REG = "regulatory"
+ NL80211_MULTICAST_GROUP_SCAN = "scan"
+ NL80211_MULTICAST_GROUP_TESTMODE = "testmode"
+ NL80211_MULTICAST_GROUP_VENDOR = "vendor"
+ NL80211_NAN_FUNC_ATTR_MAX = 0x10
+ NL80211_NAN_FUNC_CLOSE_RANGE = 0x9
+ NL80211_NAN_FUNC_FOLLOW_UP = 0x2
+ NL80211_NAN_FUNC_FOLLOW_UP_DEST = 0x8
+ NL80211_NAN_FUNC_FOLLOW_UP_ID = 0x6
+ NL80211_NAN_FUNC_FOLLOW_UP_REQ_ID = 0x7
+ NL80211_NAN_FUNC_INSTANCE_ID = 0xf
+ NL80211_NAN_FUNC_MAX_TYPE = 0x2
+ NL80211_NAN_FUNC_PUBLISH_BCAST = 0x4
+ NL80211_NAN_FUNC_PUBLISH = 0x0
+ NL80211_NAN_FUNC_PUBLISH_TYPE = 0x3
+ NL80211_NAN_FUNC_RX_MATCH_FILTER = 0xd
+ NL80211_NAN_FUNC_SERVICE_ID = 0x2
+ NL80211_NAN_FUNC_SERVICE_ID_LEN = 0x6
+ NL80211_NAN_FUNC_SERVICE_INFO = 0xb
+ NL80211_NAN_FUNC_SERVICE_SPEC_INFO_MAX_LEN = 0xff
+ NL80211_NAN_FUNC_SRF = 0xc
+ NL80211_NAN_FUNC_SRF_MAX_LEN = 0xff
+ NL80211_NAN_FUNC_SUBSCRIBE_ACTIVE = 0x5
+ NL80211_NAN_FUNC_SUBSCRIBE = 0x1
+ NL80211_NAN_FUNC_TERM_REASON = 0x10
+ NL80211_NAN_FUNC_TERM_REASON_ERROR = 0x2
+ NL80211_NAN_FUNC_TERM_REASON_TTL_EXPIRED = 0x1
+ NL80211_NAN_FUNC_TERM_REASON_USER_REQUEST = 0x0
+ NL80211_NAN_FUNC_TTL = 0xa
+ NL80211_NAN_FUNC_TX_MATCH_FILTER = 0xe
+ NL80211_NAN_FUNC_TYPE = 0x1
+ NL80211_NAN_MATCH_ATTR_MAX = 0x2
+ NL80211_NAN_MATCH_FUNC_LOCAL = 0x1
+ NL80211_NAN_MATCH_FUNC_PEER = 0x2
+ NL80211_NAN_SOLICITED_PUBLISH = 0x1
+ NL80211_NAN_SRF_ATTR_MAX = 0x4
+ NL80211_NAN_SRF_BF = 0x2
+ NL80211_NAN_SRF_BF_IDX = 0x3
+ NL80211_NAN_SRF_INCLUDE = 0x1
+ NL80211_NAN_SRF_MAC_ADDRS = 0x4
+ NL80211_NAN_UNSOLICITED_PUBLISH = 0x2
+ NL80211_NUM_ACS = 0x4
+ NL80211_P2P_PS_SUPPORTED = 0x1
+ NL80211_P2P_PS_UNSUPPORTED = 0x0
+ NL80211_PKTPAT_MASK = 0x1
+ NL80211_PKTPAT_OFFSET = 0x3
+ NL80211_PKTPAT_PATTERN = 0x2
+ NL80211_PLINK_ACTION_BLOCK = 0x2
+ NL80211_PLINK_ACTION_NO_ACTION = 0x0
+ NL80211_PLINK_ACTION_OPEN = 0x1
+ NL80211_PLINK_BLOCKED = 0x6
+ NL80211_PLINK_CNF_RCVD = 0x3
+ NL80211_PLINK_ESTAB = 0x4
+ NL80211_PLINK_HOLDING = 0x5
+ NL80211_PLINK_LISTEN = 0x0
+ NL80211_PLINK_OPN_RCVD = 0x2
+ NL80211_PLINK_OPN_SNT = 0x1
+ NL80211_PMKSA_CANDIDATE_BSSID = 0x2
+ NL80211_PMKSA_CANDIDATE_INDEX = 0x1
+ NL80211_PMKSA_CANDIDATE_PREAUTH = 0x3
+ NL80211_PMSR_ATTR_MAX = 0x5
+ NL80211_PMSR_ATTR_MAX_PEERS = 0x1
+ NL80211_PMSR_ATTR_PEERS = 0x5
+ NL80211_PMSR_ATTR_RANDOMIZE_MAC_ADDR = 0x3
+ NL80211_PMSR_ATTR_REPORT_AP_TSF = 0x2
+ NL80211_PMSR_ATTR_TYPE_CAPA = 0x4
+ NL80211_PMSR_FTM_CAPA_ATTR_ASAP = 0x1
+ NL80211_PMSR_FTM_CAPA_ATTR_BANDWIDTHS = 0x6
+ NL80211_PMSR_FTM_CAPA_ATTR_MAX_BURSTS_EXPONENT = 0x7
+ NL80211_PMSR_FTM_CAPA_ATTR_MAX = 0xa
+ NL80211_PMSR_FTM_CAPA_ATTR_MAX_FTMS_PER_BURST = 0x8
+ NL80211_PMSR_FTM_CAPA_ATTR_NON_ASAP = 0x2
+ NL80211_PMSR_FTM_CAPA_ATTR_NON_TRIGGER_BASED = 0xa
+ NL80211_PMSR_FTM_CAPA_ATTR_PREAMBLES = 0x5
+ NL80211_PMSR_FTM_CAPA_ATTR_REQ_CIVICLOC = 0x4
+ NL80211_PMSR_FTM_CAPA_ATTR_REQ_LCI = 0x3
+ NL80211_PMSR_FTM_CAPA_ATTR_TRIGGER_BASED = 0x9
+ NL80211_PMSR_FTM_FAILURE_BAD_CHANGED_PARAMS = 0x7
+ NL80211_PMSR_FTM_FAILURE_INVALID_TIMESTAMP = 0x5
+ NL80211_PMSR_FTM_FAILURE_NO_RESPONSE = 0x1
+ NL80211_PMSR_FTM_FAILURE_PEER_BUSY = 0x6
+ NL80211_PMSR_FTM_FAILURE_PEER_NOT_CAPABLE = 0x4
+ NL80211_PMSR_FTM_FAILURE_REJECTED = 0x2
+ NL80211_PMSR_FTM_FAILURE_UNSPECIFIED = 0x0
+ NL80211_PMSR_FTM_FAILURE_WRONG_CHANNEL = 0x3
+ NL80211_PMSR_FTM_REQ_ATTR_ASAP = 0x1
+ NL80211_PMSR_FTM_REQ_ATTR_BURST_DURATION = 0x5
+ NL80211_PMSR_FTM_REQ_ATTR_BURST_PERIOD = 0x4
+ NL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST = 0x6
+ NL80211_PMSR_FTM_REQ_ATTR_LMR_FEEDBACK = 0xc
+ NL80211_PMSR_FTM_REQ_ATTR_MAX = 0xd
+ NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED = 0xb
+ NL80211_PMSR_FTM_REQ_ATTR_NUM_BURSTS_EXP = 0x3
+ NL80211_PMSR_FTM_REQ_ATTR_NUM_FTMR_RETRIES = 0x7
+ NL80211_PMSR_FTM_REQ_ATTR_PREAMBLE = 0x2
+ NL80211_PMSR_FTM_REQ_ATTR_REQUEST_CIVICLOC = 0x9
+ NL80211_PMSR_FTM_REQ_ATTR_REQUEST_LCI = 0x8
+ NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED = 0xa
+ NL80211_PMSR_FTM_RESP_ATTR_BURST_DURATION = 0x7
+ NL80211_PMSR_FTM_RESP_ATTR_BURST_INDEX = 0x2
+ NL80211_PMSR_FTM_RESP_ATTR_BUSY_RETRY_TIME = 0x5
+ NL80211_PMSR_FTM_RESP_ATTR_CIVICLOC = 0x14
+ NL80211_PMSR_FTM_RESP_ATTR_DIST_AVG = 0x10
+ NL80211_PMSR_FTM_RESP_ATTR_DIST_SPREAD = 0x12
+ NL80211_PMSR_FTM_RESP_ATTR_DIST_VARIANCE = 0x11
+ NL80211_PMSR_FTM_RESP_ATTR_FAIL_REASON = 0x1
+ NL80211_PMSR_FTM_RESP_ATTR_FTMS_PER_BURST = 0x8
+ NL80211_PMSR_FTM_RESP_ATTR_LCI = 0x13
+ NL80211_PMSR_FTM_RESP_ATTR_MAX = 0x15
+ NL80211_PMSR_FTM_RESP_ATTR_NUM_BURSTS_EXP = 0x6
+ NL80211_PMSR_FTM_RESP_ATTR_NUM_FTMR_ATTEMPTS = 0x3
+ NL80211_PMSR_FTM_RESP_ATTR_NUM_FTMR_SUCCESSES = 0x4
+ NL80211_PMSR_FTM_RESP_ATTR_PAD = 0x15
+ NL80211_PMSR_FTM_RESP_ATTR_RSSI_AVG = 0x9
+ NL80211_PMSR_FTM_RESP_ATTR_RSSI_SPREAD = 0xa
+ NL80211_PMSR_FTM_RESP_ATTR_RTT_AVG = 0xd
+ NL80211_PMSR_FTM_RESP_ATTR_RTT_SPREAD = 0xf
+ NL80211_PMSR_FTM_RESP_ATTR_RTT_VARIANCE = 0xe
+ NL80211_PMSR_FTM_RESP_ATTR_RX_RATE = 0xc
+ NL80211_PMSR_FTM_RESP_ATTR_TX_RATE = 0xb
+ NL80211_PMSR_PEER_ATTR_ADDR = 0x1
+ NL80211_PMSR_PEER_ATTR_CHAN = 0x2
+ NL80211_PMSR_PEER_ATTR_MAX = 0x4
+ NL80211_PMSR_PEER_ATTR_REQ = 0x3
+ NL80211_PMSR_PEER_ATTR_RESP = 0x4
+ NL80211_PMSR_REQ_ATTR_DATA = 0x1
+ NL80211_PMSR_REQ_ATTR_GET_AP_TSF = 0x2
+ NL80211_PMSR_REQ_ATTR_MAX = 0x2
+ NL80211_PMSR_RESP_ATTR_AP_TSF = 0x4
+ NL80211_PMSR_RESP_ATTR_DATA = 0x1
+ NL80211_PMSR_RESP_ATTR_FINAL = 0x5
+ NL80211_PMSR_RESP_ATTR_HOST_TIME = 0x3
+ NL80211_PMSR_RESP_ATTR_MAX = 0x6
+ NL80211_PMSR_RESP_ATTR_PAD = 0x6
+ NL80211_PMSR_RESP_ATTR_STATUS = 0x2
+ NL80211_PMSR_STATUS_FAILURE = 0x3
+ NL80211_PMSR_STATUS_REFUSED = 0x1
+ NL80211_PMSR_STATUS_SUCCESS = 0x0
+ NL80211_PMSR_STATUS_TIMEOUT = 0x2
+ NL80211_PMSR_TYPE_FTM = 0x1
+ NL80211_PMSR_TYPE_INVALID = 0x0
+ NL80211_PMSR_TYPE_MAX = 0x1
+ NL80211_PREAMBLE_DMG = 0x3
+ NL80211_PREAMBLE_HE = 0x4
+ NL80211_PREAMBLE_HT = 0x1
+ NL80211_PREAMBLE_LEGACY = 0x0
+ NL80211_PREAMBLE_VHT = 0x2
+ NL80211_PROBE_RESP_OFFLOAD_SUPPORT_80211U = 0x8
+ NL80211_PROBE_RESP_OFFLOAD_SUPPORT_P2P = 0x4
+ NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2 = 0x2
+ NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS = 0x1
+ NL80211_PROTOCOL_FEATURE_SPLIT_WIPHY_DUMP = 0x1
+ NL80211_PS_DISABLED = 0x0
+ NL80211_PS_ENABLED = 0x1
+ NL80211_RADAR_CAC_ABORTED = 0x2
+ NL80211_RADAR_CAC_FINISHED = 0x1
+ NL80211_RADAR_CAC_STARTED = 0x5
+ NL80211_RADAR_DETECTED = 0x0
+ NL80211_RADAR_NOP_FINISHED = 0x3
+ NL80211_RADAR_PRE_CAC_EXPIRED = 0x4
+ NL80211_RATE_INFO_10_MHZ_WIDTH = 0xb
+ NL80211_RATE_INFO_160_MHZ_WIDTH = 0xa
+ NL80211_RATE_INFO_40_MHZ_WIDTH = 0x3
+ NL80211_RATE_INFO_5_MHZ_WIDTH = 0xc
+ NL80211_RATE_INFO_80_MHZ_WIDTH = 0x8
+ NL80211_RATE_INFO_80P80_MHZ_WIDTH = 0x9
+ NL80211_RATE_INFO_BITRATE32 = 0x5
+ NL80211_RATE_INFO_BITRATE = 0x1
+ NL80211_RATE_INFO_HE_1XLTF = 0x0
+ NL80211_RATE_INFO_HE_2XLTF = 0x1
+ NL80211_RATE_INFO_HE_4XLTF = 0x2
+ NL80211_RATE_INFO_HE_DCM = 0x10
+ NL80211_RATE_INFO_HE_GI_0_8 = 0x0
+ NL80211_RATE_INFO_HE_GI_1_6 = 0x1
+ NL80211_RATE_INFO_HE_GI_3_2 = 0x2
+ NL80211_RATE_INFO_HE_GI = 0xf
+ NL80211_RATE_INFO_HE_MCS = 0xd
+ NL80211_RATE_INFO_HE_NSS = 0xe
+ NL80211_RATE_INFO_HE_RU_ALLOC_106 = 0x2
+ NL80211_RATE_INFO_HE_RU_ALLOC_242 = 0x3
+ NL80211_RATE_INFO_HE_RU_ALLOC_26 = 0x0
+ NL80211_RATE_INFO_HE_RU_ALLOC_2x996 = 0x6
+ NL80211_RATE_INFO_HE_RU_ALLOC_484 = 0x4
+ NL80211_RATE_INFO_HE_RU_ALLOC_52 = 0x1
+ NL80211_RATE_INFO_HE_RU_ALLOC_996 = 0x5
+ NL80211_RATE_INFO_HE_RU_ALLOC = 0x11
+ NL80211_RATE_INFO_MAX = 0x11
+ NL80211_RATE_INFO_MCS = 0x2
+ NL80211_RATE_INFO_SHORT_GI = 0x4
+ NL80211_RATE_INFO_VHT_MCS = 0x6
+ NL80211_RATE_INFO_VHT_NSS = 0x7
+ NL80211_REGDOM_SET_BY_CORE = 0x0
+ NL80211_REGDOM_SET_BY_COUNTRY_IE = 0x3
+ NL80211_REGDOM_SET_BY_DRIVER = 0x2
+ NL80211_REGDOM_SET_BY_USER = 0x1
+ NL80211_REGDOM_TYPE_COUNTRY = 0x0
+ NL80211_REGDOM_TYPE_CUSTOM_WORLD = 0x2
+ NL80211_REGDOM_TYPE_INTERSECTION = 0x3
+ NL80211_REGDOM_TYPE_WORLD = 0x1
+ NL80211_REG_RULE_ATTR_MAX = 0x7
+ NL80211_REKEY_DATA_AKM = 0x4
+ NL80211_REKEY_DATA_KCK = 0x2
+ NL80211_REKEY_DATA_KEK = 0x1
+ NL80211_REKEY_DATA_REPLAY_CTR = 0x3
+ NL80211_REPLAY_CTR_LEN = 0x8
+ NL80211_RRF_AUTO_BW = 0x800
+ NL80211_RRF_DFS = 0x10
+ NL80211_RRF_GO_CONCURRENT = 0x1000
+ NL80211_RRF_IR_CONCURRENT = 0x1000
+ NL80211_RRF_NO_160MHZ = 0x10000
+ NL80211_RRF_NO_80MHZ = 0x8000
+ NL80211_RRF_NO_CCK = 0x2
+ NL80211_RRF_NO_HE = 0x20000
+ NL80211_RRF_NO_HT40 = 0x6000
+ NL80211_RRF_NO_HT40MINUS = 0x2000
+ NL80211_RRF_NO_HT40PLUS = 0x4000
+ NL80211_RRF_NO_IBSS = 0x80
+ NL80211_RRF_NO_INDOOR = 0x4
+ NL80211_RRF_NO_IR_ALL = 0x180
+ NL80211_RRF_NO_IR = 0x80
+ NL80211_RRF_NO_OFDM = 0x1
+ NL80211_RRF_NO_OUTDOOR = 0x8
+ NL80211_RRF_PASSIVE_SCAN = 0x80
+ NL80211_RRF_PTMP_ONLY = 0x40
+ NL80211_RRF_PTP_ONLY = 0x20
+ NL80211_RXMGMT_FLAG_ANSWERED = 0x1
+ NL80211_RXMGMT_FLAG_EXTERNAL_AUTH = 0x2
+ NL80211_SAE_PWE_BOTH = 0x3
+ NL80211_SAE_PWE_HASH_TO_ELEMENT = 0x2
+ NL80211_SAE_PWE_HUNT_AND_PECK = 0x1
+ NL80211_SAE_PWE_UNSPECIFIED = 0x0
+ NL80211_SAR_ATTR_MAX = 0x2
+ NL80211_SAR_ATTR_SPECS = 0x2
+ NL80211_SAR_ATTR_SPECS_END_FREQ = 0x4
+ NL80211_SAR_ATTR_SPECS_MAX = 0x4
+ NL80211_SAR_ATTR_SPECS_POWER = 0x1
+ NL80211_SAR_ATTR_SPECS_RANGE_INDEX = 0x2
+ NL80211_SAR_ATTR_SPECS_START_FREQ = 0x3
+ NL80211_SAR_ATTR_TYPE = 0x1
+ NL80211_SAR_TYPE_POWER = 0x0
+ NL80211_SCAN_FLAG_ACCEPT_BCAST_PROBE_RESP = 0x20
+ NL80211_SCAN_FLAG_AP = 0x4
+ NL80211_SCAN_FLAG_COLOCATED_6GHZ = 0x4000
+ NL80211_SCAN_FLAG_FILS_MAX_CHANNEL_TIME = 0x10
+ NL80211_SCAN_FLAG_FLUSH = 0x2
+ NL80211_SCAN_FLAG_FREQ_KHZ = 0x2000
+ NL80211_SCAN_FLAG_HIGH_ACCURACY = 0x400
+ NL80211_SCAN_FLAG_LOW_POWER = 0x200
+ NL80211_SCAN_FLAG_LOW_PRIORITY = 0x1
+ NL80211_SCAN_FLAG_LOW_SPAN = 0x100
+ NL80211_SCAN_FLAG_MIN_PREQ_CONTENT = 0x1000
+ NL80211_SCAN_FLAG_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION = 0x80
+ NL80211_SCAN_FLAG_OCE_PROBE_REQ_HIGH_TX_RATE = 0x40
+ NL80211_SCAN_FLAG_RANDOM_ADDR = 0x8
+ NL80211_SCAN_FLAG_RANDOM_SN = 0x800
+ NL80211_SCAN_RSSI_THOLD_OFF = -0x12c
+ NL80211_SCHED_SCAN_MATCH_ATTR_BSSID = 0x5
+ NL80211_SCHED_SCAN_MATCH_ATTR_MAX = 0x6
+ NL80211_SCHED_SCAN_MATCH_ATTR_RELATIVE_RSSI = 0x3
+ NL80211_SCHED_SCAN_MATCH_ATTR_RSSI_ADJUST = 0x4
+ NL80211_SCHED_SCAN_MATCH_ATTR_RSSI = 0x2
+ NL80211_SCHED_SCAN_MATCH_ATTR_SSID = 0x1
+ NL80211_SCHED_SCAN_MATCH_PER_BAND_RSSI = 0x6
+ NL80211_SCHED_SCAN_PLAN_INTERVAL = 0x1
+ NL80211_SCHED_SCAN_PLAN_ITERATIONS = 0x2
+ NL80211_SCHED_SCAN_PLAN_MAX = 0x2
+ NL80211_SMPS_DYNAMIC = 0x2
+ NL80211_SMPS_MAX = 0x2
+ NL80211_SMPS_OFF = 0x0
+ NL80211_SMPS_STATIC = 0x1
+ NL80211_STA_BSS_PARAM_BEACON_INTERVAL = 0x5
+ NL80211_STA_BSS_PARAM_CTS_PROT = 0x1
+ NL80211_STA_BSS_PARAM_DTIM_PERIOD = 0x4
+ NL80211_STA_BSS_PARAM_MAX = 0x5
+ NL80211_STA_BSS_PARAM_SHORT_PREAMBLE = 0x2
+ NL80211_STA_BSS_PARAM_SHORT_SLOT_TIME = 0x3
+ NL80211_STA_FLAG_ASSOCIATED = 0x7
+ NL80211_STA_FLAG_AUTHENTICATED = 0x5
+ NL80211_STA_FLAG_AUTHORIZED = 0x1
+ NL80211_STA_FLAG_MAX = 0x7
+ NL80211_STA_FLAG_MAX_OLD_API = 0x6
+ NL80211_STA_FLAG_MFP = 0x4
+ NL80211_STA_FLAG_SHORT_PREAMBLE = 0x2
+ NL80211_STA_FLAG_TDLS_PEER = 0x6
+ NL80211_STA_FLAG_WME = 0x3
+ NL80211_STA_INFO_ACK_SIGNAL_AVG = 0x23
+ NL80211_STA_INFO_ACK_SIGNAL = 0x22
+ NL80211_STA_INFO_AIRTIME_LINK_METRIC = 0x29
+ NL80211_STA_INFO_AIRTIME_WEIGHT = 0x28
+ NL80211_STA_INFO_ASSOC_AT_BOOTTIME = 0x2a
+ NL80211_STA_INFO_BEACON_LOSS = 0x12
+ NL80211_STA_INFO_BEACON_RX = 0x1d
+ NL80211_STA_INFO_BEACON_SIGNAL_AVG = 0x1e
+ NL80211_STA_INFO_BSS_PARAM = 0xf
+ NL80211_STA_INFO_CHAIN_SIGNAL_AVG = 0x1a
+ NL80211_STA_INFO_CHAIN_SIGNAL = 0x19
+ NL80211_STA_INFO_CONNECTED_TIME = 0x10
+ NL80211_STA_INFO_CONNECTED_TO_AS = 0x2b
+ NL80211_STA_INFO_CONNECTED_TO_GATE = 0x26
+ NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG = 0x23
+ NL80211_STA_INFO_EXPECTED_THROUGHPUT = 0x1b
+ NL80211_STA_INFO_FCS_ERROR_COUNT = 0x25
+ NL80211_STA_INFO_INACTIVE_TIME = 0x1
+ NL80211_STA_INFO_LLID = 0x4
+ NL80211_STA_INFO_LOCAL_PM = 0x14
+ NL80211_STA_INFO_MAX = 0x2b
+ NL80211_STA_INFO_NONPEER_PM = 0x16
+ NL80211_STA_INFO_PAD = 0x21
+ NL80211_STA_INFO_PEER_PM = 0x15
+ NL80211_STA_INFO_PLID = 0x5
+ NL80211_STA_INFO_PLINK_STATE = 0x6
+ NL80211_STA_INFO_RX_BITRATE = 0xe
+ NL80211_STA_INFO_RX_BYTES64 = 0x17
+ NL80211_STA_INFO_RX_BYTES = 0x2
+ NL80211_STA_INFO_RX_DROP_MISC = 0x1c
+ NL80211_STA_INFO_RX_DURATION = 0x20
+ NL80211_STA_INFO_RX_MPDUS = 0x24
+ NL80211_STA_INFO_RX_PACKETS = 0x9
+ NL80211_STA_INFO_SIGNAL_AVG = 0xd
+ NL80211_STA_INFO_SIGNAL = 0x7
+ NL80211_STA_INFO_STA_FLAGS = 0x11
+ NL80211_STA_INFO_TID_STATS = 0x1f
+ NL80211_STA_INFO_T_OFFSET = 0x13
+ NL80211_STA_INFO_TX_BITRATE = 0x8
+ NL80211_STA_INFO_TX_BYTES64 = 0x18
+ NL80211_STA_INFO_TX_BYTES = 0x3
+ NL80211_STA_INFO_TX_DURATION = 0x27
+ NL80211_STA_INFO_TX_FAILED = 0xc
+ NL80211_STA_INFO_TX_PACKETS = 0xa
+ NL80211_STA_INFO_TX_RETRIES = 0xb
+ NL80211_STA_WME_MAX = 0x2
+ NL80211_STA_WME_MAX_SP = 0x2
+ NL80211_STA_WME_UAPSD_QUEUES = 0x1
+ NL80211_SURVEY_INFO_CHANNEL_TIME_BUSY = 0x5
+ NL80211_SURVEY_INFO_CHANNEL_TIME = 0x4
+ NL80211_SURVEY_INFO_CHANNEL_TIME_EXT_BUSY = 0x6
+ NL80211_SURVEY_INFO_CHANNEL_TIME_RX = 0x7
+ NL80211_SURVEY_INFO_CHANNEL_TIME_TX = 0x8
+ NL80211_SURVEY_INFO_FREQUENCY = 0x1
+ NL80211_SURVEY_INFO_FREQUENCY_OFFSET = 0xc
+ NL80211_SURVEY_INFO_IN_USE = 0x3
+ NL80211_SURVEY_INFO_MAX = 0xc
+ NL80211_SURVEY_INFO_NOISE = 0x2
+ NL80211_SURVEY_INFO_PAD = 0xa
+ NL80211_SURVEY_INFO_TIME_BSS_RX = 0xb
+ NL80211_SURVEY_INFO_TIME_BUSY = 0x5
+ NL80211_SURVEY_INFO_TIME = 0x4
+ NL80211_SURVEY_INFO_TIME_EXT_BUSY = 0x6
+ NL80211_SURVEY_INFO_TIME_RX = 0x7
+ NL80211_SURVEY_INFO_TIME_SCAN = 0x9
+ NL80211_SURVEY_INFO_TIME_TX = 0x8
+ NL80211_TDLS_DISABLE_LINK = 0x4
+ NL80211_TDLS_DISCOVERY_REQ = 0x0
+ NL80211_TDLS_ENABLE_LINK = 0x3
+ NL80211_TDLS_PEER_HE = 0x8
+ NL80211_TDLS_PEER_HT = 0x1
+ NL80211_TDLS_PEER_VHT = 0x2
+ NL80211_TDLS_PEER_WMM = 0x4
+ NL80211_TDLS_SETUP = 0x1
+ NL80211_TDLS_TEARDOWN = 0x2
+ NL80211_TID_CONFIG_ATTR_AMPDU_CTRL = 0x9
+ NL80211_TID_CONFIG_ATTR_AMSDU_CTRL = 0xb
+ NL80211_TID_CONFIG_ATTR_MAX = 0xd
+ NL80211_TID_CONFIG_ATTR_NOACK = 0x6
+ NL80211_TID_CONFIG_ATTR_OVERRIDE = 0x4
+ NL80211_TID_CONFIG_ATTR_PAD = 0x1
+ NL80211_TID_CONFIG_ATTR_PEER_SUPP = 0x3
+ NL80211_TID_CONFIG_ATTR_RETRY_LONG = 0x8
+ NL80211_TID_CONFIG_ATTR_RETRY_SHORT = 0x7
+ NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL = 0xa
+ NL80211_TID_CONFIG_ATTR_TIDS = 0x5
+ NL80211_TID_CONFIG_ATTR_TX_RATE = 0xd
+ NL80211_TID_CONFIG_ATTR_TX_RATE_TYPE = 0xc
+ NL80211_TID_CONFIG_ATTR_VIF_SUPP = 0x2
+ NL80211_TID_CONFIG_DISABLE = 0x1
+ NL80211_TID_CONFIG_ENABLE = 0x0
+ NL80211_TID_STATS_MAX = 0x6
+ NL80211_TID_STATS_PAD = 0x5
+ NL80211_TID_STATS_RX_MSDU = 0x1
+ NL80211_TID_STATS_TX_MSDU = 0x2
+ NL80211_TID_STATS_TX_MSDU_FAILED = 0x4
+ NL80211_TID_STATS_TX_MSDU_RETRIES = 0x3
+ NL80211_TID_STATS_TXQ_STATS = 0x6
+ NL80211_TIMEOUT_ASSOC = 0x3
+ NL80211_TIMEOUT_AUTH = 0x2
+ NL80211_TIMEOUT_SCAN = 0x1
+ NL80211_TIMEOUT_UNSPECIFIED = 0x0
+ NL80211_TKIP_DATA_OFFSET_ENCR_KEY = 0x0
+ NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY = 0x18
+ NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY = 0x10
+ NL80211_TX_POWER_AUTOMATIC = 0x0
+ NL80211_TX_POWER_FIXED = 0x2
+ NL80211_TX_POWER_LIMITED = 0x1
+ NL80211_TXQ_ATTR_AC = 0x1
+ NL80211_TXQ_ATTR_AIFS = 0x5
+ NL80211_TXQ_ATTR_CWMAX = 0x4
+ NL80211_TXQ_ATTR_CWMIN = 0x3
+ NL80211_TXQ_ATTR_MAX = 0x5
+ NL80211_TXQ_ATTR_QUEUE = 0x1
+ NL80211_TXQ_ATTR_TXOP = 0x2
+ NL80211_TXQ_Q_BE = 0x2
+ NL80211_TXQ_Q_BK = 0x3
+ NL80211_TXQ_Q_VI = 0x1
+ NL80211_TXQ_Q_VO = 0x0
+ NL80211_TXQ_STATS_BACKLOG_BYTES = 0x1
+ NL80211_TXQ_STATS_BACKLOG_PACKETS = 0x2
+ NL80211_TXQ_STATS_COLLISIONS = 0x8
+ NL80211_TXQ_STATS_DROPS = 0x4
+ NL80211_TXQ_STATS_ECN_MARKS = 0x5
+ NL80211_TXQ_STATS_FLOWS = 0x3
+ NL80211_TXQ_STATS_MAX = 0xb
+ NL80211_TXQ_STATS_MAX_FLOWS = 0xb
+ NL80211_TXQ_STATS_OVERLIMIT = 0x6
+ NL80211_TXQ_STATS_OVERMEMORY = 0x7
+ NL80211_TXQ_STATS_TX_BYTES = 0x9
+ NL80211_TXQ_STATS_TX_PACKETS = 0xa
+ NL80211_TX_RATE_AUTOMATIC = 0x0
+ NL80211_TXRATE_DEFAULT_GI = 0x0
+ NL80211_TX_RATE_FIXED = 0x2
+ NL80211_TXRATE_FORCE_LGI = 0x2
+ NL80211_TXRATE_FORCE_SGI = 0x1
+ NL80211_TXRATE_GI = 0x4
+ NL80211_TXRATE_HE = 0x5
+ NL80211_TXRATE_HE_GI = 0x6
+ NL80211_TXRATE_HE_LTF = 0x7
+ NL80211_TXRATE_HT = 0x2
+ NL80211_TXRATE_LEGACY = 0x1
+ NL80211_TX_RATE_LIMITED = 0x1
+ NL80211_TXRATE_MAX = 0x7
+ NL80211_TXRATE_MCS = 0x2
+ NL80211_TXRATE_VHT = 0x3
+ NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INT = 0x1
+ NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_MAX = 0x2
+ NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_TMPL = 0x2
+ NL80211_USER_REG_HINT_CELL_BASE = 0x1
+ NL80211_USER_REG_HINT_INDOOR = 0x2
+ NL80211_USER_REG_HINT_USER = 0x0
+ NL80211_VENDOR_ID_IS_LINUX = 0x80000000
+ NL80211_VHT_CAPABILITY_LEN = 0xc
+ NL80211_VHT_NSS_MAX = 0x8
+ NL80211_WIPHY_NAME_MAXLEN = 0x40
+ NL80211_WMMR_AIFSN = 0x3
+ NL80211_WMMR_CW_MAX = 0x2
+ NL80211_WMMR_CW_MIN = 0x1
+ NL80211_WMMR_MAX = 0x4
+ NL80211_WMMR_TXOP = 0x4
+ NL80211_WOWLAN_PKTPAT_MASK = 0x1
+ NL80211_WOWLAN_PKTPAT_OFFSET = 0x3
+ NL80211_WOWLAN_PKTPAT_PATTERN = 0x2
+ NL80211_WOWLAN_TCP_DATA_INTERVAL = 0x9
+ NL80211_WOWLAN_TCP_DATA_PAYLOAD = 0x6
+ NL80211_WOWLAN_TCP_DATA_PAYLOAD_SEQ = 0x7
+ NL80211_WOWLAN_TCP_DATA_PAYLOAD_TOKEN = 0x8
+ NL80211_WOWLAN_TCP_DST_IPV4 = 0x2
+ NL80211_WOWLAN_TCP_DST_MAC = 0x3
+ NL80211_WOWLAN_TCP_DST_PORT = 0x5
+ NL80211_WOWLAN_TCP_SRC_IPV4 = 0x1
+ NL80211_WOWLAN_TCP_SRC_PORT = 0x4
+ NL80211_WOWLAN_TCP_WAKE_MASK = 0xb
+ NL80211_WOWLAN_TCP_WAKE_PAYLOAD = 0xa
+ NL80211_WOWLAN_TRIG_4WAY_HANDSHAKE = 0x8
+ NL80211_WOWLAN_TRIG_ANY = 0x1
+ NL80211_WOWLAN_TRIG_DISCONNECT = 0x2
+ NL80211_WOWLAN_TRIG_EAP_IDENT_REQUEST = 0x7
+ NL80211_WOWLAN_TRIG_GTK_REKEY_FAILURE = 0x6
+ NL80211_WOWLAN_TRIG_GTK_REKEY_SUPPORTED = 0x5
+ NL80211_WOWLAN_TRIG_MAGIC_PKT = 0x3
+ NL80211_WOWLAN_TRIG_NET_DETECT = 0x12
+ NL80211_WOWLAN_TRIG_NET_DETECT_RESULTS = 0x13
+ NL80211_WOWLAN_TRIG_PKT_PATTERN = 0x4
+ NL80211_WOWLAN_TRIG_RFKILL_RELEASE = 0x9
+ NL80211_WOWLAN_TRIG_TCP_CONNECTION = 0xe
+ NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211 = 0xa
+ NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211_LEN = 0xb
+ NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023 = 0xc
+ NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023_LEN = 0xd
+ NL80211_WOWLAN_TRIG_WAKEUP_TCP_CONNLOST = 0x10
+ NL80211_WOWLAN_TRIG_WAKEUP_TCP_MATCH = 0xf
+ NL80211_WOWLAN_TRIG_WAKEUP_TCP_NOMORETOKENS = 0x11
+ NL80211_WPA_VERSION_1 = 0x1
+ NL80211_WPA_VERSION_2 = 0x2
+ NL80211_WPA_VERSION_3 = 0x4
+)
+
+const (
+ FRA_UNSPEC = 0x0
+ FRA_DST = 0x1
+ FRA_SRC = 0x2
+ FRA_IIFNAME = 0x3
+ FRA_GOTO = 0x4
+ FRA_UNUSED2 = 0x5
+ FRA_PRIORITY = 0x6
+ FRA_UNUSED3 = 0x7
+ FRA_UNUSED4 = 0x8
+ FRA_UNUSED5 = 0x9
+ FRA_FWMARK = 0xa
+ FRA_FLOW = 0xb
+ FRA_TUN_ID = 0xc
+ FRA_SUPPRESS_IFGROUP = 0xd
+ FRA_SUPPRESS_PREFIXLEN = 0xe
+ FRA_TABLE = 0xf
+ FRA_FWMASK = 0x10
+ FRA_OIFNAME = 0x11
+ FRA_PAD = 0x12
+ FRA_L3MDEV = 0x13
+ FRA_UID_RANGE = 0x14
+ FRA_PROTOCOL = 0x15
+ FRA_IP_PROTO = 0x16
+ FRA_SPORT_RANGE = 0x17
+ FRA_DPORT_RANGE = 0x18
+ FR_ACT_UNSPEC = 0x0
+ FR_ACT_TO_TBL = 0x1
+ FR_ACT_GOTO = 0x2
+ FR_ACT_NOP = 0x3
+ FR_ACT_RES3 = 0x4
+ FR_ACT_RES4 = 0x5
+ FR_ACT_BLACKHOLE = 0x6
+ FR_ACT_UNREACHABLE = 0x7
+ FR_ACT_PROHIBIT = 0x8
+)
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_386.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
index 72f2e96f32da..5314092568f6 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 /build/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 /build/unix/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build 386 && linux
@@ -240,6 +240,10 @@ type EpollEvent struct {
Pad int32
}
+const (
+ OPEN_TREE_CLOEXEC = 0x80000
+)
+
const (
POLLRDHUP = 0x2000
)
@@ -250,6 +254,13 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+type Siginfo struct {
+ Signo int32
+ Errno int32
+ Code int32
+ _ [116]byte
+}
+
type Termios struct {
Iflag uint32
Oflag uint32
@@ -311,6 +322,8 @@ type Taskstats struct {
Thrashing_count uint64
Thrashing_delay_total uint64
Ac_btime64 uint64
+ Compact_count uint64
+ Compact_delay_total uint64
}
type cpuMask uint32
@@ -635,3 +648,36 @@ const (
PPS_GETCAP = 0x800470a3
PPS_FETCH = 0xc00470a4
)
+
+const (
+ PIDFD_NONBLOCK = 0x800
+)
+
+type SysvIpcPerm struct {
+ Key int32
+ Uid uint32
+ Gid uint32
+ Cuid uint32
+ Cgid uint32
+ Mode uint16
+ _ [2]uint8
+ Seq uint16
+ _ uint16
+ _ uint32
+ _ uint32
+}
+type SysvShmDesc struct {
+ Perm SysvIpcPerm
+ Segsz uint32
+ Atime uint32
+ Atime_high uint32
+ Dtime uint32
+ Dtime_high uint32
+ Ctime uint32
+ Ctime_high uint32
+ Cpid int32
+ Lpid int32
+ Nattch uint32
+ _ uint32
+ _ uint32
+}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
index d5f018d13dfe..b02ab83dbd33 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 /build/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 /build/unix/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build amd64 && linux
@@ -255,6 +255,10 @@ type EpollEvent struct {
Pad int32
}
+const (
+ OPEN_TREE_CLOEXEC = 0x80000
+)
+
const (
POLLRDHUP = 0x2000
)
@@ -265,6 +269,14 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+type Siginfo struct {
+ Signo int32
+ Errno int32
+ Code int32
+ _ int32
+ _ [112]byte
+}
+
type Termios struct {
Iflag uint32
Oflag uint32
@@ -324,6 +336,8 @@ type Taskstats struct {
Thrashing_count uint64
Thrashing_delay_total uint64
Ac_btime64 uint64
+ Compact_count uint64
+ Compact_delay_total uint64
}
type cpuMask uint64
@@ -653,3 +667,33 @@ const (
PPS_GETCAP = 0x800870a3
PPS_FETCH = 0xc00870a4
)
+
+const (
+ PIDFD_NONBLOCK = 0x800
+)
+
+type SysvIpcPerm struct {
+ Key int32
+ Uid uint32
+ Gid uint32
+ Cuid uint32
+ Cgid uint32
+ Mode uint32
+ _ [0]uint8
+ Seq uint16
+ _ uint16
+ _ uint64
+ _ uint64
+}
+type SysvShmDesc struct {
+ Perm SysvIpcPerm
+ Segsz uint64
+ Atime int64
+ Dtime int64
+ Ctime int64
+ Cpid int32
+ Lpid int32
+ Nattch uint64
+ _ uint64
+ _ uint64
+}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
index 675446d936c5..9e6871d2e045 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build arm && linux
@@ -231,6 +231,10 @@ type EpollEvent struct {
Pad int32
}
+const (
+ OPEN_TREE_CLOEXEC = 0x80000
+)
+
const (
POLLRDHUP = 0x2000
)
@@ -241,6 +245,13 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+type Siginfo struct {
+ Signo int32
+ Errno int32
+ Code int32
+ _ [116]byte
+}
+
type Termios struct {
Iflag uint32
Oflag uint32
@@ -302,6 +313,8 @@ type Taskstats struct {
Thrashing_count uint64
Thrashing_delay_total uint64
Ac_btime64 uint64
+ Compact_count uint64
+ Compact_delay_total uint64
}
type cpuMask uint32
@@ -630,3 +643,36 @@ const (
PPS_GETCAP = 0x800470a3
PPS_FETCH = 0xc00470a4
)
+
+const (
+ PIDFD_NONBLOCK = 0x800
+)
+
+type SysvIpcPerm struct {
+ Key int32
+ Uid uint32
+ Gid uint32
+ Cuid uint32
+ Cgid uint32
+ Mode uint16
+ _ [2]uint8
+ Seq uint16
+ _ uint16
+ _ uint32
+ _ uint32
+}
+type SysvShmDesc struct {
+ Perm SysvIpcPerm
+ Segsz uint32
+ Atime uint32
+ Atime_high uint32
+ Dtime uint32
+ Dtime_high uint32
+ Ctime uint32
+ Ctime_high uint32
+ Cpid int32
+ Lpid int32
+ Nattch uint32
+ _ uint32
+ _ uint32
+}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
index 711d0711cdfa..b732d12559ce 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/unix/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build arm64 && linux
@@ -234,6 +234,10 @@ type EpollEvent struct {
Pad int32
}
+const (
+ OPEN_TREE_CLOEXEC = 0x80000
+)
+
const (
POLLRDHUP = 0x2000
)
@@ -244,6 +248,14 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+type Siginfo struct {
+ Signo int32
+ Errno int32
+ Code int32
+ _ int32
+ _ [112]byte
+}
+
type Termios struct {
Iflag uint32
Oflag uint32
@@ -303,6 +315,8 @@ type Taskstats struct {
Thrashing_count uint64
Thrashing_delay_total uint64
Ac_btime64 uint64
+ Compact_count uint64
+ Compact_delay_total uint64
}
type cpuMask uint64
@@ -632,3 +646,33 @@ const (
PPS_GETCAP = 0x800870a3
PPS_FETCH = 0xc00870a4
)
+
+const (
+ PIDFD_NONBLOCK = 0x800
+)
+
+type SysvIpcPerm struct {
+ Key int32
+ Uid uint32
+ Gid uint32
+ Cuid uint32
+ Cgid uint32
+ Mode uint32
+ _ [0]uint8
+ Seq uint16
+ _ uint16
+ _ uint64
+ _ uint64
+}
+type SysvShmDesc struct {
+ Perm SysvIpcPerm
+ Segsz uint64
+ Atime int64
+ Dtime int64
+ Ctime int64
+ Cpid int32
+ Lpid int32
+ Nattch uint64
+ _ uint64
+ _ uint64
+}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
index c1131c741144..5310f71ea560 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build mips && linux
@@ -236,6 +236,10 @@ type EpollEvent struct {
Pad int32
}
+const (
+ OPEN_TREE_CLOEXEC = 0x80000
+)
+
const (
POLLRDHUP = 0x2000
)
@@ -246,6 +250,13 @@ type Sigset_t struct {
const _C__NSIG = 0x80
+type Siginfo struct {
+ Signo int32
+ Code int32
+ Errno int32
+ _ [116]byte
+}
+
type Termios struct {
Iflag uint32
Oflag uint32
@@ -307,6 +318,8 @@ type Taskstats struct {
Thrashing_count uint64
Thrashing_delay_total uint64
Ac_btime64 uint64
+ Compact_count uint64
+ Compact_delay_total uint64
}
type cpuMask uint32
@@ -636,3 +649,35 @@ const (
PPS_GETCAP = 0x400470a3
PPS_FETCH = 0xc00470a4
)
+
+const (
+ PIDFD_NONBLOCK = 0x80
+)
+
+type SysvIpcPerm struct {
+ Key int32
+ Uid uint32
+ Gid uint32
+ Cuid uint32
+ Cgid uint32
+ Mode uint32
+ _ [0]uint8
+ Seq uint16
+ _ uint16
+ _ uint32
+ _ uint32
+}
+type SysvShmDesc struct {
+ Perm SysvIpcPerm
+ Segsz uint32
+ Atime uint32
+ Dtime uint32
+ Ctime uint32
+ Cpid int32
+ Lpid int32
+ Nattch uint32
+ Atime_high uint16
+ Dtime_high uint16
+ Ctime_high uint16
+ _ uint16
+}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
index 91d5574ff9d3..219bbb1267dd 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build mips64 && linux
@@ -237,6 +237,10 @@ type EpollEvent struct {
Pad int32
}
+const (
+ OPEN_TREE_CLOEXEC = 0x80000
+)
+
const (
POLLRDHUP = 0x2000
)
@@ -247,6 +251,14 @@ type Sigset_t struct {
const _C__NSIG = 0x80
+type Siginfo struct {
+ Signo int32
+ Code int32
+ Errno int32
+ _ int32
+ _ [112]byte
+}
+
type Termios struct {
Iflag uint32
Oflag uint32
@@ -306,6 +318,8 @@ type Taskstats struct {
Thrashing_count uint64
Thrashing_delay_total uint64
Ac_btime64 uint64
+ Compact_count uint64
+ Compact_delay_total uint64
}
type cpuMask uint64
@@ -635,3 +649,33 @@ const (
PPS_GETCAP = 0x400870a3
PPS_FETCH = 0xc00870a4
)
+
+const (
+ PIDFD_NONBLOCK = 0x80
+)
+
+type SysvIpcPerm struct {
+ Key int32
+ Uid uint32
+ Gid uint32
+ Cuid uint32
+ Cgid uint32
+ Mode uint32
+ _ [0]uint8
+ Seq uint16
+ _ uint16
+ _ uint64
+ _ uint64
+}
+type SysvShmDesc struct {
+ Perm SysvIpcPerm
+ Segsz uint64
+ Atime int64
+ Dtime int64
+ Ctime int64
+ Cpid int32
+ Lpid int32
+ Nattch uint64
+ _ uint64
+ _ uint64
+}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
index 5d721497b7c6..be9432da5480 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build mips64le && linux
@@ -237,6 +237,10 @@ type EpollEvent struct {
Pad int32
}
+const (
+ OPEN_TREE_CLOEXEC = 0x80000
+)
+
const (
POLLRDHUP = 0x2000
)
@@ -247,6 +251,14 @@ type Sigset_t struct {
const _C__NSIG = 0x80
+type Siginfo struct {
+ Signo int32
+ Code int32
+ Errno int32
+ _ int32
+ _ [112]byte
+}
+
type Termios struct {
Iflag uint32
Oflag uint32
@@ -306,6 +318,8 @@ type Taskstats struct {
Thrashing_count uint64
Thrashing_delay_total uint64
Ac_btime64 uint64
+ Compact_count uint64
+ Compact_delay_total uint64
}
type cpuMask uint64
@@ -635,3 +649,33 @@ const (
PPS_GETCAP = 0x400870a3
PPS_FETCH = 0xc00870a4
)
+
+const (
+ PIDFD_NONBLOCK = 0x80
+)
+
+type SysvIpcPerm struct {
+ Key int32
+ Uid uint32
+ Gid uint32
+ Cuid uint32
+ Cgid uint32
+ Mode uint32
+ _ [0]uint8
+ Seq uint16
+ _ uint16
+ _ uint64
+ _ uint64
+}
+type SysvShmDesc struct {
+ Perm SysvIpcPerm
+ Segsz uint64
+ Atime int64
+ Dtime int64
+ Ctime int64
+ Cpid int32
+ Lpid int32
+ Nattch uint64
+ _ uint64
+ _ uint64
+}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
index a5addd06aa1e..d0155a42e61e 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build mipsle && linux
@@ -236,6 +236,10 @@ type EpollEvent struct {
Pad int32
}
+const (
+ OPEN_TREE_CLOEXEC = 0x80000
+)
+
const (
POLLRDHUP = 0x2000
)
@@ -246,6 +250,13 @@ type Sigset_t struct {
const _C__NSIG = 0x80
+type Siginfo struct {
+ Signo int32
+ Code int32
+ Errno int32
+ _ [116]byte
+}
+
type Termios struct {
Iflag uint32
Oflag uint32
@@ -307,6 +318,8 @@ type Taskstats struct {
Thrashing_count uint64
Thrashing_delay_total uint64
Ac_btime64 uint64
+ Compact_count uint64
+ Compact_delay_total uint64
}
type cpuMask uint32
@@ -636,3 +649,35 @@ const (
PPS_GETCAP = 0x400470a3
PPS_FETCH = 0xc00470a4
)
+
+const (
+ PIDFD_NONBLOCK = 0x80
+)
+
+type SysvIpcPerm struct {
+ Key int32
+ Uid uint32
+ Gid uint32
+ Cuid uint32
+ Cgid uint32
+ Mode uint32
+ _ [0]uint8
+ Seq uint16
+ _ uint16
+ _ uint32
+ _ uint32
+}
+type SysvShmDesc struct {
+ Perm SysvIpcPerm
+ Segsz uint32
+ Atime uint32
+ Dtime uint32
+ Ctime uint32
+ Cpid int32
+ Lpid int32
+ Nattch uint32
+ Atime_high uint16
+ Dtime_high uint16
+ Ctime_high uint16
+ _ uint16
+}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
index bb6b03dfcbc5..01c17bcc6f97 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build ppc && linux
@@ -243,6 +243,10 @@ type EpollEvent struct {
Pad int32
}
+const (
+ OPEN_TREE_CLOEXEC = 0x80000
+)
+
const (
POLLRDHUP = 0x2000
)
@@ -253,6 +257,13 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+type Siginfo struct {
+ Signo int32
+ Errno int32
+ Code int32
+ _ [116]byte
+}
+
type Termios struct {
Iflag uint32
Oflag uint32
@@ -314,6 +325,8 @@ type Taskstats struct {
Thrashing_count uint64
Thrashing_delay_total uint64
Ac_btime64 uint64
+ Compact_count uint64
+ Compact_delay_total uint64
}
type cpuMask uint32
@@ -642,3 +655,37 @@ const (
PPS_GETCAP = 0x400470a3
PPS_FETCH = 0xc00470a4
)
+
+const (
+ PIDFD_NONBLOCK = 0x800
+)
+
+type SysvIpcPerm struct {
+ Key int32
+ Uid uint32
+ Gid uint32
+ Cuid uint32
+ Cgid uint32
+ Mode uint32
+ Seq uint32
+ _ uint32
+ _ uint64
+ _ uint64
+}
+type SysvShmDesc struct {
+ Perm SysvIpcPerm
+ Atime_high uint32
+ Atime uint32
+ Dtime_high uint32
+ Dtime uint32
+ Ctime_high uint32
+ Ctime uint32
+ _ uint32
+ Segsz uint32
+ Cpid int32
+ Lpid int32
+ Nattch uint32
+ _ uint32
+ _ uint32
+ _ [4]byte
+}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
index 7637243b7b80..944a9c3c78fb 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build ppc64 && linux
@@ -244,6 +244,10 @@ type EpollEvent struct {
Pad int32
}
+const (
+ OPEN_TREE_CLOEXEC = 0x80000
+)
+
const (
POLLRDHUP = 0x2000
)
@@ -254,6 +258,14 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+type Siginfo struct {
+ Signo int32
+ Errno int32
+ Code int32
+ _ int32
+ _ [112]byte
+}
+
type Termios struct {
Iflag uint32
Oflag uint32
@@ -313,6 +325,8 @@ type Taskstats struct {
Thrashing_count uint64
Thrashing_delay_total uint64
Ac_btime64 uint64
+ Compact_count uint64
+ Compact_delay_total uint64
}
type cpuMask uint64
@@ -642,3 +656,32 @@ const (
PPS_GETCAP = 0x400870a3
PPS_FETCH = 0xc00870a4
)
+
+const (
+ PIDFD_NONBLOCK = 0x800
+)
+
+type SysvIpcPerm struct {
+ Key int32
+ Uid uint32
+ Gid uint32
+ Cuid uint32
+ Cgid uint32
+ Mode uint32
+ Seq uint32
+ _ uint32
+ _ uint64
+ _ uint64
+}
+type SysvShmDesc struct {
+ Perm SysvIpcPerm
+ Atime int64
+ Dtime int64
+ Ctime int64
+ Segsz uint64
+ Cpid int32
+ Lpid int32
+ Nattch uint64
+ _ uint64
+ _ uint64
+}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
index a1a28e525f34..5d2c90e1ce3d 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build ppc64le && linux
@@ -244,6 +244,10 @@ type EpollEvent struct {
Pad int32
}
+const (
+ OPEN_TREE_CLOEXEC = 0x80000
+)
+
const (
POLLRDHUP = 0x2000
)
@@ -254,6 +258,14 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+type Siginfo struct {
+ Signo int32
+ Errno int32
+ Code int32
+ _ int32
+ _ [112]byte
+}
+
type Termios struct {
Iflag uint32
Oflag uint32
@@ -313,6 +325,8 @@ type Taskstats struct {
Thrashing_count uint64
Thrashing_delay_total uint64
Ac_btime64 uint64
+ Compact_count uint64
+ Compact_delay_total uint64
}
type cpuMask uint64
@@ -642,3 +656,32 @@ const (
PPS_GETCAP = 0x400870a3
PPS_FETCH = 0xc00870a4
)
+
+const (
+ PIDFD_NONBLOCK = 0x800
+)
+
+type SysvIpcPerm struct {
+ Key int32
+ Uid uint32
+ Gid uint32
+ Cuid uint32
+ Cgid uint32
+ Mode uint32
+ Seq uint32
+ _ uint32
+ _ uint64
+ _ uint64
+}
+type SysvShmDesc struct {
+ Perm SysvIpcPerm
+ Atime int64
+ Dtime int64
+ Ctime int64
+ Segsz uint64
+ Cpid int32
+ Lpid int32
+ Nattch uint64
+ _ uint64
+ _ uint64
+}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
index e0a8a1362279..e173cb51574d 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build riscv64 && linux
@@ -262,6 +262,10 @@ type EpollEvent struct {
Pad int32
}
+const (
+ OPEN_TREE_CLOEXEC = 0x80000
+)
+
const (
POLLRDHUP = 0x2000
)
@@ -272,6 +276,14 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+type Siginfo struct {
+ Signo int32
+ Errno int32
+ Code int32
+ _ int32
+ _ [112]byte
+}
+
type Termios struct {
Iflag uint32
Oflag uint32
@@ -331,6 +343,8 @@ type Taskstats struct {
Thrashing_count uint64
Thrashing_delay_total uint64
Ac_btime64 uint64
+ Compact_count uint64
+ Compact_delay_total uint64
}
type cpuMask uint64
@@ -660,3 +674,33 @@ const (
PPS_GETCAP = 0x800870a3
PPS_FETCH = 0xc00870a4
)
+
+const (
+ PIDFD_NONBLOCK = 0x800
+)
+
+type SysvIpcPerm struct {
+ Key int32
+ Uid uint32
+ Gid uint32
+ Cuid uint32
+ Cgid uint32
+ Mode uint32
+ _ [0]uint8
+ Seq uint16
+ _ uint16
+ _ uint64
+ _ uint64
+}
+type SysvShmDesc struct {
+ Perm SysvIpcPerm
+ Segsz uint64
+ Atime int64
+ Dtime int64
+ Ctime int64
+ Cpid int32
+ Lpid int32
+ Nattch uint64
+ _ uint64
+ _ uint64
+}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
index 21d6e56c705b..6106715d5c60 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/unix/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build s390x && linux
@@ -210,8 +210,8 @@ type PtraceFpregs struct {
}
type PtracePer struct {
- _ [0]uint64
- _ [32]byte
+ Control_regs [3]uint64
+ _ [8]byte
Starting_addr uint64
Ending_addr uint64
Perc_atmid uint16
@@ -257,6 +257,10 @@ type EpollEvent struct {
Pad int32
}
+const (
+ OPEN_TREE_CLOEXEC = 0x80000
+)
+
const (
POLLRDHUP = 0x2000
)
@@ -267,6 +271,14 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+type Siginfo struct {
+ Signo int32
+ Errno int32
+ Code int32
+ _ int32
+ _ [112]byte
+}
+
type Termios struct {
Iflag uint32
Oflag uint32
@@ -326,6 +338,8 @@ type Taskstats struct {
Thrashing_count uint64
Thrashing_delay_total uint64
Ac_btime64 uint64
+ Compact_count uint64
+ Compact_delay_total uint64
}
type cpuMask uint64
@@ -656,3 +670,32 @@ const (
PPS_GETCAP = 0x800870a3
PPS_FETCH = 0xc00870a4
)
+
+const (
+ PIDFD_NONBLOCK = 0x800
+)
+
+type SysvIpcPerm struct {
+ Key int32
+ Uid uint32
+ Gid uint32
+ Cuid uint32
+ Cgid uint32
+ Mode uint32
+ _ uint16
+ Seq uint16
+ _ uint64
+ _ uint64
+}
+type SysvShmDesc struct {
+ Perm SysvIpcPerm
+ Segsz uint64
+ Atime int64
+ Dtime int64
+ Ctime int64
+ Cpid int32
+ Lpid int32
+ Nattch uint64
+ _ uint64
+ _ uint64
+}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
index 0531e98f6430..ca7b37b4b57b 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build sparc64 && linux
@@ -239,6 +239,10 @@ type EpollEvent struct {
Pad int32
}
+const (
+ OPEN_TREE_CLOEXEC = 0x400000
+)
+
const (
POLLRDHUP = 0x800
)
@@ -249,6 +253,14 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+type Siginfo struct {
+ Signo int32
+ Errno int32
+ Code int32
+ _ int32
+ _ [112]byte
+}
+
type Termios struct {
Iflag uint32
Oflag uint32
@@ -308,6 +320,8 @@ type Taskstats struct {
Thrashing_count uint64
Thrashing_delay_total uint64
Ac_btime64 uint64
+ Compact_count uint64
+ Compact_delay_total uint64
}
type cpuMask uint64
@@ -637,3 +651,32 @@ const (
PPS_GETCAP = 0x400870a3
PPS_FETCH = 0xc00870a4
)
+
+const (
+ PIDFD_NONBLOCK = 0x4000
+)
+
+type SysvIpcPerm struct {
+ Key int32
+ Uid uint32
+ Gid uint32
+ Cuid uint32
+ Cgid uint32
+ Mode uint32
+ _ uint16
+ Seq uint16
+ _ uint64
+ _ uint64
+}
+type SysvShmDesc struct {
+ Perm SysvIpcPerm
+ Atime int64
+ Dtime int64
+ Ctime int64
+ Segsz uint64
+ Cpid int32
+ Lpid int32
+ Nattch uint64
+ _ uint64
+ _ uint64
+}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go
index 2a8b1e6f73f5..baf5fe650444 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go
@@ -564,12 +564,11 @@ type Uvmexp struct {
Kmapent int32
}
-const SizeofClockinfo = 0x14
+const SizeofClockinfo = 0x10
type Clockinfo struct {
- Hz int32
- Tick int32
- Tickadj int32
- Stathz int32
- Profhz int32
+ Hz int32
+ Tick int32
+ Stathz int32
+ Profhz int32
}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go
index b1759cf705c0..e21ae8ecfa6f 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go
@@ -564,12 +564,11 @@ type Uvmexp struct {
Kmapent int32
}
-const SizeofClockinfo = 0x14
+const SizeofClockinfo = 0x10
type Clockinfo struct {
- Hz int32
- Tick int32
- Tickadj int32
- Stathz int32
- Profhz int32
+ Hz int32
+ Tick int32
+ Stathz int32
+ Profhz int32
}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go
index e807de2065c7..f190651cd964 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go
@@ -565,12 +565,11 @@ type Uvmexp struct {
Kmapent int32
}
-const SizeofClockinfo = 0x14
+const SizeofClockinfo = 0x10
type Clockinfo struct {
- Hz int32
- Tick int32
- Tickadj int32
- Stathz int32
- Profhz int32
+ Hz int32
+ Tick int32
+ Stathz int32
+ Profhz int32
}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go
index ff3aecaee40a..84747c582cfc 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go
@@ -558,12 +558,11 @@ type Uvmexp struct {
Kmapent int32
}
-const SizeofClockinfo = 0x14
+const SizeofClockinfo = 0x10
type Clockinfo struct {
- Hz int32
- Tick int32
- Tickadj int32
- Stathz int32
- Profhz int32
+ Hz int32
+ Tick int32
+ Stathz int32
+ Profhz int32
}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go
index 9ecda69174c8..ac5c8b6370b1 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go
@@ -558,12 +558,11 @@ type Uvmexp struct {
Kmapent int32
}
-const SizeofClockinfo = 0x14
+const SizeofClockinfo = 0x10
type Clockinfo struct {
- Hz int32
- Tick int32
- Tickadj int32
- Stathz int32
- Profhz int32
+ Hz int32
+ Tick int32
+ Stathz int32
+ Profhz int32
}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/windows/aliases.go b/cluster-autoscaler/vendor/golang.org/x/sys/windows/aliases.go
index af3af60db970..a20ebea63312 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/windows/aliases.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/windows/aliases.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build windows
-// +build go1.9
+//go:build windows && go1.9
+// +build windows,go1.9
package windows
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/windows/eventlog.go b/cluster-autoscaler/vendor/golang.org/x/sys/windows/eventlog.go
index 40af946e162f..2cd60645ee7d 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/windows/eventlog.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/windows/eventlog.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build windows
// +build windows
package windows
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/windows/exec_windows.go b/cluster-autoscaler/vendor/golang.org/x/sys/windows/exec_windows.go
index 7a11e83b7ec1..855698bb2828 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/windows/exec_windows.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/windows/exec_windows.go
@@ -9,8 +9,6 @@ package windows
import (
errorspkg "errors"
"unsafe"
-
- "golang.org/x/sys/internal/unsafeheader"
)
// EscapeArg rewrites command line argument s as prescribed
@@ -147,8 +145,12 @@ func NewProcThreadAttributeList(maxAttrCount uint32) (*ProcThreadAttributeListCo
}
return nil, err
}
+ alloc, err := LocalAlloc(LMEM_FIXED, uint32(size))
+ if err != nil {
+ return nil, err
+ }
// size is guaranteed to be ≥1 by InitializeProcThreadAttributeList.
- al := &ProcThreadAttributeListContainer{data: (*ProcThreadAttributeList)(unsafe.Pointer(&make([]byte, size)[0]))}
+ al := &ProcThreadAttributeListContainer{data: (*ProcThreadAttributeList)(unsafe.Pointer(alloc))}
err = initializeProcThreadAttributeList(al.data, maxAttrCount, 0, &size)
if err != nil {
return nil, err
@@ -157,36 +159,17 @@ func NewProcThreadAttributeList(maxAttrCount uint32) (*ProcThreadAttributeListCo
}
// Update modifies the ProcThreadAttributeList using UpdateProcThreadAttribute.
-// Note that the value passed to this function will be copied into memory
-// allocated by LocalAlloc, the contents of which should not contain any
-// Go-managed pointers, even if the passed value itself is a Go-managed
-// pointer.
func (al *ProcThreadAttributeListContainer) Update(attribute uintptr, value unsafe.Pointer, size uintptr) error {
- alloc, err := LocalAlloc(LMEM_FIXED, uint32(size))
- if err != nil {
- return err
- }
- var src, dst []byte
- hdr := (*unsafeheader.Slice)(unsafe.Pointer(&src))
- hdr.Data = value
- hdr.Cap = int(size)
- hdr.Len = int(size)
- hdr = (*unsafeheader.Slice)(unsafe.Pointer(&dst))
- hdr.Data = unsafe.Pointer(alloc)
- hdr.Cap = int(size)
- hdr.Len = int(size)
- copy(dst, src)
- al.heapAllocations = append(al.heapAllocations, alloc)
- return updateProcThreadAttribute(al.data, 0, attribute, unsafe.Pointer(alloc), size, nil, nil)
+ al.pointers = append(al.pointers, value)
+ return updateProcThreadAttribute(al.data, 0, attribute, value, size, nil, nil)
}
// Delete frees ProcThreadAttributeList's resources.
func (al *ProcThreadAttributeListContainer) Delete() {
deleteProcThreadAttributeList(al.data)
- for i := range al.heapAllocations {
- LocalFree(Handle(al.heapAllocations[i]))
- }
- al.heapAllocations = nil
+ LocalFree(Handle(unsafe.Pointer(al.data)))
+ al.data = nil
+ al.pointers = nil
}
// List returns the actual ProcThreadAttributeList to be passed to StartupInfoEx.
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/windows/memory_windows.go b/cluster-autoscaler/vendor/golang.org/x/sys/windows/memory_windows.go
index 1adb60739a34..6dc0920a84da 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/windows/memory_windows.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/windows/memory_windows.go
@@ -35,3 +35,14 @@ const (
QUOTA_LIMITS_HARDWS_MAX_DISABLE = 0x00000008
QUOTA_LIMITS_HARDWS_MAX_ENABLE = 0x00000004
)
+
+type MemoryBasicInformation struct {
+ BaseAddress uintptr
+ AllocationBase uintptr
+ AllocationProtect uint32
+ PartitionId uint16
+ RegionSize uintptr
+ State uint32
+ Protect uint32
+ Type uint32
+}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/windows/mksyscall.go b/cluster-autoscaler/vendor/golang.org/x/sys/windows/mksyscall.go
index 328e3b2ace2d..8563f79c57f8 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/windows/mksyscall.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/windows/mksyscall.go
@@ -2,8 +2,9 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build generate
// +build generate
package windows
-//go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go
+//go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go setupapi_windows.go
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/windows/race.go b/cluster-autoscaler/vendor/golang.org/x/sys/windows/race.go
index a74e3e24b557..9196b089ca14 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/windows/race.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/windows/race.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build windows && race
// +build windows,race
package windows
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/windows/race0.go b/cluster-autoscaler/vendor/golang.org/x/sys/windows/race0.go
index e44a3cbf6799..7bae4817a06c 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/windows/race0.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/windows/race0.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build windows && !race
// +build windows,!race
package windows
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/windows/registry/key.go b/cluster-autoscaler/vendor/golang.org/x/sys/windows/registry/key.go
index c256483434f0..906325e095a8 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/windows/registry/key.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/windows/registry/key.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build windows
// +build windows
// Package registry provides access to the Windows registry.
@@ -24,6 +25,7 @@ package registry
import (
"io"
+ "runtime"
"syscall"
"time"
)
@@ -113,6 +115,13 @@ func OpenRemoteKey(pcname string, k Key) (Key, error) {
// The parameter n controls the number of returned names,
// analogous to the way os.File.Readdirnames works.
func (k Key) ReadSubKeyNames(n int) ([]string, error) {
+ // RegEnumKeyEx must be called repeatedly and to completion.
+ // During this time, this goroutine cannot migrate away from
+ // its current thread. See https://golang.org/issue/49320 and
+ // https://golang.org/issue/49466.
+ runtime.LockOSThread()
+ defer runtime.UnlockOSThread()
+
names := make([]string, 0)
// Registry key size limit is 255 bytes and described there:
// https://msdn.microsoft.com/library/windows/desktop/ms724872.aspx
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/windows/registry/mksyscall.go b/cluster-autoscaler/vendor/golang.org/x/sys/windows/registry/mksyscall.go
index 50c32a3f4e10..ee74927d3c66 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/windows/registry/mksyscall.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/windows/registry/mksyscall.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build generate
// +build generate
package registry
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/windows/registry/syscall.go b/cluster-autoscaler/vendor/golang.org/x/sys/windows/registry/syscall.go
index e66643cbaa64..417335123084 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/windows/registry/syscall.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/windows/registry/syscall.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build windows
// +build windows
package registry
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/windows/registry/value.go b/cluster-autoscaler/vendor/golang.org/x/sys/windows/registry/value.go
index f25e7e97ae5e..2789f6f18d8f 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/windows/registry/value.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/windows/registry/value.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build windows
// +build windows
package registry
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/windows/service.go b/cluster-autoscaler/vendor/golang.org/x/sys/windows/service.go
index b269850d0666..f8deca8397ae 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/windows/service.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/windows/service.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build windows
// +build windows
package windows
@@ -16,8 +17,6 @@ const (
SC_MANAGER_ALL_ACCESS = 0xf003f
)
-//sys OpenSCManager(machineName *uint16, databaseName *uint16, access uint32) (handle Handle, err error) [failretval==0] = advapi32.OpenSCManagerW
-
const (
SERVICE_KERNEL_DRIVER = 1
SERVICE_FILE_SYSTEM_DRIVER = 2
@@ -132,6 +131,14 @@ const (
SC_EVENT_DATABASE_CHANGE = 0
SC_EVENT_PROPERTY_CHANGE = 1
SC_EVENT_STATUS_CHANGE = 2
+
+ SERVICE_START_REASON_DEMAND = 0x00000001
+ SERVICE_START_REASON_AUTO = 0x00000002
+ SERVICE_START_REASON_TRIGGER = 0x00000004
+ SERVICE_START_REASON_RESTART_ON_FAILURE = 0x00000008
+ SERVICE_START_REASON_DELAYEDAUTO = 0x00000010
+
+ SERVICE_DYNAMIC_INFORMATION_LEVEL_START_REASON = 1
)
type SERVICE_STATUS struct {
@@ -216,6 +223,7 @@ type QUERY_SERVICE_LOCK_STATUS struct {
LockDuration uint32
}
+//sys OpenSCManager(machineName *uint16, databaseName *uint16, access uint32) (handle Handle, err error) [failretval==0] = advapi32.OpenSCManagerW
//sys CloseServiceHandle(handle Handle) (err error) = advapi32.CloseServiceHandle
//sys CreateService(mgr Handle, serviceName *uint16, displayName *uint16, access uint32, srvType uint32, startType uint32, errCtl uint32, pathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16) (handle Handle, err error) [failretval==0] = advapi32.CreateServiceW
//sys OpenService(mgr Handle, serviceName *uint16, access uint32) (handle Handle, err error) [failretval==0] = advapi32.OpenServiceW
@@ -235,3 +243,5 @@ type QUERY_SERVICE_LOCK_STATUS struct {
//sys NotifyServiceStatusChange(service Handle, notifyMask uint32, notifier *SERVICE_NOTIFY) (ret error) = advapi32.NotifyServiceStatusChangeW
//sys SubscribeServiceChangeNotifications(service Handle, eventType uint32, callback uintptr, callbackCtx uintptr, subscription *uintptr) (ret error) = sechost.SubscribeServiceChangeNotifications?
//sys UnsubscribeServiceChangeNotifications(subscription uintptr) = sechost.UnsubscribeServiceChangeNotifications?
+//sys RegisterServiceCtrlHandlerEx(serviceName *uint16, handlerProc uintptr, context uintptr) (handle Handle, err error) = advapi32.RegisterServiceCtrlHandlerExW
+//sys QueryServiceDynamicInformation(service Handle, infoLevel uint32, dynamicInfo unsafe.Pointer) (err error) = advapi32.QueryServiceDynamicInformation?
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/windows/setupapi_windows.go b/cluster-autoscaler/vendor/golang.org/x/sys/windows/setupapi_windows.go
new file mode 100644
index 000000000000..14027da3f3f1
--- /dev/null
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/windows/setupapi_windows.go
@@ -0,0 +1,1425 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package windows
+
+import (
+ "encoding/binary"
+ "errors"
+ "fmt"
+ "runtime"
+ "strings"
+ "syscall"
+ "unsafe"
+)
+
+// This file contains functions that wrap SetupAPI.dll and CfgMgr32.dll,
+// core system functions for managing hardware devices, drivers, and the PnP tree.
+// Information about these APIs can be found at:
+// https://docs.microsoft.com/en-us/windows-hardware/drivers/install/setupapi
+// https://docs.microsoft.com/en-us/windows/win32/devinst/cfgmgr32-
+
+const (
+ ERROR_EXPECTED_SECTION_NAME Errno = 0x20000000 | 0xC0000000 | 0
+ ERROR_BAD_SECTION_NAME_LINE Errno = 0x20000000 | 0xC0000000 | 1
+ ERROR_SECTION_NAME_TOO_LONG Errno = 0x20000000 | 0xC0000000 | 2
+ ERROR_GENERAL_SYNTAX Errno = 0x20000000 | 0xC0000000 | 3
+ ERROR_WRONG_INF_STYLE Errno = 0x20000000 | 0xC0000000 | 0x100
+ ERROR_SECTION_NOT_FOUND Errno = 0x20000000 | 0xC0000000 | 0x101
+ ERROR_LINE_NOT_FOUND Errno = 0x20000000 | 0xC0000000 | 0x102
+ ERROR_NO_BACKUP Errno = 0x20000000 | 0xC0000000 | 0x103
+ ERROR_NO_ASSOCIATED_CLASS Errno = 0x20000000 | 0xC0000000 | 0x200
+ ERROR_CLASS_MISMATCH Errno = 0x20000000 | 0xC0000000 | 0x201
+ ERROR_DUPLICATE_FOUND Errno = 0x20000000 | 0xC0000000 | 0x202
+ ERROR_NO_DRIVER_SELECTED Errno = 0x20000000 | 0xC0000000 | 0x203
+ ERROR_KEY_DOES_NOT_EXIST Errno = 0x20000000 | 0xC0000000 | 0x204
+ ERROR_INVALID_DEVINST_NAME Errno = 0x20000000 | 0xC0000000 | 0x205
+ ERROR_INVALID_CLASS Errno = 0x20000000 | 0xC0000000 | 0x206
+ ERROR_DEVINST_ALREADY_EXISTS Errno = 0x20000000 | 0xC0000000 | 0x207
+ ERROR_DEVINFO_NOT_REGISTERED Errno = 0x20000000 | 0xC0000000 | 0x208
+ ERROR_INVALID_REG_PROPERTY Errno = 0x20000000 | 0xC0000000 | 0x209
+ ERROR_NO_INF Errno = 0x20000000 | 0xC0000000 | 0x20A
+ ERROR_NO_SUCH_DEVINST Errno = 0x20000000 | 0xC0000000 | 0x20B
+ ERROR_CANT_LOAD_CLASS_ICON Errno = 0x20000000 | 0xC0000000 | 0x20C
+ ERROR_INVALID_CLASS_INSTALLER Errno = 0x20000000 | 0xC0000000 | 0x20D
+ ERROR_DI_DO_DEFAULT Errno = 0x20000000 | 0xC0000000 | 0x20E
+ ERROR_DI_NOFILECOPY Errno = 0x20000000 | 0xC0000000 | 0x20F
+ ERROR_INVALID_HWPROFILE Errno = 0x20000000 | 0xC0000000 | 0x210
+ ERROR_NO_DEVICE_SELECTED Errno = 0x20000000 | 0xC0000000 | 0x211
+ ERROR_DEVINFO_LIST_LOCKED Errno = 0x20000000 | 0xC0000000 | 0x212
+ ERROR_DEVINFO_DATA_LOCKED Errno = 0x20000000 | 0xC0000000 | 0x213
+ ERROR_DI_BAD_PATH Errno = 0x20000000 | 0xC0000000 | 0x214
+ ERROR_NO_CLASSINSTALL_PARAMS Errno = 0x20000000 | 0xC0000000 | 0x215
+ ERROR_FILEQUEUE_LOCKED Errno = 0x20000000 | 0xC0000000 | 0x216
+ ERROR_BAD_SERVICE_INSTALLSECT Errno = 0x20000000 | 0xC0000000 | 0x217
+ ERROR_NO_CLASS_DRIVER_LIST Errno = 0x20000000 | 0xC0000000 | 0x218
+ ERROR_NO_ASSOCIATED_SERVICE Errno = 0x20000000 | 0xC0000000 | 0x219
+ ERROR_NO_DEFAULT_DEVICE_INTERFACE Errno = 0x20000000 | 0xC0000000 | 0x21A
+ ERROR_DEVICE_INTERFACE_ACTIVE Errno = 0x20000000 | 0xC0000000 | 0x21B
+ ERROR_DEVICE_INTERFACE_REMOVED Errno = 0x20000000 | 0xC0000000 | 0x21C
+ ERROR_BAD_INTERFACE_INSTALLSECT Errno = 0x20000000 | 0xC0000000 | 0x21D
+ ERROR_NO_SUCH_INTERFACE_CLASS Errno = 0x20000000 | 0xC0000000 | 0x21E
+ ERROR_INVALID_REFERENCE_STRING Errno = 0x20000000 | 0xC0000000 | 0x21F
+ ERROR_INVALID_MACHINENAME Errno = 0x20000000 | 0xC0000000 | 0x220
+ ERROR_REMOTE_COMM_FAILURE Errno = 0x20000000 | 0xC0000000 | 0x221
+ ERROR_MACHINE_UNAVAILABLE Errno = 0x20000000 | 0xC0000000 | 0x222
+ ERROR_NO_CONFIGMGR_SERVICES Errno = 0x20000000 | 0xC0000000 | 0x223
+ ERROR_INVALID_PROPPAGE_PROVIDER Errno = 0x20000000 | 0xC0000000 | 0x224
+ ERROR_NO_SUCH_DEVICE_INTERFACE Errno = 0x20000000 | 0xC0000000 | 0x225
+ ERROR_DI_POSTPROCESSING_REQUIRED Errno = 0x20000000 | 0xC0000000 | 0x226
+ ERROR_INVALID_COINSTALLER Errno = 0x20000000 | 0xC0000000 | 0x227
+ ERROR_NO_COMPAT_DRIVERS Errno = 0x20000000 | 0xC0000000 | 0x228
+ ERROR_NO_DEVICE_ICON Errno = 0x20000000 | 0xC0000000 | 0x229
+ ERROR_INVALID_INF_LOGCONFIG Errno = 0x20000000 | 0xC0000000 | 0x22A
+ ERROR_DI_DONT_INSTALL Errno = 0x20000000 | 0xC0000000 | 0x22B
+ ERROR_INVALID_FILTER_DRIVER Errno = 0x20000000 | 0xC0000000 | 0x22C
+ ERROR_NON_WINDOWS_NT_DRIVER Errno = 0x20000000 | 0xC0000000 | 0x22D
+ ERROR_NON_WINDOWS_DRIVER Errno = 0x20000000 | 0xC0000000 | 0x22E
+ ERROR_NO_CATALOG_FOR_OEM_INF Errno = 0x20000000 | 0xC0000000 | 0x22F
+ ERROR_DEVINSTALL_QUEUE_NONNATIVE Errno = 0x20000000 | 0xC0000000 | 0x230
+ ERROR_NOT_DISABLEABLE Errno = 0x20000000 | 0xC0000000 | 0x231
+ ERROR_CANT_REMOVE_DEVINST Errno = 0x20000000 | 0xC0000000 | 0x232
+ ERROR_INVALID_TARGET Errno = 0x20000000 | 0xC0000000 | 0x233
+ ERROR_DRIVER_NONNATIVE Errno = 0x20000000 | 0xC0000000 | 0x234
+ ERROR_IN_WOW64 Errno = 0x20000000 | 0xC0000000 | 0x235
+ ERROR_SET_SYSTEM_RESTORE_POINT Errno = 0x20000000 | 0xC0000000 | 0x236
+ ERROR_SCE_DISABLED Errno = 0x20000000 | 0xC0000000 | 0x238
+ ERROR_UNKNOWN_EXCEPTION Errno = 0x20000000 | 0xC0000000 | 0x239
+ ERROR_PNP_REGISTRY_ERROR Errno = 0x20000000 | 0xC0000000 | 0x23A
+ ERROR_REMOTE_REQUEST_UNSUPPORTED Errno = 0x20000000 | 0xC0000000 | 0x23B
+ ERROR_NOT_AN_INSTALLED_OEM_INF Errno = 0x20000000 | 0xC0000000 | 0x23C
+ ERROR_INF_IN_USE_BY_DEVICES Errno = 0x20000000 | 0xC0000000 | 0x23D
+ ERROR_DI_FUNCTION_OBSOLETE Errno = 0x20000000 | 0xC0000000 | 0x23E
+ ERROR_NO_AUTHENTICODE_CATALOG Errno = 0x20000000 | 0xC0000000 | 0x23F
+ ERROR_AUTHENTICODE_DISALLOWED Errno = 0x20000000 | 0xC0000000 | 0x240
+ ERROR_AUTHENTICODE_TRUSTED_PUBLISHER Errno = 0x20000000 | 0xC0000000 | 0x241
+ ERROR_AUTHENTICODE_TRUST_NOT_ESTABLISHED Errno = 0x20000000 | 0xC0000000 | 0x242
+ ERROR_AUTHENTICODE_PUBLISHER_NOT_TRUSTED Errno = 0x20000000 | 0xC0000000 | 0x243
+ ERROR_SIGNATURE_OSATTRIBUTE_MISMATCH Errno = 0x20000000 | 0xC0000000 | 0x244
+ ERROR_ONLY_VALIDATE_VIA_AUTHENTICODE Errno = 0x20000000 | 0xC0000000 | 0x245
+ ERROR_DEVICE_INSTALLER_NOT_READY Errno = 0x20000000 | 0xC0000000 | 0x246
+ ERROR_DRIVER_STORE_ADD_FAILED Errno = 0x20000000 | 0xC0000000 | 0x247
+ ERROR_DEVICE_INSTALL_BLOCKED Errno = 0x20000000 | 0xC0000000 | 0x248
+ ERROR_DRIVER_INSTALL_BLOCKED Errno = 0x20000000 | 0xC0000000 | 0x249
+ ERROR_WRONG_INF_TYPE Errno = 0x20000000 | 0xC0000000 | 0x24A
+ ERROR_FILE_HASH_NOT_IN_CATALOG Errno = 0x20000000 | 0xC0000000 | 0x24B
+ ERROR_DRIVER_STORE_DELETE_FAILED Errno = 0x20000000 | 0xC0000000 | 0x24C
+ ERROR_UNRECOVERABLE_STACK_OVERFLOW Errno = 0x20000000 | 0xC0000000 | 0x300
+ EXCEPTION_SPAPI_UNRECOVERABLE_STACK_OVERFLOW Errno = ERROR_UNRECOVERABLE_STACK_OVERFLOW
+ ERROR_NO_DEFAULT_INTERFACE_DEVICE Errno = ERROR_NO_DEFAULT_DEVICE_INTERFACE
+ ERROR_INTERFACE_DEVICE_ACTIVE Errno = ERROR_DEVICE_INTERFACE_ACTIVE
+ ERROR_INTERFACE_DEVICE_REMOVED Errno = ERROR_DEVICE_INTERFACE_REMOVED
+ ERROR_NO_SUCH_INTERFACE_DEVICE Errno = ERROR_NO_SUCH_DEVICE_INTERFACE
+)
+
+const (
+ MAX_DEVICE_ID_LEN = 200
+ MAX_DEVNODE_ID_LEN = MAX_DEVICE_ID_LEN
+ MAX_GUID_STRING_LEN = 39 // 38 chars + terminator null
+ MAX_CLASS_NAME_LEN = 32
+ MAX_PROFILE_LEN = 80
+ MAX_CONFIG_VALUE = 9999
+ MAX_INSTANCE_VALUE = 9999
+ CONFIGMG_VERSION = 0x0400
+)
+
+// Maximum string length constants
+const (
+ LINE_LEN = 256 // Windows 9x-compatible maximum for displayable strings coming from a device INF.
+ MAX_INF_STRING_LENGTH = 4096 // Actual maximum size of an INF string (including string substitutions).
+ MAX_INF_SECTION_NAME_LENGTH = 255 // For Windows 9x compatibility, INF section names should be constrained to 32 characters.
+ MAX_TITLE_LEN = 60
+ MAX_INSTRUCTION_LEN = 256
+ MAX_LABEL_LEN = 30
+ MAX_SERVICE_NAME_LEN = 256
+ MAX_SUBTITLE_LEN = 256
+)
+
+const (
+ // SP_MAX_MACHINENAME_LENGTH defines maximum length of a machine name in the format expected by ConfigMgr32 CM_Connect_Machine (i.e., "\\\\MachineName\0").
+ SP_MAX_MACHINENAME_LENGTH = MAX_PATH + 3
+)
+
+// HSPFILEQ is type for setup file queue
+type HSPFILEQ uintptr
+
+// DevInfo holds reference to device information set
+type DevInfo Handle
+
+// DEVINST is a handle usually recognized by cfgmgr32 APIs
+type DEVINST uint32
+
+// DevInfoData is a device information structure (references a device instance that is a member of a device information set)
+type DevInfoData struct {
+ size uint32
+ ClassGUID GUID
+ DevInst DEVINST
+ _ uintptr
+}
+
+// DevInfoListDetailData is a structure for detailed information on a device information set (used for SetupDiGetDeviceInfoListDetail which supersedes the functionality of SetupDiGetDeviceInfoListClass).
+type DevInfoListDetailData struct {
+ size uint32 // Use unsafeSizeOf method
+ ClassGUID GUID
+ RemoteMachineHandle Handle
+ remoteMachineName [SP_MAX_MACHINENAME_LENGTH]uint16
+}
+
+func (*DevInfoListDetailData) unsafeSizeOf() uint32 {
+ if unsafe.Sizeof(uintptr(0)) == 4 {
+ // Windows declares this with pshpack1.h
+ return uint32(unsafe.Offsetof(DevInfoListDetailData{}.remoteMachineName) + unsafe.Sizeof(DevInfoListDetailData{}.remoteMachineName))
+ }
+ return uint32(unsafe.Sizeof(DevInfoListDetailData{}))
+}
+
+func (data *DevInfoListDetailData) RemoteMachineName() string {
+ return UTF16ToString(data.remoteMachineName[:])
+}
+
+func (data *DevInfoListDetailData) SetRemoteMachineName(remoteMachineName string) error {
+ str, err := UTF16FromString(remoteMachineName)
+ if err != nil {
+ return err
+ }
+ copy(data.remoteMachineName[:], str)
+ return nil
+}
+
+// DI_FUNCTION is function type for device installer
+type DI_FUNCTION uint32
+
+const (
+ DIF_SELECTDEVICE DI_FUNCTION = 0x00000001
+ DIF_INSTALLDEVICE DI_FUNCTION = 0x00000002
+ DIF_ASSIGNRESOURCES DI_FUNCTION = 0x00000003
+ DIF_PROPERTIES DI_FUNCTION = 0x00000004
+ DIF_REMOVE DI_FUNCTION = 0x00000005
+ DIF_FIRSTTIMESETUP DI_FUNCTION = 0x00000006
+ DIF_FOUNDDEVICE DI_FUNCTION = 0x00000007
+ DIF_SELECTCLASSDRIVERS DI_FUNCTION = 0x00000008
+ DIF_VALIDATECLASSDRIVERS DI_FUNCTION = 0x00000009
+ DIF_INSTALLCLASSDRIVERS DI_FUNCTION = 0x0000000A
+ DIF_CALCDISKSPACE DI_FUNCTION = 0x0000000B
+ DIF_DESTROYPRIVATEDATA DI_FUNCTION = 0x0000000C
+ DIF_VALIDATEDRIVER DI_FUNCTION = 0x0000000D
+ DIF_DETECT DI_FUNCTION = 0x0000000F
+ DIF_INSTALLWIZARD DI_FUNCTION = 0x00000010
+ DIF_DESTROYWIZARDDATA DI_FUNCTION = 0x00000011
+ DIF_PROPERTYCHANGE DI_FUNCTION = 0x00000012
+ DIF_ENABLECLASS DI_FUNCTION = 0x00000013
+ DIF_DETECTVERIFY DI_FUNCTION = 0x00000014
+ DIF_INSTALLDEVICEFILES DI_FUNCTION = 0x00000015
+ DIF_UNREMOVE DI_FUNCTION = 0x00000016
+ DIF_SELECTBESTCOMPATDRV DI_FUNCTION = 0x00000017
+ DIF_ALLOW_INSTALL DI_FUNCTION = 0x00000018
+ DIF_REGISTERDEVICE DI_FUNCTION = 0x00000019
+ DIF_NEWDEVICEWIZARD_PRESELECT DI_FUNCTION = 0x0000001A
+ DIF_NEWDEVICEWIZARD_SELECT DI_FUNCTION = 0x0000001B
+ DIF_NEWDEVICEWIZARD_PREANALYZE DI_FUNCTION = 0x0000001C
+ DIF_NEWDEVICEWIZARD_POSTANALYZE DI_FUNCTION = 0x0000001D
+ DIF_NEWDEVICEWIZARD_FINISHINSTALL DI_FUNCTION = 0x0000001E
+ DIF_INSTALLINTERFACES DI_FUNCTION = 0x00000020
+ DIF_DETECTCANCEL DI_FUNCTION = 0x00000021
+ DIF_REGISTER_COINSTALLERS DI_FUNCTION = 0x00000022
+ DIF_ADDPROPERTYPAGE_ADVANCED DI_FUNCTION = 0x00000023
+ DIF_ADDPROPERTYPAGE_BASIC DI_FUNCTION = 0x00000024
+ DIF_TROUBLESHOOTER DI_FUNCTION = 0x00000026
+ DIF_POWERMESSAGEWAKE DI_FUNCTION = 0x00000027
+ DIF_ADDREMOTEPROPERTYPAGE_ADVANCED DI_FUNCTION = 0x00000028
+ DIF_UPDATEDRIVER_UI DI_FUNCTION = 0x00000029
+ DIF_FINISHINSTALL_ACTION DI_FUNCTION = 0x0000002A
+)
+
+// DevInstallParams is device installation parameters structure (associated with a particular device information element, or globally with a device information set)
+type DevInstallParams struct {
+ size uint32
+ Flags DI_FLAGS
+ FlagsEx DI_FLAGSEX
+ hwndParent uintptr
+ InstallMsgHandler uintptr
+ InstallMsgHandlerContext uintptr
+ FileQueue HSPFILEQ
+ _ uintptr
+ _ uint32
+ driverPath [MAX_PATH]uint16
+}
+
+func (params *DevInstallParams) DriverPath() string {
+ return UTF16ToString(params.driverPath[:])
+}
+
+func (params *DevInstallParams) SetDriverPath(driverPath string) error {
+ str, err := UTF16FromString(driverPath)
+ if err != nil {
+ return err
+ }
+ copy(params.driverPath[:], str)
+ return nil
+}
+
+// DI_FLAGS is SP_DEVINSTALL_PARAMS.Flags values
+type DI_FLAGS uint32
+
+const (
+ // Flags for choosing a device
+ DI_SHOWOEM DI_FLAGS = 0x00000001 // support Other... button
+ DI_SHOWCOMPAT DI_FLAGS = 0x00000002 // show compatibility list
+ DI_SHOWCLASS DI_FLAGS = 0x00000004 // show class list
+ DI_SHOWALL DI_FLAGS = 0x00000007 // both class & compat list shown
+ DI_NOVCP DI_FLAGS = 0x00000008 // don't create a new copy queue--use caller-supplied FileQueue
+ DI_DIDCOMPAT DI_FLAGS = 0x00000010 // Searched for compatible devices
+ DI_DIDCLASS DI_FLAGS = 0x00000020 // Searched for class devices
+ DI_AUTOASSIGNRES DI_FLAGS = 0x00000040 // No UI for resources if possible
+
+ // Flags returned by DiInstallDevice to indicate need to reboot/restart
+ DI_NEEDRESTART DI_FLAGS = 0x00000080 // Reboot required to take effect
+ DI_NEEDREBOOT DI_FLAGS = 0x00000100 // ""
+
+ // Flags for device installation
+ DI_NOBROWSE DI_FLAGS = 0x00000200 // no Browse... in InsertDisk
+
+ // Flags set by DiBuildDriverInfoList
+ DI_MULTMFGS DI_FLAGS = 0x00000400 // Set if multiple manufacturers in class driver list
+
+ // Flag indicates that device is disabled
+ DI_DISABLED DI_FLAGS = 0x00000800 // Set if device disabled
+
+ // Flags for Device/Class Properties
+ DI_GENERALPAGE_ADDED DI_FLAGS = 0x00001000
+ DI_RESOURCEPAGE_ADDED DI_FLAGS = 0x00002000
+
+ // Flag to indicate the setting properties for this Device (or class) caused a change so the Dev Mgr UI probably needs to be updated.
+ DI_PROPERTIES_CHANGE DI_FLAGS = 0x00004000
+
+ // Flag to indicate that the sorting from the INF file should be used.
+ DI_INF_IS_SORTED DI_FLAGS = 0x00008000
+
+ // Flag to indicate that only the the INF specified by SP_DEVINSTALL_PARAMS.DriverPath should be searched.
+ DI_ENUMSINGLEINF DI_FLAGS = 0x00010000
+
+ // Flag that prevents ConfigMgr from removing/re-enumerating devices during device
+ // registration, installation, and deletion.
+ DI_DONOTCALLCONFIGMG DI_FLAGS = 0x00020000
+
+ // The following flag can be used to install a device disabled
+ DI_INSTALLDISABLED DI_FLAGS = 0x00040000
+
+ // Flag that causes SetupDiBuildDriverInfoList to build a device's compatible driver
+ // list from its existing class driver list, instead of the normal INF search.
+ DI_COMPAT_FROM_CLASS DI_FLAGS = 0x00080000
+
+ // This flag is set if the Class Install params should be used.
+ DI_CLASSINSTALLPARAMS DI_FLAGS = 0x00100000
+
+ // This flag is set if the caller of DiCallClassInstaller does NOT want the internal default action performed if the Class installer returns ERROR_DI_DO_DEFAULT.
+ DI_NODI_DEFAULTACTION DI_FLAGS = 0x00200000
+
+ // Flags for device installation
+ DI_QUIETINSTALL DI_FLAGS = 0x00800000 // don't confuse the user with questions or excess info
+ DI_NOFILECOPY DI_FLAGS = 0x01000000 // No file Copy necessary
+ DI_FORCECOPY DI_FLAGS = 0x02000000 // Force files to be copied from install path
+ DI_DRIVERPAGE_ADDED DI_FLAGS = 0x04000000 // Prop provider added Driver page.
+ DI_USECI_SELECTSTRINGS DI_FLAGS = 0x08000000 // Use Class Installer Provided strings in the Select Device Dlg
+ DI_OVERRIDE_INFFLAGS DI_FLAGS = 0x10000000 // Override INF flags
+ DI_PROPS_NOCHANGEUSAGE DI_FLAGS = 0x20000000 // No Enable/Disable in General Props
+
+ DI_NOSELECTICONS DI_FLAGS = 0x40000000 // No small icons in select device dialogs
+
+ DI_NOWRITE_IDS DI_FLAGS = 0x80000000 // Don't write HW & Compat IDs on install
+)
+
+// DI_FLAGSEX is SP_DEVINSTALL_PARAMS.FlagsEx values
+type DI_FLAGSEX uint32
+
+const (
+ DI_FLAGSEX_CI_FAILED DI_FLAGSEX = 0x00000004 // Failed to Load/Call class installer
+ DI_FLAGSEX_FINISHINSTALL_ACTION DI_FLAGSEX = 0x00000008 // Class/co-installer wants to get a DIF_FINISH_INSTALL action in client context.
+ DI_FLAGSEX_DIDINFOLIST DI_FLAGSEX = 0x00000010 // Did the Class Info List
+ DI_FLAGSEX_DIDCOMPATINFO DI_FLAGSEX = 0x00000020 // Did the Compat Info List
+ DI_FLAGSEX_FILTERCLASSES DI_FLAGSEX = 0x00000040
+ DI_FLAGSEX_SETFAILEDINSTALL DI_FLAGSEX = 0x00000080
+ DI_FLAGSEX_DEVICECHANGE DI_FLAGSEX = 0x00000100
+ DI_FLAGSEX_ALWAYSWRITEIDS DI_FLAGSEX = 0x00000200
+ DI_FLAGSEX_PROPCHANGE_PENDING DI_FLAGSEX = 0x00000400 // One or more device property sheets have had changes made to them, and need to have a DIF_PROPERTYCHANGE occur.
+ DI_FLAGSEX_ALLOWEXCLUDEDDRVS DI_FLAGSEX = 0x00000800
+ DI_FLAGSEX_NOUIONQUERYREMOVE DI_FLAGSEX = 0x00001000
+ DI_FLAGSEX_USECLASSFORCOMPAT DI_FLAGSEX = 0x00002000 // Use the device's class when building compat drv list. (Ignored if DI_COMPAT_FROM_CLASS flag is specified.)
+ DI_FLAGSEX_NO_DRVREG_MODIFY DI_FLAGSEX = 0x00008000 // Don't run AddReg and DelReg for device's software (driver) key.
+ DI_FLAGSEX_IN_SYSTEM_SETUP DI_FLAGSEX = 0x00010000 // Installation is occurring during initial system setup.
+ DI_FLAGSEX_INET_DRIVER DI_FLAGSEX = 0x00020000 // Driver came from Windows Update
+ DI_FLAGSEX_APPENDDRIVERLIST DI_FLAGSEX = 0x00040000 // Cause SetupDiBuildDriverInfoList to append a new driver list to an existing list.
+ DI_FLAGSEX_PREINSTALLBACKUP DI_FLAGSEX = 0x00080000 // not used
+ DI_FLAGSEX_BACKUPONREPLACE DI_FLAGSEX = 0x00100000 // not used
+ DI_FLAGSEX_DRIVERLIST_FROM_URL DI_FLAGSEX = 0x00200000 // build driver list from INF(s) retrieved from URL specified in SP_DEVINSTALL_PARAMS.DriverPath (empty string means Windows Update website)
+ DI_FLAGSEX_EXCLUDE_OLD_INET_DRIVERS DI_FLAGSEX = 0x00800000 // Don't include old Internet drivers when building a driver list. Ignored on Windows Vista and later.
+ DI_FLAGSEX_POWERPAGE_ADDED DI_FLAGSEX = 0x01000000 // class installer added their own power page
+ DI_FLAGSEX_FILTERSIMILARDRIVERS DI_FLAGSEX = 0x02000000 // only include similar drivers in class list
+ DI_FLAGSEX_INSTALLEDDRIVER DI_FLAGSEX = 0x04000000 // only add the installed driver to the class or compat driver list. Used in calls to SetupDiBuildDriverInfoList
+ DI_FLAGSEX_NO_CLASSLIST_NODE_MERGE DI_FLAGSEX = 0x08000000 // Don't remove identical driver nodes from the class list
+ DI_FLAGSEX_ALTPLATFORM_DRVSEARCH DI_FLAGSEX = 0x10000000 // Build driver list based on alternate platform information specified in associated file queue
+ DI_FLAGSEX_RESTART_DEVICE_ONLY DI_FLAGSEX = 0x20000000 // only restart the device drivers are being installed on as opposed to restarting all devices using those drivers.
+ DI_FLAGSEX_RECURSIVESEARCH DI_FLAGSEX = 0x40000000 // Tell SetupDiBuildDriverInfoList to do a recursive search
+ DI_FLAGSEX_SEARCH_PUBLISHED_INFS DI_FLAGSEX = 0x80000000 // Tell SetupDiBuildDriverInfoList to do a "published INF" search
+)
+
+// ClassInstallHeader is the first member of any class install parameters structure. It contains the device installation request code that defines the format of the rest of the install parameters structure.
+type ClassInstallHeader struct {
+ size uint32
+ InstallFunction DI_FUNCTION
+}
+
+func MakeClassInstallHeader(installFunction DI_FUNCTION) *ClassInstallHeader {
+ hdr := &ClassInstallHeader{InstallFunction: installFunction}
+ hdr.size = uint32(unsafe.Sizeof(*hdr))
+ return hdr
+}
+
+// DICS_STATE specifies values indicating a change in a device's state
+type DICS_STATE uint32
+
+const (
+ DICS_ENABLE DICS_STATE = 0x00000001 // The device is being enabled.
+ DICS_DISABLE DICS_STATE = 0x00000002 // The device is being disabled.
+ DICS_PROPCHANGE DICS_STATE = 0x00000003 // The properties of the device have changed.
+ DICS_START DICS_STATE = 0x00000004 // The device is being started (if the request is for the currently active hardware profile).
+ DICS_STOP DICS_STATE = 0x00000005 // The device is being stopped. The driver stack will be unloaded and the CSCONFIGFLAG_DO_NOT_START flag will be set for the device.
+)
+
+// DICS_FLAG specifies the scope of a device property change
+type DICS_FLAG uint32
+
+const (
+ DICS_FLAG_GLOBAL DICS_FLAG = 0x00000001 // make change in all hardware profiles
+ DICS_FLAG_CONFIGSPECIFIC DICS_FLAG = 0x00000002 // make change in specified profile only
+ DICS_FLAG_CONFIGGENERAL DICS_FLAG = 0x00000004 // 1 or more hardware profile-specific changes to follow (obsolete)
+)
+
+// PropChangeParams is a structure corresponding to a DIF_PROPERTYCHANGE install function.
+type PropChangeParams struct {
+ ClassInstallHeader ClassInstallHeader
+ StateChange DICS_STATE
+ Scope DICS_FLAG
+ HwProfile uint32
+}
+
+// DI_REMOVEDEVICE specifies the scope of the device removal
+type DI_REMOVEDEVICE uint32
+
+const (
+ DI_REMOVEDEVICE_GLOBAL DI_REMOVEDEVICE = 0x00000001 // Make this change in all hardware profiles. Remove information about the device from the registry.
+ DI_REMOVEDEVICE_CONFIGSPECIFIC DI_REMOVEDEVICE = 0x00000002 // Make this change to only the hardware profile specified by HwProfile. this flag only applies to root-enumerated devices. When Windows removes the device from the last hardware profile in which it was configured, Windows performs a global removal.
+)
+
+// RemoveDeviceParams is a structure corresponding to a DIF_REMOVE install function.
+type RemoveDeviceParams struct {
+ ClassInstallHeader ClassInstallHeader
+ Scope DI_REMOVEDEVICE
+ HwProfile uint32
+}
+
+// DrvInfoData is driver information structure (member of a driver info list that may be associated with a particular device instance, or (globally) with a device information set)
+type DrvInfoData struct {
+ size uint32
+ DriverType uint32
+ _ uintptr
+ description [LINE_LEN]uint16
+ mfgName [LINE_LEN]uint16
+ providerName [LINE_LEN]uint16
+ DriverDate Filetime
+ DriverVersion uint64
+}
+
+func (data *DrvInfoData) Description() string {
+ return UTF16ToString(data.description[:])
+}
+
+func (data *DrvInfoData) SetDescription(description string) error {
+ str, err := UTF16FromString(description)
+ if err != nil {
+ return err
+ }
+ copy(data.description[:], str)
+ return nil
+}
+
+func (data *DrvInfoData) MfgName() string {
+ return UTF16ToString(data.mfgName[:])
+}
+
+func (data *DrvInfoData) SetMfgName(mfgName string) error {
+ str, err := UTF16FromString(mfgName)
+ if err != nil {
+ return err
+ }
+ copy(data.mfgName[:], str)
+ return nil
+}
+
+func (data *DrvInfoData) ProviderName() string {
+ return UTF16ToString(data.providerName[:])
+}
+
+func (data *DrvInfoData) SetProviderName(providerName string) error {
+ str, err := UTF16FromString(providerName)
+ if err != nil {
+ return err
+ }
+ copy(data.providerName[:], str)
+ return nil
+}
+
+// IsNewer method returns true if DrvInfoData date and version is newer than supplied parameters.
+func (data *DrvInfoData) IsNewer(driverDate Filetime, driverVersion uint64) bool {
+ if data.DriverDate.HighDateTime > driverDate.HighDateTime {
+ return true
+ }
+ if data.DriverDate.HighDateTime < driverDate.HighDateTime {
+ return false
+ }
+
+ if data.DriverDate.LowDateTime > driverDate.LowDateTime {
+ return true
+ }
+ if data.DriverDate.LowDateTime < driverDate.LowDateTime {
+ return false
+ }
+
+ if data.DriverVersion > driverVersion {
+ return true
+ }
+ if data.DriverVersion < driverVersion {
+ return false
+ }
+
+ return false
+}
+
+// DrvInfoDetailData is driver information details structure (provides detailed information about a particular driver information structure)
+type DrvInfoDetailData struct {
+ size uint32 // Use unsafeSizeOf method
+ InfDate Filetime
+ compatIDsOffset uint32
+ compatIDsLength uint32
+ _ uintptr
+ sectionName [LINE_LEN]uint16
+ infFileName [MAX_PATH]uint16
+ drvDescription [LINE_LEN]uint16
+ hardwareID [1]uint16
+}
+
+func (*DrvInfoDetailData) unsafeSizeOf() uint32 {
+ if unsafe.Sizeof(uintptr(0)) == 4 {
+ // Windows declares this with pshpack1.h
+ return uint32(unsafe.Offsetof(DrvInfoDetailData{}.hardwareID) + unsafe.Sizeof(DrvInfoDetailData{}.hardwareID))
+ }
+ return uint32(unsafe.Sizeof(DrvInfoDetailData{}))
+}
+
+func (data *DrvInfoDetailData) SectionName() string {
+ return UTF16ToString(data.sectionName[:])
+}
+
+func (data *DrvInfoDetailData) InfFileName() string {
+ return UTF16ToString(data.infFileName[:])
+}
+
+func (data *DrvInfoDetailData) DrvDescription() string {
+ return UTF16ToString(data.drvDescription[:])
+}
+
+func (data *DrvInfoDetailData) HardwareID() string {
+ if data.compatIDsOffset > 1 {
+ bufW := data.getBuf()
+ return UTF16ToString(bufW[:wcslen(bufW)])
+ }
+
+ return ""
+}
+
+func (data *DrvInfoDetailData) CompatIDs() []string {
+ a := make([]string, 0)
+
+ if data.compatIDsLength > 0 {
+ bufW := data.getBuf()
+ bufW = bufW[data.compatIDsOffset : data.compatIDsOffset+data.compatIDsLength]
+ for i := 0; i < len(bufW); {
+ j := i + wcslen(bufW[i:])
+ if i < j {
+ a = append(a, UTF16ToString(bufW[i:j]))
+ }
+ i = j + 1
+ }
+ }
+
+ return a
+}
+
+func (data *DrvInfoDetailData) getBuf() []uint16 {
+ len := (data.size - uint32(unsafe.Offsetof(data.hardwareID))) / 2
+ sl := struct {
+ addr *uint16
+ len int
+ cap int
+ }{&data.hardwareID[0], int(len), int(len)}
+ return *(*[]uint16)(unsafe.Pointer(&sl))
+}
+
+// IsCompatible method tests if given hardware ID matches the driver or is listed on the compatible ID list.
+func (data *DrvInfoDetailData) IsCompatible(hwid string) bool {
+ hwidLC := strings.ToLower(hwid)
+ if strings.ToLower(data.HardwareID()) == hwidLC {
+ return true
+ }
+ a := data.CompatIDs()
+ for i := range a {
+ if strings.ToLower(a[i]) == hwidLC {
+ return true
+ }
+ }
+
+ return false
+}
+
+// DICD flags control SetupDiCreateDeviceInfo
+type DICD uint32
+
+const (
+ DICD_GENERATE_ID DICD = 0x00000001
+ DICD_INHERIT_CLASSDRVS DICD = 0x00000002
+)
+
+// SUOI flags control SetupUninstallOEMInf
+type SUOI uint32
+
+const (
+ SUOI_FORCEDELETE SUOI = 0x0001
+)
+
+// SPDIT flags to distinguish between class drivers and
+// device drivers. (Passed in 'DriverType' parameter of
+// driver information list APIs)
+type SPDIT uint32
+
+const (
+ SPDIT_NODRIVER SPDIT = 0x00000000
+ SPDIT_CLASSDRIVER SPDIT = 0x00000001
+ SPDIT_COMPATDRIVER SPDIT = 0x00000002
+)
+
+// DIGCF flags control what is included in the device information set built by SetupDiGetClassDevs
+type DIGCF uint32
+
+const (
+ DIGCF_DEFAULT DIGCF = 0x00000001 // only valid with DIGCF_DEVICEINTERFACE
+ DIGCF_PRESENT DIGCF = 0x00000002
+ DIGCF_ALLCLASSES DIGCF = 0x00000004
+ DIGCF_PROFILE DIGCF = 0x00000008
+ DIGCF_DEVICEINTERFACE DIGCF = 0x00000010
+)
+
+// DIREG specifies values for SetupDiCreateDevRegKey, SetupDiOpenDevRegKey, and SetupDiDeleteDevRegKey.
+type DIREG uint32
+
+const (
+ DIREG_DEV DIREG = 0x00000001 // Open/Create/Delete device key
+ DIREG_DRV DIREG = 0x00000002 // Open/Create/Delete driver key
+ DIREG_BOTH DIREG = 0x00000004 // Delete both driver and Device key
+)
+
+// SPDRP specifies device registry property codes
+// (Codes marked as read-only (R) may only be used for
+// SetupDiGetDeviceRegistryProperty)
+//
+// These values should cover the same set of registry properties
+// as defined by the CM_DRP codes in cfgmgr32.h.
+//
+// Note that SPDRP codes are zero based while CM_DRP codes are one based!
+type SPDRP uint32
+
+const (
+ SPDRP_DEVICEDESC SPDRP = 0x00000000 // DeviceDesc (R/W)
+ SPDRP_HARDWAREID SPDRP = 0x00000001 // HardwareID (R/W)
+ SPDRP_COMPATIBLEIDS SPDRP = 0x00000002 // CompatibleIDs (R/W)
+ SPDRP_SERVICE SPDRP = 0x00000004 // Service (R/W)
+ SPDRP_CLASS SPDRP = 0x00000007 // Class (R--tied to ClassGUID)
+ SPDRP_CLASSGUID SPDRP = 0x00000008 // ClassGUID (R/W)
+ SPDRP_DRIVER SPDRP = 0x00000009 // Driver (R/W)
+ SPDRP_CONFIGFLAGS SPDRP = 0x0000000A // ConfigFlags (R/W)
+ SPDRP_MFG SPDRP = 0x0000000B // Mfg (R/W)
+ SPDRP_FRIENDLYNAME SPDRP = 0x0000000C // FriendlyName (R/W)
+ SPDRP_LOCATION_INFORMATION SPDRP = 0x0000000D // LocationInformation (R/W)
+ SPDRP_PHYSICAL_DEVICE_OBJECT_NAME SPDRP = 0x0000000E // PhysicalDeviceObjectName (R)
+ SPDRP_CAPABILITIES SPDRP = 0x0000000F // Capabilities (R)
+ SPDRP_UI_NUMBER SPDRP = 0x00000010 // UiNumber (R)
+ SPDRP_UPPERFILTERS SPDRP = 0x00000011 // UpperFilters (R/W)
+ SPDRP_LOWERFILTERS SPDRP = 0x00000012 // LowerFilters (R/W)
+ SPDRP_BUSTYPEGUID SPDRP = 0x00000013 // BusTypeGUID (R)
+ SPDRP_LEGACYBUSTYPE SPDRP = 0x00000014 // LegacyBusType (R)
+ SPDRP_BUSNUMBER SPDRP = 0x00000015 // BusNumber (R)
+ SPDRP_ENUMERATOR_NAME SPDRP = 0x00000016 // Enumerator Name (R)
+ SPDRP_SECURITY SPDRP = 0x00000017 // Security (R/W, binary form)
+ SPDRP_SECURITY_SDS SPDRP = 0x00000018 // Security (W, SDS form)
+ SPDRP_DEVTYPE SPDRP = 0x00000019 // Device Type (R/W)
+ SPDRP_EXCLUSIVE SPDRP = 0x0000001A // Device is exclusive-access (R/W)
+ SPDRP_CHARACTERISTICS SPDRP = 0x0000001B // Device Characteristics (R/W)
+ SPDRP_ADDRESS SPDRP = 0x0000001C // Device Address (R)
+ SPDRP_UI_NUMBER_DESC_FORMAT SPDRP = 0x0000001D // UiNumberDescFormat (R/W)
+ SPDRP_DEVICE_POWER_DATA SPDRP = 0x0000001E // Device Power Data (R)
+ SPDRP_REMOVAL_POLICY SPDRP = 0x0000001F // Removal Policy (R)
+ SPDRP_REMOVAL_POLICY_HW_DEFAULT SPDRP = 0x00000020 // Hardware Removal Policy (R)
+ SPDRP_REMOVAL_POLICY_OVERRIDE SPDRP = 0x00000021 // Removal Policy Override (RW)
+ SPDRP_INSTALL_STATE SPDRP = 0x00000022 // Device Install State (R)
+ SPDRP_LOCATION_PATHS SPDRP = 0x00000023 // Device Location Paths (R)
+ SPDRP_BASE_CONTAINERID SPDRP = 0x00000024 // Base ContainerID (R)
+
+ SPDRP_MAXIMUM_PROPERTY SPDRP = 0x00000025 // Upper bound on ordinals
+)
+
+// DEVPROPTYPE represents the property-data-type identifier that specifies the
+// data type of a device property value in the unified device property model.
+type DEVPROPTYPE uint32
+
+const (
+ DEVPROP_TYPEMOD_ARRAY DEVPROPTYPE = 0x00001000
+ DEVPROP_TYPEMOD_LIST DEVPROPTYPE = 0x00002000
+
+ DEVPROP_TYPE_EMPTY DEVPROPTYPE = 0x00000000
+ DEVPROP_TYPE_NULL DEVPROPTYPE = 0x00000001
+ DEVPROP_TYPE_SBYTE DEVPROPTYPE = 0x00000002
+ DEVPROP_TYPE_BYTE DEVPROPTYPE = 0x00000003
+ DEVPROP_TYPE_INT16 DEVPROPTYPE = 0x00000004
+ DEVPROP_TYPE_UINT16 DEVPROPTYPE = 0x00000005
+ DEVPROP_TYPE_INT32 DEVPROPTYPE = 0x00000006
+ DEVPROP_TYPE_UINT32 DEVPROPTYPE = 0x00000007
+ DEVPROP_TYPE_INT64 DEVPROPTYPE = 0x00000008
+ DEVPROP_TYPE_UINT64 DEVPROPTYPE = 0x00000009
+ DEVPROP_TYPE_FLOAT DEVPROPTYPE = 0x0000000A
+ DEVPROP_TYPE_DOUBLE DEVPROPTYPE = 0x0000000B
+ DEVPROP_TYPE_DECIMAL DEVPROPTYPE = 0x0000000C
+ DEVPROP_TYPE_GUID DEVPROPTYPE = 0x0000000D
+ DEVPROP_TYPE_CURRENCY DEVPROPTYPE = 0x0000000E
+ DEVPROP_TYPE_DATE DEVPROPTYPE = 0x0000000F
+ DEVPROP_TYPE_FILETIME DEVPROPTYPE = 0x00000010
+ DEVPROP_TYPE_BOOLEAN DEVPROPTYPE = 0x00000011
+ DEVPROP_TYPE_STRING DEVPROPTYPE = 0x00000012
+ DEVPROP_TYPE_STRING_LIST DEVPROPTYPE = DEVPROP_TYPE_STRING | DEVPROP_TYPEMOD_LIST
+ DEVPROP_TYPE_SECURITY_DESCRIPTOR DEVPROPTYPE = 0x00000013
+ DEVPROP_TYPE_SECURITY_DESCRIPTOR_STRING DEVPROPTYPE = 0x00000014
+ DEVPROP_TYPE_DEVPROPKEY DEVPROPTYPE = 0x00000015
+ DEVPROP_TYPE_DEVPROPTYPE DEVPROPTYPE = 0x00000016
+ DEVPROP_TYPE_BINARY DEVPROPTYPE = DEVPROP_TYPE_BYTE | DEVPROP_TYPEMOD_ARRAY
+ DEVPROP_TYPE_ERROR DEVPROPTYPE = 0x00000017
+ DEVPROP_TYPE_NTSTATUS DEVPROPTYPE = 0x00000018
+ DEVPROP_TYPE_STRING_INDIRECT DEVPROPTYPE = 0x00000019
+
+ MAX_DEVPROP_TYPE DEVPROPTYPE = 0x00000019
+ MAX_DEVPROP_TYPEMOD DEVPROPTYPE = 0x00002000
+
+ DEVPROP_MASK_TYPE DEVPROPTYPE = 0x00000FFF
+ DEVPROP_MASK_TYPEMOD DEVPROPTYPE = 0x0000F000
+)
+
+// DEVPROPGUID specifies a property category.
+type DEVPROPGUID GUID
+
+// DEVPROPID uniquely identifies the property within the property category.
+type DEVPROPID uint32
+
+const DEVPROPID_FIRST_USABLE DEVPROPID = 2
+
+// DEVPROPKEY represents a device property key for a device property in the
+// unified device property model.
+type DEVPROPKEY struct {
+ FmtID DEVPROPGUID
+ PID DEVPROPID
+}
+
+// CONFIGRET is a return value or error code from cfgmgr32 APIs
+type CONFIGRET uint32
+
+func (ret CONFIGRET) Error() string {
+ if win32Error, ok := ret.Unwrap().(Errno); ok {
+ return fmt.Sprintf("%s (CfgMgr error: 0x%08x)", win32Error.Error(), uint32(ret))
+ }
+ return fmt.Sprintf("CfgMgr error: 0x%08x", uint32(ret))
+}
+
+func (ret CONFIGRET) Win32Error(defaultError Errno) Errno {
+ return cm_MapCrToWin32Err(ret, defaultError)
+}
+
+func (ret CONFIGRET) Unwrap() error {
+ const noMatch = Errno(^uintptr(0))
+ win32Error := ret.Win32Error(noMatch)
+ if win32Error == noMatch {
+ return nil
+ }
+ return win32Error
+}
+
+const (
+ CR_SUCCESS CONFIGRET = 0x00000000
+ CR_DEFAULT CONFIGRET = 0x00000001
+ CR_OUT_OF_MEMORY CONFIGRET = 0x00000002
+ CR_INVALID_POINTER CONFIGRET = 0x00000003
+ CR_INVALID_FLAG CONFIGRET = 0x00000004
+ CR_INVALID_DEVNODE CONFIGRET = 0x00000005
+ CR_INVALID_DEVINST = CR_INVALID_DEVNODE
+ CR_INVALID_RES_DES CONFIGRET = 0x00000006
+ CR_INVALID_LOG_CONF CONFIGRET = 0x00000007
+ CR_INVALID_ARBITRATOR CONFIGRET = 0x00000008
+ CR_INVALID_NODELIST CONFIGRET = 0x00000009
+ CR_DEVNODE_HAS_REQS CONFIGRET = 0x0000000A
+ CR_DEVINST_HAS_REQS = CR_DEVNODE_HAS_REQS
+ CR_INVALID_RESOURCEID CONFIGRET = 0x0000000B
+ CR_DLVXD_NOT_FOUND CONFIGRET = 0x0000000C
+ CR_NO_SUCH_DEVNODE CONFIGRET = 0x0000000D
+ CR_NO_SUCH_DEVINST = CR_NO_SUCH_DEVNODE
+ CR_NO_MORE_LOG_CONF CONFIGRET = 0x0000000E
+ CR_NO_MORE_RES_DES CONFIGRET = 0x0000000F
+ CR_ALREADY_SUCH_DEVNODE CONFIGRET = 0x00000010
+ CR_ALREADY_SUCH_DEVINST = CR_ALREADY_SUCH_DEVNODE
+ CR_INVALID_RANGE_LIST CONFIGRET = 0x00000011
+ CR_INVALID_RANGE CONFIGRET = 0x00000012
+ CR_FAILURE CONFIGRET = 0x00000013
+ CR_NO_SUCH_LOGICAL_DEV CONFIGRET = 0x00000014
+ CR_CREATE_BLOCKED CONFIGRET = 0x00000015
+ CR_NOT_SYSTEM_VM CONFIGRET = 0x00000016
+ CR_REMOVE_VETOED CONFIGRET = 0x00000017
+ CR_APM_VETOED CONFIGRET = 0x00000018
+ CR_INVALID_LOAD_TYPE CONFIGRET = 0x00000019
+ CR_BUFFER_SMALL CONFIGRET = 0x0000001A
+ CR_NO_ARBITRATOR CONFIGRET = 0x0000001B
+ CR_NO_REGISTRY_HANDLE CONFIGRET = 0x0000001C
+ CR_REGISTRY_ERROR CONFIGRET = 0x0000001D
+ CR_INVALID_DEVICE_ID CONFIGRET = 0x0000001E
+ CR_INVALID_DATA CONFIGRET = 0x0000001F
+ CR_INVALID_API CONFIGRET = 0x00000020
+ CR_DEVLOADER_NOT_READY CONFIGRET = 0x00000021
+ CR_NEED_RESTART CONFIGRET = 0x00000022
+ CR_NO_MORE_HW_PROFILES CONFIGRET = 0x00000023
+ CR_DEVICE_NOT_THERE CONFIGRET = 0x00000024
+ CR_NO_SUCH_VALUE CONFIGRET = 0x00000025
+ CR_WRONG_TYPE CONFIGRET = 0x00000026
+ CR_INVALID_PRIORITY CONFIGRET = 0x00000027
+ CR_NOT_DISABLEABLE CONFIGRET = 0x00000028
+ CR_FREE_RESOURCES CONFIGRET = 0x00000029
+ CR_QUERY_VETOED CONFIGRET = 0x0000002A
+ CR_CANT_SHARE_IRQ CONFIGRET = 0x0000002B
+ CR_NO_DEPENDENT CONFIGRET = 0x0000002C
+ CR_SAME_RESOURCES CONFIGRET = 0x0000002D
+ CR_NO_SUCH_REGISTRY_KEY CONFIGRET = 0x0000002E
+ CR_INVALID_MACHINENAME CONFIGRET = 0x0000002F
+ CR_REMOTE_COMM_FAILURE CONFIGRET = 0x00000030
+ CR_MACHINE_UNAVAILABLE CONFIGRET = 0x00000031
+ CR_NO_CM_SERVICES CONFIGRET = 0x00000032
+ CR_ACCESS_DENIED CONFIGRET = 0x00000033
+ CR_CALL_NOT_IMPLEMENTED CONFIGRET = 0x00000034
+ CR_INVALID_PROPERTY CONFIGRET = 0x00000035
+ CR_DEVICE_INTERFACE_ACTIVE CONFIGRET = 0x00000036
+ CR_NO_SUCH_DEVICE_INTERFACE CONFIGRET = 0x00000037
+ CR_INVALID_REFERENCE_STRING CONFIGRET = 0x00000038
+ CR_INVALID_CONFLICT_LIST CONFIGRET = 0x00000039
+ CR_INVALID_INDEX CONFIGRET = 0x0000003A
+ CR_INVALID_STRUCTURE_SIZE CONFIGRET = 0x0000003B
+ NUM_CR_RESULTS CONFIGRET = 0x0000003C
+)
+
+const (
+ CM_GET_DEVICE_INTERFACE_LIST_PRESENT = 0 // only currently 'live' device interfaces
+ CM_GET_DEVICE_INTERFACE_LIST_ALL_DEVICES = 1 // all registered device interfaces, live or not
+)
+
+const (
+ DN_ROOT_ENUMERATED = 0x00000001 // Was enumerated by ROOT
+ DN_DRIVER_LOADED = 0x00000002 // Has Register_Device_Driver
+ DN_ENUM_LOADED = 0x00000004 // Has Register_Enumerator
+ DN_STARTED = 0x00000008 // Is currently configured
+ DN_MANUAL = 0x00000010 // Manually installed
+ DN_NEED_TO_ENUM = 0x00000020 // May need reenumeration
+ DN_NOT_FIRST_TIME = 0x00000040 // Has received a config
+ DN_HARDWARE_ENUM = 0x00000080 // Enum generates hardware ID
+ DN_LIAR = 0x00000100 // Lied about can reconfig once
+ DN_HAS_MARK = 0x00000200 // Not CM_Create_DevInst lately
+ DN_HAS_PROBLEM = 0x00000400 // Need device installer
+ DN_FILTERED = 0x00000800 // Is filtered
+ DN_MOVED = 0x00001000 // Has been moved
+ DN_DISABLEABLE = 0x00002000 // Can be disabled
+ DN_REMOVABLE = 0x00004000 // Can be removed
+ DN_PRIVATE_PROBLEM = 0x00008000 // Has a private problem
+ DN_MF_PARENT = 0x00010000 // Multi function parent
+ DN_MF_CHILD = 0x00020000 // Multi function child
+ DN_WILL_BE_REMOVED = 0x00040000 // DevInst is being removed
+ DN_NOT_FIRST_TIMEE = 0x00080000 // Has received a config enumerate
+ DN_STOP_FREE_RES = 0x00100000 // When child is stopped, free resources
+ DN_REBAL_CANDIDATE = 0x00200000 // Don't skip during rebalance
+ DN_BAD_PARTIAL = 0x00400000 // This devnode's log_confs do not have same resources
+ DN_NT_ENUMERATOR = 0x00800000 // This devnode's is an NT enumerator
+ DN_NT_DRIVER = 0x01000000 // This devnode's is an NT driver
+ DN_NEEDS_LOCKING = 0x02000000 // Devnode need lock resume processing
+ DN_ARM_WAKEUP = 0x04000000 // Devnode can be the wakeup device
+ DN_APM_ENUMERATOR = 0x08000000 // APM aware enumerator
+ DN_APM_DRIVER = 0x10000000 // APM aware driver
+ DN_SILENT_INSTALL = 0x20000000 // Silent install
+ DN_NO_SHOW_IN_DM = 0x40000000 // No show in device manager
+ DN_BOOT_LOG_PROB = 0x80000000 // Had a problem during preassignment of boot log conf
+ DN_NEED_RESTART = DN_LIAR // System needs to be restarted for this Devnode to work properly
+ DN_DRIVER_BLOCKED = DN_NOT_FIRST_TIME // One or more drivers are blocked from loading for this Devnode
+ DN_LEGACY_DRIVER = DN_MOVED // This device is using a legacy driver
+ DN_CHILD_WITH_INVALID_ID = DN_HAS_MARK // One or more children have invalid IDs
+ DN_DEVICE_DISCONNECTED = DN_NEEDS_LOCKING // The function driver for a device reported that the device is not connected. Typically this means a wireless device is out of range.
+ DN_QUERY_REMOVE_PENDING = DN_MF_PARENT // Device is part of a set of related devices collectively pending query-removal
+ DN_QUERY_REMOVE_ACTIVE = DN_MF_CHILD // Device is actively engaged in a query-remove IRP
+ DN_CHANGEABLE_FLAGS = DN_NOT_FIRST_TIME | DN_HARDWARE_ENUM | DN_HAS_MARK | DN_DISABLEABLE | DN_REMOVABLE | DN_MF_CHILD | DN_MF_PARENT | DN_NOT_FIRST_TIMEE | DN_STOP_FREE_RES | DN_REBAL_CANDIDATE | DN_NT_ENUMERATOR | DN_NT_DRIVER | DN_SILENT_INSTALL | DN_NO_SHOW_IN_DM
+)
+
+//sys setupDiCreateDeviceInfoListEx(classGUID *GUID, hwndParent uintptr, machineName *uint16, reserved uintptr) (handle DevInfo, err error) [failretval==DevInfo(InvalidHandle)] = setupapi.SetupDiCreateDeviceInfoListExW
+
+// SetupDiCreateDeviceInfoListEx function creates an empty device information set on a remote or a local computer and optionally associates the set with a device setup class.
+func SetupDiCreateDeviceInfoListEx(classGUID *GUID, hwndParent uintptr, machineName string) (deviceInfoSet DevInfo, err error) {
+ var machineNameUTF16 *uint16
+ if machineName != "" {
+ machineNameUTF16, err = UTF16PtrFromString(machineName)
+ if err != nil {
+ return
+ }
+ }
+ return setupDiCreateDeviceInfoListEx(classGUID, hwndParent, machineNameUTF16, 0)
+}
+
+//sys setupDiGetDeviceInfoListDetail(deviceInfoSet DevInfo, deviceInfoSetDetailData *DevInfoListDetailData) (err error) = setupapi.SetupDiGetDeviceInfoListDetailW
+
+// SetupDiGetDeviceInfoListDetail function retrieves information associated with a device information set including the class GUID, remote computer handle, and remote computer name.
+func SetupDiGetDeviceInfoListDetail(deviceInfoSet DevInfo) (deviceInfoSetDetailData *DevInfoListDetailData, err error) {
+ data := &DevInfoListDetailData{}
+ data.size = data.unsafeSizeOf()
+
+ return data, setupDiGetDeviceInfoListDetail(deviceInfoSet, data)
+}
+
+// DeviceInfoListDetail method retrieves information associated with a device information set including the class GUID, remote computer handle, and remote computer name.
+func (deviceInfoSet DevInfo) DeviceInfoListDetail() (*DevInfoListDetailData, error) {
+ return SetupDiGetDeviceInfoListDetail(deviceInfoSet)
+}
+
+//sys setupDiCreateDeviceInfo(deviceInfoSet DevInfo, DeviceName *uint16, classGUID *GUID, DeviceDescription *uint16, hwndParent uintptr, CreationFlags DICD, deviceInfoData *DevInfoData) (err error) = setupapi.SetupDiCreateDeviceInfoW
+
+// SetupDiCreateDeviceInfo function creates a new device information element and adds it as a new member to the specified device information set.
+func SetupDiCreateDeviceInfo(deviceInfoSet DevInfo, deviceName string, classGUID *GUID, deviceDescription string, hwndParent uintptr, creationFlags DICD) (deviceInfoData *DevInfoData, err error) {
+ deviceNameUTF16, err := UTF16PtrFromString(deviceName)
+ if err != nil {
+ return
+ }
+
+ var deviceDescriptionUTF16 *uint16
+ if deviceDescription != "" {
+ deviceDescriptionUTF16, err = UTF16PtrFromString(deviceDescription)
+ if err != nil {
+ return
+ }
+ }
+
+ data := &DevInfoData{}
+ data.size = uint32(unsafe.Sizeof(*data))
+
+ return data, setupDiCreateDeviceInfo(deviceInfoSet, deviceNameUTF16, classGUID, deviceDescriptionUTF16, hwndParent, creationFlags, data)
+}
+
+// CreateDeviceInfo method creates a new device information element and adds it as a new member to the specified device information set.
+func (deviceInfoSet DevInfo) CreateDeviceInfo(deviceName string, classGUID *GUID, deviceDescription string, hwndParent uintptr, creationFlags DICD) (*DevInfoData, error) {
+ return SetupDiCreateDeviceInfo(deviceInfoSet, deviceName, classGUID, deviceDescription, hwndParent, creationFlags)
+}
+
+//sys setupDiEnumDeviceInfo(deviceInfoSet DevInfo, memberIndex uint32, deviceInfoData *DevInfoData) (err error) = setupapi.SetupDiEnumDeviceInfo
+
+// SetupDiEnumDeviceInfo function returns a DevInfoData structure that specifies a device information element in a device information set.
+func SetupDiEnumDeviceInfo(deviceInfoSet DevInfo, memberIndex int) (*DevInfoData, error) {
+ data := &DevInfoData{}
+ data.size = uint32(unsafe.Sizeof(*data))
+
+ return data, setupDiEnumDeviceInfo(deviceInfoSet, uint32(memberIndex), data)
+}
+
+// EnumDeviceInfo method returns a DevInfoData structure that specifies a device information element in a device information set.
+func (deviceInfoSet DevInfo) EnumDeviceInfo(memberIndex int) (*DevInfoData, error) {
+ return SetupDiEnumDeviceInfo(deviceInfoSet, memberIndex)
+}
+
+// SetupDiDestroyDeviceInfoList function deletes a device information set and frees all associated memory.
+//sys SetupDiDestroyDeviceInfoList(deviceInfoSet DevInfo) (err error) = setupapi.SetupDiDestroyDeviceInfoList
+
+// Close method deletes a device information set and frees all associated memory.
+func (deviceInfoSet DevInfo) Close() error {
+ return SetupDiDestroyDeviceInfoList(deviceInfoSet)
+}
+
+//sys SetupDiBuildDriverInfoList(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT) (err error) = setupapi.SetupDiBuildDriverInfoList
+
+// BuildDriverInfoList method builds a list of drivers that is associated with a specific device or with the global class driver list for a device information set.
+func (deviceInfoSet DevInfo) BuildDriverInfoList(deviceInfoData *DevInfoData, driverType SPDIT) error {
+ return SetupDiBuildDriverInfoList(deviceInfoSet, deviceInfoData, driverType)
+}
+
+//sys SetupDiCancelDriverInfoSearch(deviceInfoSet DevInfo) (err error) = setupapi.SetupDiCancelDriverInfoSearch
+
+// CancelDriverInfoSearch method cancels a driver list search that is currently in progress in a different thread.
+func (deviceInfoSet DevInfo) CancelDriverInfoSearch() error {
+ return SetupDiCancelDriverInfoSearch(deviceInfoSet)
+}
+
+//sys setupDiEnumDriverInfo(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT, memberIndex uint32, driverInfoData *DrvInfoData) (err error) = setupapi.SetupDiEnumDriverInfoW
+
+// SetupDiEnumDriverInfo function enumerates the members of a driver list.
+func SetupDiEnumDriverInfo(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT, memberIndex int) (*DrvInfoData, error) {
+ data := &DrvInfoData{}
+ data.size = uint32(unsafe.Sizeof(*data))
+
+ return data, setupDiEnumDriverInfo(deviceInfoSet, deviceInfoData, driverType, uint32(memberIndex), data)
+}
+
+// EnumDriverInfo method enumerates the members of a driver list.
+func (deviceInfoSet DevInfo) EnumDriverInfo(deviceInfoData *DevInfoData, driverType SPDIT, memberIndex int) (*DrvInfoData, error) {
+ return SetupDiEnumDriverInfo(deviceInfoSet, deviceInfoData, driverType, memberIndex)
+}
+
+//sys setupDiGetSelectedDriver(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) (err error) = setupapi.SetupDiGetSelectedDriverW
+
+// SetupDiGetSelectedDriver function retrieves the selected driver for a device information set or a particular device information element.
+func SetupDiGetSelectedDriver(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (*DrvInfoData, error) {
+ data := &DrvInfoData{}
+ data.size = uint32(unsafe.Sizeof(*data))
+
+ return data, setupDiGetSelectedDriver(deviceInfoSet, deviceInfoData, data)
+}
+
+// SelectedDriver method retrieves the selected driver for a device information set or a particular device information element.
+func (deviceInfoSet DevInfo) SelectedDriver(deviceInfoData *DevInfoData) (*DrvInfoData, error) {
+ return SetupDiGetSelectedDriver(deviceInfoSet, deviceInfoData)
+}
+
+//sys SetupDiSetSelectedDriver(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) (err error) = setupapi.SetupDiSetSelectedDriverW
+
+// SetSelectedDriver method sets, or resets, the selected driver for a device information element or the selected class driver for a device information set.
+func (deviceInfoSet DevInfo) SetSelectedDriver(deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) error {
+ return SetupDiSetSelectedDriver(deviceInfoSet, deviceInfoData, driverInfoData)
+}
+
+//sys setupDiGetDriverInfoDetail(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData, driverInfoDetailData *DrvInfoDetailData, driverInfoDetailDataSize uint32, requiredSize *uint32) (err error) = setupapi.SetupDiGetDriverInfoDetailW
+
+// SetupDiGetDriverInfoDetail function retrieves driver information detail for a device information set or a particular device information element in the device information set.
+func SetupDiGetDriverInfoDetail(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) (*DrvInfoDetailData, error) {
+ reqSize := uint32(2048)
+ for {
+ buf := make([]byte, reqSize)
+ data := (*DrvInfoDetailData)(unsafe.Pointer(&buf[0]))
+ data.size = data.unsafeSizeOf()
+ err := setupDiGetDriverInfoDetail(deviceInfoSet, deviceInfoData, driverInfoData, data, uint32(len(buf)), &reqSize)
+ if err == ERROR_INSUFFICIENT_BUFFER {
+ continue
+ }
+ if err != nil {
+ return nil, err
+ }
+ data.size = reqSize
+ return data, nil
+ }
+}
+
+// DriverInfoDetail method retrieves driver information detail for a device information set or a particular device information element in the device information set.
+func (deviceInfoSet DevInfo) DriverInfoDetail(deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) (*DrvInfoDetailData, error) {
+ return SetupDiGetDriverInfoDetail(deviceInfoSet, deviceInfoData, driverInfoData)
+}
+
+//sys SetupDiDestroyDriverInfoList(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT) (err error) = setupapi.SetupDiDestroyDriverInfoList
+
+// DestroyDriverInfoList method deletes a driver list.
+func (deviceInfoSet DevInfo) DestroyDriverInfoList(deviceInfoData *DevInfoData, driverType SPDIT) error {
+ return SetupDiDestroyDriverInfoList(deviceInfoSet, deviceInfoData, driverType)
+}
+
+//sys setupDiGetClassDevsEx(classGUID *GUID, Enumerator *uint16, hwndParent uintptr, Flags DIGCF, deviceInfoSet DevInfo, machineName *uint16, reserved uintptr) (handle DevInfo, err error) [failretval==DevInfo(InvalidHandle)] = setupapi.SetupDiGetClassDevsExW
+
+// SetupDiGetClassDevsEx function returns a handle to a device information set that contains requested device information elements for a local or a remote computer.
+func SetupDiGetClassDevsEx(classGUID *GUID, enumerator string, hwndParent uintptr, flags DIGCF, deviceInfoSet DevInfo, machineName string) (handle DevInfo, err error) {
+ var enumeratorUTF16 *uint16
+ if enumerator != "" {
+ enumeratorUTF16, err = UTF16PtrFromString(enumerator)
+ if err != nil {
+ return
+ }
+ }
+ var machineNameUTF16 *uint16
+ if machineName != "" {
+ machineNameUTF16, err = UTF16PtrFromString(machineName)
+ if err != nil {
+ return
+ }
+ }
+ return setupDiGetClassDevsEx(classGUID, enumeratorUTF16, hwndParent, flags, deviceInfoSet, machineNameUTF16, 0)
+}
+
+// SetupDiCallClassInstaller function calls the appropriate class installer, and any registered co-installers, with the specified installation request (DIF code).
+//sys SetupDiCallClassInstaller(installFunction DI_FUNCTION, deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (err error) = setupapi.SetupDiCallClassInstaller
+
+// CallClassInstaller member calls the appropriate class installer, and any registered co-installers, with the specified installation request (DIF code).
+func (deviceInfoSet DevInfo) CallClassInstaller(installFunction DI_FUNCTION, deviceInfoData *DevInfoData) error {
+ return SetupDiCallClassInstaller(installFunction, deviceInfoSet, deviceInfoData)
+}
+
+// SetupDiOpenDevRegKey function opens a registry key for device-specific configuration information.
+//sys SetupDiOpenDevRegKey(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, Scope DICS_FLAG, HwProfile uint32, KeyType DIREG, samDesired uint32) (key Handle, err error) [failretval==InvalidHandle] = setupapi.SetupDiOpenDevRegKey
+
+// OpenDevRegKey method opens a registry key for device-specific configuration information.
+func (deviceInfoSet DevInfo) OpenDevRegKey(DeviceInfoData *DevInfoData, Scope DICS_FLAG, HwProfile uint32, KeyType DIREG, samDesired uint32) (Handle, error) {
+ return SetupDiOpenDevRegKey(deviceInfoSet, DeviceInfoData, Scope, HwProfile, KeyType, samDesired)
+}
+
+//sys setupDiGetDeviceProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, propertyKey *DEVPROPKEY, propertyType *DEVPROPTYPE, propertyBuffer *byte, propertyBufferSize uint32, requiredSize *uint32, flags uint32) (err error) = setupapi.SetupDiGetDevicePropertyW
+
+// SetupDiGetDeviceProperty function retrieves a specified device instance property.
+func SetupDiGetDeviceProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, propertyKey *DEVPROPKEY) (value interface{}, err error) {
+ reqSize := uint32(256)
+ for {
+ var dataType DEVPROPTYPE
+ buf := make([]byte, reqSize)
+ err = setupDiGetDeviceProperty(deviceInfoSet, deviceInfoData, propertyKey, &dataType, &buf[0], uint32(len(buf)), &reqSize, 0)
+ if err == ERROR_INSUFFICIENT_BUFFER {
+ continue
+ }
+ if err != nil {
+ return
+ }
+ switch dataType {
+ case DEVPROP_TYPE_STRING:
+ ret := UTF16ToString(bufToUTF16(buf))
+ runtime.KeepAlive(buf)
+ return ret, nil
+ }
+ return nil, errors.New("unimplemented property type")
+ }
+}
+
+//sys setupDiGetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, property SPDRP, propertyRegDataType *uint32, propertyBuffer *byte, propertyBufferSize uint32, requiredSize *uint32) (err error) = setupapi.SetupDiGetDeviceRegistryPropertyW
+
+// SetupDiGetDeviceRegistryProperty function retrieves a specified Plug and Play device property.
+func SetupDiGetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, property SPDRP) (value interface{}, err error) {
+ reqSize := uint32(256)
+ for {
+ var dataType uint32
+ buf := make([]byte, reqSize)
+ err = setupDiGetDeviceRegistryProperty(deviceInfoSet, deviceInfoData, property, &dataType, &buf[0], uint32(len(buf)), &reqSize)
+ if err == ERROR_INSUFFICIENT_BUFFER {
+ continue
+ }
+ if err != nil {
+ return
+ }
+ return getRegistryValue(buf[:reqSize], dataType)
+ }
+}
+
+func getRegistryValue(buf []byte, dataType uint32) (interface{}, error) {
+ switch dataType {
+ case REG_SZ:
+ ret := UTF16ToString(bufToUTF16(buf))
+ runtime.KeepAlive(buf)
+ return ret, nil
+ case REG_EXPAND_SZ:
+ value := UTF16ToString(bufToUTF16(buf))
+ if value == "" {
+ return "", nil
+ }
+ p, err := syscall.UTF16PtrFromString(value)
+ if err != nil {
+ return "", err
+ }
+ ret := make([]uint16, 100)
+ for {
+ n, err := ExpandEnvironmentStrings(p, &ret[0], uint32(len(ret)))
+ if err != nil {
+ return "", err
+ }
+ if n <= uint32(len(ret)) {
+ return UTF16ToString(ret[:n]), nil
+ }
+ ret = make([]uint16, n)
+ }
+ case REG_BINARY:
+ return buf, nil
+ case REG_DWORD_LITTLE_ENDIAN:
+ return binary.LittleEndian.Uint32(buf), nil
+ case REG_DWORD_BIG_ENDIAN:
+ return binary.BigEndian.Uint32(buf), nil
+ case REG_MULTI_SZ:
+ bufW := bufToUTF16(buf)
+ a := []string{}
+ for i := 0; i < len(bufW); {
+ j := i + wcslen(bufW[i:])
+ if i < j {
+ a = append(a, UTF16ToString(bufW[i:j]))
+ }
+ i = j + 1
+ }
+ runtime.KeepAlive(buf)
+ return a, nil
+ case REG_QWORD_LITTLE_ENDIAN:
+ return binary.LittleEndian.Uint64(buf), nil
+ default:
+ return nil, fmt.Errorf("Unsupported registry value type: %v", dataType)
+ }
+}
+
+// bufToUTF16 function reinterprets []byte buffer as []uint16
+func bufToUTF16(buf []byte) []uint16 {
+ sl := struct {
+ addr *uint16
+ len int
+ cap int
+ }{(*uint16)(unsafe.Pointer(&buf[0])), len(buf) / 2, cap(buf) / 2}
+ return *(*[]uint16)(unsafe.Pointer(&sl))
+}
+
+// utf16ToBuf function reinterprets []uint16 as []byte
+func utf16ToBuf(buf []uint16) []byte {
+ sl := struct {
+ addr *byte
+ len int
+ cap int
+ }{(*byte)(unsafe.Pointer(&buf[0])), len(buf) * 2, cap(buf) * 2}
+ return *(*[]byte)(unsafe.Pointer(&sl))
+}
+
+func wcslen(str []uint16) int {
+ for i := 0; i < len(str); i++ {
+ if str[i] == 0 {
+ return i
+ }
+ }
+ return len(str)
+}
+
+// DeviceRegistryProperty method retrieves a specified Plug and Play device property.
+func (deviceInfoSet DevInfo) DeviceRegistryProperty(deviceInfoData *DevInfoData, property SPDRP) (interface{}, error) {
+ return SetupDiGetDeviceRegistryProperty(deviceInfoSet, deviceInfoData, property)
+}
+
+//sys setupDiSetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, property SPDRP, propertyBuffer *byte, propertyBufferSize uint32) (err error) = setupapi.SetupDiSetDeviceRegistryPropertyW
+
+// SetupDiSetDeviceRegistryProperty function sets a Plug and Play device property for a device.
+func SetupDiSetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, property SPDRP, propertyBuffers []byte) error {
+ return setupDiSetDeviceRegistryProperty(deviceInfoSet, deviceInfoData, property, &propertyBuffers[0], uint32(len(propertyBuffers)))
+}
+
+// SetDeviceRegistryProperty function sets a Plug and Play device property for a device.
+func (deviceInfoSet DevInfo) SetDeviceRegistryProperty(deviceInfoData *DevInfoData, property SPDRP, propertyBuffers []byte) error {
+ return SetupDiSetDeviceRegistryProperty(deviceInfoSet, deviceInfoData, property, propertyBuffers)
+}
+
+// SetDeviceRegistryPropertyString method sets a Plug and Play device property string for a device.
+func (deviceInfoSet DevInfo) SetDeviceRegistryPropertyString(deviceInfoData *DevInfoData, property SPDRP, str string) error {
+ str16, err := UTF16FromString(str)
+ if err != nil {
+ return err
+ }
+ err = SetupDiSetDeviceRegistryProperty(deviceInfoSet, deviceInfoData, property, utf16ToBuf(append(str16, 0)))
+ runtime.KeepAlive(str16)
+ return err
+}
+
+//sys setupDiGetDeviceInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, deviceInstallParams *DevInstallParams) (err error) = setupapi.SetupDiGetDeviceInstallParamsW
+
+// SetupDiGetDeviceInstallParams function retrieves device installation parameters for a device information set or a particular device information element.
+func SetupDiGetDeviceInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (*DevInstallParams, error) {
+ params := &DevInstallParams{}
+ params.size = uint32(unsafe.Sizeof(*params))
+
+ return params, setupDiGetDeviceInstallParams(deviceInfoSet, deviceInfoData, params)
+}
+
+// DeviceInstallParams method retrieves device installation parameters for a device information set or a particular device information element.
+func (deviceInfoSet DevInfo) DeviceInstallParams(deviceInfoData *DevInfoData) (*DevInstallParams, error) {
+ return SetupDiGetDeviceInstallParams(deviceInfoSet, deviceInfoData)
+}
+
+//sys setupDiGetDeviceInstanceId(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, instanceId *uint16, instanceIdSize uint32, instanceIdRequiredSize *uint32) (err error) = setupapi.SetupDiGetDeviceInstanceIdW
+
+// SetupDiGetDeviceInstanceId function retrieves the instance ID of the device.
+func SetupDiGetDeviceInstanceId(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (string, error) {
+ reqSize := uint32(1024)
+ for {
+ buf := make([]uint16, reqSize)
+ err := setupDiGetDeviceInstanceId(deviceInfoSet, deviceInfoData, &buf[0], uint32(len(buf)), &reqSize)
+ if err == ERROR_INSUFFICIENT_BUFFER {
+ continue
+ }
+ if err != nil {
+ return "", err
+ }
+ return UTF16ToString(buf), nil
+ }
+}
+
+// DeviceInstanceID method retrieves the instance ID of the device.
+func (deviceInfoSet DevInfo) DeviceInstanceID(deviceInfoData *DevInfoData) (string, error) {
+ return SetupDiGetDeviceInstanceId(deviceInfoSet, deviceInfoData)
+}
+
+// SetupDiGetClassInstallParams function retrieves class installation parameters for a device information set or a particular device information element.
+//sys SetupDiGetClassInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, classInstallParams *ClassInstallHeader, classInstallParamsSize uint32, requiredSize *uint32) (err error) = setupapi.SetupDiGetClassInstallParamsW
+
+// ClassInstallParams method retrieves class installation parameters for a device information set or a particular device information element.
+func (deviceInfoSet DevInfo) ClassInstallParams(deviceInfoData *DevInfoData, classInstallParams *ClassInstallHeader, classInstallParamsSize uint32, requiredSize *uint32) error {
+ return SetupDiGetClassInstallParams(deviceInfoSet, deviceInfoData, classInstallParams, classInstallParamsSize, requiredSize)
+}
+
+//sys SetupDiSetDeviceInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, deviceInstallParams *DevInstallParams) (err error) = setupapi.SetupDiSetDeviceInstallParamsW
+
+// SetDeviceInstallParams member sets device installation parameters for a device information set or a particular device information element.
+func (deviceInfoSet DevInfo) SetDeviceInstallParams(deviceInfoData *DevInfoData, deviceInstallParams *DevInstallParams) error {
+ return SetupDiSetDeviceInstallParams(deviceInfoSet, deviceInfoData, deviceInstallParams)
+}
+
+// SetupDiSetClassInstallParams function sets or clears class install parameters for a device information set or a particular device information element.
+//sys SetupDiSetClassInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, classInstallParams *ClassInstallHeader, classInstallParamsSize uint32) (err error) = setupapi.SetupDiSetClassInstallParamsW
+
+// SetClassInstallParams method sets or clears class install parameters for a device information set or a particular device information element.
+func (deviceInfoSet DevInfo) SetClassInstallParams(deviceInfoData *DevInfoData, classInstallParams *ClassInstallHeader, classInstallParamsSize uint32) error {
+ return SetupDiSetClassInstallParams(deviceInfoSet, deviceInfoData, classInstallParams, classInstallParamsSize)
+}
+
+//sys setupDiClassNameFromGuidEx(classGUID *GUID, className *uint16, classNameSize uint32, requiredSize *uint32, machineName *uint16, reserved uintptr) (err error) = setupapi.SetupDiClassNameFromGuidExW
+
+// SetupDiClassNameFromGuidEx function retrieves the class name associated with a class GUID. The class can be installed on a local or remote computer.
+func SetupDiClassNameFromGuidEx(classGUID *GUID, machineName string) (className string, err error) {
+ var classNameUTF16 [MAX_CLASS_NAME_LEN]uint16
+
+ var machineNameUTF16 *uint16
+ if machineName != "" {
+ machineNameUTF16, err = UTF16PtrFromString(machineName)
+ if err != nil {
+ return
+ }
+ }
+
+ err = setupDiClassNameFromGuidEx(classGUID, &classNameUTF16[0], MAX_CLASS_NAME_LEN, nil, machineNameUTF16, 0)
+ if err != nil {
+ return
+ }
+
+ className = UTF16ToString(classNameUTF16[:])
+ return
+}
+
+//sys setupDiClassGuidsFromNameEx(className *uint16, classGuidList *GUID, classGuidListSize uint32, requiredSize *uint32, machineName *uint16, reserved uintptr) (err error) = setupapi.SetupDiClassGuidsFromNameExW
+
+// SetupDiClassGuidsFromNameEx function retrieves the GUIDs associated with the specified class name. This resulting list contains the classes currently installed on a local or remote computer.
+func SetupDiClassGuidsFromNameEx(className string, machineName string) ([]GUID, error) {
+ classNameUTF16, err := UTF16PtrFromString(className)
+ if err != nil {
+ return nil, err
+ }
+
+ var machineNameUTF16 *uint16
+ if machineName != "" {
+ machineNameUTF16, err = UTF16PtrFromString(machineName)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ reqSize := uint32(4)
+ for {
+ buf := make([]GUID, reqSize)
+ err = setupDiClassGuidsFromNameEx(classNameUTF16, &buf[0], uint32(len(buf)), &reqSize, machineNameUTF16, 0)
+ if err == ERROR_INSUFFICIENT_BUFFER {
+ continue
+ }
+ if err != nil {
+ return nil, err
+ }
+ return buf[:reqSize], nil
+ }
+}
+
+//sys setupDiGetSelectedDevice(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (err error) = setupapi.SetupDiGetSelectedDevice
+
+// SetupDiGetSelectedDevice function retrieves the selected device information element in a device information set.
+func SetupDiGetSelectedDevice(deviceInfoSet DevInfo) (*DevInfoData, error) {
+ data := &DevInfoData{}
+ data.size = uint32(unsafe.Sizeof(*data))
+
+ return data, setupDiGetSelectedDevice(deviceInfoSet, data)
+}
+
+// SelectedDevice method retrieves the selected device information element in a device information set.
+func (deviceInfoSet DevInfo) SelectedDevice() (*DevInfoData, error) {
+ return SetupDiGetSelectedDevice(deviceInfoSet)
+}
+
+// SetupDiSetSelectedDevice function sets a device information element as the selected member of a device information set. This function is typically used by an installation wizard.
+//sys SetupDiSetSelectedDevice(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (err error) = setupapi.SetupDiSetSelectedDevice
+
+// SetSelectedDevice method sets a device information element as the selected member of a device information set. This function is typically used by an installation wizard.
+func (deviceInfoSet DevInfo) SetSelectedDevice(deviceInfoData *DevInfoData) error {
+ return SetupDiSetSelectedDevice(deviceInfoSet, deviceInfoData)
+}
+
+//sys setupUninstallOEMInf(infFileName *uint16, flags SUOI, reserved uintptr) (err error) = setupapi.SetupUninstallOEMInfW
+
+// SetupUninstallOEMInf uninstalls the specified driver.
+func SetupUninstallOEMInf(infFileName string, flags SUOI) error {
+ infFileName16, err := UTF16PtrFromString(infFileName)
+ if err != nil {
+ return err
+ }
+ return setupUninstallOEMInf(infFileName16, flags, 0)
+}
+
+//sys cm_MapCrToWin32Err(configRet CONFIGRET, defaultWin32Error Errno) (ret Errno) = CfgMgr32.CM_MapCrToWin32Err
+
+//sys cm_Get_Device_Interface_List_Size(len *uint32, interfaceClass *GUID, deviceID *uint16, flags uint32) (ret CONFIGRET) = CfgMgr32.CM_Get_Device_Interface_List_SizeW
+//sys cm_Get_Device_Interface_List(interfaceClass *GUID, deviceID *uint16, buffer *uint16, bufferLen uint32, flags uint32) (ret CONFIGRET) = CfgMgr32.CM_Get_Device_Interface_ListW
+
+func CM_Get_Device_Interface_List(deviceID string, interfaceClass *GUID, flags uint32) ([]string, error) {
+ deviceID16, err := UTF16PtrFromString(deviceID)
+ if err != nil {
+ return nil, err
+ }
+ var buf []uint16
+ var buflen uint32
+ for {
+ if ret := cm_Get_Device_Interface_List_Size(&buflen, interfaceClass, deviceID16, flags); ret != CR_SUCCESS {
+ return nil, ret
+ }
+ buf = make([]uint16, buflen)
+ if ret := cm_Get_Device_Interface_List(interfaceClass, deviceID16, &buf[0], buflen, flags); ret == CR_SUCCESS {
+ break
+ } else if ret != CR_BUFFER_SMALL {
+ return nil, ret
+ }
+ }
+ var interfaces []string
+ for i := 0; i < len(buf); {
+ j := i + wcslen(buf[i:])
+ if i < j {
+ interfaces = append(interfaces, UTF16ToString(buf[i:j]))
+ }
+ i = j + 1
+ }
+ if interfaces == nil {
+ return nil, ERROR_NO_SUCH_DEVICE_INTERFACE
+ }
+ return interfaces, nil
+}
+
+//sys cm_Get_DevNode_Status(status *uint32, problemNumber *uint32, devInst DEVINST, flags uint32) (ret CONFIGRET) = CfgMgr32.CM_Get_DevNode_Status
+
+func CM_Get_DevNode_Status(status *uint32, problemNumber *uint32, devInst DEVINST, flags uint32) error {
+ ret := cm_Get_DevNode_Status(status, problemNumber, devInst, flags)
+ if ret == CR_SUCCESS {
+ return nil
+ }
+ return ret
+}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/windows/setupapierrors_windows.go b/cluster-autoscaler/vendor/golang.org/x/sys/windows/setupapierrors_windows.go
deleted file mode 100644
index 1681810e0488..000000000000
--- a/cluster-autoscaler/vendor/golang.org/x/sys/windows/setupapierrors_windows.go
+++ /dev/null
@@ -1,100 +0,0 @@
-// Copyright 2020 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package windows
-
-import "syscall"
-
-const (
- ERROR_EXPECTED_SECTION_NAME syscall.Errno = 0x20000000 | 0xC0000000 | 0
- ERROR_BAD_SECTION_NAME_LINE syscall.Errno = 0x20000000 | 0xC0000000 | 1
- ERROR_SECTION_NAME_TOO_LONG syscall.Errno = 0x20000000 | 0xC0000000 | 2
- ERROR_GENERAL_SYNTAX syscall.Errno = 0x20000000 | 0xC0000000 | 3
- ERROR_WRONG_INF_STYLE syscall.Errno = 0x20000000 | 0xC0000000 | 0x100
- ERROR_SECTION_NOT_FOUND syscall.Errno = 0x20000000 | 0xC0000000 | 0x101
- ERROR_LINE_NOT_FOUND syscall.Errno = 0x20000000 | 0xC0000000 | 0x102
- ERROR_NO_BACKUP syscall.Errno = 0x20000000 | 0xC0000000 | 0x103
- ERROR_NO_ASSOCIATED_CLASS syscall.Errno = 0x20000000 | 0xC0000000 | 0x200
- ERROR_CLASS_MISMATCH syscall.Errno = 0x20000000 | 0xC0000000 | 0x201
- ERROR_DUPLICATE_FOUND syscall.Errno = 0x20000000 | 0xC0000000 | 0x202
- ERROR_NO_DRIVER_SELECTED syscall.Errno = 0x20000000 | 0xC0000000 | 0x203
- ERROR_KEY_DOES_NOT_EXIST syscall.Errno = 0x20000000 | 0xC0000000 | 0x204
- ERROR_INVALID_DEVINST_NAME syscall.Errno = 0x20000000 | 0xC0000000 | 0x205
- ERROR_INVALID_CLASS syscall.Errno = 0x20000000 | 0xC0000000 | 0x206
- ERROR_DEVINST_ALREADY_EXISTS syscall.Errno = 0x20000000 | 0xC0000000 | 0x207
- ERROR_DEVINFO_NOT_REGISTERED syscall.Errno = 0x20000000 | 0xC0000000 | 0x208
- ERROR_INVALID_REG_PROPERTY syscall.Errno = 0x20000000 | 0xC0000000 | 0x209
- ERROR_NO_INF syscall.Errno = 0x20000000 | 0xC0000000 | 0x20A
- ERROR_NO_SUCH_DEVINST syscall.Errno = 0x20000000 | 0xC0000000 | 0x20B
- ERROR_CANT_LOAD_CLASS_ICON syscall.Errno = 0x20000000 | 0xC0000000 | 0x20C
- ERROR_INVALID_CLASS_INSTALLER syscall.Errno = 0x20000000 | 0xC0000000 | 0x20D
- ERROR_DI_DO_DEFAULT syscall.Errno = 0x20000000 | 0xC0000000 | 0x20E
- ERROR_DI_NOFILECOPY syscall.Errno = 0x20000000 | 0xC0000000 | 0x20F
- ERROR_INVALID_HWPROFILE syscall.Errno = 0x20000000 | 0xC0000000 | 0x210
- ERROR_NO_DEVICE_SELECTED syscall.Errno = 0x20000000 | 0xC0000000 | 0x211
- ERROR_DEVINFO_LIST_LOCKED syscall.Errno = 0x20000000 | 0xC0000000 | 0x212
- ERROR_DEVINFO_DATA_LOCKED syscall.Errno = 0x20000000 | 0xC0000000 | 0x213
- ERROR_DI_BAD_PATH syscall.Errno = 0x20000000 | 0xC0000000 | 0x214
- ERROR_NO_CLASSINSTALL_PARAMS syscall.Errno = 0x20000000 | 0xC0000000 | 0x215
- ERROR_FILEQUEUE_LOCKED syscall.Errno = 0x20000000 | 0xC0000000 | 0x216
- ERROR_BAD_SERVICE_INSTALLSECT syscall.Errno = 0x20000000 | 0xC0000000 | 0x217
- ERROR_NO_CLASS_DRIVER_LIST syscall.Errno = 0x20000000 | 0xC0000000 | 0x218
- ERROR_NO_ASSOCIATED_SERVICE syscall.Errno = 0x20000000 | 0xC0000000 | 0x219
- ERROR_NO_DEFAULT_DEVICE_INTERFACE syscall.Errno = 0x20000000 | 0xC0000000 | 0x21A
- ERROR_DEVICE_INTERFACE_ACTIVE syscall.Errno = 0x20000000 | 0xC0000000 | 0x21B
- ERROR_DEVICE_INTERFACE_REMOVED syscall.Errno = 0x20000000 | 0xC0000000 | 0x21C
- ERROR_BAD_INTERFACE_INSTALLSECT syscall.Errno = 0x20000000 | 0xC0000000 | 0x21D
- ERROR_NO_SUCH_INTERFACE_CLASS syscall.Errno = 0x20000000 | 0xC0000000 | 0x21E
- ERROR_INVALID_REFERENCE_STRING syscall.Errno = 0x20000000 | 0xC0000000 | 0x21F
- ERROR_INVALID_MACHINENAME syscall.Errno = 0x20000000 | 0xC0000000 | 0x220
- ERROR_REMOTE_COMM_FAILURE syscall.Errno = 0x20000000 | 0xC0000000 | 0x221
- ERROR_MACHINE_UNAVAILABLE syscall.Errno = 0x20000000 | 0xC0000000 | 0x222
- ERROR_NO_CONFIGMGR_SERVICES syscall.Errno = 0x20000000 | 0xC0000000 | 0x223
- ERROR_INVALID_PROPPAGE_PROVIDER syscall.Errno = 0x20000000 | 0xC0000000 | 0x224
- ERROR_NO_SUCH_DEVICE_INTERFACE syscall.Errno = 0x20000000 | 0xC0000000 | 0x225
- ERROR_DI_POSTPROCESSING_REQUIRED syscall.Errno = 0x20000000 | 0xC0000000 | 0x226
- ERROR_INVALID_COINSTALLER syscall.Errno = 0x20000000 | 0xC0000000 | 0x227
- ERROR_NO_COMPAT_DRIVERS syscall.Errno = 0x20000000 | 0xC0000000 | 0x228
- ERROR_NO_DEVICE_ICON syscall.Errno = 0x20000000 | 0xC0000000 | 0x229
- ERROR_INVALID_INF_LOGCONFIG syscall.Errno = 0x20000000 | 0xC0000000 | 0x22A
- ERROR_DI_DONT_INSTALL syscall.Errno = 0x20000000 | 0xC0000000 | 0x22B
- ERROR_INVALID_FILTER_DRIVER syscall.Errno = 0x20000000 | 0xC0000000 | 0x22C
- ERROR_NON_WINDOWS_NT_DRIVER syscall.Errno = 0x20000000 | 0xC0000000 | 0x22D
- ERROR_NON_WINDOWS_DRIVER syscall.Errno = 0x20000000 | 0xC0000000 | 0x22E
- ERROR_NO_CATALOG_FOR_OEM_INF syscall.Errno = 0x20000000 | 0xC0000000 | 0x22F
- ERROR_DEVINSTALL_QUEUE_NONNATIVE syscall.Errno = 0x20000000 | 0xC0000000 | 0x230
- ERROR_NOT_DISABLEABLE syscall.Errno = 0x20000000 | 0xC0000000 | 0x231
- ERROR_CANT_REMOVE_DEVINST syscall.Errno = 0x20000000 | 0xC0000000 | 0x232
- ERROR_INVALID_TARGET syscall.Errno = 0x20000000 | 0xC0000000 | 0x233
- ERROR_DRIVER_NONNATIVE syscall.Errno = 0x20000000 | 0xC0000000 | 0x234
- ERROR_IN_WOW64 syscall.Errno = 0x20000000 | 0xC0000000 | 0x235
- ERROR_SET_SYSTEM_RESTORE_POINT syscall.Errno = 0x20000000 | 0xC0000000 | 0x236
- ERROR_SCE_DISABLED syscall.Errno = 0x20000000 | 0xC0000000 | 0x238
- ERROR_UNKNOWN_EXCEPTION syscall.Errno = 0x20000000 | 0xC0000000 | 0x239
- ERROR_PNP_REGISTRY_ERROR syscall.Errno = 0x20000000 | 0xC0000000 | 0x23A
- ERROR_REMOTE_REQUEST_UNSUPPORTED syscall.Errno = 0x20000000 | 0xC0000000 | 0x23B
- ERROR_NOT_AN_INSTALLED_OEM_INF syscall.Errno = 0x20000000 | 0xC0000000 | 0x23C
- ERROR_INF_IN_USE_BY_DEVICES syscall.Errno = 0x20000000 | 0xC0000000 | 0x23D
- ERROR_DI_FUNCTION_OBSOLETE syscall.Errno = 0x20000000 | 0xC0000000 | 0x23E
- ERROR_NO_AUTHENTICODE_CATALOG syscall.Errno = 0x20000000 | 0xC0000000 | 0x23F
- ERROR_AUTHENTICODE_DISALLOWED syscall.Errno = 0x20000000 | 0xC0000000 | 0x240
- ERROR_AUTHENTICODE_TRUSTED_PUBLISHER syscall.Errno = 0x20000000 | 0xC0000000 | 0x241
- ERROR_AUTHENTICODE_TRUST_NOT_ESTABLISHED syscall.Errno = 0x20000000 | 0xC0000000 | 0x242
- ERROR_AUTHENTICODE_PUBLISHER_NOT_TRUSTED syscall.Errno = 0x20000000 | 0xC0000000 | 0x243
- ERROR_SIGNATURE_OSATTRIBUTE_MISMATCH syscall.Errno = 0x20000000 | 0xC0000000 | 0x244
- ERROR_ONLY_VALIDATE_VIA_AUTHENTICODE syscall.Errno = 0x20000000 | 0xC0000000 | 0x245
- ERROR_DEVICE_INSTALLER_NOT_READY syscall.Errno = 0x20000000 | 0xC0000000 | 0x246
- ERROR_DRIVER_STORE_ADD_FAILED syscall.Errno = 0x20000000 | 0xC0000000 | 0x247
- ERROR_DEVICE_INSTALL_BLOCKED syscall.Errno = 0x20000000 | 0xC0000000 | 0x248
- ERROR_DRIVER_INSTALL_BLOCKED syscall.Errno = 0x20000000 | 0xC0000000 | 0x249
- ERROR_WRONG_INF_TYPE syscall.Errno = 0x20000000 | 0xC0000000 | 0x24A
- ERROR_FILE_HASH_NOT_IN_CATALOG syscall.Errno = 0x20000000 | 0xC0000000 | 0x24B
- ERROR_DRIVER_STORE_DELETE_FAILED syscall.Errno = 0x20000000 | 0xC0000000 | 0x24C
- ERROR_UNRECOVERABLE_STACK_OVERFLOW syscall.Errno = 0x20000000 | 0xC0000000 | 0x300
- EXCEPTION_SPAPI_UNRECOVERABLE_STACK_OVERFLOW syscall.Errno = ERROR_UNRECOVERABLE_STACK_OVERFLOW
- ERROR_NO_DEFAULT_INTERFACE_DEVICE syscall.Errno = ERROR_NO_DEFAULT_DEVICE_INTERFACE
- ERROR_INTERFACE_DEVICE_ACTIVE syscall.Errno = ERROR_DEVICE_INTERFACE_ACTIVE
- ERROR_INTERFACE_DEVICE_REMOVED syscall.Errno = ERROR_DEVICE_INTERFACE_REMOVED
- ERROR_NO_SUCH_INTERFACE_DEVICE syscall.Errno = ERROR_NO_SUCH_DEVICE_INTERFACE
-)
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/windows/str.go b/cluster-autoscaler/vendor/golang.org/x/sys/windows/str.go
index 917cc2aae4e1..4fc01434e4a2 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/windows/str.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/windows/str.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build windows
// +build windows
package windows
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/windows/svc/event.go b/cluster-autoscaler/vendor/golang.org/x/sys/windows/svc/event.go
deleted file mode 100644
index 0508e2288184..000000000000
--- a/cluster-autoscaler/vendor/golang.org/x/sys/windows/svc/event.go
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build windows
-
-package svc
-
-import (
- "errors"
-
- "golang.org/x/sys/windows"
-)
-
-// event represents auto-reset, initially non-signaled Windows event.
-// It is used to communicate between go and asm parts of this package.
-type event struct {
- h windows.Handle
-}
-
-func newEvent() (*event, error) {
- h, err := windows.CreateEvent(nil, 0, 0, nil)
- if err != nil {
- return nil, err
- }
- return &event{h: h}, nil
-}
-
-func (e *event) Close() error {
- return windows.CloseHandle(e.h)
-}
-
-func (e *event) Set() error {
- return windows.SetEvent(e.h)
-}
-
-func (e *event) Wait() error {
- s, err := windows.WaitForSingleObject(e.h, windows.INFINITE)
- switch s {
- case windows.WAIT_OBJECT_0:
- break
- case windows.WAIT_FAILED:
- return err
- default:
- return errors.New("unexpected result from WaitForSingleObject")
- }
- return nil
-}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/windows/svc/go12.c b/cluster-autoscaler/vendor/golang.org/x/sys/windows/svc/go12.c
deleted file mode 100644
index 6f1be1fa3bcb..000000000000
--- a/cluster-autoscaler/vendor/golang.org/x/sys/windows/svc/go12.c
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build windows
-// +build !go1.3
-
-// copied from pkg/runtime
-typedef unsigned int uint32;
-typedef unsigned long long int uint64;
-#ifdef _64BIT
-typedef uint64 uintptr;
-#else
-typedef uint32 uintptr;
-#endif
-
-// from sys_386.s or sys_amd64.s
-void ·servicemain(void);
-
-void
-·getServiceMain(uintptr *r)
-{
- *r = (uintptr)·servicemain;
-}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/windows/svc/go12.go b/cluster-autoscaler/vendor/golang.org/x/sys/windows/svc/go12.go
deleted file mode 100644
index cd8b913c99d4..000000000000
--- a/cluster-autoscaler/vendor/golang.org/x/sys/windows/svc/go12.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build windows
-// +build !go1.3
-
-package svc
-
-// from go12.c
-func getServiceMain(r *uintptr)
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/windows/svc/go13.go b/cluster-autoscaler/vendor/golang.org/x/sys/windows/svc/go13.go
deleted file mode 100644
index 9d7f3cec54cd..000000000000
--- a/cluster-autoscaler/vendor/golang.org/x/sys/windows/svc/go13.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build windows
-// +build go1.3
-
-package svc
-
-import "unsafe"
-
-const ptrSize = 4 << (^uintptr(0) >> 63) // unsafe.Sizeof(uintptr(0)) but an ideal const
-
-// Should be a built-in for unsafe.Pointer?
-func add(p unsafe.Pointer, x uintptr) unsafe.Pointer {
- return unsafe.Pointer(uintptr(p) + x)
-}
-
-// funcPC returns the entry PC of the function f.
-// It assumes that f is a func value. Otherwise the behavior is undefined.
-func funcPC(f interface{}) uintptr {
- return **(**uintptr)(add(unsafe.Pointer(&f), ptrSize))
-}
-
-// from sys_386.s and sys_amd64.s
-func servicectlhandler(ctl uint32) uintptr
-func servicemain(argc uint32, argv **uint16)
-
-func getServiceMain(r *uintptr) {
- *r = funcPC(servicemain)
-}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/windows/svc/security.go b/cluster-autoscaler/vendor/golang.org/x/sys/windows/svc/security.go
index ef719c1759f2..1c51006eabbf 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/windows/svc/security.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/windows/svc/security.go
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build windows
// +build windows
package svc
import (
- "path/filepath"
"strings"
"unsafe"
@@ -73,36 +73,29 @@ func IsWindowsService() (bool, error) {
// Specifically, it looks up whether the parent process has session ID zero
// and is called "services".
- var pbi windows.PROCESS_BASIC_INFORMATION
- pbiLen := uint32(unsafe.Sizeof(pbi))
- err := windows.NtQueryInformationProcess(windows.CurrentProcess(), windows.ProcessBasicInformation, unsafe.Pointer(&pbi), pbiLen, &pbiLen)
+ var currentProcess windows.PROCESS_BASIC_INFORMATION
+ infoSize := uint32(unsafe.Sizeof(currentProcess))
+ err := windows.NtQueryInformationProcess(windows.CurrentProcess(), windows.ProcessBasicInformation, unsafe.Pointer(¤tProcess), infoSize, &infoSize)
if err != nil {
return false, err
}
- var psid uint32
- err = windows.ProcessIdToSessionId(uint32(pbi.InheritedFromUniqueProcessId), &psid)
- if err != nil || psid != 0 {
- return false, nil
- }
- pproc, err := windows.OpenProcess(windows.PROCESS_QUERY_LIMITED_INFORMATION, false, uint32(pbi.InheritedFromUniqueProcessId))
- if err != nil {
- return false, err
- }
- defer windows.CloseHandle(pproc)
- var exeNameBuf [261]uint16
- exeNameLen := uint32(len(exeNameBuf) - 1)
- err = windows.QueryFullProcessImageName(pproc, 0, &exeNameBuf[0], &exeNameLen)
- if err != nil {
- return false, err
- }
- exeName := windows.UTF16ToString(exeNameBuf[:exeNameLen])
- if !strings.EqualFold(filepath.Base(exeName), "services.exe") {
- return false, nil
+ var parentProcess *windows.SYSTEM_PROCESS_INFORMATION
+ for infoSize = uint32((unsafe.Sizeof(*parentProcess) + unsafe.Sizeof(uintptr(0))) * 1024); ; {
+ parentProcess = (*windows.SYSTEM_PROCESS_INFORMATION)(unsafe.Pointer(&make([]byte, infoSize)[0]))
+ err = windows.NtQuerySystemInformation(windows.SystemProcessInformation, unsafe.Pointer(parentProcess), infoSize, &infoSize)
+ if err == nil {
+ break
+ } else if err != windows.STATUS_INFO_LENGTH_MISMATCH {
+ return false, err
+ }
}
- system32, err := windows.GetSystemDirectory()
- if err != nil {
- return false, err
+ for ; ; parentProcess = (*windows.SYSTEM_PROCESS_INFORMATION)(unsafe.Pointer(uintptr(unsafe.Pointer(parentProcess)) + uintptr(parentProcess.NextEntryOffset))) {
+ if parentProcess.UniqueProcessID == currentProcess.InheritedFromUniqueProcessId {
+ return parentProcess.SessionID == 0 && strings.EqualFold("services.exe", parentProcess.ImageName.String()), nil
+ }
+ if parentProcess.NextEntryOffset == 0 {
+ break
+ }
}
- targetExeName := filepath.Join(system32, "services.exe")
- return strings.EqualFold(exeName, targetExeName), nil
+ return false, nil
}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/windows/svc/service.go b/cluster-autoscaler/vendor/golang.org/x/sys/windows/svc/service.go
index 3748528636d6..5b05c3e33f5d 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/windows/svc/service.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/windows/svc/service.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build windows
// +build windows
// Package svc provides everything required to build Windows service.
@@ -10,8 +11,7 @@ package svc
import (
"errors"
- "runtime"
- "syscall"
+ "sync"
"unsafe"
"golang.org/x/sys/internal/unsafeheader"
@@ -80,6 +80,17 @@ type Status struct {
ServiceSpecificExitCode uint32 // set if the service has exited with a service-specific exit code
}
+// StartReason is the reason that the service was started.
+type StartReason uint32
+
+const (
+ StartReasonDemand = StartReason(windows.SERVICE_START_REASON_DEMAND)
+ StartReasonAuto = StartReason(windows.SERVICE_START_REASON_AUTO)
+ StartReasonTrigger = StartReason(windows.SERVICE_START_REASON_TRIGGER)
+ StartReasonRestartOnFailure = StartReason(windows.SERVICE_START_REASON_RESTART_ON_FAILURE)
+ StartReasonDelayedAuto = StartReason(windows.SERVICE_START_REASON_DELAYEDAUTO)
+)
+
// ChangeRequest is sent to the service Handler to request service status change.
type ChangeRequest struct {
Cmd Cmd
@@ -91,7 +102,6 @@ type ChangeRequest struct {
// Handler is the interface that must be implemented to build Windows service.
type Handler interface {
-
// Execute will be called by the package code at the start of
// the service, and the service will exit once Execute completes.
// Inside Execute you must read service change requests from r and
@@ -106,28 +116,6 @@ type Handler interface {
Execute(args []string, r <-chan ChangeRequest, s chan<- Status) (svcSpecificEC bool, exitCode uint32)
}
-var (
- // These are used by asm code.
- goWaitsH uintptr
- cWaitsH uintptr
- ssHandle uintptr
- sName *uint16
- sArgc uintptr
- sArgv **uint16
- ctlHandlerExProc uintptr
- cSetEvent uintptr
- cWaitForSingleObject uintptr
- cRegisterServiceCtrlHandlerExW uintptr
-)
-
-func init() {
- k := windows.NewLazySystemDLL("kernel32.dll")
- cSetEvent = k.NewProc("SetEvent").Addr()
- cWaitForSingleObject = k.NewProc("WaitForSingleObject").Addr()
- a := windows.NewLazySystemDLL("advapi32.dll")
- cRegisterServiceCtrlHandlerExW = a.NewProc("RegisterServiceCtrlHandlerExW").Addr()
-}
-
type ctlEvent struct {
cmd Cmd
eventType uint32
@@ -140,36 +128,10 @@ type ctlEvent struct {
type service struct {
name string
h windows.Handle
- cWaits *event
- goWaits *event
c chan ctlEvent
handler Handler
}
-func newService(name string, handler Handler) (*service, error) {
- var s service
- var err error
- s.name = name
- s.c = make(chan ctlEvent)
- s.handler = handler
- s.cWaits, err = newEvent()
- if err != nil {
- return nil, err
- }
- s.goWaits, err = newEvent()
- if err != nil {
- s.cWaits.Close()
- return nil, err
- }
- return &s, nil
-}
-
-func (s *service) close() error {
- s.cWaits.Close()
- s.goWaits.Close()
- return nil
-}
-
type exitCode struct {
isSvcSpecific bool
errno uint32
@@ -224,23 +186,42 @@ func (s *service) updateStatus(status *Status, ec *exitCode) error {
return windows.SetServiceStatus(s.h, &t)
}
-const (
- sysErrSetServiceStatusFailed = uint32(syscall.APPLICATION_ERROR) + iota
- sysErrNewThreadInCallback
+var (
+ initCallbacks sync.Once
+ ctlHandlerCallback uintptr
+ serviceMainCallback uintptr
)
-func (s *service) run() {
- s.goWaits.Wait()
- s.h = windows.Handle(ssHandle)
+func ctlHandler(ctl, evtype, evdata, context uintptr) uintptr {
+ s := (*service)(unsafe.Pointer(context))
+ e := ctlEvent{cmd: Cmd(ctl), eventType: uint32(evtype), eventData: evdata, context: 123456} // Set context to 123456 to test issue #25660.
+ s.c <- e
+ return 0
+}
- var argv []*uint16
- hdr := (*unsafeheader.Slice)(unsafe.Pointer(&argv))
- hdr.Data = unsafe.Pointer(sArgv)
- hdr.Len = int(sArgc)
- hdr.Cap = int(sArgc)
+var theService service // This is, unfortunately, a global, which means only one service per process.
- args := make([]string, len(argv))
- for i, a := range argv {
+// serviceMain is the entry point called by the service manager, registered earlier by
+// the call to StartServiceCtrlDispatcher.
+func serviceMain(argc uint32, argv **uint16) uintptr {
+ handle, err := windows.RegisterServiceCtrlHandlerEx(windows.StringToUTF16Ptr(theService.name), ctlHandlerCallback, uintptr(unsafe.Pointer(&theService)))
+ if sysErr, ok := err.(windows.Errno); ok {
+ return uintptr(sysErr)
+ } else if err != nil {
+ return uintptr(windows.ERROR_UNKNOWN_EXCEPTION)
+ }
+ theService.h = handle
+ defer func() {
+ theService.h = 0
+ }()
+ var args16 []*uint16
+ hdr := (*unsafeheader.Slice)(unsafe.Pointer(&args16))
+ hdr.Data = unsafe.Pointer(argv)
+ hdr.Len = int(argc)
+ hdr.Cap = int(argc)
+
+ args := make([]string, len(args16))
+ for i, a := range args16 {
args[i] = windows.UTF16PtrToString(a)
}
@@ -249,7 +230,7 @@ func (s *service) run() {
exitFromHandler := make(chan exitCode)
go func() {
- ss, errno := s.handler.Execute(args, cmdsToHandler, changesFromHandler)
+ ss, errno := theService.handler.Execute(args, cmdsToHandler, changesFromHandler)
exitFromHandler <- exitCode{ss, errno}
}()
@@ -258,7 +239,7 @@ func (s *service) run() {
CurrentStatus: Status{State: Stopped},
}
var outch chan ChangeRequest
- inch := s.c
+ inch := theService.c
loop:
for {
select {
@@ -274,14 +255,13 @@ loop:
outcr.EventData = r.eventData
outcr.Context = r.context
case outch <- outcr:
- inch = s.c
+ inch = theService.c
outch = nil
case c := <-changesFromHandler:
- err := s.updateStatus(&c, &ec)
+ err := theService.updateStatus(&c, &ec)
if err != nil {
- // best suitable error number
- ec.errno = sysErrSetServiceStatusFailed
- if err2, ok := err.(syscall.Errno); ok {
+ ec.errno = uint32(windows.ERROR_EXCEPTION_IN_SERVICE)
+ if err2, ok := err.(windows.Errno); ok {
ec.errno = uint32(err2)
}
break loop
@@ -292,87 +272,43 @@ loop:
}
}
- s.updateStatus(&Status{State: Stopped}, &ec)
- s.cWaits.Set()
-}
+ theService.updateStatus(&Status{State: Stopped}, &ec)
-func newCallback(fn interface{}) (cb uintptr, err error) {
- defer func() {
- r := recover()
- if r == nil {
- return
- }
- cb = 0
- switch v := r.(type) {
- case string:
- err = errors.New(v)
- case error:
- err = v
- default:
- err = errors.New("unexpected panic in syscall.NewCallback")
- }
- }()
- return syscall.NewCallback(fn), nil
+ return windows.NO_ERROR
}
-// BUG(brainman): There is no mechanism to run multiple services
-// inside one single executable. Perhaps, it can be overcome by
-// using RegisterServiceCtrlHandlerEx Windows api.
-
// Run executes service name by calling appropriate handler function.
func Run(name string, handler Handler) error {
- runtime.LockOSThread()
-
- tid := windows.GetCurrentThreadId()
-
- s, err := newService(name, handler)
- if err != nil {
- return err
- }
-
- ctlHandler := func(ctl, evtype, evdata, context uintptr) uintptr {
- e := ctlEvent{cmd: Cmd(ctl), eventType: uint32(evtype), eventData: evdata, context: context}
- // We assume that this callback function is running on
- // the same thread as Run. Nowhere in MS documentation
- // I could find statement to guarantee that. So putting
- // check here to verify, otherwise things will go bad
- // quickly, if ignored.
- i := windows.GetCurrentThreadId()
- if i != tid {
- e.errno = sysErrNewThreadInCallback
- }
- s.c <- e
- // Always return NO_ERROR (0) for now.
- return windows.NO_ERROR
- }
-
- var svcmain uintptr
- getServiceMain(&svcmain)
+ initCallbacks.Do(func() {
+ ctlHandlerCallback = windows.NewCallback(ctlHandler)
+ serviceMainCallback = windows.NewCallback(serviceMain)
+ })
+ theService.name = name
+ theService.handler = handler
+ theService.c = make(chan ctlEvent)
t := []windows.SERVICE_TABLE_ENTRY{
- {ServiceName: syscall.StringToUTF16Ptr(s.name), ServiceProc: svcmain},
+ {ServiceName: windows.StringToUTF16Ptr(theService.name), ServiceProc: serviceMainCallback},
{ServiceName: nil, ServiceProc: 0},
}
-
- goWaitsH = uintptr(s.goWaits.h)
- cWaitsH = uintptr(s.cWaits.h)
- sName = t[0].ServiceName
- ctlHandlerExProc, err = newCallback(ctlHandler)
- if err != nil {
- return err
- }
-
- go s.run()
-
- err = windows.StartServiceCtrlDispatcher(&t[0])
- if err != nil {
- return err
- }
- return nil
+ return windows.StartServiceCtrlDispatcher(&t[0])
}
// StatusHandle returns service status handle. It is safe to call this function
// from inside the Handler.Execute because then it is guaranteed to be set.
-// This code will have to change once multiple services are possible per process.
func StatusHandle() windows.Handle {
- return windows.Handle(ssHandle)
+ return theService.h
+}
+
+// DynamicStartReason returns the reason why the service was started. It is safe
+// to call this function from inside the Handler.Execute because then it is
+// guaranteed to be set.
+func DynamicStartReason() (StartReason, error) {
+ var allocReason *uint32
+ err := windows.QueryServiceDynamicInformation(theService.h, windows.SERVICE_DYNAMIC_INFORMATION_LEVEL_START_REASON, unsafe.Pointer(&allocReason))
+ if err != nil {
+ return 0, err
+ }
+ reason := StartReason(*allocReason)
+ windows.LocalFree(windows.Handle(unsafe.Pointer(allocReason)))
+ return reason, nil
}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/windows/svc/sys_windows_386.s b/cluster-autoscaler/vendor/golang.org/x/sys/windows/svc/sys_windows_386.s
deleted file mode 100644
index 1ed914130b96..000000000000
--- a/cluster-autoscaler/vendor/golang.org/x/sys/windows/svc/sys_windows_386.s
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// func servicemain(argc uint32, argv **uint16)
-TEXT ·servicemain(SB),7,$0
- MOVL argc+0(FP), AX
- MOVL AX, ·sArgc(SB)
- MOVL argv+4(FP), AX
- MOVL AX, ·sArgv(SB)
-
- PUSHL BP
- PUSHL BX
- PUSHL SI
- PUSHL DI
-
- SUBL $12, SP
-
- MOVL ·sName(SB), AX
- MOVL AX, (SP)
- MOVL $·servicectlhandler(SB), AX
- MOVL AX, 4(SP)
- // Set context to 123456 to test issue #25660.
- MOVL $123456, 8(SP)
- MOVL ·cRegisterServiceCtrlHandlerExW(SB), AX
- MOVL SP, BP
- CALL AX
- MOVL BP, SP
- CMPL AX, $0
- JE exit
- MOVL AX, ·ssHandle(SB)
-
- MOVL ·goWaitsH(SB), AX
- MOVL AX, (SP)
- MOVL ·cSetEvent(SB), AX
- MOVL SP, BP
- CALL AX
- MOVL BP, SP
-
- MOVL ·cWaitsH(SB), AX
- MOVL AX, (SP)
- MOVL $-1, AX
- MOVL AX, 4(SP)
- MOVL ·cWaitForSingleObject(SB), AX
- MOVL SP, BP
- CALL AX
- MOVL BP, SP
-
-exit:
- ADDL $12, SP
-
- POPL DI
- POPL SI
- POPL BX
- POPL BP
-
- MOVL 0(SP), CX
- ADDL $12, SP
- JMP CX
-
-// I do not know why, but this seems to be the only way to call
-// ctlHandlerProc on Windows 7.
-
-// func servicectlhandler(ctl uint32, evtype uint32, evdata uintptr, context uintptr) uintptr {
-TEXT ·servicectlhandler(SB),7,$0
- MOVL ·ctlHandlerExProc(SB), CX
- JMP CX
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/windows/svc/sys_windows_amd64.s b/cluster-autoscaler/vendor/golang.org/x/sys/windows/svc/sys_windows_amd64.s
deleted file mode 100644
index 1e5ef92b22aa..000000000000
--- a/cluster-autoscaler/vendor/golang.org/x/sys/windows/svc/sys_windows_amd64.s
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// func servicemain(argc uint32, argv **uint16)
-TEXT ·servicemain(SB),7,$0
- MOVQ SP, AX
- ANDQ $~15, SP // alignment as per Windows requirement
- SUBQ $48, SP // room for SP and 4 args as per Windows requirement
- // plus one extra word to keep stack 16 bytes aligned
- MOVQ AX, 32(SP)
-
- MOVL CX, ·sArgc(SB)
- MOVQ DX, ·sArgv(SB)
-
- MOVQ ·sName(SB), CX
- MOVQ $·servicectlhandler(SB), DX
- // BUG(pastarmovj): Figure out a way to pass in context in R8.
- // Set context to 123456 to test issue #25660.
- MOVQ $123456, R8
- MOVQ ·cRegisterServiceCtrlHandlerExW(SB), AX
- CALL AX
- CMPQ AX, $0
- JE exit
- MOVQ AX, ·ssHandle(SB)
-
- MOVQ ·goWaitsH(SB), CX
- MOVQ ·cSetEvent(SB), AX
- CALL AX
-
- MOVQ ·cWaitsH(SB), CX
- MOVQ $4294967295, DX
- MOVQ ·cWaitForSingleObject(SB), AX
- CALL AX
-
-exit:
- MOVQ 32(SP), SP
- RET
-
-// I do not know why, but this seems to be the only way to call
-// ctlHandlerProc on Windows 7.
-
-// func ·servicectlhandler(ctl uint32, evtype uint32, evdata uintptr, context uintptr) uintptr {
-TEXT ·servicectlhandler(SB),7,$0
- MOVQ ·ctlHandlerExProc(SB), AX
- JMP AX
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/windows/svc/sys_windows_arm.s b/cluster-autoscaler/vendor/golang.org/x/sys/windows/svc/sys_windows_arm.s
deleted file mode 100644
index 360b86ed5b55..000000000000
--- a/cluster-autoscaler/vendor/golang.org/x/sys/windows/svc/sys_windows_arm.s
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2018 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "textflag.h"
-
-// func servicemain(argc uint32, argv **uint16)
-TEXT ·servicemain(SB),NOSPLIT|NOFRAME,$0
- MOVM.DB.W [R4, R14], (R13) // push {r4, lr}
- MOVW R13, R4
- BIC $0x7, R13 // alignment for ABI
-
- MOVW R0, ·sArgc(SB)
- MOVW R1, ·sArgv(SB)
-
- MOVW ·sName(SB), R0
- MOVW ·ctlHandlerExProc(SB), R1
- MOVW $0, R2
- MOVW ·cRegisterServiceCtrlHandlerExW(SB), R3
- BL (R3)
- CMP $0, R0
- BEQ exit
- MOVW R0, ·ssHandle(SB)
-
- MOVW ·goWaitsH(SB), R0
- MOVW ·cSetEvent(SB), R1
- BL (R1)
-
- MOVW ·cWaitsH(SB), R0
- MOVW $-1, R1
- MOVW ·cWaitForSingleObject(SB), R2
- BL (R2)
-
-exit:
- MOVW R4, R13 // free extra stack space
- MOVM.IA.W (R13), [R4, R15] // pop {r4, pc}
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/windows/svc/sys_windows_arm64.s b/cluster-autoscaler/vendor/golang.org/x/sys/windows/svc/sys_windows_arm64.s
deleted file mode 100644
index 3ca540e69078..000000000000
--- a/cluster-autoscaler/vendor/golang.org/x/sys/windows/svc/sys_windows_arm64.s
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2018 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "textflag.h"
-
-// func servicemain(argc uint32, argv **uint16)
-TEXT ·servicemain(SB),NOSPLIT|NOFRAME,$0
- MOVD R0, ·sArgc(SB)
- MOVD R1, ·sArgv(SB)
-
- MOVD ·sName(SB), R0
- MOVD ·ctlHandlerExProc(SB), R1
- MOVD $0, R2
- MOVD ·cRegisterServiceCtrlHandlerExW(SB), R3
- BL (R3)
- CMP $0, R0
- BEQ exit
- MOVD R0, ·ssHandle(SB)
-
- MOVD ·goWaitsH(SB), R0
- MOVD ·cSetEvent(SB), R1
- BL (R1)
-
- MOVD ·cWaitsH(SB), R0
- MOVD $-1, R1
- MOVD ·cWaitForSingleObject(SB), R2
- BL (R2)
-
-exit:
- RET
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/windows/syscall.go b/cluster-autoscaler/vendor/golang.org/x/sys/windows/syscall.go
index 6122f557a097..72074d582f10 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/windows/syscall.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/windows/syscall.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build windows
// +build windows
// Package windows contains an interface to the low-level operating system
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/windows/syscall_windows.go b/cluster-autoscaler/vendor/golang.org/x/sys/windows/syscall_windows.go
index 1215b2ae2097..ce3075c45344 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/windows/syscall_windows.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/windows/syscall_windows.go
@@ -10,6 +10,7 @@ import (
errorspkg "errors"
"fmt"
"runtime"
+ "strings"
"sync"
"syscall"
"time"
@@ -86,10 +87,8 @@ func StringToUTF16(s string) []uint16 {
// s, with a terminating NUL added. If s contains a NUL byte at any
// location, it returns (nil, syscall.EINVAL).
func UTF16FromString(s string) ([]uint16, error) {
- for i := 0; i < len(s); i++ {
- if s[i] == 0 {
- return nil, syscall.EINVAL
- }
+ if strings.IndexByte(s, 0) != -1 {
+ return nil, syscall.EINVAL
}
return utf16.Encode([]rune(s + "\x00")), nil
}
@@ -186,8 +185,8 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys GetNamedPipeInfo(pipe Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error)
//sys GetNamedPipeHandleState(pipe Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) = GetNamedPipeHandleStateW
//sys SetNamedPipeHandleState(pipe Handle, state *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32) (err error) = SetNamedPipeHandleState
-//sys ReadFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error)
-//sys WriteFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error)
+//sys readFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) = ReadFile
+//sys writeFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) = WriteFile
//sys GetOverlappedResult(handle Handle, overlapped *Overlapped, done *uint32, wait bool) (err error)
//sys SetFilePointer(handle Handle, lowoffset int32, highoffsetptr *int32, whence uint32) (newlowoffset uint32, err error) [failretval==0xffffffff]
//sys CloseHandle(handle Handle) (err error)
@@ -248,6 +247,7 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys FreeEnvironmentStrings(envs *uint16) (err error) = kernel32.FreeEnvironmentStringsW
//sys GetEnvironmentVariable(name *uint16, buffer *uint16, size uint32) (n uint32, err error) = kernel32.GetEnvironmentVariableW
//sys SetEnvironmentVariable(name *uint16, value *uint16) (err error) = kernel32.SetEnvironmentVariableW
+//sys ExpandEnvironmentStrings(src *uint16, dst *uint16, size uint32) (n uint32, err error) = kernel32.ExpandEnvironmentStringsW
//sys CreateEnvironmentBlock(block **uint16, token Token, inheritExisting bool) (err error) = userenv.CreateEnvironmentBlock
//sys DestroyEnvironmentBlock(block *uint16) (err error) = userenv.DestroyEnvironmentBlock
//sys getTickCount64() (ms uint64) = kernel32.GetTickCount64
@@ -274,6 +274,11 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys VirtualAlloc(address uintptr, size uintptr, alloctype uint32, protect uint32) (value uintptr, err error) = kernel32.VirtualAlloc
//sys VirtualFree(address uintptr, size uintptr, freetype uint32) (err error) = kernel32.VirtualFree
//sys VirtualProtect(address uintptr, size uintptr, newprotect uint32, oldprotect *uint32) (err error) = kernel32.VirtualProtect
+//sys VirtualProtectEx(process Handle, address uintptr, size uintptr, newProtect uint32, oldProtect *uint32) (err error) = kernel32.VirtualProtectEx
+//sys VirtualQuery(address uintptr, buffer *MemoryBasicInformation, length uintptr) (err error) = kernel32.VirtualQuery
+//sys VirtualQueryEx(process Handle, address uintptr, buffer *MemoryBasicInformation, length uintptr) (err error) = kernel32.VirtualQueryEx
+//sys ReadProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size uintptr, numberOfBytesRead *uintptr) (err error) = kernel32.ReadProcessMemory
+//sys WriteProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size uintptr, numberOfBytesWritten *uintptr) (err error) = kernel32.WriteProcessMemory
//sys TransmitFile(s Handle, handle Handle, bytesToWrite uint32, bytsPerSend uint32, overlapped *Overlapped, transmitFileBuf *TransmitFileBuffers, flags uint32) (err error) = mswsock.TransmitFile
//sys ReadDirectoryChanges(handle Handle, buf *byte, buflen uint32, watchSubTree bool, mask uint32, retlen *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) = kernel32.ReadDirectoryChangesW
//sys FindFirstChangeNotification(path string, watchSubtree bool, notifyFilter uint32) (handle Handle, err error) [failretval==InvalidHandle] = kernel32.FindFirstChangeNotificationW
@@ -317,6 +322,8 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) = kernel32.WriteConsoleW
//sys ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) = kernel32.ReadConsoleW
//sys CreateToolhelp32Snapshot(flags uint32, processId uint32) (handle Handle, err error) [failretval==InvalidHandle] = kernel32.CreateToolhelp32Snapshot
+//sys Module32First(snapshot Handle, moduleEntry *ModuleEntry32) (err error) = kernel32.Module32FirstW
+//sys Module32Next(snapshot Handle, moduleEntry *ModuleEntry32) (err error) = kernel32.Module32NextW
//sys Process32First(snapshot Handle, procEntry *ProcessEntry32) (err error) = kernel32.Process32FirstW
//sys Process32Next(snapshot Handle, procEntry *ProcessEntry32) (err error) = kernel32.Process32NextW
//sys Thread32First(snapshot Handle, threadEntry *ThreadEntry32) (err error)
@@ -355,6 +362,8 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys SetProcessWorkingSetSizeEx(hProcess Handle, dwMinimumWorkingSetSize uintptr, dwMaximumWorkingSetSize uintptr, flags uint32) (err error)
//sys GetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error)
//sys SetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error)
+//sys GetActiveProcessorCount(groupNumber uint16) (ret uint32)
+//sys GetMaximumProcessorCount(groupNumber uint16) (ret uint32)
// Volume Management Functions
//sys DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) = DefineDosDeviceW
@@ -396,8 +405,18 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys LoadResource(module Handle, resInfo Handle) (resData Handle, err error) = kernel32.LoadResource
//sys LockResource(resData Handle) (addr uintptr, err error) = kernel32.LockResource
+// Version APIs
+//sys GetFileVersionInfoSize(filename string, zeroHandle *Handle) (bufSize uint32, err error) = version.GetFileVersionInfoSizeW
+//sys GetFileVersionInfo(filename string, handle uint32, bufSize uint32, buffer unsafe.Pointer) (err error) = version.GetFileVersionInfoW
+//sys VerQueryValue(block unsafe.Pointer, subBlock string, pointerToBufferPointer unsafe.Pointer, bufSize *uint32) (err error) = version.VerQueryValueW
+
// Process Status API (PSAPI)
//sys EnumProcesses(processIds []uint32, bytesReturned *uint32) (err error) = psapi.EnumProcesses
+//sys EnumProcessModules(process Handle, module *Handle, cb uint32, cbNeeded *uint32) (err error) = psapi.EnumProcessModules
+//sys EnumProcessModulesEx(process Handle, module *Handle, cb uint32, cbNeeded *uint32, filterFlag uint32) (err error) = psapi.EnumProcessModulesEx
+//sys GetModuleInformation(process Handle, module Handle, modinfo *ModuleInfo, cb uint32) (err error) = psapi.GetModuleInformation
+//sys GetModuleFileNameEx(process Handle, module Handle, filename *uint16, size uint32) (err error) = psapi.GetModuleFileNameExW
+//sys GetModuleBaseName(process Handle, module Handle, baseName *uint16, size uint32) (err error) = psapi.GetModuleBaseNameW
// NT Native APIs
//sys rtlNtStatusToDosErrorNoTeb(ntstatus NTStatus) (ret syscall.Errno) = ntdll.RtlNtStatusToDosErrorNoTeb
@@ -408,11 +427,16 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys RtlInitString(destinationString *NTString, sourceString *byte) = ntdll.RtlInitString
//sys NtCreateFile(handle *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, allocationSize *int64, attributes uint32, share uint32, disposition uint32, options uint32, eabuffer uintptr, ealength uint32) (ntstatus error) = ntdll.NtCreateFile
//sys NtCreateNamedPipeFile(pipe *Handle, access uint32, oa *OBJECT_ATTRIBUTES, iosb *IO_STATUS_BLOCK, share uint32, disposition uint32, options uint32, typ uint32, readMode uint32, completionMode uint32, maxInstances uint32, inboundQuota uint32, outputQuota uint32, timeout *int64) (ntstatus error) = ntdll.NtCreateNamedPipeFile
+//sys NtSetInformationFile(handle Handle, iosb *IO_STATUS_BLOCK, inBuffer *byte, inBufferLen uint32, class uint32) (ntstatus error) = ntdll.NtSetInformationFile
//sys RtlDosPathNameToNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) = ntdll.RtlDosPathNameToNtPathName_U_WithStatus
//sys RtlDosPathNameToRelativeNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) = ntdll.RtlDosPathNameToRelativeNtPathName_U_WithStatus
//sys RtlDefaultNpAcl(acl **ACL) (ntstatus error) = ntdll.RtlDefaultNpAcl
//sys NtQueryInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32, retLen *uint32) (ntstatus error) = ntdll.NtQueryInformationProcess
//sys NtSetInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32) (ntstatus error) = ntdll.NtSetInformationProcess
+//sys NtQuerySystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32, retLen *uint32) (ntstatus error) = ntdll.NtQuerySystemInformation
+//sys NtSetSystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32) (ntstatus error) = ntdll.NtSetSystemInformation
+//sys RtlAddFunctionTable(functionTable *RUNTIME_FUNCTION, entryCount uint32, baseAddress uintptr) (ret bool) = ntdll.RtlAddFunctionTable
+//sys RtlDeleteFunctionTable(functionTable *RUNTIME_FUNCTION) (ret bool) = ntdll.RtlDeleteFunctionTable
// syscall interface implementation for other packages
@@ -524,12 +548,6 @@ func Read(fd Handle, p []byte) (n int, err error) {
}
return 0, e
}
- if raceenabled {
- if done > 0 {
- raceWriteRange(unsafe.Pointer(&p[0]), int(done))
- }
- raceAcquire(unsafe.Pointer(&ioSync))
- }
return int(done), nil
}
@@ -542,12 +560,31 @@ func Write(fd Handle, p []byte) (n int, err error) {
if e != nil {
return 0, e
}
- if raceenabled && done > 0 {
- raceReadRange(unsafe.Pointer(&p[0]), int(done))
- }
return int(done), nil
}
+func ReadFile(fd Handle, p []byte, done *uint32, overlapped *Overlapped) error {
+ err := readFile(fd, p, done, overlapped)
+ if raceenabled {
+ if *done > 0 {
+ raceWriteRange(unsafe.Pointer(&p[0]), int(*done))
+ }
+ raceAcquire(unsafe.Pointer(&ioSync))
+ }
+ return err
+}
+
+func WriteFile(fd Handle, p []byte, done *uint32, overlapped *Overlapped) error {
+ if raceenabled {
+ raceReleaseMerge(unsafe.Pointer(&ioSync))
+ }
+ err := writeFile(fd, p, done, overlapped)
+ if raceenabled && *done > 0 {
+ raceReadRange(unsafe.Pointer(&p[0]), int(*done))
+ }
+ return err
+}
+
var ioSync int64
func Seek(fd Handle, offset int64, whence int) (newoffset int64, err error) {
@@ -873,9 +910,7 @@ func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, int32, error) {
p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
p[0] = byte(sa.Port >> 8)
p[1] = byte(sa.Port)
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
+ sa.raw.Addr = sa.Addr
return unsafe.Pointer(&sa.raw), int32(unsafe.Sizeof(sa.raw)), nil
}
@@ -895,9 +930,7 @@ func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, int32, error) {
p[0] = byte(sa.Port >> 8)
p[1] = byte(sa.Port)
sa.raw.Scope_id = sa.ZoneId
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
+ sa.raw.Addr = sa.Addr
return unsafe.Pointer(&sa.raw), int32(unsafe.Sizeof(sa.raw)), nil
}
@@ -970,9 +1003,7 @@ func (rsa *RawSockaddrAny) Sockaddr() (Sockaddr, error) {
sa := new(SockaddrInet4)
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
sa.Port = int(p[0])<<8 + int(p[1])
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
+ sa.Addr = pp.Addr
return sa, nil
case AF_INET6:
@@ -981,9 +1012,7 @@ func (rsa *RawSockaddrAny) Sockaddr() (Sockaddr, error) {
p := (*[2]byte)(unsafe.Pointer(&pp.Port))
sa.Port = int(p[0])<<8 + int(p[1])
sa.ZoneId = pp.Scope_id
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
+ sa.Addr = pp.Addr
return sa, nil
}
return nil, syscall.EAFNOSUPPORT
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/windows/types_windows.go b/cluster-autoscaler/vendor/golang.org/x/sys/windows/types_windows.go
index 17f03312df1c..e19471c6a852 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/windows/types_windows.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/windows/types_windows.go
@@ -66,9 +66,21 @@ var signals = [...]string{
}
const (
- FILE_LIST_DIRECTORY = 0x00000001
- FILE_APPEND_DATA = 0x00000004
+ FILE_READ_DATA = 0x00000001
+ FILE_READ_ATTRIBUTES = 0x00000080
+ FILE_READ_EA = 0x00000008
+ FILE_WRITE_DATA = 0x00000002
FILE_WRITE_ATTRIBUTES = 0x00000100
+ FILE_WRITE_EA = 0x00000010
+ FILE_APPEND_DATA = 0x00000004
+ FILE_EXECUTE = 0x00000020
+
+ FILE_GENERIC_READ = STANDARD_RIGHTS_READ | FILE_READ_DATA | FILE_READ_ATTRIBUTES | FILE_READ_EA | SYNCHRONIZE
+ FILE_GENERIC_WRITE = STANDARD_RIGHTS_WRITE | FILE_WRITE_DATA | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA | FILE_APPEND_DATA | SYNCHRONIZE
+ FILE_GENERIC_EXECUTE = STANDARD_RIGHTS_EXECUTE | FILE_READ_ATTRIBUTES | FILE_EXECUTE | SYNCHRONIZE
+
+ FILE_LIST_DIRECTORY = 0x00000001
+ FILE_TRAVERSE = 0x00000020
FILE_SHARE_READ = 0x00000001
FILE_SHARE_WRITE = 0x00000002
@@ -144,6 +156,8 @@ const (
MAX_PATH = 260
MAX_LONG_PATH = 32768
+ MAX_MODULE_NAME32 = 255
+
MAX_COMPUTERNAME_LENGTH = 15
TIME_ZONE_ID_UNKNOWN = 0
@@ -242,6 +256,14 @@ const (
TH32CS_INHERIT = 0x80000000
)
+const (
+ // flags for EnumProcessModulesEx
+ LIST_MODULES_32BIT = 0x01
+ LIST_MODULES_64BIT = 0x02
+ LIST_MODULES_ALL = 0x03
+ LIST_MODULES_DEFAULT = 0x00
+)
+
const (
// filters for ReadDirectoryChangesW and FindFirstChangeNotificationW
FILE_NOTIFY_CHANGE_FILE_NAME = 0x001
@@ -916,8 +938,8 @@ type StartupInfoEx struct {
type ProcThreadAttributeList struct{}
type ProcThreadAttributeListContainer struct {
- data *ProcThreadAttributeList
- heapAllocations []uintptr
+ data *ProcThreadAttributeList
+ pointers []unsafe.Pointer
}
type ProcessInformation struct {
@@ -950,6 +972,21 @@ type ThreadEntry32 struct {
Flags uint32
}
+type ModuleEntry32 struct {
+ Size uint32
+ ModuleID uint32
+ ProcessID uint32
+ GlblcntUsage uint32
+ ProccntUsage uint32
+ ModBaseAddr uintptr
+ ModBaseSize uint32
+ ModuleHandle Handle
+ Module [MAX_MODULE_NAME32 + 1]uint16
+ ExePath [MAX_PATH]uint16
+}
+
+const SizeofModuleEntry32 = unsafe.Sizeof(ModuleEntry32{})
+
type Systemtime struct {
Year uint16
Month uint16
@@ -1781,7 +1818,53 @@ type reparseDataBuffer struct {
}
const (
- FSCTL_GET_REPARSE_POINT = 0x900A8
+ FSCTL_CREATE_OR_GET_OBJECT_ID = 0x0900C0
+ FSCTL_DELETE_OBJECT_ID = 0x0900A0
+ FSCTL_DELETE_REPARSE_POINT = 0x0900AC
+ FSCTL_DUPLICATE_EXTENTS_TO_FILE = 0x098344
+ FSCTL_DUPLICATE_EXTENTS_TO_FILE_EX = 0x0983E8
+ FSCTL_FILESYSTEM_GET_STATISTICS = 0x090060
+ FSCTL_FILE_LEVEL_TRIM = 0x098208
+ FSCTL_FIND_FILES_BY_SID = 0x09008F
+ FSCTL_GET_COMPRESSION = 0x09003C
+ FSCTL_GET_INTEGRITY_INFORMATION = 0x09027C
+ FSCTL_GET_NTFS_VOLUME_DATA = 0x090064
+ FSCTL_GET_REFS_VOLUME_DATA = 0x0902D8
+ FSCTL_GET_OBJECT_ID = 0x09009C
+ FSCTL_GET_REPARSE_POINT = 0x0900A8
+ FSCTL_GET_RETRIEVAL_POINTER_COUNT = 0x09042B
+ FSCTL_GET_RETRIEVAL_POINTERS = 0x090073
+ FSCTL_GET_RETRIEVAL_POINTERS_AND_REFCOUNT = 0x0903D3
+ FSCTL_IS_PATHNAME_VALID = 0x09002C
+ FSCTL_LMR_SET_LINK_TRACKING_INFORMATION = 0x1400EC
+ FSCTL_MARK_HANDLE = 0x0900FC
+ FSCTL_OFFLOAD_READ = 0x094264
+ FSCTL_OFFLOAD_WRITE = 0x098268
+ FSCTL_PIPE_PEEK = 0x11400C
+ FSCTL_PIPE_TRANSCEIVE = 0x11C017
+ FSCTL_PIPE_WAIT = 0x110018
+ FSCTL_QUERY_ALLOCATED_RANGES = 0x0940CF
+ FSCTL_QUERY_FAT_BPB = 0x090058
+ FSCTL_QUERY_FILE_REGIONS = 0x090284
+ FSCTL_QUERY_ON_DISK_VOLUME_INFO = 0x09013C
+ FSCTL_QUERY_SPARING_INFO = 0x090138
+ FSCTL_READ_FILE_USN_DATA = 0x0900EB
+ FSCTL_RECALL_FILE = 0x090117
+ FSCTL_REFS_STREAM_SNAPSHOT_MANAGEMENT = 0x090440
+ FSCTL_SET_COMPRESSION = 0x09C040
+ FSCTL_SET_DEFECT_MANAGEMENT = 0x098134
+ FSCTL_SET_ENCRYPTION = 0x0900D7
+ FSCTL_SET_INTEGRITY_INFORMATION = 0x09C280
+ FSCTL_SET_INTEGRITY_INFORMATION_EX = 0x090380
+ FSCTL_SET_OBJECT_ID = 0x090098
+ FSCTL_SET_OBJECT_ID_EXTENDED = 0x0900BC
+ FSCTL_SET_REPARSE_POINT = 0x0900A4
+ FSCTL_SET_SPARSE = 0x0900C4
+ FSCTL_SET_ZERO_DATA = 0x0980C8
+ FSCTL_SET_ZERO_ON_DEALLOCATION = 0x090194
+ FSCTL_SIS_COPYFILE = 0x090100
+ FSCTL_WRITE_USN_CLOSE_RECORD = 0x0900EF
+
MAXIMUM_REPARSE_DATA_BUFFER_SIZE = 16 * 1024
IO_REPARSE_TAG_MOUNT_POINT = 0xA0000003
IO_REPARSE_TAG_SYMLINK = 0xA000000C
@@ -2300,6 +2383,12 @@ type LIST_ENTRY struct {
Blink *LIST_ENTRY
}
+type RUNTIME_FUNCTION struct {
+ BeginAddress uint32
+ EndAddress uint32
+ UnwindData uint32
+}
+
type LDR_DATA_TABLE_ENTRY struct {
reserved1 [2]uintptr
InMemoryOrderLinks LIST_ENTRY
@@ -2490,6 +2579,60 @@ const (
FILE_PIPE_SERVER_END = 0x00000001
)
+const (
+ // FileInformationClass for NtSetInformationFile
+ FileBasicInformation = 4
+ FileRenameInformation = 10
+ FileDispositionInformation = 13
+ FilePositionInformation = 14
+ FileEndOfFileInformation = 20
+ FileValidDataLengthInformation = 39
+ FileShortNameInformation = 40
+ FileIoPriorityHintInformation = 43
+ FileReplaceCompletionInformation = 61
+ FileDispositionInformationEx = 64
+ FileCaseSensitiveInformation = 71
+ FileLinkInformation = 72
+ FileCaseSensitiveInformationForceAccessCheck = 75
+ FileKnownFolderInformation = 76
+
+ // Flags for FILE_RENAME_INFORMATION
+ FILE_RENAME_REPLACE_IF_EXISTS = 0x00000001
+ FILE_RENAME_POSIX_SEMANTICS = 0x00000002
+ FILE_RENAME_SUPPRESS_PIN_STATE_INHERITANCE = 0x00000004
+ FILE_RENAME_SUPPRESS_STORAGE_RESERVE_INHERITANCE = 0x00000008
+ FILE_RENAME_NO_INCREASE_AVAILABLE_SPACE = 0x00000010
+ FILE_RENAME_NO_DECREASE_AVAILABLE_SPACE = 0x00000020
+ FILE_RENAME_PRESERVE_AVAILABLE_SPACE = 0x00000030
+ FILE_RENAME_IGNORE_READONLY_ATTRIBUTE = 0x00000040
+ FILE_RENAME_FORCE_RESIZE_TARGET_SR = 0x00000080
+ FILE_RENAME_FORCE_RESIZE_SOURCE_SR = 0x00000100
+ FILE_RENAME_FORCE_RESIZE_SR = 0x00000180
+
+ // Flags for FILE_DISPOSITION_INFORMATION_EX
+ FILE_DISPOSITION_DO_NOT_DELETE = 0x00000000
+ FILE_DISPOSITION_DELETE = 0x00000001
+ FILE_DISPOSITION_POSIX_SEMANTICS = 0x00000002
+ FILE_DISPOSITION_FORCE_IMAGE_SECTION_CHECK = 0x00000004
+ FILE_DISPOSITION_ON_CLOSE = 0x00000008
+ FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE = 0x00000010
+
+ // Flags for FILE_CASE_SENSITIVE_INFORMATION
+ FILE_CS_FLAG_CASE_SENSITIVE_DIR = 0x00000001
+
+ // Flags for FILE_LINK_INFORMATION
+ FILE_LINK_REPLACE_IF_EXISTS = 0x00000001
+ FILE_LINK_POSIX_SEMANTICS = 0x00000002
+ FILE_LINK_SUPPRESS_STORAGE_RESERVE_INHERITANCE = 0x00000008
+ FILE_LINK_NO_INCREASE_AVAILABLE_SPACE = 0x00000010
+ FILE_LINK_NO_DECREASE_AVAILABLE_SPACE = 0x00000020
+ FILE_LINK_PRESERVE_AVAILABLE_SPACE = 0x00000030
+ FILE_LINK_IGNORE_READONLY_ATTRIBUTE = 0x00000040
+ FILE_LINK_FORCE_RESIZE_TARGET_SR = 0x00000080
+ FILE_LINK_FORCE_RESIZE_SOURCE_SR = 0x00000100
+ FILE_LINK_FORCE_RESIZE_SR = 0x00000180
+)
+
// ProcessInformationClasses for NtQueryInformationProcess and NtSetInformationProcess.
const (
ProcessBasicInformation = iota
@@ -2606,6 +2749,240 @@ type PROCESS_BASIC_INFORMATION struct {
InheritedFromUniqueProcessId uintptr
}
+type SYSTEM_PROCESS_INFORMATION struct {
+ NextEntryOffset uint32
+ NumberOfThreads uint32
+ WorkingSetPrivateSize int64
+ HardFaultCount uint32
+ NumberOfThreadsHighWatermark uint32
+ CycleTime uint64
+ CreateTime int64
+ UserTime int64
+ KernelTime int64
+ ImageName NTUnicodeString
+ BasePriority int32
+ UniqueProcessID uintptr
+ InheritedFromUniqueProcessID uintptr
+ HandleCount uint32
+ SessionID uint32
+ UniqueProcessKey *uint32
+ PeakVirtualSize uintptr
+ VirtualSize uintptr
+ PageFaultCount uint32
+ PeakWorkingSetSize uintptr
+ WorkingSetSize uintptr
+ QuotaPeakPagedPoolUsage uintptr
+ QuotaPagedPoolUsage uintptr
+ QuotaPeakNonPagedPoolUsage uintptr
+ QuotaNonPagedPoolUsage uintptr
+ PagefileUsage uintptr
+ PeakPagefileUsage uintptr
+ PrivatePageCount uintptr
+ ReadOperationCount int64
+ WriteOperationCount int64
+ OtherOperationCount int64
+ ReadTransferCount int64
+ WriteTransferCount int64
+ OtherTransferCount int64
+}
+
+// SystemInformationClasses for NtQuerySystemInformation and NtSetSystemInformation
+const (
+ SystemBasicInformation = iota
+ SystemProcessorInformation
+ SystemPerformanceInformation
+ SystemTimeOfDayInformation
+ SystemPathInformation
+ SystemProcessInformation
+ SystemCallCountInformation
+ SystemDeviceInformation
+ SystemProcessorPerformanceInformation
+ SystemFlagsInformation
+ SystemCallTimeInformation
+ SystemModuleInformation
+ SystemLocksInformation
+ SystemStackTraceInformation
+ SystemPagedPoolInformation
+ SystemNonPagedPoolInformation
+ SystemHandleInformation
+ SystemObjectInformation
+ SystemPageFileInformation
+ SystemVdmInstemulInformation
+ SystemVdmBopInformation
+ SystemFileCacheInformation
+ SystemPoolTagInformation
+ SystemInterruptInformation
+ SystemDpcBehaviorInformation
+ SystemFullMemoryInformation
+ SystemLoadGdiDriverInformation
+ SystemUnloadGdiDriverInformation
+ SystemTimeAdjustmentInformation
+ SystemSummaryMemoryInformation
+ SystemMirrorMemoryInformation
+ SystemPerformanceTraceInformation
+ systemObsolete0
+ SystemExceptionInformation
+ SystemCrashDumpStateInformation
+ SystemKernelDebuggerInformation
+ SystemContextSwitchInformation
+ SystemRegistryQuotaInformation
+ SystemExtendServiceTableInformation
+ SystemPrioritySeperation
+ SystemVerifierAddDriverInformation
+ SystemVerifierRemoveDriverInformation
+ SystemProcessorIdleInformation
+ SystemLegacyDriverInformation
+ SystemCurrentTimeZoneInformation
+ SystemLookasideInformation
+ SystemTimeSlipNotification
+ SystemSessionCreate
+ SystemSessionDetach
+ SystemSessionInformation
+ SystemRangeStartInformation
+ SystemVerifierInformation
+ SystemVerifierThunkExtend
+ SystemSessionProcessInformation
+ SystemLoadGdiDriverInSystemSpace
+ SystemNumaProcessorMap
+ SystemPrefetcherInformation
+ SystemExtendedProcessInformation
+ SystemRecommendedSharedDataAlignment
+ SystemComPlusPackage
+ SystemNumaAvailableMemory
+ SystemProcessorPowerInformation
+ SystemEmulationBasicInformation
+ SystemEmulationProcessorInformation
+ SystemExtendedHandleInformation
+ SystemLostDelayedWriteInformation
+ SystemBigPoolInformation
+ SystemSessionPoolTagInformation
+ SystemSessionMappedViewInformation
+ SystemHotpatchInformation
+ SystemObjectSecurityMode
+ SystemWatchdogTimerHandler
+ SystemWatchdogTimerInformation
+ SystemLogicalProcessorInformation
+ SystemWow64SharedInformationObsolete
+ SystemRegisterFirmwareTableInformationHandler
+ SystemFirmwareTableInformation
+ SystemModuleInformationEx
+ SystemVerifierTriageInformation
+ SystemSuperfetchInformation
+ SystemMemoryListInformation
+ SystemFileCacheInformationEx
+ SystemThreadPriorityClientIdInformation
+ SystemProcessorIdleCycleTimeInformation
+ SystemVerifierCancellationInformation
+ SystemProcessorPowerInformationEx
+ SystemRefTraceInformation
+ SystemSpecialPoolInformation
+ SystemProcessIdInformation
+ SystemErrorPortInformation
+ SystemBootEnvironmentInformation
+ SystemHypervisorInformation
+ SystemVerifierInformationEx
+ SystemTimeZoneInformation
+ SystemImageFileExecutionOptionsInformation
+ SystemCoverageInformation
+ SystemPrefetchPatchInformation
+ SystemVerifierFaultsInformation
+ SystemSystemPartitionInformation
+ SystemSystemDiskInformation
+ SystemProcessorPerformanceDistribution
+ SystemNumaProximityNodeInformation
+ SystemDynamicTimeZoneInformation
+ SystemCodeIntegrityInformation
+ SystemProcessorMicrocodeUpdateInformation
+ SystemProcessorBrandString
+ SystemVirtualAddressInformation
+ SystemLogicalProcessorAndGroupInformation
+ SystemProcessorCycleTimeInformation
+ SystemStoreInformation
+ SystemRegistryAppendString
+ SystemAitSamplingValue
+ SystemVhdBootInformation
+ SystemCpuQuotaInformation
+ SystemNativeBasicInformation
+ systemSpare1
+ SystemLowPriorityIoInformation
+ SystemTpmBootEntropyInformation
+ SystemVerifierCountersInformation
+ SystemPagedPoolInformationEx
+ SystemSystemPtesInformationEx
+ SystemNodeDistanceInformation
+ SystemAcpiAuditInformation
+ SystemBasicPerformanceInformation
+ SystemQueryPerformanceCounterInformation
+ SystemSessionBigPoolInformation
+ SystemBootGraphicsInformation
+ SystemScrubPhysicalMemoryInformation
+ SystemBadPageInformation
+ SystemProcessorProfileControlArea
+ SystemCombinePhysicalMemoryInformation
+ SystemEntropyInterruptTimingCallback
+ SystemConsoleInformation
+ SystemPlatformBinaryInformation
+ SystemThrottleNotificationInformation
+ SystemHypervisorProcessorCountInformation
+ SystemDeviceDataInformation
+ SystemDeviceDataEnumerationInformation
+ SystemMemoryTopologyInformation
+ SystemMemoryChannelInformation
+ SystemBootLogoInformation
+ SystemProcessorPerformanceInformationEx
+ systemSpare0
+ SystemSecureBootPolicyInformation
+ SystemPageFileInformationEx
+ SystemSecureBootInformation
+ SystemEntropyInterruptTimingRawInformation
+ SystemPortableWorkspaceEfiLauncherInformation
+ SystemFullProcessInformation
+ SystemKernelDebuggerInformationEx
+ SystemBootMetadataInformation
+ SystemSoftRebootInformation
+ SystemElamCertificateInformation
+ SystemOfflineDumpConfigInformation
+ SystemProcessorFeaturesInformation
+ SystemRegistryReconciliationInformation
+ SystemEdidInformation
+ SystemManufacturingInformation
+ SystemEnergyEstimationConfigInformation
+ SystemHypervisorDetailInformation
+ SystemProcessorCycleStatsInformation
+ SystemVmGenerationCountInformation
+ SystemTrustedPlatformModuleInformation
+ SystemKernelDebuggerFlags
+ SystemCodeIntegrityPolicyInformation
+ SystemIsolatedUserModeInformation
+ SystemHardwareSecurityTestInterfaceResultsInformation
+ SystemSingleModuleInformation
+ SystemAllowedCpuSetsInformation
+ SystemDmaProtectionInformation
+ SystemInterruptCpuSetsInformation
+ SystemSecureBootPolicyFullInformation
+ SystemCodeIntegrityPolicyFullInformation
+ SystemAffinitizedInterruptProcessorInformation
+ SystemRootSiloInformation
+)
+
+type RTL_PROCESS_MODULE_INFORMATION struct {
+ Section Handle
+ MappedBase uintptr
+ ImageBase uintptr
+ ImageSize uint32
+ Flags uint32
+ LoadOrderIndex uint16
+ InitOrderIndex uint16
+ LoadCount uint16
+ OffsetToFileName uint16
+ FullPathName [256]byte
+}
+
+type RTL_PROCESS_MODULES struct {
+ NumberOfModules uint32
+ Modules [1]RTL_PROCESS_MODULE_INFORMATION
+}
+
// Constants for LocalAlloc flags.
const (
LMEM_FIXED = 0x0
@@ -2700,6 +3077,22 @@ var (
RT_MANIFEST ResourceID = 24
)
+type VS_FIXEDFILEINFO struct {
+ Signature uint32
+ StrucVersion uint32
+ FileVersionMS uint32
+ FileVersionLS uint32
+ ProductVersionMS uint32
+ ProductVersionLS uint32
+ FileFlagsMask uint32
+ FileFlags uint32
+ FileOS uint32
+ FileType uint32
+ FileSubtype uint32
+ FileDateMS uint32
+ FileDateLS uint32
+}
+
type COAUTHIDENTITY struct {
User *uint16
UserLength uint32
@@ -2773,3 +3166,11 @@ const (
// Flag for QueryFullProcessImageName.
const PROCESS_NAME_NATIVE = 1
+
+type ModuleInfo struct {
+ BaseOfDll uintptr
+ SizeOfImage uint32
+ EntryPoint uintptr
+}
+
+const ALL_PROCESSOR_GROUPS = 0xFFFF
diff --git a/cluster-autoscaler/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/cluster-autoscaler/vendor/golang.org/x/sys/windows/zsyscall_windows.go
index 2083ec376e9d..68f52c1e61e9 100644
--- a/cluster-autoscaler/vendor/golang.org/x/sys/windows/zsyscall_windows.go
+++ b/cluster-autoscaler/vendor/golang.org/x/sys/windows/zsyscall_windows.go
@@ -36,6 +36,7 @@ func errnoErr(e syscall.Errno) error {
}
var (
+ modCfgMgr32 = NewLazySystemDLL("CfgMgr32.dll")
modadvapi32 = NewLazySystemDLL("advapi32.dll")
modcrypt32 = NewLazySystemDLL("crypt32.dll")
moddnsapi = NewLazySystemDLL("dnsapi.dll")
@@ -48,13 +49,19 @@ var (
modpsapi = NewLazySystemDLL("psapi.dll")
modsechost = NewLazySystemDLL("sechost.dll")
modsecur32 = NewLazySystemDLL("secur32.dll")
+ modsetupapi = NewLazySystemDLL("setupapi.dll")
modshell32 = NewLazySystemDLL("shell32.dll")
moduser32 = NewLazySystemDLL("user32.dll")
moduserenv = NewLazySystemDLL("userenv.dll")
+ modversion = NewLazySystemDLL("version.dll")
modwintrust = NewLazySystemDLL("wintrust.dll")
modws2_32 = NewLazySystemDLL("ws2_32.dll")
modwtsapi32 = NewLazySystemDLL("wtsapi32.dll")
+ procCM_Get_DevNode_Status = modCfgMgr32.NewProc("CM_Get_DevNode_Status")
+ procCM_Get_Device_Interface_ListW = modCfgMgr32.NewProc("CM_Get_Device_Interface_ListW")
+ procCM_Get_Device_Interface_List_SizeW = modCfgMgr32.NewProc("CM_Get_Device_Interface_List_SizeW")
+ procCM_MapCrToWin32Err = modCfgMgr32.NewProc("CM_MapCrToWin32Err")
procAdjustTokenGroups = modadvapi32.NewProc("AdjustTokenGroups")
procAdjustTokenPrivileges = modadvapi32.NewProc("AdjustTokenPrivileges")
procAllocateAndInitializeSid = modadvapi32.NewProc("AllocateAndInitializeSid")
@@ -114,6 +121,7 @@ var (
procOpenThreadToken = modadvapi32.NewProc("OpenThreadToken")
procQueryServiceConfig2W = modadvapi32.NewProc("QueryServiceConfig2W")
procQueryServiceConfigW = modadvapi32.NewProc("QueryServiceConfigW")
+ procQueryServiceDynamicInformation = modadvapi32.NewProc("QueryServiceDynamicInformation")
procQueryServiceLockStatusW = modadvapi32.NewProc("QueryServiceLockStatusW")
procQueryServiceStatus = modadvapi32.NewProc("QueryServiceStatus")
procQueryServiceStatusEx = modadvapi32.NewProc("QueryServiceStatusEx")
@@ -124,6 +132,7 @@ var (
procRegQueryInfoKeyW = modadvapi32.NewProc("RegQueryInfoKeyW")
procRegQueryValueExW = modadvapi32.NewProc("RegQueryValueExW")
procRegisterEventSourceW = modadvapi32.NewProc("RegisterEventSourceW")
+ procRegisterServiceCtrlHandlerExW = modadvapi32.NewProc("RegisterServiceCtrlHandlerExW")
procReportEventW = modadvapi32.NewProc("ReportEventW")
procRevertToSelf = modadvapi32.NewProc("RevertToSelf")
procSetEntriesInAclW = modadvapi32.NewProc("SetEntriesInAclW")
@@ -196,6 +205,7 @@ var (
procDeviceIoControl = modkernel32.NewProc("DeviceIoControl")
procDuplicateHandle = modkernel32.NewProc("DuplicateHandle")
procExitProcess = modkernel32.NewProc("ExitProcess")
+ procExpandEnvironmentStringsW = modkernel32.NewProc("ExpandEnvironmentStringsW")
procFindClose = modkernel32.NewProc("FindClose")
procFindCloseChangeNotification = modkernel32.NewProc("FindCloseChangeNotification")
procFindFirstChangeNotificationW = modkernel32.NewProc("FindFirstChangeNotificationW")
@@ -216,6 +226,7 @@ var (
procFreeLibrary = modkernel32.NewProc("FreeLibrary")
procGenerateConsoleCtrlEvent = modkernel32.NewProc("GenerateConsoleCtrlEvent")
procGetACP = modkernel32.NewProc("GetACP")
+ procGetActiveProcessorCount = modkernel32.NewProc("GetActiveProcessorCount")
procGetCommTimeouts = modkernel32.NewProc("GetCommTimeouts")
procGetCommandLineW = modkernel32.NewProc("GetCommandLineW")
procGetComputerNameExW = modkernel32.NewProc("GetComputerNameExW")
@@ -241,6 +252,7 @@ var (
procGetLogicalDriveStringsW = modkernel32.NewProc("GetLogicalDriveStringsW")
procGetLogicalDrives = modkernel32.NewProc("GetLogicalDrives")
procGetLongPathNameW = modkernel32.NewProc("GetLongPathNameW")
+ procGetMaximumProcessorCount = modkernel32.NewProc("GetMaximumProcessorCount")
procGetModuleFileNameW = modkernel32.NewProc("GetModuleFileNameW")
procGetModuleHandleExW = modkernel32.NewProc("GetModuleHandleExW")
procGetNamedPipeHandleStateW = modkernel32.NewProc("GetNamedPipeHandleStateW")
@@ -285,6 +297,8 @@ var (
procLockFileEx = modkernel32.NewProc("LockFileEx")
procLockResource = modkernel32.NewProc("LockResource")
procMapViewOfFile = modkernel32.NewProc("MapViewOfFile")
+ procModule32FirstW = modkernel32.NewProc("Module32FirstW")
+ procModule32NextW = modkernel32.NewProc("Module32NextW")
procMoveFileExW = modkernel32.NewProc("MoveFileExW")
procMoveFileW = modkernel32.NewProc("MoveFileW")
procMultiByteToWideChar = modkernel32.NewProc("MultiByteToWideChar")
@@ -303,6 +317,7 @@ var (
procReadConsoleW = modkernel32.NewProc("ReadConsoleW")
procReadDirectoryChangesW = modkernel32.NewProc("ReadDirectoryChangesW")
procReadFile = modkernel32.NewProc("ReadFile")
+ procReadProcessMemory = modkernel32.NewProc("ReadProcessMemory")
procReleaseMutex = modkernel32.NewProc("ReleaseMutex")
procRemoveDirectoryW = modkernel32.NewProc("RemoveDirectoryW")
procResetEvent = modkernel32.NewProc("ResetEvent")
@@ -345,12 +360,16 @@ var (
procVirtualFree = modkernel32.NewProc("VirtualFree")
procVirtualLock = modkernel32.NewProc("VirtualLock")
procVirtualProtect = modkernel32.NewProc("VirtualProtect")
+ procVirtualProtectEx = modkernel32.NewProc("VirtualProtectEx")
+ procVirtualQuery = modkernel32.NewProc("VirtualQuery")
+ procVirtualQueryEx = modkernel32.NewProc("VirtualQueryEx")
procVirtualUnlock = modkernel32.NewProc("VirtualUnlock")
procWTSGetActiveConsoleSessionId = modkernel32.NewProc("WTSGetActiveConsoleSessionId")
procWaitForMultipleObjects = modkernel32.NewProc("WaitForMultipleObjects")
procWaitForSingleObject = modkernel32.NewProc("WaitForSingleObject")
procWriteConsoleW = modkernel32.NewProc("WriteConsoleW")
procWriteFile = modkernel32.NewProc("WriteFile")
+ procWriteProcessMemory = modkernel32.NewProc("WriteProcessMemory")
procAcceptEx = modmswsock.NewProc("AcceptEx")
procGetAcceptExSockaddrs = modmswsock.NewProc("GetAcceptExSockaddrs")
procTransmitFile = modmswsock.NewProc("TransmitFile")
@@ -360,8 +379,13 @@ var (
procNtCreateFile = modntdll.NewProc("NtCreateFile")
procNtCreateNamedPipeFile = modntdll.NewProc("NtCreateNamedPipeFile")
procNtQueryInformationProcess = modntdll.NewProc("NtQueryInformationProcess")
+ procNtQuerySystemInformation = modntdll.NewProc("NtQuerySystemInformation")
+ procNtSetInformationFile = modntdll.NewProc("NtSetInformationFile")
procNtSetInformationProcess = modntdll.NewProc("NtSetInformationProcess")
+ procNtSetSystemInformation = modntdll.NewProc("NtSetSystemInformation")
+ procRtlAddFunctionTable = modntdll.NewProc("RtlAddFunctionTable")
procRtlDefaultNpAcl = modntdll.NewProc("RtlDefaultNpAcl")
+ procRtlDeleteFunctionTable = modntdll.NewProc("RtlDeleteFunctionTable")
procRtlDosPathNameToNtPathName_U_WithStatus = modntdll.NewProc("RtlDosPathNameToNtPathName_U_WithStatus")
procRtlDosPathNameToRelativeNtPathName_U_WithStatus = modntdll.NewProc("RtlDosPathNameToRelativeNtPathName_U_WithStatus")
procRtlGetCurrentPeb = modntdll.NewProc("RtlGetCurrentPeb")
@@ -377,11 +401,44 @@ var (
procCoTaskMemFree = modole32.NewProc("CoTaskMemFree")
procCoUninitialize = modole32.NewProc("CoUninitialize")
procStringFromGUID2 = modole32.NewProc("StringFromGUID2")
+ procEnumProcessModules = modpsapi.NewProc("EnumProcessModules")
+ procEnumProcessModulesEx = modpsapi.NewProc("EnumProcessModulesEx")
procEnumProcesses = modpsapi.NewProc("EnumProcesses")
+ procGetModuleBaseNameW = modpsapi.NewProc("GetModuleBaseNameW")
+ procGetModuleFileNameExW = modpsapi.NewProc("GetModuleFileNameExW")
+ procGetModuleInformation = modpsapi.NewProc("GetModuleInformation")
procSubscribeServiceChangeNotifications = modsechost.NewProc("SubscribeServiceChangeNotifications")
procUnsubscribeServiceChangeNotifications = modsechost.NewProc("UnsubscribeServiceChangeNotifications")
procGetUserNameExW = modsecur32.NewProc("GetUserNameExW")
procTranslateNameW = modsecur32.NewProc("TranslateNameW")
+ procSetupDiBuildDriverInfoList = modsetupapi.NewProc("SetupDiBuildDriverInfoList")
+ procSetupDiCallClassInstaller = modsetupapi.NewProc("SetupDiCallClassInstaller")
+ procSetupDiCancelDriverInfoSearch = modsetupapi.NewProc("SetupDiCancelDriverInfoSearch")
+ procSetupDiClassGuidsFromNameExW = modsetupapi.NewProc("SetupDiClassGuidsFromNameExW")
+ procSetupDiClassNameFromGuidExW = modsetupapi.NewProc("SetupDiClassNameFromGuidExW")
+ procSetupDiCreateDeviceInfoListExW = modsetupapi.NewProc("SetupDiCreateDeviceInfoListExW")
+ procSetupDiCreateDeviceInfoW = modsetupapi.NewProc("SetupDiCreateDeviceInfoW")
+ procSetupDiDestroyDeviceInfoList = modsetupapi.NewProc("SetupDiDestroyDeviceInfoList")
+ procSetupDiDestroyDriverInfoList = modsetupapi.NewProc("SetupDiDestroyDriverInfoList")
+ procSetupDiEnumDeviceInfo = modsetupapi.NewProc("SetupDiEnumDeviceInfo")
+ procSetupDiEnumDriverInfoW = modsetupapi.NewProc("SetupDiEnumDriverInfoW")
+ procSetupDiGetClassDevsExW = modsetupapi.NewProc("SetupDiGetClassDevsExW")
+ procSetupDiGetClassInstallParamsW = modsetupapi.NewProc("SetupDiGetClassInstallParamsW")
+ procSetupDiGetDeviceInfoListDetailW = modsetupapi.NewProc("SetupDiGetDeviceInfoListDetailW")
+ procSetupDiGetDeviceInstallParamsW = modsetupapi.NewProc("SetupDiGetDeviceInstallParamsW")
+ procSetupDiGetDeviceInstanceIdW = modsetupapi.NewProc("SetupDiGetDeviceInstanceIdW")
+ procSetupDiGetDevicePropertyW = modsetupapi.NewProc("SetupDiGetDevicePropertyW")
+ procSetupDiGetDeviceRegistryPropertyW = modsetupapi.NewProc("SetupDiGetDeviceRegistryPropertyW")
+ procSetupDiGetDriverInfoDetailW = modsetupapi.NewProc("SetupDiGetDriverInfoDetailW")
+ procSetupDiGetSelectedDevice = modsetupapi.NewProc("SetupDiGetSelectedDevice")
+ procSetupDiGetSelectedDriverW = modsetupapi.NewProc("SetupDiGetSelectedDriverW")
+ procSetupDiOpenDevRegKey = modsetupapi.NewProc("SetupDiOpenDevRegKey")
+ procSetupDiSetClassInstallParamsW = modsetupapi.NewProc("SetupDiSetClassInstallParamsW")
+ procSetupDiSetDeviceInstallParamsW = modsetupapi.NewProc("SetupDiSetDeviceInstallParamsW")
+ procSetupDiSetDeviceRegistryPropertyW = modsetupapi.NewProc("SetupDiSetDeviceRegistryPropertyW")
+ procSetupDiSetSelectedDevice = modsetupapi.NewProc("SetupDiSetSelectedDevice")
+ procSetupDiSetSelectedDriverW = modsetupapi.NewProc("SetupDiSetSelectedDriverW")
+ procSetupUninstallOEMInfW = modsetupapi.NewProc("SetupUninstallOEMInfW")
procCommandLineToArgvW = modshell32.NewProc("CommandLineToArgvW")
procSHGetKnownFolderPath = modshell32.NewProc("SHGetKnownFolderPath")
procShellExecuteW = modshell32.NewProc("ShellExecuteW")
@@ -392,6 +449,9 @@ var (
procCreateEnvironmentBlock = moduserenv.NewProc("CreateEnvironmentBlock")
procDestroyEnvironmentBlock = moduserenv.NewProc("DestroyEnvironmentBlock")
procGetUserProfileDirectoryW = moduserenv.NewProc("GetUserProfileDirectoryW")
+ procGetFileVersionInfoSizeW = modversion.NewProc("GetFileVersionInfoSizeW")
+ procGetFileVersionInfoW = modversion.NewProc("GetFileVersionInfoW")
+ procVerQueryValueW = modversion.NewProc("VerQueryValueW")
procWinVerifyTrustEx = modwintrust.NewProc("WinVerifyTrustEx")
procFreeAddrInfoW = modws2_32.NewProc("FreeAddrInfoW")
procGetAddrInfoW = modws2_32.NewProc("GetAddrInfoW")
@@ -426,6 +486,30 @@ var (
procWTSQueryUserToken = modwtsapi32.NewProc("WTSQueryUserToken")
)
+func cm_Get_DevNode_Status(status *uint32, problemNumber *uint32, devInst DEVINST, flags uint32) (ret CONFIGRET) {
+ r0, _, _ := syscall.Syscall6(procCM_Get_DevNode_Status.Addr(), 4, uintptr(unsafe.Pointer(status)), uintptr(unsafe.Pointer(problemNumber)), uintptr(devInst), uintptr(flags), 0, 0)
+ ret = CONFIGRET(r0)
+ return
+}
+
+func cm_Get_Device_Interface_List(interfaceClass *GUID, deviceID *uint16, buffer *uint16, bufferLen uint32, flags uint32) (ret CONFIGRET) {
+ r0, _, _ := syscall.Syscall6(procCM_Get_Device_Interface_ListW.Addr(), 5, uintptr(unsafe.Pointer(interfaceClass)), uintptr(unsafe.Pointer(deviceID)), uintptr(unsafe.Pointer(buffer)), uintptr(bufferLen), uintptr(flags), 0)
+ ret = CONFIGRET(r0)
+ return
+}
+
+func cm_Get_Device_Interface_List_Size(len *uint32, interfaceClass *GUID, deviceID *uint16, flags uint32) (ret CONFIGRET) {
+ r0, _, _ := syscall.Syscall6(procCM_Get_Device_Interface_List_SizeW.Addr(), 4, uintptr(unsafe.Pointer(len)), uintptr(unsafe.Pointer(interfaceClass)), uintptr(unsafe.Pointer(deviceID)), uintptr(flags), 0, 0)
+ ret = CONFIGRET(r0)
+ return
+}
+
+func cm_MapCrToWin32Err(configRet CONFIGRET, defaultWin32Error Errno) (ret Errno) {
+ r0, _, _ := syscall.Syscall(procCM_MapCrToWin32Err.Addr(), 2, uintptr(configRet), uintptr(defaultWin32Error), 0)
+ ret = Errno(r0)
+ return
+}
+
func AdjustTokenGroups(token Token, resetToDefault bool, newstate *Tokengroups, buflen uint32, prevstate *Tokengroups, returnlen *uint32) (err error) {
var _p0 uint32
if resetToDefault {
@@ -956,6 +1040,18 @@ func QueryServiceConfig(service Handle, serviceConfig *QUERY_SERVICE_CONFIG, buf
return
}
+func QueryServiceDynamicInformation(service Handle, infoLevel uint32, dynamicInfo unsafe.Pointer) (err error) {
+ err = procQueryServiceDynamicInformation.Find()
+ if err != nil {
+ return
+ }
+ r1, _, e1 := syscall.Syscall(procQueryServiceDynamicInformation.Addr(), 3, uintptr(service), uintptr(infoLevel), uintptr(dynamicInfo))
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
func QueryServiceLockStatus(mgr Handle, lockStatus *QUERY_SERVICE_LOCK_STATUS, bufSize uint32, bytesNeeded *uint32) (err error) {
r1, _, e1 := syscall.Syscall6(procQueryServiceLockStatusW.Addr(), 4, uintptr(mgr), uintptr(unsafe.Pointer(lockStatus)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), 0, 0)
if r1 == 0 {
@@ -1045,6 +1141,15 @@ func RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Hand
return
}
+func RegisterServiceCtrlHandlerEx(serviceName *uint16, handlerProc uintptr, context uintptr) (handle Handle, err error) {
+ r0, _, e1 := syscall.Syscall(procRegisterServiceCtrlHandlerExW.Addr(), 3, uintptr(unsafe.Pointer(serviceName)), uintptr(handlerProc), uintptr(context))
+ handle = Handle(r0)
+ if handle == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
func ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) {
r1, _, e1 := syscall.Syscall9(procReportEventW.Addr(), 9, uintptr(log), uintptr(etype), uintptr(category), uintptr(eventId), uintptr(usrSId), uintptr(numStrings), uintptr(dataSize), uintptr(unsafe.Pointer(strings)), uintptr(unsafe.Pointer(rawData)))
if r1 == 0 {
@@ -1674,6 +1779,15 @@ func ExitProcess(exitcode uint32) {
return
}
+func ExpandEnvironmentStrings(src *uint16, dst *uint16, size uint32) (n uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procExpandEnvironmentStringsW.Addr(), 3, uintptr(unsafe.Pointer(src)), uintptr(unsafe.Pointer(dst)), uintptr(size))
+ n = uint32(r0)
+ if n == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
func FindClose(handle Handle) (err error) {
r1, _, e1 := syscall.Syscall(procFindClose.Addr(), 1, uintptr(handle), 0, 0)
if r1 == 0 {
@@ -1855,6 +1969,12 @@ func GetACP() (acp uint32) {
return
}
+func GetActiveProcessorCount(groupNumber uint16) (ret uint32) {
+ r0, _, _ := syscall.Syscall(procGetActiveProcessorCount.Addr(), 1, uintptr(groupNumber), 0, 0)
+ ret = uint32(r0)
+ return
+}
+
func GetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) {
r1, _, e1 := syscall.Syscall(procGetCommTimeouts.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(timeouts)), 0)
if r1 == 0 {
@@ -2057,6 +2177,12 @@ func GetLongPathName(path *uint16, buf *uint16, buflen uint32) (n uint32, err er
return
}
+func GetMaximumProcessorCount(groupNumber uint16) (ret uint32) {
+ r0, _, _ := syscall.Syscall(procGetMaximumProcessorCount.Addr(), 1, uintptr(groupNumber), 0, 0)
+ ret = uint32(r0)
+ return
+}
+
func GetModuleFileName(module Handle, filename *uint16, size uint32) (n uint32, err error) {
r0, _, e1 := syscall.Syscall(procGetModuleFileNameW.Addr(), 3, uintptr(module), uintptr(unsafe.Pointer(filename)), uintptr(size))
n = uint32(r0)
@@ -2457,6 +2583,22 @@ func MapViewOfFile(handle Handle, access uint32, offsetHigh uint32, offsetLow ui
return
}
+func Module32First(snapshot Handle, moduleEntry *ModuleEntry32) (err error) {
+ r1, _, e1 := syscall.Syscall(procModule32FirstW.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(moduleEntry)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func Module32Next(snapshot Handle, moduleEntry *ModuleEntry32) (err error) {
+ r1, _, e1 := syscall.Syscall(procModule32NextW.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(moduleEntry)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
func MoveFileEx(from *uint16, to *uint16, flags uint32) (err error) {
r1, _, e1 := syscall.Syscall(procMoveFileExW.Addr(), 3, uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to)), uintptr(flags))
if r1 == 0 {
@@ -2619,7 +2761,7 @@ func ReadDirectoryChanges(handle Handle, buf *byte, buflen uint32, watchSubTree
return
}
-func ReadFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) {
+func readFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) {
var _p0 *byte
if len(buf) > 0 {
_p0 = &buf[0]
@@ -2631,6 +2773,14 @@ func ReadFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (
return
}
+func ReadProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size uintptr, numberOfBytesRead *uintptr) (err error) {
+ r1, _, e1 := syscall.Syscall6(procReadProcessMemory.Addr(), 5, uintptr(process), uintptr(baseAddress), uintptr(unsafe.Pointer(buffer)), uintptr(size), uintptr(unsafe.Pointer(numberOfBytesRead)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
func ReleaseMutex(mutex Handle) (err error) {
r1, _, e1 := syscall.Syscall(procReleaseMutex.Addr(), 1, uintptr(mutex), 0, 0)
if r1 == 0 {
@@ -2985,6 +3135,30 @@ func VirtualProtect(address uintptr, size uintptr, newprotect uint32, oldprotect
return
}
+func VirtualProtectEx(process Handle, address uintptr, size uintptr, newProtect uint32, oldProtect *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procVirtualProtectEx.Addr(), 5, uintptr(process), uintptr(address), uintptr(size), uintptr(newProtect), uintptr(unsafe.Pointer(oldProtect)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func VirtualQuery(address uintptr, buffer *MemoryBasicInformation, length uintptr) (err error) {
+ r1, _, e1 := syscall.Syscall(procVirtualQuery.Addr(), 3, uintptr(address), uintptr(unsafe.Pointer(buffer)), uintptr(length))
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func VirtualQueryEx(process Handle, address uintptr, buffer *MemoryBasicInformation, length uintptr) (err error) {
+ r1, _, e1 := syscall.Syscall6(procVirtualQueryEx.Addr(), 4, uintptr(process), uintptr(address), uintptr(unsafe.Pointer(buffer)), uintptr(length), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
func VirtualUnlock(addr uintptr, length uintptr) (err error) {
r1, _, e1 := syscall.Syscall(procVirtualUnlock.Addr(), 2, uintptr(addr), uintptr(length), 0)
if r1 == 0 {
@@ -3029,7 +3203,7 @@ func WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32,
return
}
-func WriteFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) {
+func writeFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) {
var _p0 *byte
if len(buf) > 0 {
_p0 = &buf[0]
@@ -3041,6 +3215,14 @@ func WriteFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped)
return
}
+func WriteProcessMemory(process Handle, baseAddress uintptr, buffer *byte, size uintptr, numberOfBytesWritten *uintptr) (err error) {
+ r1, _, e1 := syscall.Syscall6(procWriteProcessMemory.Addr(), 5, uintptr(process), uintptr(baseAddress), uintptr(unsafe.Pointer(buffer)), uintptr(size), uintptr(unsafe.Pointer(numberOfBytesWritten)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
func AcceptEx(ls Handle, as Handle, buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, recvd *uint32, overlapped *Overlapped) (err error) {
r1, _, e1 := syscall.Syscall9(procAcceptEx.Addr(), 8, uintptr(ls), uintptr(as), uintptr(unsafe.Pointer(buf)), uintptr(rxdatalen), uintptr(laddrlen), uintptr(raddrlen), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(overlapped)), 0)
if r1 == 0 {
@@ -3110,6 +3292,22 @@ func NtQueryInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe
return
}
+func NtQuerySystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32, retLen *uint32) (ntstatus error) {
+ r0, _, _ := syscall.Syscall6(procNtQuerySystemInformation.Addr(), 4, uintptr(sysInfoClass), uintptr(sysInfo), uintptr(sysInfoLen), uintptr(unsafe.Pointer(retLen)), 0, 0)
+ if r0 != 0 {
+ ntstatus = NTStatus(r0)
+ }
+ return
+}
+
+func NtSetInformationFile(handle Handle, iosb *IO_STATUS_BLOCK, inBuffer *byte, inBufferLen uint32, class uint32) (ntstatus error) {
+ r0, _, _ := syscall.Syscall6(procNtSetInformationFile.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(iosb)), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferLen), uintptr(class), 0)
+ if r0 != 0 {
+ ntstatus = NTStatus(r0)
+ }
+ return
+}
+
func NtSetInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.Pointer, procInfoLen uint32) (ntstatus error) {
r0, _, _ := syscall.Syscall6(procNtSetInformationProcess.Addr(), 4, uintptr(proc), uintptr(procInfoClass), uintptr(procInfo), uintptr(procInfoLen), 0, 0)
if r0 != 0 {
@@ -3118,6 +3316,20 @@ func NtSetInformationProcess(proc Handle, procInfoClass int32, procInfo unsafe.P
return
}
+func NtSetSystemInformation(sysInfoClass int32, sysInfo unsafe.Pointer, sysInfoLen uint32) (ntstatus error) {
+ r0, _, _ := syscall.Syscall(procNtSetSystemInformation.Addr(), 3, uintptr(sysInfoClass), uintptr(sysInfo), uintptr(sysInfoLen))
+ if r0 != 0 {
+ ntstatus = NTStatus(r0)
+ }
+ return
+}
+
+func RtlAddFunctionTable(functionTable *RUNTIME_FUNCTION, entryCount uint32, baseAddress uintptr) (ret bool) {
+ r0, _, _ := syscall.Syscall(procRtlAddFunctionTable.Addr(), 3, uintptr(unsafe.Pointer(functionTable)), uintptr(entryCount), uintptr(baseAddress))
+ ret = r0 != 0
+ return
+}
+
func RtlDefaultNpAcl(acl **ACL) (ntstatus error) {
r0, _, _ := syscall.Syscall(procRtlDefaultNpAcl.Addr(), 1, uintptr(unsafe.Pointer(acl)), 0, 0)
if r0 != 0 {
@@ -3126,6 +3338,12 @@ func RtlDefaultNpAcl(acl **ACL) (ntstatus error) {
return
}
+func RtlDeleteFunctionTable(functionTable *RUNTIME_FUNCTION) (ret bool) {
+ r0, _, _ := syscall.Syscall(procRtlDeleteFunctionTable.Addr(), 1, uintptr(unsafe.Pointer(functionTable)), 0, 0)
+ ret = r0 != 0
+ return
+}
+
func RtlDosPathNameToNtPathName(dosName *uint16, ntName *NTUnicodeString, ntFileNamePart *uint16, relativeName *RTL_RELATIVE_NAME) (ntstatus error) {
r0, _, _ := syscall.Syscall6(procRtlDosPathNameToNtPathName_U_WithStatus.Addr(), 4, uintptr(unsafe.Pointer(dosName)), uintptr(unsafe.Pointer(ntName)), uintptr(unsafe.Pointer(ntFileNamePart)), uintptr(unsafe.Pointer(relativeName)), 0, 0)
if r0 != 0 {
@@ -3225,6 +3443,22 @@ func stringFromGUID2(rguid *GUID, lpsz *uint16, cchMax int32) (chars int32) {
return
}
+func EnumProcessModules(process Handle, module *Handle, cb uint32, cbNeeded *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procEnumProcessModules.Addr(), 4, uintptr(process), uintptr(unsafe.Pointer(module)), uintptr(cb), uintptr(unsafe.Pointer(cbNeeded)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func EnumProcessModulesEx(process Handle, module *Handle, cb uint32, cbNeeded *uint32, filterFlag uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procEnumProcessModulesEx.Addr(), 5, uintptr(process), uintptr(unsafe.Pointer(module)), uintptr(cb), uintptr(unsafe.Pointer(cbNeeded)), uintptr(filterFlag), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
func EnumProcesses(processIds []uint32, bytesReturned *uint32) (err error) {
var _p0 *uint32
if len(processIds) > 0 {
@@ -3237,6 +3471,30 @@ func EnumProcesses(processIds []uint32, bytesReturned *uint32) (err error) {
return
}
+func GetModuleBaseName(process Handle, module Handle, baseName *uint16, size uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetModuleBaseNameW.Addr(), 4, uintptr(process), uintptr(module), uintptr(unsafe.Pointer(baseName)), uintptr(size), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func GetModuleFileNameEx(process Handle, module Handle, filename *uint16, size uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetModuleFileNameExW.Addr(), 4, uintptr(process), uintptr(module), uintptr(unsafe.Pointer(filename)), uintptr(size), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func GetModuleInformation(process Handle, module Handle, modinfo *ModuleInfo, cb uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetModuleInformation.Addr(), 4, uintptr(process), uintptr(module), uintptr(unsafe.Pointer(modinfo)), uintptr(cb), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
func SubscribeServiceChangeNotifications(service Handle, eventType uint32, callback uintptr, callbackCtx uintptr, subscription *uintptr) (ret error) {
ret = procSubscribeServiceChangeNotifications.Find()
if ret != nil {
@@ -3274,6 +3532,233 @@ func TranslateName(accName *uint16, accNameFormat uint32, desiredNameFormat uint
return
}
+func SetupDiBuildDriverInfoList(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetupDiBuildDriverInfoList.Addr(), 3, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(driverType))
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func SetupDiCallClassInstaller(installFunction DI_FUNCTION, deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetupDiCallClassInstaller.Addr(), 3, uintptr(installFunction), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)))
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func SetupDiCancelDriverInfoSearch(deviceInfoSet DevInfo) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetupDiCancelDriverInfoSearch.Addr(), 1, uintptr(deviceInfoSet), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func setupDiClassGuidsFromNameEx(className *uint16, classGuidList *GUID, classGuidListSize uint32, requiredSize *uint32, machineName *uint16, reserved uintptr) (err error) {
+ r1, _, e1 := syscall.Syscall6(procSetupDiClassGuidsFromNameExW.Addr(), 6, uintptr(unsafe.Pointer(className)), uintptr(unsafe.Pointer(classGuidList)), uintptr(classGuidListSize), uintptr(unsafe.Pointer(requiredSize)), uintptr(unsafe.Pointer(machineName)), uintptr(reserved))
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func setupDiClassNameFromGuidEx(classGUID *GUID, className *uint16, classNameSize uint32, requiredSize *uint32, machineName *uint16, reserved uintptr) (err error) {
+ r1, _, e1 := syscall.Syscall6(procSetupDiClassNameFromGuidExW.Addr(), 6, uintptr(unsafe.Pointer(classGUID)), uintptr(unsafe.Pointer(className)), uintptr(classNameSize), uintptr(unsafe.Pointer(requiredSize)), uintptr(unsafe.Pointer(machineName)), uintptr(reserved))
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func setupDiCreateDeviceInfoListEx(classGUID *GUID, hwndParent uintptr, machineName *uint16, reserved uintptr) (handle DevInfo, err error) {
+ r0, _, e1 := syscall.Syscall6(procSetupDiCreateDeviceInfoListExW.Addr(), 4, uintptr(unsafe.Pointer(classGUID)), uintptr(hwndParent), uintptr(unsafe.Pointer(machineName)), uintptr(reserved), 0, 0)
+ handle = DevInfo(r0)
+ if handle == DevInfo(InvalidHandle) {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func setupDiCreateDeviceInfo(deviceInfoSet DevInfo, DeviceName *uint16, classGUID *GUID, DeviceDescription *uint16, hwndParent uintptr, CreationFlags DICD, deviceInfoData *DevInfoData) (err error) {
+ r1, _, e1 := syscall.Syscall9(procSetupDiCreateDeviceInfoW.Addr(), 7, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(DeviceName)), uintptr(unsafe.Pointer(classGUID)), uintptr(unsafe.Pointer(DeviceDescription)), uintptr(hwndParent), uintptr(CreationFlags), uintptr(unsafe.Pointer(deviceInfoData)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func SetupDiDestroyDeviceInfoList(deviceInfoSet DevInfo) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetupDiDestroyDeviceInfoList.Addr(), 1, uintptr(deviceInfoSet), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func SetupDiDestroyDriverInfoList(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetupDiDestroyDriverInfoList.Addr(), 3, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(driverType))
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func setupDiEnumDeviceInfo(deviceInfoSet DevInfo, memberIndex uint32, deviceInfoData *DevInfoData) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetupDiEnumDeviceInfo.Addr(), 3, uintptr(deviceInfoSet), uintptr(memberIndex), uintptr(unsafe.Pointer(deviceInfoData)))
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func setupDiEnumDriverInfo(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverType SPDIT, memberIndex uint32, driverInfoData *DrvInfoData) (err error) {
+ r1, _, e1 := syscall.Syscall6(procSetupDiEnumDriverInfoW.Addr(), 5, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(driverType), uintptr(memberIndex), uintptr(unsafe.Pointer(driverInfoData)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func setupDiGetClassDevsEx(classGUID *GUID, Enumerator *uint16, hwndParent uintptr, Flags DIGCF, deviceInfoSet DevInfo, machineName *uint16, reserved uintptr) (handle DevInfo, err error) {
+ r0, _, e1 := syscall.Syscall9(procSetupDiGetClassDevsExW.Addr(), 7, uintptr(unsafe.Pointer(classGUID)), uintptr(unsafe.Pointer(Enumerator)), uintptr(hwndParent), uintptr(Flags), uintptr(deviceInfoSet), uintptr(unsafe.Pointer(machineName)), uintptr(reserved), 0, 0)
+ handle = DevInfo(r0)
+ if handle == DevInfo(InvalidHandle) {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func SetupDiGetClassInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, classInstallParams *ClassInstallHeader, classInstallParamsSize uint32, requiredSize *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procSetupDiGetClassInstallParamsW.Addr(), 5, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(classInstallParams)), uintptr(classInstallParamsSize), uintptr(unsafe.Pointer(requiredSize)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func setupDiGetDeviceInfoListDetail(deviceInfoSet DevInfo, deviceInfoSetDetailData *DevInfoListDetailData) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetupDiGetDeviceInfoListDetailW.Addr(), 2, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoSetDetailData)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func setupDiGetDeviceInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, deviceInstallParams *DevInstallParams) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetupDiGetDeviceInstallParamsW.Addr(), 3, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(deviceInstallParams)))
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func setupDiGetDeviceInstanceId(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, instanceId *uint16, instanceIdSize uint32, instanceIdRequiredSize *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procSetupDiGetDeviceInstanceIdW.Addr(), 5, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(instanceId)), uintptr(instanceIdSize), uintptr(unsafe.Pointer(instanceIdRequiredSize)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func setupDiGetDeviceProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, propertyKey *DEVPROPKEY, propertyType *DEVPROPTYPE, propertyBuffer *byte, propertyBufferSize uint32, requiredSize *uint32, flags uint32) (err error) {
+ r1, _, e1 := syscall.Syscall9(procSetupDiGetDevicePropertyW.Addr(), 8, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(propertyKey)), uintptr(unsafe.Pointer(propertyType)), uintptr(unsafe.Pointer(propertyBuffer)), uintptr(propertyBufferSize), uintptr(unsafe.Pointer(requiredSize)), uintptr(flags), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func setupDiGetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, property SPDRP, propertyRegDataType *uint32, propertyBuffer *byte, propertyBufferSize uint32, requiredSize *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall9(procSetupDiGetDeviceRegistryPropertyW.Addr(), 7, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(property), uintptr(unsafe.Pointer(propertyRegDataType)), uintptr(unsafe.Pointer(propertyBuffer)), uintptr(propertyBufferSize), uintptr(unsafe.Pointer(requiredSize)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func setupDiGetDriverInfoDetail(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData, driverInfoDetailData *DrvInfoDetailData, driverInfoDetailDataSize uint32, requiredSize *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procSetupDiGetDriverInfoDetailW.Addr(), 6, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(driverInfoData)), uintptr(unsafe.Pointer(driverInfoDetailData)), uintptr(driverInfoDetailDataSize), uintptr(unsafe.Pointer(requiredSize)))
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func setupDiGetSelectedDevice(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetupDiGetSelectedDevice.Addr(), 2, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func setupDiGetSelectedDriver(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetupDiGetSelectedDriverW.Addr(), 3, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(driverInfoData)))
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func SetupDiOpenDevRegKey(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, Scope DICS_FLAG, HwProfile uint32, KeyType DIREG, samDesired uint32) (key Handle, err error) {
+ r0, _, e1 := syscall.Syscall6(procSetupDiOpenDevRegKey.Addr(), 6, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(Scope), uintptr(HwProfile), uintptr(KeyType), uintptr(samDesired))
+ key = Handle(r0)
+ if key == InvalidHandle {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func SetupDiSetClassInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, classInstallParams *ClassInstallHeader, classInstallParamsSize uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procSetupDiSetClassInstallParamsW.Addr(), 4, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(classInstallParams)), uintptr(classInstallParamsSize), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func SetupDiSetDeviceInstallParams(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, deviceInstallParams *DevInstallParams) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetupDiSetDeviceInstallParamsW.Addr(), 3, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(deviceInstallParams)))
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func setupDiSetDeviceRegistryProperty(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, property SPDRP, propertyBuffer *byte, propertyBufferSize uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procSetupDiSetDeviceRegistryPropertyW.Addr(), 5, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(property), uintptr(unsafe.Pointer(propertyBuffer)), uintptr(propertyBufferSize), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func SetupDiSetSelectedDevice(deviceInfoSet DevInfo, deviceInfoData *DevInfoData) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetupDiSetSelectedDevice.Addr(), 2, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func SetupDiSetSelectedDriver(deviceInfoSet DevInfo, deviceInfoData *DevInfoData, driverInfoData *DrvInfoData) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetupDiSetSelectedDriverW.Addr(), 3, uintptr(deviceInfoSet), uintptr(unsafe.Pointer(deviceInfoData)), uintptr(unsafe.Pointer(driverInfoData)))
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func setupUninstallOEMInf(infFileName *uint16, flags SUOI, reserved uintptr) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetupUninstallOEMInfW.Addr(), 3, uintptr(unsafe.Pointer(infFileName)), uintptr(flags), uintptr(reserved))
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
func CommandLineToArgv(cmd *uint16, argc *int32) (argv *[8192]*[8192]uint16, err error) {
r0, _, e1 := syscall.Syscall(procCommandLineToArgvW.Addr(), 2, uintptr(unsafe.Pointer(cmd)), uintptr(unsafe.Pointer(argc)), 0)
argv = (*[8192]*[8192]uint16)(unsafe.Pointer(r0))
@@ -3359,6 +3844,58 @@ func GetUserProfileDirectory(t Token, dir *uint16, dirLen *uint32) (err error) {
return
}
+func GetFileVersionInfoSize(filename string, zeroHandle *Handle) (bufSize uint32, err error) {
+ var _p0 *uint16
+ _p0, err = syscall.UTF16PtrFromString(filename)
+ if err != nil {
+ return
+ }
+ return _GetFileVersionInfoSize(_p0, zeroHandle)
+}
+
+func _GetFileVersionInfoSize(filename *uint16, zeroHandle *Handle) (bufSize uint32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetFileVersionInfoSizeW.Addr(), 2, uintptr(unsafe.Pointer(filename)), uintptr(unsafe.Pointer(zeroHandle)), 0)
+ bufSize = uint32(r0)
+ if bufSize == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func GetFileVersionInfo(filename string, handle uint32, bufSize uint32, buffer unsafe.Pointer) (err error) {
+ var _p0 *uint16
+ _p0, err = syscall.UTF16PtrFromString(filename)
+ if err != nil {
+ return
+ }
+ return _GetFileVersionInfo(_p0, handle, bufSize, buffer)
+}
+
+func _GetFileVersionInfo(filename *uint16, handle uint32, bufSize uint32, buffer unsafe.Pointer) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetFileVersionInfoW.Addr(), 4, uintptr(unsafe.Pointer(filename)), uintptr(handle), uintptr(bufSize), uintptr(buffer), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func VerQueryValue(block unsafe.Pointer, subBlock string, pointerToBufferPointer unsafe.Pointer, bufSize *uint32) (err error) {
+ var _p0 *uint16
+ _p0, err = syscall.UTF16PtrFromString(subBlock)
+ if err != nil {
+ return
+ }
+ return _VerQueryValue(block, _p0, pointerToBufferPointer, bufSize)
+}
+
+func _VerQueryValue(block unsafe.Pointer, subBlock *uint16, pointerToBufferPointer unsafe.Pointer, bufSize *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procVerQueryValueW.Addr(), 4, uintptr(block), uintptr(unsafe.Pointer(subBlock)), uintptr(pointerToBufferPointer), uintptr(unsafe.Pointer(bufSize)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
func WinVerifyTrustEx(hwnd HWND, actionId *GUID, data *WinTrustData) (ret error) {
r0, _, _ := syscall.Syscall(procWinVerifyTrustEx.Addr(), 3, uintptr(hwnd), uintptr(unsafe.Pointer(actionId)), uintptr(unsafe.Pointer(data)))
if r0 != 0 {
diff --git a/cluster-autoscaler/vendor/golang.org/x/term/codereview.cfg b/cluster-autoscaler/vendor/golang.org/x/term/codereview.cfg
new file mode 100644
index 000000000000..3f8b14b64e83
--- /dev/null
+++ b/cluster-autoscaler/vendor/golang.org/x/term/codereview.cfg
@@ -0,0 +1 @@
+issuerepo: golang/go
diff --git a/cluster-autoscaler/vendor/golang.org/x/term/term.go b/cluster-autoscaler/vendor/golang.org/x/term/term.go
index 1f6a38fad2ab..d5927088082b 100644
--- a/cluster-autoscaler/vendor/golang.org/x/term/term.go
+++ b/cluster-autoscaler/vendor/golang.org/x/term/term.go
@@ -12,6 +12,8 @@
// panic(err)
// }
// defer term.Restore(int(os.Stdin.Fd()), oldState)
+//
+// Note that on non-Unix systems os.Stdin.Fd() may not be 0.
package term
// State contains the state of a terminal.
diff --git a/cluster-autoscaler/vendor/google.golang.org/genproto/googleapis/api/annotations/routing.pb.go b/cluster-autoscaler/vendor/google.golang.org/genproto/googleapis/api/annotations/routing.pb.go
new file mode 100644
index 000000000000..dd45cf6e6c1a
--- /dev/null
+++ b/cluster-autoscaler/vendor/google.golang.org/genproto/googleapis/api/annotations/routing.pb.go
@@ -0,0 +1,693 @@
+// Copyright 2021 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.26.0
+// protoc v3.12.2
+// source: google/api/routing.proto
+
+package annotations
+
+import (
+ reflect "reflect"
+ sync "sync"
+
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ descriptorpb "google.golang.org/protobuf/types/descriptorpb"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Specifies the routing information that should be sent along with the request
+// in the form of routing header.
+// **NOTE:** All service configuration rules follow the "last one wins" order.
+//
+// The examples below will apply to an RPC which has the following request type:
+//
+// Message Definition:
+//
+// message Request {
+// // The name of the Table
+// // Values can be of the following formats:
+// // - `projects//tables/`
+// // - `projects//instances//tables/`
+// // - `region//zones//tables/`
+// string table_name = 1;
+//
+// // This value specifies routing for replication.
+// // It can be in the following formats:
+// // - `profiles/`
+// // - a legacy `profile_id` that can be any string
+// string app_profile_id = 2;
+// }
+//
+// Example message:
+//
+// {
+// table_name: projects/proj_foo/instances/instance_bar/table/table_baz,
+// app_profile_id: profiles/prof_qux
+// }
+//
+// The routing header consists of one or multiple key-value pairs. Every key
+// and value must be percent-encoded, and joined together in the format of
+// `key1=value1&key2=value2`.
+// In the examples below I am skipping the percent-encoding for readablity.
+//
+// Example 1
+//
+// Extracting a field from the request to put into the routing header
+// unchanged, with the key equal to the field name.
+//
+// annotation:
+//
+// option (google.api.routing) = {
+// // Take the `app_profile_id`.
+// routing_parameters {
+// field: "app_profile_id"
+// }
+// };
+//
+// result:
+//
+// x-goog-request-params: app_profile_id=profiles/prof_qux
+//
+// Example 2
+//
+// Extracting a field from the request to put into the routing header
+// unchanged, with the key different from the field name.
+//
+// annotation:
+//
+// option (google.api.routing) = {
+// // Take the `app_profile_id`, but name it `routing_id` in the header.
+// routing_parameters {
+// field: "app_profile_id"
+// path_template: "{routing_id=**}"
+// }
+// };
+//
+// result:
+//
+// x-goog-request-params: routing_id=profiles/prof_qux
+//
+// Example 3
+//
+// Extracting a field from the request to put into the routing
+// header, while matching a path template syntax on the field's value.
+//
+// NB: it is more useful to send nothing than to send garbage for the purpose
+// of dynamic routing, since garbage pollutes cache. Thus the matching.
+//
+// Sub-example 3a
+//
+// The field matches the template.
+//
+// annotation:
+//
+// option (google.api.routing) = {
+// // Take the `table_name`, if it's well-formed (with project-based
+// // syntax).
+// routing_parameters {
+// field: "table_name"
+// path_template: "{table_name=projects/*/instances/*/**}"
+// }
+// };
+//
+// result:
+//
+// x-goog-request-params:
+// table_name=projects/proj_foo/instances/instance_bar/table/table_baz
+//
+// Sub-example 3b
+//
+// The field does not match the template.
+//
+// annotation:
+//
+// option (google.api.routing) = {
+// // Take the `table_name`, if it's well-formed (with region-based
+// // syntax).
+// routing_parameters {
+// field: "table_name"
+// path_template: "{table_name=regions/*/zones/*/**}"
+// }
+// };
+//
+// result:
+//
+//
+//
+// Sub-example 3c
+//
+// Multiple alternative conflictingly named path templates are
+// specified. The one that matches is used to construct the header.
+//
+// annotation:
+//
+// option (google.api.routing) = {
+// // Take the `table_name`, if it's well-formed, whether
+// // using the region- or projects-based syntax.
+//
+// routing_parameters {
+// field: "table_name"
+// path_template: "{table_name=regions/*/zones/*/**}"
+// }
+// routing_parameters {
+// field: "table_name"
+// path_template: "{table_name=projects/*/instances/*/**}"
+// }
+// };
+//
+// result:
+//
+// x-goog-request-params:
+// table_name=projects/proj_foo/instances/instance_bar/table/table_baz
+//
+// Example 4
+//
+// Extracting a single routing header key-value pair by matching a
+// template syntax on (a part of) a single request field.
+//
+// annotation:
+//
+// option (google.api.routing) = {
+// // Take just the project id from the `table_name` field.
+// routing_parameters {
+// field: "table_name"
+// path_template: "{routing_id=projects/*}/**"
+// }
+// };
+//
+// result:
+//
+// x-goog-request-params: routing_id=projects/proj_foo
+//
+// Example 5
+//
+// Extracting a single routing header key-value pair by matching
+// several conflictingly named path templates on (parts of) a single request
+// field. The last template to match "wins" the conflict.
+//
+// annotation:
+//
+// option (google.api.routing) = {
+// // If the `table_name` does not have instances information,
+// // take just the project id for routing.
+// // Otherwise take project + instance.
+//
+// routing_parameters {
+// field: "table_name"
+// path_template: "{routing_id=projects/*}/**"
+// }
+// routing_parameters {
+// field: "table_name"
+// path_template: "{routing_id=projects/*/instances/*}/**"
+// }
+// };
+//
+// result:
+//
+// x-goog-request-params:
+// routing_id=projects/proj_foo/instances/instance_bar
+//
+// Example 6
+//
+// Extracting multiple routing header key-value pairs by matching
+// several non-conflicting path templates on (parts of) a single request field.
+//
+// Sub-example 6a
+//
+// Make the templates strict, so that if the `table_name` does not
+// have an instance information, nothing is sent.
+//
+// annotation:
+//
+// option (google.api.routing) = {
+// // The routing code needs two keys instead of one composite
+// // but works only for the tables with the "project-instance" name
+// // syntax.
+//
+// routing_parameters {
+// field: "table_name"
+// path_template: "{project_id=projects/*}/instances/*/**"
+// }
+// routing_parameters {
+// field: "table_name"
+// path_template: "projects/*/{instance_id=instances/*}/**"
+// }
+// };
+//
+// result:
+//
+// x-goog-request-params:
+// project_id=projects/proj_foo&instance_id=instances/instance_bar
+//
+// Sub-example 6b
+//
+// Make the templates loose, so that if the `table_name` does not
+// have an instance information, just the project id part is sent.
+//
+// annotation:
+//
+// option (google.api.routing) = {
+// // The routing code wants two keys instead of one composite
+// // but will work with just the `project_id` for tables without
+// // an instance in the `table_name`.
+//
+// routing_parameters {
+// field: "table_name"
+// path_template: "{project_id=projects/*}/**"
+// }
+// routing_parameters {
+// field: "table_name"
+// path_template: "projects/*/{instance_id=instances/*}/**"
+// }
+// };
+//
+// result (is the same as 6a for our example message because it has the instance
+// information):
+//
+// x-goog-request-params:
+// project_id=projects/proj_foo&instance_id=instances/instance_bar
+//
+// Example 7
+//
+// Extracting multiple routing header key-value pairs by matching
+// several path templates on multiple request fields.
+//
+// NB: note that here there is no way to specify sending nothing if one of the
+// fields does not match its template. E.g. if the `table_name` is in the wrong
+// format, the `project_id` will not be sent, but the `routing_id` will be.
+// The backend routing code has to be aware of that and be prepared to not
+// receive a full complement of keys if it expects multiple.
+//
+// annotation:
+//
+// option (google.api.routing) = {
+// // The routing needs both `project_id` and `routing_id`
+// // (from the `app_profile_id` field) for routing.
+//
+// routing_parameters {
+// field: "table_name"
+// path_template: "{project_id=projects/*}/**"
+// }
+// routing_parameters {
+// field: "app_profile_id"
+// path_template: "{routing_id=**}"
+// }
+// };
+//
+// result:
+//
+// x-goog-request-params:
+// project_id=projects/proj_foo&routing_id=profiles/prof_qux
+//
+// Example 8
+//
+// Extracting a single routing header key-value pair by matching
+// several conflictingly named path templates on several request fields. The
+// last template to match "wins" the conflict.
+//
+// annotation:
+//
+// option (google.api.routing) = {
+// // The `routing_id` can be a project id or a region id depending on
+// // the table name format, but only if the `app_profile_id` is not set.
+// // If `app_profile_id` is set it should be used instead.
+//
+// routing_parameters {
+// field: "table_name"
+// path_template: "{routing_id=projects/*}/**"
+// }
+// routing_parameters {
+// field: "table_name"
+// path_template: "{routing_id=regions/*}/**"
+// }
+// routing_parameters {
+// field: "app_profile_id"
+// path_template: "{routing_id=**}"
+// }
+// };
+//
+// result:
+//
+// x-goog-request-params: routing_id=profiles/prof_qux
+//
+// Example 9
+//
+// Bringing it all together.
+//
+// annotation:
+//
+// option (google.api.routing) = {
+// // For routing both `table_location` and a `routing_id` are needed.
+// //
+// // table_location can be either an instance id or a region+zone id.
+// //
+// // For `routing_id`, take the value of `app_profile_id`
+// // - If it's in the format `profiles/`, send
+// // just the `` part.
+// // - If it's any other literal, send it as is.
+// // If the `app_profile_id` is empty, and the `table_name` starts with
+// // the project_id, send that instead.
+//
+// routing_parameters {
+// field: "table_name"
+// path_template: "projects/*/{table_location=instances/*}/tables/*"
+// }
+// routing_parameters {
+// field: "table_name"
+// path_template: "{table_location=regions/*/zones/*}/tables/*"
+// }
+// routing_parameters {
+// field: "table_name"
+// path_template: "{routing_id=projects/*}/**"
+// }
+// routing_parameters {
+// field: "app_profile_id"
+// path_template: "{routing_id=**}"
+// }
+// routing_parameters {
+// field: "app_profile_id"
+// path_template: "profiles/{routing_id=*}"
+// }
+// };
+//
+// result:
+//
+// x-goog-request-params:
+// table_location=instances/instance_bar&routing_id=prof_qux
+type RoutingRule struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // A collection of Routing Parameter specifications.
+ // **NOTE:** If multiple Routing Parameters describe the same key
+ // (via the `path_template` field or via the `field` field when
+ // `path_template` is not provided), "last one wins" rule
+ // determines which Parameter gets used.
+ // See the examples for more details.
+ RoutingParameters []*RoutingParameter `protobuf:"bytes,2,rep,name=routing_parameters,json=routingParameters,proto3" json:"routing_parameters,omitempty"`
+}
+
+func (x *RoutingRule) Reset() {
+ *x = RoutingRule{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_google_api_routing_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RoutingRule) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RoutingRule) ProtoMessage() {}
+
+func (x *RoutingRule) ProtoReflect() protoreflect.Message {
+ mi := &file_google_api_routing_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RoutingRule.ProtoReflect.Descriptor instead.
+func (*RoutingRule) Descriptor() ([]byte, []int) {
+ return file_google_api_routing_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *RoutingRule) GetRoutingParameters() []*RoutingParameter {
+ if x != nil {
+ return x.RoutingParameters
+ }
+ return nil
+}
+
+// A projection from an input message to the GRPC or REST header.
+type RoutingParameter struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // A request field to extract the header key-value pair from.
+ Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"`
+ // A pattern matching the key-value field. Optional.
+ // If not specified, the whole field specified in the `field` field will be
+ // taken as value, and its name used as key. If specified, it MUST contain
+ // exactly one named segment (along with any number of unnamed segments) The
+ // pattern will be matched over the field specified in the `field` field, then
+ // if the match is successful:
+ // - the name of the single named segment will be used as a header name,
+ // - the match value of the segment will be used as a header value;
+ // if the match is NOT successful, nothing will be sent.
+ //
+ // Example:
+ //
+ // -- This is a field in the request message
+ // | that the header value will be extracted from.
+ // |
+ // | -- This is the key name in the
+ // | | routing header.
+ // V |
+ // field: "table_name" v
+ // path_template: "projects/*/{table_location=instances/*}/tables/*"
+ // ^ ^
+ // | |
+ // In the {} brackets is the pattern that -- |
+ // specifies what to extract from the |
+ // field as a value to be sent. |
+ // |
+ // The string in the field must match the whole pattern --
+ // before brackets, inside brackets, after brackets.
+ //
+ // When looking at this specific example, we can see that:
+ // - A key-value pair with the key `table_location`
+ // and the value matching `instances/*` should be added
+ // to the x-goog-request-params routing header.
+ // - The value is extracted from the request message's `table_name` field
+ // if it matches the full pattern specified:
+ // `projects/*/instances/*/tables/*`.
+ //
+ // **NB:** If the `path_template` field is not provided, the key name is
+ // equal to the field name, and the whole field should be sent as a value.
+ // This makes the pattern for the field and the value functionally equivalent
+ // to `**`, and the configuration
+ //
+ // {
+ // field: "table_name"
+ // }
+ //
+ // is a functionally equivalent shorthand to:
+ //
+ // {
+ // field: "table_name"
+ // path_template: "{table_name=**}"
+ // }
+ //
+ // See Example 1 for more details.
+ PathTemplate string `protobuf:"bytes,2,opt,name=path_template,json=pathTemplate,proto3" json:"path_template,omitempty"`
+}
+
+func (x *RoutingParameter) Reset() {
+ *x = RoutingParameter{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_google_api_routing_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RoutingParameter) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RoutingParameter) ProtoMessage() {}
+
+func (x *RoutingParameter) ProtoReflect() protoreflect.Message {
+ mi := &file_google_api_routing_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RoutingParameter.ProtoReflect.Descriptor instead.
+func (*RoutingParameter) Descriptor() ([]byte, []int) {
+ return file_google_api_routing_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *RoutingParameter) GetField() string {
+ if x != nil {
+ return x.Field
+ }
+ return ""
+}
+
+func (x *RoutingParameter) GetPathTemplate() string {
+ if x != nil {
+ return x.PathTemplate
+ }
+ return ""
+}
+
+var file_google_api_routing_proto_extTypes = []protoimpl.ExtensionInfo{
+ {
+ ExtendedType: (*descriptorpb.MethodOptions)(nil),
+ ExtensionType: (*RoutingRule)(nil),
+ Field: 72295729,
+ Name: "google.api.routing",
+ Tag: "bytes,72295729,opt,name=routing",
+ Filename: "google/api/routing.proto",
+ },
+}
+
+// Extension fields to descriptorpb.MethodOptions.
+var (
+ // See RoutingRule.
+ //
+ // optional google.api.RoutingRule routing = 72295729;
+ E_Routing = &file_google_api_routing_proto_extTypes[0]
+)
+
+var File_google_api_routing_proto protoreflect.FileDescriptor
+
+var file_google_api_routing_proto_rawDesc = []byte{
+ 0x0a, 0x18, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x6f, 0x75,
+ 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
+ 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5a, 0x0a, 0x0b, 0x52, 0x6f, 0x75, 0x74,
+ 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x4b, 0x0a, 0x12, 0x72, 0x6f, 0x75, 0x74, 0x69,
+ 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69,
+ 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65,
+ 0x72, 0x52, 0x11, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65,
+ 0x74, 0x65, 0x72, 0x73, 0x22, 0x4d, 0x0a, 0x10, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50,
+ 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c,
+ 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x23,
+ 0x0a, 0x0d, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x61, 0x74, 0x68, 0x54, 0x65, 0x6d, 0x70, 0x6c,
+ 0x61, 0x74, 0x65, 0x3a, 0x54, 0x0a, 0x07, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1e,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xb1,
+ 0xca, 0xbc, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65,
+ 0x52, 0x07, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x42, 0x6a, 0x0a, 0x0e, 0x63, 0x6f, 0x6d,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0c, 0x52, 0x6f, 0x75,
+ 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67,
+ 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70,
+ 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x3b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xa2, 0x02,
+ 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_google_api_routing_proto_rawDescOnce sync.Once
+ file_google_api_routing_proto_rawDescData = file_google_api_routing_proto_rawDesc
+)
+
+func file_google_api_routing_proto_rawDescGZIP() []byte {
+ file_google_api_routing_proto_rawDescOnce.Do(func() {
+ file_google_api_routing_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_routing_proto_rawDescData)
+ })
+ return file_google_api_routing_proto_rawDescData
+}
+
+var file_google_api_routing_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_google_api_routing_proto_goTypes = []interface{}{
+ (*RoutingRule)(nil), // 0: google.api.RoutingRule
+ (*RoutingParameter)(nil), // 1: google.api.RoutingParameter
+ (*descriptorpb.MethodOptions)(nil), // 2: google.protobuf.MethodOptions
+}
+var file_google_api_routing_proto_depIdxs = []int32{
+ 1, // 0: google.api.RoutingRule.routing_parameters:type_name -> google.api.RoutingParameter
+ 2, // 1: google.api.routing:extendee -> google.protobuf.MethodOptions
+ 0, // 2: google.api.routing:type_name -> google.api.RoutingRule
+ 3, // [3:3] is the sub-list for method output_type
+ 3, // [3:3] is the sub-list for method input_type
+ 2, // [2:3] is the sub-list for extension type_name
+ 1, // [1:2] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_google_api_routing_proto_init() }
+func file_google_api_routing_proto_init() {
+ if File_google_api_routing_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_google_api_routing_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RoutingRule); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_google_api_routing_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RoutingParameter); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_google_api_routing_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 1,
+ NumServices: 0,
+ },
+ GoTypes: file_google_api_routing_proto_goTypes,
+ DependencyIndexes: file_google_api_routing_proto_depIdxs,
+ MessageInfos: file_google_api_routing_proto_msgTypes,
+ ExtensionInfos: file_google_api_routing_proto_extTypes,
+ }.Build()
+ File_google_api_routing_proto = out.File
+ file_google_api_routing_proto_rawDesc = nil
+ file_google_api_routing_proto_goTypes = nil
+ file_google_api_routing_proto_depIdxs = nil
+}
diff --git a/cluster-autoscaler/vendor/google.golang.org/genproto/googleapis/api/httpbody/httpbody.pb.go b/cluster-autoscaler/vendor/google.golang.org/genproto/googleapis/api/httpbody/httpbody.pb.go
index b47efe82b200..7ea5ced87e0f 100644
--- a/cluster-autoscaler/vendor/google.golang.org/genproto/googleapis/api/httpbody/httpbody.pb.go
+++ b/cluster-autoscaler/vendor/google.golang.org/genproto/googleapis/api/httpbody/httpbody.pb.go
@@ -56,12 +56,15 @@ const (
//
// // The raw HTTP body is bound to this field.
// google.api.HttpBody http_body = 2;
+//
// }
//
// service ResourceService {
-// rpc GetResource(GetResourceRequest) returns (google.api.HttpBody);
-// rpc UpdateResource(google.api.HttpBody) returns
-// (google.protobuf.Empty);
+// rpc GetResource(GetResourceRequest)
+// returns (google.api.HttpBody);
+// rpc UpdateResource(google.api.HttpBody)
+// returns (google.protobuf.Empty);
+//
// }
//
// Example with streaming methods:
@@ -71,6 +74,7 @@ const (
// returns (stream google.api.HttpBody);
// rpc UpdateCalendar(stream google.api.HttpBody)
// returns (stream google.api.HttpBody);
+//
// }
//
// Use of this type only changes how the request and response bodies are
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/MAINTAINERS.md b/cluster-autoscaler/vendor/google.golang.org/grpc/MAINTAINERS.md
index 093c82b3afe8..c6672c0a3efe 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/MAINTAINERS.md
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/MAINTAINERS.md
@@ -8,17 +8,18 @@ See [CONTRIBUTING.md](https://github.com/grpc/grpc-community/blob/master/CONTRIB
for general contribution guidelines.
## Maintainers (in alphabetical order)
-- [canguler](https://github.com/canguler), Google LLC
+
- [cesarghali](https://github.com/cesarghali), Google LLC
- [dfawley](https://github.com/dfawley), Google LLC
- [easwars](https://github.com/easwars), Google LLC
-- [jadekler](https://github.com/jadekler), Google LLC
- [menghanl](https://github.com/menghanl), Google LLC
- [srini100](https://github.com/srini100), Google LLC
## Emeritus Maintainers (in alphabetical order)
- [adelez](https://github.com/adelez), Google LLC
+- [canguler](https://github.com/canguler), Google LLC
- [iamqizhao](https://github.com/iamqizhao), Google LLC
+- [jadekler](https://github.com/jadekler), Google LLC
- [jtattermusch](https://github.com/jtattermusch), Google LLC
- [lyuxuan](https://github.com/lyuxuan), Google LLC
- [makmukhi](https://github.com/makmukhi), Google LLC
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/Makefile b/cluster-autoscaler/vendor/google.golang.org/grpc/Makefile
index 1f0722f16243..1f8960922b3b 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/Makefile
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/Makefile
@@ -41,8 +41,6 @@ vetdeps:
clean \
proto \
test \
- testappengine \
- testappenginedeps \
testrace \
vet \
vetdeps
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/NOTICE.txt b/cluster-autoscaler/vendor/google.golang.org/grpc/NOTICE.txt
new file mode 100644
index 000000000000..530197749e9d
--- /dev/null
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/NOTICE.txt
@@ -0,0 +1,13 @@
+Copyright 2014 gRPC authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/attributes/attributes.go b/cluster-autoscaler/vendor/google.golang.org/grpc/attributes/attributes.go
index 3220d87be403..6ff2792ee4fa 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/attributes/attributes.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/attributes/attributes.go
@@ -25,55 +25,75 @@
// later release.
package attributes
-import "fmt"
-
// Attributes is an immutable struct for storing and retrieving generic
// key/value pairs. Keys must be hashable, and users should define their own
-// types for keys.
+// types for keys. Values should not be modified after they are added to an
+// Attributes or if they were received from one. If values implement 'Equal(o
+// interface{}) bool', it will be called by (*Attributes).Equal to determine
+// whether two values with the same key should be considered equal.
type Attributes struct {
m map[interface{}]interface{}
}
-// New returns a new Attributes containing all key/value pairs in kvs. If the
-// same key appears multiple times, the last value overwrites all previous
-// values for that key. Panics if len(kvs) is not even.
-func New(kvs ...interface{}) *Attributes {
- if len(kvs)%2 != 0 {
- panic(fmt.Sprintf("attributes.New called with unexpected input: len(kvs) = %v", len(kvs)))
- }
- a := &Attributes{m: make(map[interface{}]interface{}, len(kvs)/2)}
- for i := 0; i < len(kvs)/2; i++ {
- a.m[kvs[i*2]] = kvs[i*2+1]
- }
- return a
+// New returns a new Attributes containing the key/value pair.
+func New(key, value interface{}) *Attributes {
+ return &Attributes{m: map[interface{}]interface{}{key: value}}
}
-// WithValues returns a new Attributes containing all key/value pairs in a and
-// kvs. Panics if len(kvs) is not even. If the same key appears multiple
-// times, the last value overwrites all previous values for that key. To
-// remove an existing key, use a nil value.
-func (a *Attributes) WithValues(kvs ...interface{}) *Attributes {
+// WithValue returns a new Attributes containing the previous keys and values
+// and the new key/value pair. If the same key appears multiple times, the
+// last value overwrites all previous values for that key. To remove an
+// existing key, use a nil value. value should not be modified later.
+func (a *Attributes) WithValue(key, value interface{}) *Attributes {
if a == nil {
- return New(kvs...)
+ return New(key, value)
}
- if len(kvs)%2 != 0 {
- panic(fmt.Sprintf("attributes.New called with unexpected input: len(kvs) = %v", len(kvs)))
- }
- n := &Attributes{m: make(map[interface{}]interface{}, len(a.m)+len(kvs)/2)}
+ n := &Attributes{m: make(map[interface{}]interface{}, len(a.m)+1)}
for k, v := range a.m {
n.m[k] = v
}
- for i := 0; i < len(kvs)/2; i++ {
- n.m[kvs[i*2]] = kvs[i*2+1]
- }
+ n.m[key] = value
return n
}
// Value returns the value associated with these attributes for key, or nil if
-// no value is associated with key.
+// no value is associated with key. The returned value should not be modified.
func (a *Attributes) Value(key interface{}) interface{} {
if a == nil {
return nil
}
return a.m[key]
}
+
+// Equal returns whether a and o are equivalent. If 'Equal(o interface{})
+// bool' is implemented for a value in the attributes, it is called to
+// determine if the value matches the one stored in the other attributes. If
+// Equal is not implemented, standard equality is used to determine if the two
+// values are equal.
+func (a *Attributes) Equal(o *Attributes) bool {
+ if a == nil && o == nil {
+ return true
+ }
+ if a == nil || o == nil {
+ return false
+ }
+ if len(a.m) != len(o.m) {
+ return false
+ }
+ for k, v := range a.m {
+ ov, ok := o.m[k]
+ if !ok {
+ // o missing element of a
+ return false
+ }
+ if eq, ok := v.(interface{ Equal(o interface{}) bool }); ok {
+ if !eq.Equal(ov) {
+ return false
+ }
+ } else if v != ov {
+ // Fallback to a standard equality check if Value is unimplemented.
+ return false
+ }
+ }
+ return true
+}
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/balancer/balancer.go b/cluster-autoscaler/vendor/google.golang.org/grpc/balancer/balancer.go
index ab531f4c0b80..178de0898aa4 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/balancer/balancer.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/balancer/balancer.go
@@ -75,24 +75,26 @@ func Get(name string) Builder {
return nil
}
-// SubConn represents a gRPC sub connection.
-// Each sub connection contains a list of addresses. gRPC will
-// try to connect to them (in sequence), and stop trying the
-// remainder once one connection is successful.
+// A SubConn represents a single connection to a gRPC backend service.
//
-// The reconnect backoff will be applied on the list, not a single address.
-// For example, try_on_all_addresses -> backoff -> try_on_all_addresses.
+// Each SubConn contains a list of addresses.
//
-// All SubConns start in IDLE, and will not try to connect. To trigger
-// the connecting, Balancers must call Connect.
-// When the connection encounters an error, it will reconnect immediately.
-// When the connection becomes IDLE, it will not reconnect unless Connect is
-// called.
+// All SubConns start in IDLE, and will not try to connect. To trigger the
+// connecting, Balancers must call Connect. If a connection re-enters IDLE,
+// Balancers must call Connect again to trigger a new connection attempt.
//
-// This interface is to be implemented by gRPC. Users should not need a
-// brand new implementation of this interface. For the situations like
-// testing, the new implementation should embed this interface. This allows
-// gRPC to add new methods to this interface.
+// gRPC will try to connect to the addresses in sequence, and stop trying the
+// remainder once the first connection is successful. If an attempt to connect
+// to all addresses encounters an error, the SubConn will enter
+// TRANSIENT_FAILURE for a backoff period, and then transition to IDLE.
+//
+// Once established, if a connection is lost, the SubConn will transition
+// directly to IDLE.
+//
+// This interface is to be implemented by gRPC. Users should not need their own
+// implementation of this interface. For situations like testing, any
+// implementations should embed this interface. This allows gRPC to add new
+// methods to this interface.
type SubConn interface {
// UpdateAddresses updates the addresses used in this SubConn.
// gRPC checks if currently-connected address is still in the new list.
@@ -326,6 +328,20 @@ type Balancer interface {
Close()
}
+// ExitIdler is an optional interface for balancers to implement. If
+// implemented, ExitIdle will be called when ClientConn.Connect is called, if
+// the ClientConn is idle. If unimplemented, ClientConn.Connect will cause
+// all SubConns to connect.
+//
+// Notice: it will be required for all balancers to implement this in a future
+// release.
+type ExitIdler interface {
+ // ExitIdle instructs the LB policy to reconnect to backends / exit the
+ // IDLE state, if appropriate and possible. Note that SubConns that enter
+ // the IDLE state will not reconnect until SubConn.Connect is called.
+ ExitIdle()
+}
+
// SubConnState describes the state of a SubConn.
type SubConnState struct {
// ConnectivityState is the connectivity state of the SubConn.
@@ -353,8 +369,10 @@ var ErrBadResolverState = errors.New("bad resolver state")
//
// It's not thread safe.
type ConnectivityStateEvaluator struct {
- numReady uint64 // Number of addrConns in ready state.
- numConnecting uint64 // Number of addrConns in connecting state.
+ numReady uint64 // Number of addrConns in ready state.
+ numConnecting uint64 // Number of addrConns in connecting state.
+ numTransientFailure uint64 // Number of addrConns in transient failure state.
+ numIdle uint64 // Number of addrConns in idle state.
}
// RecordTransition records state change happening in subConn and based on that
@@ -362,9 +380,11 @@ type ConnectivityStateEvaluator struct {
//
// - If at least one SubConn in Ready, the aggregated state is Ready;
// - Else if at least one SubConn in Connecting, the aggregated state is Connecting;
-// - Else the aggregated state is TransientFailure.
+// - Else if at least one SubConn is TransientFailure, the aggregated state is Transient Failure;
+// - Else if at least one SubConn is Idle, the aggregated state is Idle;
+// - Else there are no subconns and the aggregated state is Transient Failure
//
-// Idle and Shutdown are not considered.
+// Shutdown is not considered.
func (cse *ConnectivityStateEvaluator) RecordTransition(oldState, newState connectivity.State) connectivity.State {
// Update counters.
for idx, state := range []connectivity.State{oldState, newState} {
@@ -374,6 +394,10 @@ func (cse *ConnectivityStateEvaluator) RecordTransition(oldState, newState conne
cse.numReady += updateVal
case connectivity.Connecting:
cse.numConnecting += updateVal
+ case connectivity.TransientFailure:
+ cse.numTransientFailure += updateVal
+ case connectivity.Idle:
+ cse.numIdle += updateVal
}
}
@@ -384,5 +408,11 @@ func (cse *ConnectivityStateEvaluator) RecordTransition(oldState, newState conne
if cse.numConnecting > 0 {
return connectivity.Connecting
}
+ if cse.numTransientFailure > 0 {
+ return connectivity.TransientFailure
+ }
+ if cse.numIdle > 0 {
+ return connectivity.Idle
+ }
return connectivity.TransientFailure
}
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/balancer/base/balancer.go b/cluster-autoscaler/vendor/google.golang.org/grpc/balancer/base/balancer.go
index c883efa0bbf5..a67074a3ad06 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/balancer/base/balancer.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/balancer/base/balancer.go
@@ -22,7 +22,6 @@ import (
"errors"
"fmt"
- "google.golang.org/grpc/attributes"
"google.golang.org/grpc/balancer"
"google.golang.org/grpc/connectivity"
"google.golang.org/grpc/grpclog"
@@ -42,7 +41,7 @@ func (bb *baseBuilder) Build(cc balancer.ClientConn, opt balancer.BuildOptions)
cc: cc,
pickerBuilder: bb.pickerBuilder,
- subConns: make(map[resolver.Address]subConnInfo),
+ subConns: resolver.NewAddressMap(),
scStates: make(map[balancer.SubConn]connectivity.State),
csEvltr: &balancer.ConnectivityStateEvaluator{},
config: bb.config,
@@ -58,11 +57,6 @@ func (bb *baseBuilder) Name() string {
return bb.name
}
-type subConnInfo struct {
- subConn balancer.SubConn
- attrs *attributes.Attributes
-}
-
type baseBalancer struct {
cc balancer.ClientConn
pickerBuilder PickerBuilder
@@ -70,7 +64,7 @@ type baseBalancer struct {
csEvltr *balancer.ConnectivityStateEvaluator
state connectivity.State
- subConns map[resolver.Address]subConnInfo // `attributes` is stripped from the keys of this map (the addresses)
+ subConns *resolver.AddressMap
scStates map[balancer.SubConn]connectivity.State
picker balancer.Picker
config Config
@@ -81,7 +75,7 @@ type baseBalancer struct {
func (b *baseBalancer) ResolverError(err error) {
b.resolverErr = err
- if len(b.subConns) == 0 {
+ if b.subConns.Len() == 0 {
b.state = connectivity.TransientFailure
}
@@ -105,52 +99,29 @@ func (b *baseBalancer) UpdateClientConnState(s balancer.ClientConnState) error {
// Successful resolution; clear resolver error and ensure we return nil.
b.resolverErr = nil
// addrsSet is the set converted from addrs, it's used for quick lookup of an address.
- addrsSet := make(map[resolver.Address]struct{})
+ addrsSet := resolver.NewAddressMap()
for _, a := range s.ResolverState.Addresses {
- // Strip attributes from addresses before using them as map keys. So
- // that when two addresses only differ in attributes pointers (but with
- // the same attribute content), they are considered the same address.
- //
- // Note that this doesn't handle the case where the attribute content is
- // different. So if users want to set different attributes to create
- // duplicate connections to the same backend, it doesn't work. This is
- // fine for now, because duplicate is done by setting Metadata today.
- //
- // TODO: read attributes to handle duplicate connections.
- aNoAttrs := a
- aNoAttrs.Attributes = nil
- addrsSet[aNoAttrs] = struct{}{}
- if scInfo, ok := b.subConns[aNoAttrs]; !ok {
+ addrsSet.Set(a, nil)
+ if _, ok := b.subConns.Get(a); !ok {
// a is a new address (not existing in b.subConns).
- //
- // When creating SubConn, the original address with attributes is
- // passed through. So that connection configurations in attributes
- // (like creds) will be used.
sc, err := b.cc.NewSubConn([]resolver.Address{a}, balancer.NewSubConnOptions{HealthCheckEnabled: b.config.HealthCheck})
if err != nil {
logger.Warningf("base.baseBalancer: failed to create new SubConn: %v", err)
continue
}
- b.subConns[aNoAttrs] = subConnInfo{subConn: sc, attrs: a.Attributes}
+ b.subConns.Set(a, sc)
b.scStates[sc] = connectivity.Idle
+ b.csEvltr.RecordTransition(connectivity.Shutdown, connectivity.Idle)
sc.Connect()
- } else {
- // Always update the subconn's address in case the attributes
- // changed.
- //
- // The SubConn does a reflect.DeepEqual of the new and old
- // addresses. So this is a noop if the current address is the same
- // as the old one (including attributes).
- scInfo.attrs = a.Attributes
- b.subConns[aNoAttrs] = scInfo
- b.cc.UpdateAddresses(scInfo.subConn, []resolver.Address{a})
}
}
- for a, scInfo := range b.subConns {
+ for _, a := range b.subConns.Keys() {
+ sci, _ := b.subConns.Get(a)
+ sc := sci.(balancer.SubConn)
// a was removed by resolver.
- if _, ok := addrsSet[a]; !ok {
- b.cc.RemoveSubConn(scInfo.subConn)
- delete(b.subConns, a)
+ if _, ok := addrsSet.Get(a); !ok {
+ b.cc.RemoveSubConn(sc)
+ b.subConns.Delete(a)
// Keep the state of this sc in b.scStates until sc's state becomes Shutdown.
// The entry will be deleted in UpdateSubConnState.
}
@@ -192,10 +163,11 @@ func (b *baseBalancer) regeneratePicker() {
readySCs := make(map[balancer.SubConn]SubConnInfo)
// Filter out all ready SCs from full subConn map.
- for addr, scInfo := range b.subConns {
- if st, ok := b.scStates[scInfo.subConn]; ok && st == connectivity.Ready {
- addr.Attributes = scInfo.attrs
- readySCs[scInfo.subConn] = SubConnInfo{Address: addr}
+ for _, addr := range b.subConns.Keys() {
+ sci, _ := b.subConns.Get(addr)
+ sc := sci.(balancer.SubConn)
+ if st, ok := b.scStates[sc]; ok && st == connectivity.Ready {
+ readySCs[sc] = SubConnInfo{Address: addr}
}
}
b.picker = b.pickerBuilder.Build(PickerBuildInfo{ReadySCs: readySCs})
@@ -213,10 +185,14 @@ func (b *baseBalancer) UpdateSubConnState(sc balancer.SubConn, state balancer.Su
}
return
}
- if oldS == connectivity.TransientFailure && s == connectivity.Connecting {
- // Once a subconn enters TRANSIENT_FAILURE, ignore subsequent
+ if oldS == connectivity.TransientFailure &&
+ (s == connectivity.Connecting || s == connectivity.Idle) {
+ // Once a subconn enters TRANSIENT_FAILURE, ignore subsequent IDLE or
// CONNECTING transitions to prevent the aggregated state from being
// always CONNECTING when many backends exist but are all down.
+ if s == connectivity.Idle {
+ sc.Connect()
+ }
return
}
b.scStates[sc] = s
@@ -242,7 +218,6 @@ func (b *baseBalancer) UpdateSubConnState(sc balancer.SubConn, state balancer.Su
b.state == connectivity.TransientFailure {
b.regeneratePicker()
}
-
b.cc.UpdateState(balancer.State{ConnectivityState: b.state, Picker: b.picker})
}
@@ -251,6 +226,11 @@ func (b *baseBalancer) UpdateSubConnState(sc balancer.SubConn, state balancer.Su
func (b *baseBalancer) Close() {
}
+// ExitIdle is a nop because the base balancer attempts to stay connected to
+// all SubConns at all times.
+func (b *baseBalancer) ExitIdle() {
+}
+
// NewErrPicker returns a Picker that always returns err on Pick().
func NewErrPicker(err error) balancer.Picker {
return &errPicker{err: err}
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/balancer/grpclb/state/state.go b/cluster-autoscaler/vendor/google.golang.org/grpc/balancer/grpclb/state/state.go
index a24264a34f5f..4ecfa1c21511 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/balancer/grpclb/state/state.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/balancer/grpclb/state/state.go
@@ -39,7 +39,7 @@ type State struct {
// Set returns a copy of the provided state with attributes containing s. s's
// data should not be mutated after calling Set.
func Set(state resolver.State, s *State) resolver.State {
- state.Attributes = state.Attributes.WithValues(key, s)
+ state.Attributes = state.Attributes.WithValue(key, s)
return state
}
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go b/cluster-autoscaler/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go
index 43c2a15373a1..274eb2f85802 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go
@@ -47,11 +47,11 @@ func init() {
type rrPickerBuilder struct{}
func (*rrPickerBuilder) Build(info base.PickerBuildInfo) balancer.Picker {
- logger.Infof("roundrobinPicker: newPicker called with info: %v", info)
+ logger.Infof("roundrobinPicker: Build called with info: %v", info)
if len(info.ReadySCs) == 0 {
return base.NewErrPicker(balancer.ErrNoSubConnAvailable)
}
- var scs []balancer.SubConn
+ scs := make([]balancer.SubConn, 0, len(info.ReadySCs))
for sc := range info.ReadySCs {
scs = append(scs, sc)
}
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/balancer_conn_wrappers.go b/cluster-autoscaler/vendor/google.golang.org/grpc/balancer_conn_wrappers.go
index dd8397963974..f4ea61746823 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/balancer_conn_wrappers.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/balancer_conn_wrappers.go
@@ -37,15 +37,20 @@ type scStateUpdate struct {
err error
}
+// exitIdle contains no data and is just a signal sent on the updateCh in
+// ccBalancerWrapper to instruct the balancer to exit idle.
+type exitIdle struct{}
+
// ccBalancerWrapper is a wrapper on top of cc for balancers.
// It implements balancer.ClientConn interface.
type ccBalancerWrapper struct {
- cc *ClientConn
- balancerMu sync.Mutex // synchronizes calls to the balancer
- balancer balancer.Balancer
- updateCh *buffer.Unbounded
- closed *grpcsync.Event
- done *grpcsync.Event
+ cc *ClientConn
+ balancerMu sync.Mutex // synchronizes calls to the balancer
+ balancer balancer.Balancer
+ hasExitIdle bool
+ updateCh *buffer.Unbounded
+ closed *grpcsync.Event
+ done *grpcsync.Event
mu sync.Mutex
subConns map[*acBalancerWrapper]struct{}
@@ -61,6 +66,7 @@ func newCCBalancerWrapper(cc *ClientConn, b balancer.Builder, bopts balancer.Bui
}
go ccb.watcher()
ccb.balancer = b.Build(ccb, bopts)
+ _, ccb.hasExitIdle = ccb.balancer.(balancer.ExitIdler)
return ccb
}
@@ -86,6 +92,17 @@ func (ccb *ccBalancerWrapper) watcher() {
ccb.cc.removeAddrConn(u.getAddrConn(), errConnDrain)
}
ccb.mu.Unlock()
+ case exitIdle:
+ if ccb.cc.GetState() == connectivity.Idle {
+ if ei, ok := ccb.balancer.(balancer.ExitIdler); ok {
+ // We already checked that the balancer implements
+ // ExitIdle before pushing the event to updateCh, but
+ // check conditionally again as defensive programming.
+ ccb.balancerMu.Lock()
+ ei.ExitIdle()
+ ccb.balancerMu.Unlock()
+ }
+ }
default:
logger.Errorf("ccBalancerWrapper.watcher: unknown update %+v, type %T", t, t)
}
@@ -118,6 +135,14 @@ func (ccb *ccBalancerWrapper) close() {
<-ccb.done.Done()
}
+func (ccb *ccBalancerWrapper) exitIdle() bool {
+ if !ccb.hasExitIdle {
+ return false
+ }
+ ccb.updateCh.Put(exitIdle{})
+ return true
+}
+
func (ccb *ccBalancerWrapper) handleSubConnStateChange(sc balancer.SubConn, s connectivity.State, err error) {
// When updating addresses for a SubConn, if the address in use is not in
// the new addresses, the old ac will be tearDown() and a new ac will be
@@ -144,8 +169,8 @@ func (ccb *ccBalancerWrapper) updateClientConnState(ccs *balancer.ClientConnStat
func (ccb *ccBalancerWrapper) resolverError(err error) {
ccb.balancerMu.Lock()
+ defer ccb.balancerMu.Unlock()
ccb.balancer.ResolverError(err)
- ccb.balancerMu.Unlock()
}
func (ccb *ccBalancerWrapper) NewSubConn(addrs []resolver.Address, opts balancer.NewSubConnOptions) (balancer.SubConn, error) {
@@ -239,17 +264,17 @@ func (acbw *acBalancerWrapper) UpdateAddresses(addrs []resolver.Address) {
return
}
- ac, err := cc.newAddrConn(addrs, opts)
+ newAC, err := cc.newAddrConn(addrs, opts)
if err != nil {
channelz.Warningf(logger, acbw.ac.channelzID, "acBalancerWrapper: UpdateAddresses: failed to newAddrConn: %v", err)
return
}
- acbw.ac = ac
- ac.mu.Lock()
- ac.acbw = acbw
- ac.mu.Unlock()
+ acbw.ac = newAC
+ newAC.mu.Lock()
+ newAC.acbw = acbw
+ newAC.mu.Unlock()
if acState != connectivity.Idle {
- ac.connect()
+ go newAC.connect()
}
}
}
@@ -257,7 +282,7 @@ func (acbw *acBalancerWrapper) UpdateAddresses(addrs []resolver.Address) {
func (acbw *acBalancerWrapper) Connect() {
acbw.mu.Lock()
defer acbw.mu.Unlock()
- acbw.ac.connect()
+ go acbw.ac.connect()
}
func (acbw *acBalancerWrapper) getAddrConn() *addrConn {
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/clientconn.go b/cluster-autoscaler/vendor/google.golang.org/grpc/clientconn.go
index b2bccfed136e..5a9e7d754fe2 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/clientconn.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/clientconn.go
@@ -23,6 +23,7 @@ import (
"errors"
"fmt"
"math"
+ "net/url"
"reflect"
"strings"
"sync"
@@ -37,7 +38,6 @@ import (
"google.golang.org/grpc/internal/backoff"
"google.golang.org/grpc/internal/channelz"
"google.golang.org/grpc/internal/grpcsync"
- "google.golang.org/grpc/internal/grpcutil"
iresolver "google.golang.org/grpc/internal/resolver"
"google.golang.org/grpc/internal/transport"
"google.golang.org/grpc/keepalive"
@@ -248,38 +248,15 @@ func DialContext(ctx context.Context, target string, opts ...DialOption) (conn *
}
// Determine the resolver to use.
- cc.parsedTarget = grpcutil.ParseTarget(cc.target, cc.dopts.copts.Dialer != nil)
- channelz.Infof(logger, cc.channelzID, "parsed scheme: %q", cc.parsedTarget.Scheme)
- resolverBuilder := cc.getResolver(cc.parsedTarget.Scheme)
- if resolverBuilder == nil {
- // If resolver builder is still nil, the parsed target's scheme is
- // not registered. Fallback to default resolver and set Endpoint to
- // the original target.
- channelz.Infof(logger, cc.channelzID, "scheme %q not registered, fallback to default scheme", cc.parsedTarget.Scheme)
- cc.parsedTarget = resolver.Target{
- Scheme: resolver.GetDefaultScheme(),
- Endpoint: target,
- }
- resolverBuilder = cc.getResolver(cc.parsedTarget.Scheme)
- if resolverBuilder == nil {
- return nil, fmt.Errorf("could not get resolver for default scheme: %q", cc.parsedTarget.Scheme)
- }
+ resolverBuilder, err := cc.parseTargetAndFindResolver()
+ if err != nil {
+ return nil, err
}
-
- creds := cc.dopts.copts.TransportCredentials
- if creds != nil && creds.Info().ServerName != "" {
- cc.authority = creds.Info().ServerName
- } else if cc.dopts.insecure && cc.dopts.authority != "" {
- cc.authority = cc.dopts.authority
- } else if strings.HasPrefix(cc.target, "unix:") || strings.HasPrefix(cc.target, "unix-abstract:") {
- cc.authority = "localhost"
- } else if strings.HasPrefix(cc.parsedTarget.Endpoint, ":") {
- cc.authority = "localhost" + cc.parsedTarget.Endpoint
- } else {
- // Use endpoint from "scheme://authority/endpoint" as the default
- // authority for ClientConn.
- cc.authority = cc.parsedTarget.Endpoint
+ cc.authority, err = determineAuthority(cc.parsedTarget.Endpoint, cc.target, cc.dopts)
+ if err != nil {
+ return nil, err
}
+ channelz.Infof(logger, cc.channelzID, "Channel authority set to %q", cc.authority)
if cc.dopts.scChan != nil && !scSet {
// Blocking wait for the initial service config.
@@ -322,6 +299,7 @@ func DialContext(ctx context.Context, target string, opts ...DialOption) (conn *
// A blocking dial blocks until the clientConn is ready.
if cc.dopts.block {
for {
+ cc.Connect()
s := cc.GetState()
if s == connectivity.Ready {
break
@@ -539,12 +517,31 @@ func (cc *ClientConn) WaitForStateChange(ctx context.Context, sourceState connec
//
// Experimental
//
-// Notice: This API is EXPERIMENTAL and may be changed or removed in a
-// later release.
+// Notice: This API is EXPERIMENTAL and may be changed or removed in a later
+// release.
func (cc *ClientConn) GetState() connectivity.State {
return cc.csMgr.getState()
}
+// Connect causes all subchannels in the ClientConn to attempt to connect if
+// the channel is idle. Does not wait for the connection attempts to begin
+// before returning.
+//
+// Experimental
+//
+// Notice: This API is EXPERIMENTAL and may be changed or removed in a later
+// release.
+func (cc *ClientConn) Connect() {
+ cc.mu.Lock()
+ defer cc.mu.Unlock()
+ if cc.balancerWrapper != nil && cc.balancerWrapper.exitIdle() {
+ return
+ }
+ for ac := range cc.conns {
+ go ac.connect()
+ }
+}
+
func (cc *ClientConn) scWatcher() {
for {
select {
@@ -845,8 +842,7 @@ func (ac *addrConn) connect() error {
ac.updateConnectivityState(connectivity.Connecting, nil)
ac.mu.Unlock()
- // Start a goroutine connecting to the server asynchronously.
- go ac.resetTransport()
+ ac.resetTransport()
return nil
}
@@ -883,6 +879,7 @@ func (ac *addrConn) tryUpdateAddrs(addrs []resolver.Address) bool {
// ac.state is Ready, try to find the connected address.
var curAddrFound bool
for _, a := range addrs {
+ a.ServerName = ac.cc.getServerName(a)
if reflect.DeepEqual(ac.curAddr, a) {
curAddrFound = true
break
@@ -896,6 +893,26 @@ func (ac *addrConn) tryUpdateAddrs(addrs []resolver.Address) bool {
return curAddrFound
}
+// getServerName determines the serverName to be used in the connection
+// handshake. The default value for the serverName is the authority on the
+// ClientConn, which either comes from the user's dial target or through an
+// authority override specified using the WithAuthority dial option. Name
+// resolvers can specify a per-address override for the serverName through the
+// resolver.Address.ServerName field which is used only if the WithAuthority
+// dial option was not used. The rationale is that per-address authority
+// overrides specified by the name resolver can represent a security risk, while
+// an override specified by the user is more dependable since they probably know
+// what they are doing.
+func (cc *ClientConn) getServerName(addr resolver.Address) string {
+ if cc.dopts.authority != "" {
+ return cc.dopts.authority
+ }
+ if addr.ServerName != "" {
+ return addr.ServerName
+ }
+ return cc.authority
+}
+
func getMethodConfig(sc *ServiceConfig, method string) MethodConfig {
if sc == nil {
return MethodConfig{}
@@ -1135,112 +1152,86 @@ func (ac *addrConn) adjustParams(r transport.GoAwayReason) {
}
func (ac *addrConn) resetTransport() {
- for i := 0; ; i++ {
- if i > 0 {
- ac.cc.resolveNow(resolver.ResolveNowOptions{})
- }
+ ac.mu.Lock()
+ if ac.state == connectivity.Shutdown {
+ ac.mu.Unlock()
+ return
+ }
+
+ addrs := ac.addrs
+ backoffFor := ac.dopts.bs.Backoff(ac.backoffIdx)
+ // This will be the duration that dial gets to finish.
+ dialDuration := minConnectTimeout
+ if ac.dopts.minConnectTimeout != nil {
+ dialDuration = ac.dopts.minConnectTimeout()
+ }
+
+ if dialDuration < backoffFor {
+ // Give dial more time as we keep failing to connect.
+ dialDuration = backoffFor
+ }
+ // We can potentially spend all the time trying the first address, and
+ // if the server accepts the connection and then hangs, the following
+ // addresses will never be tried.
+ //
+ // The spec doesn't mention what should be done for multiple addresses.
+ // https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md#proposed-backoff-algorithm
+ connectDeadline := time.Now().Add(dialDuration)
+
+ ac.updateConnectivityState(connectivity.Connecting, nil)
+ ac.mu.Unlock()
+ if err := ac.tryAllAddrs(addrs, connectDeadline); err != nil {
+ ac.cc.resolveNow(resolver.ResolveNowOptions{})
+ // After exhausting all addresses, the addrConn enters
+ // TRANSIENT_FAILURE.
ac.mu.Lock()
if ac.state == connectivity.Shutdown {
ac.mu.Unlock()
return
}
+ ac.updateConnectivityState(connectivity.TransientFailure, err)
- addrs := ac.addrs
- backoffFor := ac.dopts.bs.Backoff(ac.backoffIdx)
- // This will be the duration that dial gets to finish.
- dialDuration := minConnectTimeout
- if ac.dopts.minConnectTimeout != nil {
- dialDuration = ac.dopts.minConnectTimeout()
- }
-
- if dialDuration < backoffFor {
- // Give dial more time as we keep failing to connect.
- dialDuration = backoffFor
- }
- // We can potentially spend all the time trying the first address, and
- // if the server accepts the connection and then hangs, the following
- // addresses will never be tried.
- //
- // The spec doesn't mention what should be done for multiple addresses.
- // https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md#proposed-backoff-algorithm
- connectDeadline := time.Now().Add(dialDuration)
-
- ac.updateConnectivityState(connectivity.Connecting, nil)
- ac.transport = nil
+ // Backoff.
+ b := ac.resetBackoff
ac.mu.Unlock()
- newTr, addr, reconnect, err := ac.tryAllAddrs(addrs, connectDeadline)
- if err != nil {
- // After exhausting all addresses, the addrConn enters
- // TRANSIENT_FAILURE.
+ timer := time.NewTimer(backoffFor)
+ select {
+ case <-timer.C:
ac.mu.Lock()
- if ac.state == connectivity.Shutdown {
- ac.mu.Unlock()
- return
- }
- ac.updateConnectivityState(connectivity.TransientFailure, err)
-
- // Backoff.
- b := ac.resetBackoff
+ ac.backoffIdx++
ac.mu.Unlock()
-
- timer := time.NewTimer(backoffFor)
- select {
- case <-timer.C:
- ac.mu.Lock()
- ac.backoffIdx++
- ac.mu.Unlock()
- case <-b:
- timer.Stop()
- case <-ac.ctx.Done():
- timer.Stop()
- return
- }
- continue
+ case <-b:
+ timer.Stop()
+ case <-ac.ctx.Done():
+ timer.Stop()
+ return
}
ac.mu.Lock()
- if ac.state == connectivity.Shutdown {
- ac.mu.Unlock()
- newTr.Close(fmt.Errorf("reached connectivity state: SHUTDOWN"))
- return
+ if ac.state != connectivity.Shutdown {
+ ac.updateConnectivityState(connectivity.Idle, err)
}
- ac.curAddr = addr
- ac.transport = newTr
- ac.backoffIdx = 0
-
- hctx, hcancel := context.WithCancel(ac.ctx)
- ac.startHealthCheck(hctx)
ac.mu.Unlock()
-
- // Block until the created transport is down. And when this happens,
- // we restart from the top of the addr list.
- <-reconnect.Done()
- hcancel()
- // restart connecting - the top of the loop will set state to
- // CONNECTING. This is against the current connectivity semantics doc,
- // however it allows for graceful behavior for RPCs not yet dispatched
- // - unfortunate timing would otherwise lead to the RPC failing even
- // though the TRANSIENT_FAILURE state (called for by the doc) would be
- // instantaneous.
- //
- // Ideally we should transition to Idle here and block until there is
- // RPC activity that leads to the balancer requesting a reconnect of
- // the associated SubConn.
+ return
}
+ // Success; reset backoff.
+ ac.mu.Lock()
+ ac.backoffIdx = 0
+ ac.mu.Unlock()
}
-// tryAllAddrs tries to creates a connection to the addresses, and stop when at the
-// first successful one. It returns the transport, the address and a Event in
-// the successful case. The Event fires when the returned transport disconnects.
-func (ac *addrConn) tryAllAddrs(addrs []resolver.Address, connectDeadline time.Time) (transport.ClientTransport, resolver.Address, *grpcsync.Event, error) {
+// tryAllAddrs tries to creates a connection to the addresses, and stop when at
+// the first successful one. It returns an error if no address was successfully
+// connected, or updates ac appropriately with the new transport.
+func (ac *addrConn) tryAllAddrs(addrs []resolver.Address, connectDeadline time.Time) error {
var firstConnErr error
for _, addr := range addrs {
ac.mu.Lock()
if ac.state == connectivity.Shutdown {
ac.mu.Unlock()
- return nil, resolver.Address{}, nil, errConnClosing
+ return errConnClosing
}
ac.cc.mu.RLock()
@@ -1255,9 +1246,9 @@ func (ac *addrConn) tryAllAddrs(addrs []resolver.Address, connectDeadline time.T
channelz.Infof(logger, ac.channelzID, "Subchannel picks a new address %q to connect", addr.Addr)
- newTr, reconnect, err := ac.createTransport(addr, copts, connectDeadline)
+ err := ac.createTransport(addr, copts, connectDeadline)
if err == nil {
- return newTr, addr, reconnect, nil
+ return nil
}
if firstConnErr == nil {
firstConnErr = err
@@ -1266,57 +1257,50 @@ func (ac *addrConn) tryAllAddrs(addrs []resolver.Address, connectDeadline time.T
}
// Couldn't connect to any address.
- return nil, resolver.Address{}, nil, firstConnErr
+ return firstConnErr
}
-// createTransport creates a connection to addr. It returns the transport and a
-// Event in the successful case. The Event fires when the returned transport
-// disconnects.
-func (ac *addrConn) createTransport(addr resolver.Address, copts transport.ConnectOptions, connectDeadline time.Time) (transport.ClientTransport, *grpcsync.Event, error) {
- prefaceReceived := make(chan struct{})
- onCloseCalled := make(chan struct{})
- reconnect := grpcsync.NewEvent()
+// createTransport creates a connection to addr. It returns an error if the
+// address was not successfully connected, or updates ac appropriately with the
+// new transport.
+func (ac *addrConn) createTransport(addr resolver.Address, copts transport.ConnectOptions, connectDeadline time.Time) error {
+ // TODO: Delete prefaceReceived and move the logic to wait for it into the
+ // transport.
+ prefaceReceived := grpcsync.NewEvent()
+ connClosed := grpcsync.NewEvent()
- // addr.ServerName takes precedent over ClientConn authority, if present.
- if addr.ServerName == "" {
- addr.ServerName = ac.cc.authority
- }
+ addr.ServerName = ac.cc.getServerName(addr)
+ hctx, hcancel := context.WithCancel(ac.ctx)
+ hcStarted := false // protected by ac.mu
- once := sync.Once{}
- onGoAway := func(r transport.GoAwayReason) {
+ onClose := func() {
ac.mu.Lock()
- ac.adjustParams(r)
- once.Do(func() {
- if ac.state == connectivity.Ready {
- // Prevent this SubConn from being used for new RPCs by setting its
- // state to Connecting.
- //
- // TODO: this should be Idle when grpc-go properly supports it.
- ac.updateConnectivityState(connectivity.Connecting, nil)
- }
- })
- ac.mu.Unlock()
- reconnect.Fire()
+ defer ac.mu.Unlock()
+ defer connClosed.Fire()
+ if !hcStarted || hctx.Err() != nil {
+ // We didn't start the health check or set the state to READY, so
+ // no need to do anything else here.
+ //
+ // OR, we have already cancelled the health check context, meaning
+ // we have already called onClose once for this transport. In this
+ // case it would be dangerous to clear the transport and update the
+ // state, since there may be a new transport in this addrConn.
+ return
+ }
+ hcancel()
+ ac.transport = nil
+ // Refresh the name resolver
+ ac.cc.resolveNow(resolver.ResolveNowOptions{})
+ if ac.state != connectivity.Shutdown {
+ ac.updateConnectivityState(connectivity.Idle, nil)
+ }
}
- onClose := func() {
+ onGoAway := func(r transport.GoAwayReason) {
ac.mu.Lock()
- once.Do(func() {
- if ac.state == connectivity.Ready {
- // Prevent this SubConn from being used for new RPCs by setting its
- // state to Connecting.
- //
- // TODO: this should be Idle when grpc-go properly supports it.
- ac.updateConnectivityState(connectivity.Connecting, nil)
- }
- })
+ ac.adjustParams(r)
ac.mu.Unlock()
- close(onCloseCalled)
- reconnect.Fire()
- }
-
- onPrefaceReceipt := func() {
- close(prefaceReceived)
+ onClose()
}
connectCtx, cancel := context.WithDeadline(ac.ctx, connectDeadline)
@@ -1325,27 +1309,67 @@ func (ac *addrConn) createTransport(addr resolver.Address, copts transport.Conne
copts.ChannelzParentID = ac.channelzID
}
- newTr, err := transport.NewClientTransport(connectCtx, ac.cc.ctx, addr, copts, onPrefaceReceipt, onGoAway, onClose)
+ newTr, err := transport.NewClientTransport(connectCtx, ac.cc.ctx, addr, copts, func() { prefaceReceived.Fire() }, onGoAway, onClose)
if err != nil {
// newTr is either nil, or closed.
- channelz.Warningf(logger, ac.channelzID, "grpc: addrConn.createTransport failed to connect to %v. Err: %v. Reconnecting...", addr, err)
- return nil, nil, err
+ channelz.Warningf(logger, ac.channelzID, "grpc: addrConn.createTransport failed to connect to %v. Err: %v", addr, err)
+ return err
}
select {
- case <-time.After(time.Until(connectDeadline)):
+ case <-connectCtx.Done():
// We didn't get the preface in time.
- newTr.Close(fmt.Errorf("failed to receive server preface within timeout"))
- channelz.Warningf(logger, ac.channelzID, "grpc: addrConn.createTransport failed to connect to %v: didn't receive server preface in time. Reconnecting...", addr)
- return nil, nil, errors.New("timed out waiting for server handshake")
- case <-prefaceReceived:
+ // The error we pass to Close() is immaterial since there are no open
+ // streams at this point, so no trailers with error details will be sent
+ // out. We just need to pass a non-nil error.
+ newTr.Close(transport.ErrConnClosing)
+ if connectCtx.Err() == context.DeadlineExceeded {
+ err := errors.New("failed to receive server preface within timeout")
+ channelz.Warningf(logger, ac.channelzID, "grpc: addrConn.createTransport failed to connect to %v: %v", addr, err)
+ return err
+ }
+ return nil
+ case <-prefaceReceived.Done():
// We got the preface - huzzah! things are good.
- case <-onCloseCalled:
- // The transport has already closed - noop.
- return nil, nil, errors.New("connection closed")
- // TODO(deklerk) this should bail on ac.ctx.Done(). Add a test and fix.
+ ac.mu.Lock()
+ defer ac.mu.Unlock()
+ if connClosed.HasFired() {
+ // onClose called first; go idle but do nothing else.
+ if ac.state != connectivity.Shutdown {
+ ac.updateConnectivityState(connectivity.Idle, nil)
+ }
+ return nil
+ }
+ if ac.state == connectivity.Shutdown {
+ // This can happen if the subConn was removed while in `Connecting`
+ // state. tearDown() would have set the state to `Shutdown`, but
+ // would not have closed the transport since ac.transport would not
+ // been set at that point.
+ //
+ // We run this in a goroutine because newTr.Close() calls onClose()
+ // inline, which requires locking ac.mu.
+ //
+ // The error we pass to Close() is immaterial since there are no open
+ // streams at this point, so no trailers with error details will be sent
+ // out. We just need to pass a non-nil error.
+ go newTr.Close(transport.ErrConnClosing)
+ return nil
+ }
+ ac.curAddr = addr
+ ac.transport = newTr
+ hcStarted = true
+ ac.startHealthCheck(hctx) // Will set state to READY if appropriate.
+ return nil
+ case <-connClosed.Done():
+ // The transport has already closed. If we received the preface, too,
+ // this is not an error.
+ select {
+ case <-prefaceReceived.Done():
+ return nil
+ default:
+ return errors.New("connection closed before server preface received")
+ }
}
- return newTr, reconnect, nil
}
// startHealthCheck starts the health checking stream (RPC) to watch the health
@@ -1587,3 +1611,114 @@ func (cc *ClientConn) connectionError() error {
defer cc.lceMu.Unlock()
return cc.lastConnectionError
}
+
+func (cc *ClientConn) parseTargetAndFindResolver() (resolver.Builder, error) {
+ channelz.Infof(logger, cc.channelzID, "original dial target is: %q", cc.target)
+
+ var rb resolver.Builder
+ parsedTarget, err := parseTarget(cc.target)
+ if err != nil {
+ channelz.Infof(logger, cc.channelzID, "dial target %q parse failed: %v", cc.target, err)
+ } else {
+ channelz.Infof(logger, cc.channelzID, "parsed dial target is: %+v", parsedTarget)
+ rb = cc.getResolver(parsedTarget.Scheme)
+ if rb != nil {
+ cc.parsedTarget = parsedTarget
+ return rb, nil
+ }
+ }
+
+ // We are here because the user's dial target did not contain a scheme or
+ // specified an unregistered scheme. We should fallback to the default
+ // scheme, except when a custom dialer is specified in which case, we should
+ // always use passthrough scheme.
+ defScheme := resolver.GetDefaultScheme()
+ channelz.Infof(logger, cc.channelzID, "fallback to scheme %q", defScheme)
+ canonicalTarget := defScheme + ":///" + cc.target
+
+ parsedTarget, err = parseTarget(canonicalTarget)
+ if err != nil {
+ channelz.Infof(logger, cc.channelzID, "dial target %q parse failed: %v", canonicalTarget, err)
+ return nil, err
+ }
+ channelz.Infof(logger, cc.channelzID, "parsed dial target is: %+v", parsedTarget)
+ rb = cc.getResolver(parsedTarget.Scheme)
+ if rb == nil {
+ return nil, fmt.Errorf("could not get resolver for default scheme: %q", parsedTarget.Scheme)
+ }
+ cc.parsedTarget = parsedTarget
+ return rb, nil
+}
+
+// parseTarget uses RFC 3986 semantics to parse the given target into a
+// resolver.Target struct containing scheme, authority and endpoint. Query
+// params are stripped from the endpoint.
+func parseTarget(target string) (resolver.Target, error) {
+ u, err := url.Parse(target)
+ if err != nil {
+ return resolver.Target{}, err
+ }
+ // For targets of the form "[scheme]://[authority]/endpoint, the endpoint
+ // value returned from url.Parse() contains a leading "/". Although this is
+ // in accordance with RFC 3986, we do not want to break existing resolver
+ // implementations which expect the endpoint without the leading "/". So, we
+ // end up stripping the leading "/" here. But this will result in an
+ // incorrect parsing for something like "unix:///path/to/socket". Since we
+ // own the "unix" resolver, we can workaround in the unix resolver by using
+ // the `URL` field instead of the `Endpoint` field.
+ endpoint := u.Path
+ if endpoint == "" {
+ endpoint = u.Opaque
+ }
+ endpoint = strings.TrimPrefix(endpoint, "/")
+ return resolver.Target{
+ Scheme: u.Scheme,
+ Authority: u.Host,
+ Endpoint: endpoint,
+ URL: *u,
+ }, nil
+}
+
+// Determine channel authority. The order of precedence is as follows:
+// - user specified authority override using `WithAuthority` dial option
+// - creds' notion of server name for the authentication handshake
+// - endpoint from dial target of the form "scheme://[authority]/endpoint"
+func determineAuthority(endpoint, target string, dopts dialOptions) (string, error) {
+ // Historically, we had two options for users to specify the serverName or
+ // authority for a channel. One was through the transport credentials
+ // (either in its constructor, or through the OverrideServerName() method).
+ // The other option (for cases where WithInsecure() dial option was used)
+ // was to use the WithAuthority() dial option.
+ //
+ // A few things have changed since:
+ // - `insecure` package with an implementation of the `TransportCredentials`
+ // interface for the insecure case
+ // - WithAuthority() dial option support for secure credentials
+ authorityFromCreds := ""
+ if creds := dopts.copts.TransportCredentials; creds != nil && creds.Info().ServerName != "" {
+ authorityFromCreds = creds.Info().ServerName
+ }
+ authorityFromDialOption := dopts.authority
+ if (authorityFromCreds != "" && authorityFromDialOption != "") && authorityFromCreds != authorityFromDialOption {
+ return "", fmt.Errorf("ClientConn's authority from transport creds %q and dial option %q don't match", authorityFromCreds, authorityFromDialOption)
+ }
+
+ switch {
+ case authorityFromDialOption != "":
+ return authorityFromDialOption, nil
+ case authorityFromCreds != "":
+ return authorityFromCreds, nil
+ case strings.HasPrefix(target, "unix:") || strings.HasPrefix(target, "unix-abstract:"):
+ // TODO: remove when the unix resolver implements optional interface to
+ // return channel authority.
+ return "localhost", nil
+ case strings.HasPrefix(endpoint, ":"):
+ return "localhost" + endpoint, nil
+ default:
+ // TODO: Define an optional interface on the resolver builder to return
+ // the channel authority given the user's dial target. For resolvers
+ // which don't implement this interface, we will use the endpoint from
+ // "scheme://authority/endpoint" as the default authority.
+ return endpoint, nil
+ }
+}
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/connectivity/connectivity.go b/cluster-autoscaler/vendor/google.golang.org/grpc/connectivity/connectivity.go
index 010156261505..4a89926422bc 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/connectivity/connectivity.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/connectivity/connectivity.go
@@ -18,7 +18,6 @@
// Package connectivity defines connectivity semantics.
// For details, see https://github.com/grpc/grpc/blob/master/doc/connectivity-semantics-and-api.md.
-// All APIs in this package are experimental.
package connectivity
import (
@@ -45,7 +44,7 @@ func (s State) String() string {
return "SHUTDOWN"
default:
logger.Errorf("unknown connectivity state: %d", s)
- return "Invalid-State"
+ return "INVALID_STATE"
}
}
@@ -61,3 +60,35 @@ const (
// Shutdown indicates the ClientConn has started shutting down.
Shutdown
)
+
+// ServingMode indicates the current mode of operation of the server.
+//
+// Only xDS enabled gRPC servers currently report their serving mode.
+type ServingMode int
+
+const (
+ // ServingModeStarting indicates that the server is starting up.
+ ServingModeStarting ServingMode = iota
+ // ServingModeServing indicates that the server contains all required
+ // configuration and is serving RPCs.
+ ServingModeServing
+ // ServingModeNotServing indicates that the server is not accepting new
+ // connections. Existing connections will be closed gracefully, allowing
+ // in-progress RPCs to complete. A server enters this mode when it does not
+ // contain the required configuration to serve RPCs.
+ ServingModeNotServing
+)
+
+func (s ServingMode) String() string {
+ switch s {
+ case ServingModeStarting:
+ return "STARTING"
+ case ServingModeServing:
+ return "SERVING"
+ case ServingModeNotServing:
+ return "NOT_SERVING"
+ default:
+ logger.Errorf("unknown serving mode: %d", s)
+ return "INVALID_MODE"
+ }
+}
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/credentials/credentials.go b/cluster-autoscaler/vendor/google.golang.org/grpc/credentials/credentials.go
index 7eee7e4ec126..a671107584f5 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/credentials/credentials.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/credentials/credentials.go
@@ -140,6 +140,11 @@ type TransportCredentials interface {
// Additionally, ClientHandshakeInfo data will be available via the context
// passed to this call.
//
+ // The second argument to this method is the `:authority` header value used
+ // while creating new streams on this connection after authentication
+ // succeeds. Implementations must use this as the server name during the
+ // authentication handshake.
+ //
// If the returned net.Conn is closed, it MUST close the net.Conn provided.
ClientHandshake(context.Context, string, net.Conn) (net.Conn, AuthInfo, error)
// ServerHandshake does the authentication handshake for servers. It returns
@@ -153,9 +158,13 @@ type TransportCredentials interface {
Info() ProtocolInfo
// Clone makes a copy of this TransportCredentials.
Clone() TransportCredentials
- // OverrideServerName overrides the server name used to verify the hostname on the returned certificates from the server.
- // gRPC internals also use it to override the virtual hosting name if it is set.
- // It must be called before dialing. Currently, this is only used by grpclb.
+ // OverrideServerName specifies the value used for the following:
+ // - verifying the hostname on the returned certificates
+ // - as SNI in the client's handshake to support virtual hosting
+ // - as the value for `:authority` header at stream creation time
+ //
+ // Deprecated: use grpc.WithAuthority instead. Will be supported
+ // throughout 1.x.
OverrideServerName(string) error
}
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/credentials/go12.go b/cluster-autoscaler/vendor/google.golang.org/grpc/credentials/go12.go
deleted file mode 100644
index ccbf35b33125..000000000000
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/credentials/go12.go
+++ /dev/null
@@ -1,30 +0,0 @@
-// +build go1.12
-
-/*
- *
- * Copyright 2019 gRPC authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package credentials
-
-import "crypto/tls"
-
-// This init function adds cipher suite constants only defined in Go 1.12.
-func init() {
- cipherSuiteLookup[tls.TLS_AES_128_GCM_SHA256] = "TLS_AES_128_GCM_SHA256"
- cipherSuiteLookup[tls.TLS_AES_256_GCM_SHA384] = "TLS_AES_256_GCM_SHA384"
- cipherSuiteLookup[tls.TLS_CHACHA20_POLY1305_SHA256] = "TLS_CHACHA20_POLY1305_SHA256"
-}
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/credentials/tls.go b/cluster-autoscaler/vendor/google.golang.org/grpc/credentials/tls.go
index 8ee7124f2265..784822d0560a 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/credentials/tls.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/credentials/tls.go
@@ -230,4 +230,7 @@ var cipherSuiteLookup = map[uint16]string{
tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256: "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256",
tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305: "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305",
tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305: "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305",
+ tls.TLS_AES_128_GCM_SHA256: "TLS_AES_128_GCM_SHA256",
+ tls.TLS_AES_256_GCM_SHA384: "TLS_AES_256_GCM_SHA384",
+ tls.TLS_CHACHA20_POLY1305_SHA256: "TLS_CHACHA20_POLY1305_SHA256",
}
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/dialoptions.go b/cluster-autoscaler/vendor/google.golang.org/grpc/dialoptions.go
index 7a497237bbd3..40d8ba6596ab 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/dialoptions.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/dialoptions.go
@@ -482,8 +482,7 @@ func WithChainStreamInterceptor(interceptors ...StreamClientInterceptor) DialOpt
}
// WithAuthority returns a DialOption that specifies the value to be used as the
-// :authority pseudo-header. This value only works with WithInsecure and has no
-// effect if TransportCredentials are present.
+// :authority pseudo-header and as the server name in authentication handshake.
func WithAuthority(a string) DialOption {
return newFuncDialOption(func(o *dialOptions) {
o.authority = a
@@ -519,14 +518,16 @@ func WithDisableServiceConfig() DialOption {
// WithDefaultServiceConfig returns a DialOption that configures the default
// service config, which will be used in cases where:
//
-// 1. WithDisableServiceConfig is also used.
-// 2. Resolver does not return a service config or if the resolver returns an
-// invalid service config.
+// 1. WithDisableServiceConfig is also used, or
//
-// Experimental
+// 2. The name resolver does not provide a service config or provides an
+// invalid service config.
//
-// Notice: This API is EXPERIMENTAL and may be changed or removed in a
-// later release.
+// The parameter s is the JSON representation of the default service config.
+// For more information about service configs, see:
+// https://github.com/grpc/grpc/blob/master/doc/service_config.md
+// For a simple example of usage, see:
+// examples/features/load_balancing/client/main.go
func WithDefaultServiceConfig(s string) DialOption {
return newFuncDialOption(func(o *dialOptions) {
o.defaultServiceConfigRawJSON = &s
@@ -538,14 +539,8 @@ func WithDefaultServiceConfig(s string) DialOption {
// will happen automatically if no data is written to the wire or if the RPC is
// unprocessed by the remote server.
//
-// Retry support is currently disabled by default, but will be enabled by
-// default in the future. Until then, it may be enabled by setting the
-// environment variable "GRPC_GO_RETRY" to "on".
-//
-// Experimental
-//
-// Notice: This API is EXPERIMENTAL and may be changed or removed in a
-// later release.
+// Retry support is currently enabled by default, but may be disabled by
+// setting the environment variable "GRPC_GO_RETRY" to "off".
func WithDisableRetry() DialOption {
return newFuncDialOption(func(o *dialOptions) {
o.disableRetry = true
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/go.mod b/cluster-autoscaler/vendor/google.golang.org/grpc/go.mod
index 2f2cf1eb7669..fcffdceef25c 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/go.mod
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/go.mod
@@ -1,11 +1,12 @@
module google.golang.org/grpc
-go 1.11
+go 1.14
require (
- github.com/cespare/xxhash v1.1.0
- github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403
- github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0
+ github.com/cespare/xxhash/v2 v2.1.1
+ github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4
+ github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1
+ github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
github.com/golang/protobuf v1.4.3
github.com/google/go-cmp v0.5.0
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/go.sum b/cluster-autoscaler/vendor/google.golang.org/grpc/go.sum
index 372b4ea3d201..8b542e0beb65 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/go.sum
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/go.sum
@@ -2,27 +2,28 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT
cloud.google.com/go v0.34.0 h1:eOI3/cP2VTU6uZLDYAoic+eyzzB9YyGmJ7eIjl8rOPg=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
-github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE=
-github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
-github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
-github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
+github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=
+github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
-github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403 h1:cqQfy1jclcSy/FwLjemeg3SR1yaINm74aQyupQ0Bl8M=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
-github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed h1:OZmjad4L3H8ncOIR8rnb5MREYqG8ixi5+WbeUsquF0c=
-github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
+github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4 h1:hzAQntlaYRkVSFEfj9OTWlVV1H155FMD8BTKktLv0QI=
+github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
+github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
+github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
+github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1 h1:zH8ljVhhq7yC0MIeUL/IviMtY8hx2mK8cN9wEYb8ggw=
+github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
-github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0 h1:dulLQAYQFYtG5MTplgNGHWuV2D+OBD+Z8lmDBmbLg+s=
-github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ=
+github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021 h1:fP+fF0up6oPY49OrjPrhIJ8yQfdIM85NXMLkMg1EXVs=
+github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
@@ -54,11 +55,10 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
-github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ=
-github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
+github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
+github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
@@ -122,7 +122,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.3 h1:fvjTMHxHEw/mxHbtzPi3JCcKXQRAnQTBRo6YCJSVHKI=
gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/grpclog/loggerv2.go b/cluster-autoscaler/vendor/google.golang.org/grpc/grpclog/loggerv2.go
index 4ee33171e008..34098bb8eb59 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/grpclog/loggerv2.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/grpclog/loggerv2.go
@@ -19,11 +19,14 @@
package grpclog
import (
+ "encoding/json"
+ "fmt"
"io"
"io/ioutil"
"log"
"os"
"strconv"
+ "strings"
"google.golang.org/grpc/internal/grpclog"
)
@@ -95,8 +98,9 @@ var severityName = []string{
// loggerT is the default logger used by grpclog.
type loggerT struct {
- m []*log.Logger
- v int
+ m []*log.Logger
+ v int
+ jsonFormat bool
}
// NewLoggerV2 creates a loggerV2 with the provided writers.
@@ -105,19 +109,32 @@ type loggerT struct {
// Warning logs will be written to warningW and infoW.
// Info logs will be written to infoW.
func NewLoggerV2(infoW, warningW, errorW io.Writer) LoggerV2 {
- return NewLoggerV2WithVerbosity(infoW, warningW, errorW, 0)
+ return newLoggerV2WithConfig(infoW, warningW, errorW, loggerV2Config{})
}
// NewLoggerV2WithVerbosity creates a loggerV2 with the provided writers and
// verbosity level.
func NewLoggerV2WithVerbosity(infoW, warningW, errorW io.Writer, v int) LoggerV2 {
+ return newLoggerV2WithConfig(infoW, warningW, errorW, loggerV2Config{verbose: v})
+}
+
+type loggerV2Config struct {
+ verbose int
+ jsonFormat bool
+}
+
+func newLoggerV2WithConfig(infoW, warningW, errorW io.Writer, c loggerV2Config) LoggerV2 {
var m []*log.Logger
- m = append(m, log.New(infoW, severityName[infoLog]+": ", log.LstdFlags))
- m = append(m, log.New(io.MultiWriter(infoW, warningW), severityName[warningLog]+": ", log.LstdFlags))
+ flag := log.LstdFlags
+ if c.jsonFormat {
+ flag = 0
+ }
+ m = append(m, log.New(infoW, "", flag))
+ m = append(m, log.New(io.MultiWriter(infoW, warningW), "", flag))
ew := io.MultiWriter(infoW, warningW, errorW) // ew will be used for error and fatal.
- m = append(m, log.New(ew, severityName[errorLog]+": ", log.LstdFlags))
- m = append(m, log.New(ew, severityName[fatalLog]+": ", log.LstdFlags))
- return &loggerT{m: m, v: v}
+ m = append(m, log.New(ew, "", flag))
+ m = append(m, log.New(ew, "", flag))
+ return &loggerT{m: m, v: c.verbose, jsonFormat: c.jsonFormat}
}
// newLoggerV2 creates a loggerV2 to be used as default logger.
@@ -142,58 +159,79 @@ func newLoggerV2() LoggerV2 {
if vl, err := strconv.Atoi(vLevel); err == nil {
v = vl
}
- return NewLoggerV2WithVerbosity(infoW, warningW, errorW, v)
+
+ jsonFormat := strings.EqualFold(os.Getenv("GRPC_GO_LOG_FORMATTER"), "json")
+
+ return newLoggerV2WithConfig(infoW, warningW, errorW, loggerV2Config{
+ verbose: v,
+ jsonFormat: jsonFormat,
+ })
+}
+
+func (g *loggerT) output(severity int, s string) {
+ sevStr := severityName[severity]
+ if !g.jsonFormat {
+ g.m[severity].Output(2, fmt.Sprintf("%v: %v", sevStr, s))
+ return
+ }
+ // TODO: we can also include the logging component, but that needs more
+ // (API) changes.
+ b, _ := json.Marshal(map[string]string{
+ "severity": sevStr,
+ "message": s,
+ })
+ g.m[severity].Output(2, string(b))
}
func (g *loggerT) Info(args ...interface{}) {
- g.m[infoLog].Print(args...)
+ g.output(infoLog, fmt.Sprint(args...))
}
func (g *loggerT) Infoln(args ...interface{}) {
- g.m[infoLog].Println(args...)
+ g.output(infoLog, fmt.Sprintln(args...))
}
func (g *loggerT) Infof(format string, args ...interface{}) {
- g.m[infoLog].Printf(format, args...)
+ g.output(infoLog, fmt.Sprintf(format, args...))
}
func (g *loggerT) Warning(args ...interface{}) {
- g.m[warningLog].Print(args...)
+ g.output(warningLog, fmt.Sprint(args...))
}
func (g *loggerT) Warningln(args ...interface{}) {
- g.m[warningLog].Println(args...)
+ g.output(warningLog, fmt.Sprintln(args...))
}
func (g *loggerT) Warningf(format string, args ...interface{}) {
- g.m[warningLog].Printf(format, args...)
+ g.output(warningLog, fmt.Sprintf(format, args...))
}
func (g *loggerT) Error(args ...interface{}) {
- g.m[errorLog].Print(args...)
+ g.output(errorLog, fmt.Sprint(args...))
}
func (g *loggerT) Errorln(args ...interface{}) {
- g.m[errorLog].Println(args...)
+ g.output(errorLog, fmt.Sprintln(args...))
}
func (g *loggerT) Errorf(format string, args ...interface{}) {
- g.m[errorLog].Printf(format, args...)
+ g.output(errorLog, fmt.Sprintf(format, args...))
}
func (g *loggerT) Fatal(args ...interface{}) {
- g.m[fatalLog].Fatal(args...)
- // No need to call os.Exit() again because log.Logger.Fatal() calls os.Exit().
+ g.output(fatalLog, fmt.Sprint(args...))
+ os.Exit(1)
}
func (g *loggerT) Fatalln(args ...interface{}) {
- g.m[fatalLog].Fatalln(args...)
- // No need to call os.Exit() again because log.Logger.Fatal() calls os.Exit().
+ g.output(fatalLog, fmt.Sprintln(args...))
+ os.Exit(1)
}
func (g *loggerT) Fatalf(format string, args ...interface{}) {
- g.m[fatalLog].Fatalf(format, args...)
- // No need to call os.Exit() again because log.Logger.Fatal() calls os.Exit().
+ g.output(fatalLog, fmt.Sprintf(format, args...))
+ os.Exit(1)
}
func (g *loggerT) V(l int) bool {
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/install_gae.sh b/cluster-autoscaler/vendor/google.golang.org/grpc/install_gae.sh
deleted file mode 100644
index 15ff9facdd78..000000000000
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/install_gae.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-
-TMP=$(mktemp -d /tmp/sdk.XXX) \
-&& curl -o $TMP.zip "https://storage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_linux_amd64-1.9.68.zip" \
-&& unzip -q $TMP.zip -d $TMP \
-&& export PATH="$PATH:$TMP/go_appengine"
\ No newline at end of file
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/channelz/funcs.go b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/channelz/funcs.go
index f7314139303e..6d5760d95146 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/channelz/funcs.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/channelz/funcs.go
@@ -630,7 +630,7 @@ func (c *channelMap) GetServerSockets(id int64, startID int64, maxResults int64)
if count == 0 {
end = true
}
- var s []*SocketMetric
+ s := make([]*SocketMetric, 0, len(sks))
for _, ns := range sks {
sm := &SocketMetric{}
sm.SocketData = ns.s.ChannelzMetric()
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/channelz/types_linux.go b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/channelz/types_linux.go
index 692dd6181778..1b1c4cce34a9 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/channelz/types_linux.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/channelz/types_linux.go
@@ -1,5 +1,3 @@
-// +build !appengine
-
/*
*
* Copyright 2018 gRPC authors.
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/channelz/types_nonlinux.go b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/channelz/types_nonlinux.go
index 19c2fc521dcf..8b06eed1ab8b 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/channelz/types_nonlinux.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/channelz/types_nonlinux.go
@@ -1,4 +1,5 @@
-// +build !linux appengine
+//go:build !linux
+// +build !linux
/*
*
@@ -37,6 +38,6 @@ type SocketOptionData struct {
// Windows OS doesn't support Socket Option
func (s *SocketOptionData) Getsockopt(fd uintptr) {
once.Do(func() {
- logger.Warning("Channelz: socket options are not supported on non-linux os and appengine.")
+ logger.Warning("Channelz: socket options are not supported on non-linux environments")
})
}
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/channelz/util_linux.go b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/channelz/util_linux.go
index fdf409d55de3..8d194e44e1dc 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/channelz/util_linux.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/channelz/util_linux.go
@@ -1,5 +1,3 @@
-// +build linux,!appengine
-
/*
*
* Copyright 2018 gRPC authors.
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/channelz/util_nonlinux.go b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/channelz/util_nonlinux.go
index 8864a0811164..837ddc402400 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/channelz/util_nonlinux.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/channelz/util_nonlinux.go
@@ -1,4 +1,5 @@
-// +build !linux appengine
+//go:build !linux
+// +build !linux
/*
*
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/credentials/spiffe.go b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/credentials/spiffe.go
index be70b6cdfc31..25ade623058e 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/credentials/spiffe.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/credentials/spiffe.go
@@ -1,5 +1,3 @@
-// +build !appengine
-
/*
*
* Copyright 2020 gRPC authors.
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/credentials/syscallconn.go b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/credentials/syscallconn.go
index f499a614c20e..2919632d657e 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/credentials/syscallconn.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/credentials/syscallconn.go
@@ -1,5 +1,3 @@
-// +build !appengine
-
/*
*
* Copyright 2018 gRPC authors.
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/credentials/util.go b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/credentials/util.go
index 55664fa46b81..f792fd22cafc 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/credentials/util.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/credentials/util.go
@@ -18,7 +18,9 @@
package credentials
-import "crypto/tls"
+import (
+ "crypto/tls"
+)
const alpnProtoStrH2 = "h2"
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go
index 73931a94bcad..9f25a67fc6bd 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go
@@ -22,6 +22,8 @@ package envconfig
import (
"os"
"strings"
+
+ xdsenv "google.golang.org/grpc/internal/xds/env"
)
const (
@@ -31,8 +33,9 @@ const (
)
var (
- // Retry is set if retry is explicitly enabled via "GRPC_GO_RETRY=on".
- Retry = strings.EqualFold(os.Getenv(retryStr), "on")
+ // Retry is enabled unless explicitly disabled via "GRPC_GO_RETRY=off" or
+ // if XDS retry support is explicitly disabled.
+ Retry = !strings.EqualFold(os.Getenv(retryStr), "off") && xdsenv.RetrySupport
// TXTErrIgnore is set if TXT errors should be ignored ("GRPC_GO_IGNORE_TXT_ERRORS" is not "false").
TXTErrIgnore = !strings.EqualFold(os.Getenv(txtErrIgnoreStr), "false")
)
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/credentials/syscallconn_appengine.go b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/grpcutil/grpcutil.go
similarity index 72%
rename from cluster-autoscaler/vendor/google.golang.org/grpc/internal/credentials/syscallconn_appengine.go
rename to cluster-autoscaler/vendor/google.golang.org/grpc/internal/grpcutil/grpcutil.go
index a6144cd661c2..e2f948e8f4f4 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/credentials/syscallconn_appengine.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/grpcutil/grpcutil.go
@@ -1,8 +1,6 @@
-// +build appengine
-
/*
*
- * Copyright 2018 gRPC authors.
+ * Copyright 2021 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,13 +16,5 @@
*
*/
-package credentials
-
-import (
- "net"
-)
-
-// WrapSyscallConn returns newConn on appengine.
-func WrapSyscallConn(rawConn, newConn net.Conn) net.Conn {
- return newConn
-}
+// Package grpcutil provides utility functions used across the gRPC codebase.
+package grpcutil
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/credentials/spiffe_appengine.go b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/grpcutil/regex.go
similarity index 66%
rename from cluster-autoscaler/vendor/google.golang.org/grpc/internal/credentials/spiffe_appengine.go
rename to cluster-autoscaler/vendor/google.golang.org/grpc/internal/grpcutil/regex.go
index af6f57719768..2810a8ba2fdf 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/credentials/spiffe_appengine.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/grpcutil/regex.go
@@ -1,8 +1,6 @@
-// +build appengine
-
/*
*
- * Copyright 2020 gRPC authors.
+ * Copyright 2021 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,14 +16,13 @@
*
*/
-package credentials
+package grpcutil
-import (
- "crypto/tls"
- "net/url"
-)
+import "regexp"
-// SPIFFEIDFromState is a no-op for appengine builds.
-func SPIFFEIDFromState(state tls.ConnectionState) *url.URL {
- return nil
+// FullMatchWithRegex returns whether the full string matches the regex provided.
+func FullMatchWithRegex(re *regexp.Regexp, string string) bool {
+ re.Longest()
+ rem := re.FindString(string)
+ return len(rem) == len(string)
}
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/grpcutil/target.go b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/grpcutil/target.go
deleted file mode 100644
index 8833021da02e..000000000000
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/grpcutil/target.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- *
- * Copyright 2020 gRPC authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// Package grpcutil provides a bunch of utility functions to be used across the
-// gRPC codebase.
-package grpcutil
-
-import (
- "strings"
-
- "google.golang.org/grpc/resolver"
-)
-
-// split2 returns the values from strings.SplitN(s, sep, 2).
-// If sep is not found, it returns ("", "", false) instead.
-func split2(s, sep string) (string, string, bool) {
- spl := strings.SplitN(s, sep, 2)
- if len(spl) < 2 {
- return "", "", false
- }
- return spl[0], spl[1], true
-}
-
-// ParseTarget splits target into a resolver.Target struct containing scheme,
-// authority and endpoint. skipUnixColonParsing indicates that the parse should
-// not parse "unix:[path]" cases. This should be true in cases where a custom
-// dialer is present, to prevent a behavior change.
-//
-// If target is not a valid scheme://authority/endpoint as specified in
-// https://github.com/grpc/grpc/blob/master/doc/naming.md,
-// it returns {Endpoint: target}.
-func ParseTarget(target string, skipUnixColonParsing bool) (ret resolver.Target) {
- var ok bool
- if strings.HasPrefix(target, "unix-abstract:") {
- if strings.HasPrefix(target, "unix-abstract://") {
- // Maybe, with Authority specified, try to parse it
- var remain string
- ret.Scheme, remain, _ = split2(target, "://")
- ret.Authority, ret.Endpoint, ok = split2(remain, "/")
- if !ok {
- // No Authority, add the "//" back
- ret.Endpoint = "//" + remain
- } else {
- // Found Authority, add the "/" back
- ret.Endpoint = "/" + ret.Endpoint
- }
- } else {
- // Without Authority specified, split target on ":"
- ret.Scheme, ret.Endpoint, _ = split2(target, ":")
- }
- return ret
- }
- ret.Scheme, ret.Endpoint, ok = split2(target, "://")
- if !ok {
- if strings.HasPrefix(target, "unix:") && !skipUnixColonParsing {
- // Handle the "unix:[local/path]" and "unix:[/absolute/path]" cases,
- // because splitting on :// only handles the
- // "unix://[/absolute/path]" case. Only handle if the dialer is nil,
- // to avoid a behavior change with custom dialers.
- return resolver.Target{Scheme: "unix", Endpoint: target[len("unix:"):]}
- }
- return resolver.Target{Endpoint: target}
- }
- ret.Authority, ret.Endpoint, ok = split2(ret.Endpoint, "/")
- if !ok {
- return resolver.Target{Endpoint: target}
- }
- if ret.Scheme == "unix" {
- // Add the "/" back in the unix case, so the unix resolver receives the
- // actual endpoint in the "unix://[/absolute/path]" case.
- ret.Endpoint = "/" + ret.Endpoint
- }
- return ret
-}
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/metadata/metadata.go b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/metadata/metadata.go
index 302262613a02..b8733dbf340d 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/metadata/metadata.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/metadata/metadata.go
@@ -30,14 +30,38 @@ type mdKeyType string
const mdKey = mdKeyType("grpc.internal.address.metadata")
+type mdValue metadata.MD
+
+func (m mdValue) Equal(o interface{}) bool {
+ om, ok := o.(mdValue)
+ if !ok {
+ return false
+ }
+ if len(m) != len(om) {
+ return false
+ }
+ for k, v := range m {
+ ov := om[k]
+ if len(ov) != len(v) {
+ return false
+ }
+ for i, ve := range v {
+ if ov[i] != ve {
+ return false
+ }
+ }
+ }
+ return true
+}
+
// Get returns the metadata of addr.
func Get(addr resolver.Address) metadata.MD {
attrs := addr.Attributes
if attrs == nil {
return nil
}
- md, _ := attrs.Value(mdKey).(metadata.MD)
- return md
+ md, _ := attrs.Value(mdKey).(mdValue)
+ return metadata.MD(md)
}
// Set sets (overrides) the metadata in addr.
@@ -45,6 +69,6 @@ func Get(addr resolver.Address) metadata.MD {
// When a SubConn is created with this address, the RPCs sent on it will all
// have this metadata.
func Set(addr resolver.Address, md metadata.MD) resolver.Address {
- addr.Attributes = addr.Attributes.WithValues(mdKey, md)
+ addr.Attributes = addr.Attributes.WithValue(mdKey, mdValue(md))
return addr
}
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/resolver/config_selector.go b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/resolver/config_selector.go
index 5e7f36703d4b..c7a18a948adb 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/resolver/config_selector.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/resolver/config_selector.go
@@ -117,9 +117,12 @@ type ClientInterceptor interface {
NewStream(ctx context.Context, ri RPCInfo, done func(), newStream func(ctx context.Context, done func()) (ClientStream, error)) (ClientStream, error)
}
-// ServerInterceptor is unimplementable; do not use.
+// ServerInterceptor is an interceptor for incoming RPC's on gRPC server side.
type ServerInterceptor interface {
- notDefined()
+ // AllowRPC checks if an incoming RPC is allowed to proceed based on
+ // information about connection RPC was received on, and HTTP Headers. This
+ // information will be piped into context.
+ AllowRPC(ctx context.Context) error // TODO: Make this a real interceptor for filters such as rate limiting.
}
type csKeyType string
@@ -129,7 +132,7 @@ const csKey = csKeyType("grpc.internal.resolver.configSelector")
// SetConfigSelector sets the config selector in state and returns the new
// state.
func SetConfigSelector(state resolver.State, cs ConfigSelector) resolver.State {
- state.Attributes = state.Attributes.WithValues(csKey, cs)
+ state.Attributes = state.Attributes.WithValue(csKey, cs)
return state
}
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go
index 03825bbe7b56..75301c514913 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go
@@ -277,18 +277,13 @@ func (d *dnsResolver) lookupSRV() ([]resolver.Address, error) {
return newAddrs, nil
}
-var filterError = func(err error) error {
+func handleDNSError(err error, lookupType string) error {
if dnsErr, ok := err.(*net.DNSError); ok && !dnsErr.IsTimeout && !dnsErr.IsTemporary {
// Timeouts and temporary errors should be communicated to gRPC to
// attempt another DNS query (with backoff). Other errors should be
// suppressed (they may represent the absence of a TXT record).
return nil
}
- return err
-}
-
-func handleDNSError(err error, lookupType string) error {
- err = filterError(err)
if err != nil {
err = fmt.Errorf("dns: %v record lookup error: %v", lookupType, err)
logger.Info(err)
@@ -323,12 +318,12 @@ func (d *dnsResolver) lookupTXT() *serviceconfig.ParseResult {
}
func (d *dnsResolver) lookupHost() ([]resolver.Address, error) {
- var newAddrs []resolver.Address
addrs, err := d.resolver.LookupHost(d.ctx, d.host)
if err != nil {
err = handleDNSError(err, "A")
return nil, err
}
+ newAddrs := make([]resolver.Address, 0, len(addrs))
for _, a := range addrs {
ip, ok := formatIP(a)
if !ok {
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/resolver/dns/go113.go b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/resolver/dns/go113.go
deleted file mode 100644
index 8783a8cf8214..000000000000
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/resolver/dns/go113.go
+++ /dev/null
@@ -1,33 +0,0 @@
-// +build go1.13
-
-/*
- *
- * Copyright 2019 gRPC authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package dns
-
-import "net"
-
-func init() {
- filterError = func(err error) error {
- if dnsErr, ok := err.(*net.DNSError); ok && dnsErr.IsNotFound {
- // The name does not exist; not an error.
- return nil
- }
- return err
- }
-}
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/resolver/unix/unix.go b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/resolver/unix/unix.go
index 0d5a811ddfad..20852e59df29 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/resolver/unix/unix.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/resolver/unix/unix.go
@@ -37,7 +37,17 @@ func (b *builder) Build(target resolver.Target, cc resolver.ClientConn, _ resolv
if target.Authority != "" {
return nil, fmt.Errorf("invalid (non-empty) authority: %v", target.Authority)
}
- addr := resolver.Address{Addr: target.Endpoint}
+
+ // gRPC was parsing the dial target manually before PR #4817, and we
+ // switched to using url.Parse() in that PR. To avoid breaking existing
+ // resolver implementations we ended up stripping the leading "/" from the
+ // endpoint. This obviously does not work for the "unix" scheme. Hence we
+ // end up using the parsed URL instead.
+ endpoint := target.URL.Path
+ if endpoint == "" {
+ endpoint = target.URL.Opaque
+ }
+ addr := resolver.Address{Addr: endpoint}
if b.scheme == unixAbstractScheme {
// prepend "\x00" to address for unix-abstract
addr.Addr = "\x00" + addr.Addr
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/serviceconfig/serviceconfig.go b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/serviceconfig/serviceconfig.go
index c0634d152c2e..badbdbf597f3 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/serviceconfig/serviceconfig.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/serviceconfig/serviceconfig.go
@@ -78,6 +78,7 @@ func (bc *BalancerConfig) UnmarshalJSON(b []byte) error {
return err
}
+ var names []string
for i, lbcfg := range ir {
if len(lbcfg) != 1 {
return fmt.Errorf("invalid loadBalancingConfig: entry %v does not contain exactly 1 policy/config pair: %q", i, lbcfg)
@@ -92,6 +93,7 @@ func (bc *BalancerConfig) UnmarshalJSON(b []byte) error {
for name, jsonCfg = range lbcfg {
}
+ names = append(names, name)
builder := balancer.Get(name)
if builder == nil {
// If the balancer is not registered, move on to the next config.
@@ -120,7 +122,7 @@ func (bc *BalancerConfig) UnmarshalJSON(b []byte) error {
// return. This means we had a loadBalancingConfig slice but did not
// encounter a registered policy. The config is considered invalid in this
// case.
- return fmt.Errorf("invalid loadBalancingConfig: no supported policies found")
+ return fmt.Errorf("invalid loadBalancingConfig: no supported policies found in %v", names)
}
// MethodConfig defines the configuration recommended by the service providers for a
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/syscall/syscall_linux.go b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/syscall/syscall_linux.go
index 4b2964f2a1e3..b3a72276dee4 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/syscall/syscall_linux.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/syscall/syscall_linux.go
@@ -1,5 +1,3 @@
-// +build !appengine
-
/*
*
* Copyright 2018 gRPC authors.
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/syscall/syscall_nonlinux.go b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/syscall/syscall_nonlinux.go
index 7913ef1dbfb5..999f52cd75bd 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/syscall/syscall_nonlinux.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/syscall/syscall_nonlinux.go
@@ -1,4 +1,5 @@
-// +build !linux appengine
+//go:build !linux
+// +build !linux
/*
*
@@ -35,41 +36,41 @@ var logger = grpclog.Component("core")
func log() {
once.Do(func() {
- logger.Info("CPU time info is unavailable on non-linux or appengine environment.")
+ logger.Info("CPU time info is unavailable on non-linux environments.")
})
}
-// GetCPUTime returns the how much CPU time has passed since the start of this process.
-// It always returns 0 under non-linux or appengine environment.
+// GetCPUTime returns the how much CPU time has passed since the start of this
+// process. It always returns 0 under non-linux environments.
func GetCPUTime() int64 {
log()
return 0
}
-// Rusage is an empty struct under non-linux or appengine environment.
+// Rusage is an empty struct under non-linux environments.
type Rusage struct{}
-// GetRusage is a no-op function under non-linux or appengine environment.
+// GetRusage is a no-op function under non-linux environments.
func GetRusage() *Rusage {
log()
return nil
}
// CPUTimeDiff returns the differences of user CPU time and system CPU time used
-// between two Rusage structs. It a no-op function for non-linux or appengine environment.
+// between two Rusage structs. It a no-op function for non-linux environments.
func CPUTimeDiff(first *Rusage, latest *Rusage) (float64, float64) {
log()
return 0, 0
}
-// SetTCPUserTimeout is a no-op function under non-linux or appengine environments
+// SetTCPUserTimeout is a no-op function under non-linux environments.
func SetTCPUserTimeout(conn net.Conn, timeout time.Duration) error {
log()
return nil
}
-// GetTCPUserTimeout is a no-op function under non-linux or appengine environments
-// a negative return value indicates the operation is not supported
+// GetTCPUserTimeout is a no-op function under non-linux environments.
+// A negative return value indicates the operation is not supported
func GetTCPUserTimeout(conn net.Conn) (int, error) {
log()
return -1, nil
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/transport/controlbuf.go b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/transport/controlbuf.go
index 45532f8aeaab..8394d252df03 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/transport/controlbuf.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/transport/controlbuf.go
@@ -133,6 +133,7 @@ type cleanupStream struct {
func (c *cleanupStream) isTransportResponseFrame() bool { return c.rst } // Results in a RST_STREAM
type earlyAbortStream struct {
+ httpStatus uint32
streamID uint32
contentSubtype string
status *status.Status
@@ -771,9 +772,12 @@ func (l *loopyWriter) earlyAbortStreamHandler(eas *earlyAbortStream) error {
if l.side == clientSide {
return errors.New("earlyAbortStream not handled on client")
}
-
+ // In case the caller forgets to set the http status, default to 200.
+ if eas.httpStatus == 0 {
+ eas.httpStatus = 200
+ }
headerFields := []hpack.HeaderField{
- {Name: ":status", Value: "200"},
+ {Name: ":status", Value: strconv.Itoa(int(eas.httpStatus))},
{Name: "content-type", Value: grpcutil.ContentType(eas.contentSubtype)},
{Name: "grpc-status", Value: strconv.Itoa(int(eas.status.Code()))},
{Name: "grpc-message", Value: encodeGrpcMessage(eas.status.Message())},
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/transport/http2_client.go b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/transport/http2_client.go
index 0cd6da1e73f7..2521a7d7a408 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/transport/http2_client.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/transport/http2_client.go
@@ -25,6 +25,7 @@ import (
"math"
"net"
"net/http"
+ "path/filepath"
"strconv"
"strings"
"sync"
@@ -146,13 +147,20 @@ func dial(ctx context.Context, fn func(context.Context, string) (net.Conn, error
address := addr.Addr
networkType, ok := networktype.Get(addr)
if fn != nil {
+ // Special handling for unix scheme with custom dialer. Back in the day,
+ // we did not have a unix resolver and therefore targets with a unix
+ // scheme would end up using the passthrough resolver. So, user's used a
+ // custom dialer in this case and expected the original dial target to
+ // be passed to the custom dialer. Now, we have a unix resolver. But if
+ // a custom dialer is specified, we want to retain the old behavior in
+ // terms of the address being passed to the custom dialer.
if networkType == "unix" && !strings.HasPrefix(address, "\x00") {
- // For backward compatibility, if the user dialed "unix:///path",
- // the passthrough resolver would be used and the user's custom
- // dialer would see "unix:///path". Since the unix resolver is used
- // and the address is now "/path", prepend "unix://" so the user's
- // custom dialer sees the same address.
- return fn(ctx, "unix://"+address)
+ // Supported unix targets are either "unix://absolute-path" or
+ // "unix:relative-path".
+ if filepath.IsAbs(address) {
+ return fn(ctx, "unix://"+address)
+ }
+ return fn(ctx, "unix:"+address)
}
return fn(ctx, address)
}
@@ -616,12 +624,22 @@ func (t *http2Client) getCallAuthData(ctx context.Context, audience string, call
return callAuthData, nil
}
-// NewStreamError wraps an error and reports additional information.
+// NewStreamError wraps an error and reports additional information. Typically
+// NewStream errors result in transparent retry, as they mean nothing went onto
+// the wire. However, there are two notable exceptions:
+//
+// 1. If the stream headers violate the max header list size allowed by the
+// server. In this case there is no reason to retry at all, as it is
+// assumed the RPC would continue to fail on subsequent attempts.
+// 2. If the credentials errored when requesting their headers. In this case,
+// it's possible a retry can fix the problem, but indefinitely transparently
+// retrying is not appropriate as it is likely the credentials, if they can
+// eventually succeed, would need I/O to do so.
type NewStreamError struct {
Err error
- DoNotRetry bool
- PerformedIO bool
+ DoNotRetry bool
+ DoNotTransparentRetry bool
}
func (e NewStreamError) Error() string {
@@ -631,24 +649,10 @@ func (e NewStreamError) Error() string {
// NewStream creates a stream and registers it into the transport as "active"
// streams. All non-nil errors returned will be *NewStreamError.
func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (_ *Stream, err error) {
- defer func() {
- if err != nil {
- nse, ok := err.(*NewStreamError)
- if !ok {
- nse = &NewStreamError{Err: err}
- }
- if len(t.perRPCCreds) > 0 || callHdr.Creds != nil {
- // We may have performed I/O in the per-RPC creds callback, so do not
- // allow transparent retry.
- nse.PerformedIO = true
- }
- err = nse
- }
- }()
ctx = peer.NewContext(ctx, t.getPeer())
headerFields, err := t.createHeaderFields(ctx, callHdr)
if err != nil {
- return nil, err
+ return nil, &NewStreamError{Err: err, DoNotTransparentRetry: true}
}
s := t.newStream(ctx, callHdr)
cleanup := func(err error) {
@@ -748,7 +752,7 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (_ *Strea
return true
}, hdr)
if err != nil {
- return nil, err
+ return nil, &NewStreamError{Err: err}
}
if success {
break
@@ -759,12 +763,12 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (_ *Strea
firstTry = false
select {
case <-ch:
- case <-s.ctx.Done():
- return nil, ContextErr(s.ctx.Err())
+ case <-ctx.Done():
+ return nil, &NewStreamError{Err: ContextErr(ctx.Err())}
case <-t.goAway:
- return nil, errStreamDrain
+ return nil, &NewStreamError{Err: errStreamDrain}
case <-t.ctx.Done():
- return nil, ErrConnClosing
+ return nil, &NewStreamError{Err: ErrConnClosing}
}
}
if t.statsHandler != nil {
@@ -1077,7 +1081,7 @@ func (t *http2Client) handleData(f *http2.DataFrame) {
}
// The server has closed the stream without sending trailers. Record that
// the read direction is closed, and set the status appropriately.
- if f.FrameHeader.Flags.Has(http2.FlagDataEndStream) {
+ if f.StreamEnded() {
t.closeStream(s, io.EOF, false, http2.ErrCodeNo, status.New(codes.Internal, "server closed the stream without sending trailers"), nil, true)
}
}
@@ -1407,26 +1411,6 @@ func (t *http2Client) operateHeaders(frame *http2.MetaHeadersFrame) {
}
isHeader := false
- defer func() {
- if t.statsHandler != nil {
- if isHeader {
- inHeader := &stats.InHeader{
- Client: true,
- WireLength: int(frame.Header().Length),
- Header: s.header.Copy(),
- Compression: s.recvCompress,
- }
- t.statsHandler.HandleRPC(s.ctx, inHeader)
- } else {
- inTrailer := &stats.InTrailer{
- Client: true,
- WireLength: int(frame.Header().Length),
- Trailer: s.trailer.Copy(),
- }
- t.statsHandler.HandleRPC(s.ctx, inTrailer)
- }
- }
- }()
// If headerChan hasn't been closed yet
if atomic.CompareAndSwapUint32(&s.headerChanClosed, 0, 1) {
@@ -1448,6 +1432,25 @@ func (t *http2Client) operateHeaders(frame *http2.MetaHeadersFrame) {
close(s.headerChan)
}
+ if t.statsHandler != nil {
+ if isHeader {
+ inHeader := &stats.InHeader{
+ Client: true,
+ WireLength: int(frame.Header().Length),
+ Header: metadata.MD(mdata).Copy(),
+ Compression: s.recvCompress,
+ }
+ t.statsHandler.HandleRPC(s.ctx, inHeader)
+ } else {
+ inTrailer := &stats.InTrailer{
+ Client: true,
+ WireLength: int(frame.Header().Length),
+ Trailer: metadata.MD(mdata).Copy(),
+ }
+ t.statsHandler.HandleRPC(s.ctx, inTrailer)
+ }
+ }
+
if !endStream {
return
}
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/transport/http2_server.go b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/transport/http2_server.go
index e3799d50aa71..f2cad9ebc311 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/transport/http2_server.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/transport/http2_server.go
@@ -129,10 +129,26 @@ type http2Server struct {
// options from config.
//
// It returns a non-nil transport and a nil error on success. On failure, it
-// returns a non-nil transport and a nil-error. For a special case where the
+// returns a nil transport and a non-nil error. For a special case where the
// underlying conn gets closed before the client preface could be read, it
// returns a nil transport and a nil error.
func NewServerTransport(conn net.Conn, config *ServerConfig) (_ ServerTransport, err error) {
+ var authInfo credentials.AuthInfo
+ rawConn := conn
+ if config.Credentials != nil {
+ var err error
+ conn, authInfo, err = config.Credentials.ServerHandshake(rawConn)
+ if err != nil {
+ // ErrConnDispatched means that the connection was dispatched away
+ // from gRPC; those connections should be left open. io.EOF means
+ // the connection was closed before handshaking completed, which can
+ // happen naturally from probers. Return these errors directly.
+ if err == credentials.ErrConnDispatched || err == io.EOF {
+ return nil, err
+ }
+ return nil, connectionErrorf(false, err, "ServerHandshake(%q) failed: %v", rawConn.RemoteAddr(), err)
+ }
+ }
writeBufSize := config.WriteBufferSize
readBufSize := config.ReadBufferSize
maxHeaderListSize := defaultServerMaxHeaderListSize
@@ -215,14 +231,15 @@ func NewServerTransport(conn net.Conn, config *ServerConfig) (_ ServerTransport,
if kep.MinTime == 0 {
kep.MinTime = defaultKeepalivePolicyMinTime
}
+
done := make(chan struct{})
t := &http2Server{
- ctx: context.Background(),
+ ctx: setConnection(context.Background(), rawConn),
done: done,
conn: conn,
remoteAddr: conn.RemoteAddr(),
localAddr: conn.LocalAddr(),
- authInfo: config.AuthInfo,
+ authInfo: authInfo,
framer: framer,
readerDone: make(chan struct{}),
writerDone: make(chan struct{}),
@@ -273,10 +290,11 @@ func NewServerTransport(conn net.Conn, config *ServerConfig) (_ ServerTransport,
if _, err := io.ReadFull(t.conn, preface); err != nil {
// In deployments where a gRPC server runs behind a cloud load balancer
// which performs regular TCP level health checks, the connection is
- // closed immediately by the latter. Skipping the error here will help
- // reduce log clutter.
+ // closed immediately by the latter. Returning io.EOF here allows the
+ // grpc server implementation to recognize this scenario and suppress
+ // logging to reduce spam.
if err == io.EOF {
- return nil, nil
+ return nil, io.EOF
}
return nil, connectionErrorf(false, err, "transport: http2Server.HandleStreams failed to receive the preface from client: %v", err)
}
@@ -373,6 +391,13 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func(
if timeout, err = decodeTimeout(hf.Value); err != nil {
headerError = true
}
+ // "Transports must consider requests containing the Connection header
+ // as malformed." - A41
+ case "connection":
+ if logger.V(logLevel) {
+ logger.Errorf("transport: http2Server.operateHeaders parsed a :connection header which makes a request malformed as per the HTTP/2 spec")
+ }
+ headerError = true
default:
if isReservedHeader(hf.Name) && !isWhitelistedHeader(hf.Name) {
break
@@ -387,6 +412,25 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func(
}
}
+ // "If multiple Host headers or multiple :authority headers are present, the
+ // request must be rejected with an HTTP status code 400 as required by Host
+ // validation in RFC 7230 §5.4, gRPC status code INTERNAL, or RST_STREAM
+ // with HTTP/2 error code PROTOCOL_ERROR." - A41. Since this is a HTTP/2
+ // error, this takes precedence over a client not speaking gRPC.
+ if len(mdata[":authority"]) > 1 || len(mdata["host"]) > 1 {
+ errMsg := fmt.Sprintf("num values of :authority: %v, num values of host: %v, both must only have 1 value as per HTTP/2 spec", len(mdata[":authority"]), len(mdata["host"]))
+ if logger.V(logLevel) {
+ logger.Errorf("transport: %v", errMsg)
+ }
+ t.controlBuf.put(&earlyAbortStream{
+ httpStatus: 400,
+ streamID: streamID,
+ contentSubtype: s.contentSubtype,
+ status: status.New(codes.Internal, errMsg),
+ })
+ return false
+ }
+
if !isGRPC || headerError {
t.controlBuf.put(&cleanupStream{
streamID: streamID,
@@ -397,6 +441,19 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func(
return false
}
+ // "If :authority is missing, Host must be renamed to :authority." - A41
+ if len(mdata[":authority"]) == 0 {
+ // No-op if host isn't present, no eventual :authority header is a valid
+ // RPC.
+ if host, ok := mdata["host"]; ok {
+ mdata[":authority"] = host
+ delete(mdata, "host")
+ }
+ } else {
+ // "If :authority is present, Host must be discarded" - A41
+ delete(mdata, "host")
+ }
+
if frame.StreamEnded() {
// s is just created by the caller. No lock needed.
s.state = streamReadDone
@@ -477,6 +534,7 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func(
stat = status.New(codes.PermissionDenied, err.Error())
}
t.controlBuf.put(&earlyAbortStream{
+ httpStatus: 200,
streamID: s.id,
contentSubtype: s.contentSubtype,
status: stat,
@@ -717,7 +775,7 @@ func (t *http2Server) handleData(f *http2.DataFrame) {
s.write(recvMsg{buffer: buffer})
}
}
- if f.Header().Flags.Has(http2.FlagDataEndStream) {
+ if f.StreamEnded() {
// Received the end of stream from the client.
s.compareAndSwapState(streamActive, streamReadDone)
s.write(recvMsg{err: io.EOF})
@@ -1345,3 +1403,18 @@ func getJitter(v time.Duration) time.Duration {
j := grpcrand.Int63n(2*r) - r
return time.Duration(j)
}
+
+type connectionKey struct{}
+
+// GetConnection gets the connection from the context.
+func GetConnection(ctx context.Context) net.Conn {
+ conn, _ := ctx.Value(connectionKey{}).(net.Conn)
+ return conn
+}
+
+// SetConnection adds the connection to the context to be able to get
+// information about the destination ip and port for an incoming RPC. This also
+// allows any unary or streaming interceptors to see the connection.
+func setConnection(ctx context.Context, conn net.Conn) context.Context {
+ return context.WithValue(ctx, connectionKey{}, conn)
+}
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/transport/networktype/networktype.go b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/transport/networktype/networktype.go
index 7bb53cff1011..c11b5278274f 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/transport/networktype/networktype.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/transport/networktype/networktype.go
@@ -31,7 +31,7 @@ const key = keyType("grpc.internal.transport.networktype")
// Set returns a copy of the provided address with attributes containing networkType.
func Set(address resolver.Address, networkType string) resolver.Address {
- address.Attributes = address.Attributes.WithValues(key, networkType)
+ address.Attributes = address.Attributes.WithValue(key, networkType)
return address
}
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/transport/transport.go b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/transport/transport.go
index 14198126457b..d3bf65b2bdff 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/transport/transport.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/transport/transport.go
@@ -30,6 +30,7 @@ import (
"net"
"sync"
"sync/atomic"
+ "time"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/credentials"
@@ -518,7 +519,8 @@ const (
// ServerConfig consists of all the configurations to establish a server transport.
type ServerConfig struct {
MaxStreams uint32
- AuthInfo credentials.AuthInfo
+ ConnectionTimeout time.Duration
+ Credentials credentials.TransportCredentials
InTapHandle tap.ServerInHandle
StatsHandler stats.Handler
KeepaliveParams keepalive.ServerParameters
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/xds/env/env.go b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/xds/env/env.go
new file mode 100644
index 000000000000..87d3c2433a4f
--- /dev/null
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/xds/env/env.go
@@ -0,0 +1,97 @@
+/*
+ *
+ * Copyright 2020 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// Package env acts a single source of definition for all environment variables
+// related to the xDS implementation in gRPC.
+package env
+
+import (
+ "os"
+ "strings"
+)
+
+const (
+ // BootstrapFileNameEnv is the env variable to set bootstrap file name.
+ // Do not use this and read from env directly. Its value is read and kept in
+ // variable BootstrapFileName.
+ //
+ // When both bootstrap FileName and FileContent are set, FileName is used.
+ BootstrapFileNameEnv = "GRPC_XDS_BOOTSTRAP"
+ // BootstrapFileContentEnv is the env variable to set bootstrapp file
+ // content. Do not use this and read from env directly. Its value is read
+ // and kept in variable BootstrapFileName.
+ //
+ // When both bootstrap FileName and FileContent are set, FileName is used.
+ BootstrapFileContentEnv = "GRPC_XDS_BOOTSTRAP_CONFIG"
+
+ ringHashSupportEnv = "GRPC_XDS_EXPERIMENTAL_ENABLE_RING_HASH"
+ clientSideSecuritySupportEnv = "GRPC_XDS_EXPERIMENTAL_SECURITY_SUPPORT"
+ aggregateAndDNSSupportEnv = "GRPC_XDS_EXPERIMENTAL_ENABLE_AGGREGATE_AND_LOGICAL_DNS_CLUSTER"
+ retrySupportEnv = "GRPC_XDS_EXPERIMENTAL_ENABLE_RETRY"
+ rbacSupportEnv = "GRPC_XDS_EXPERIMENTAL_RBAC"
+
+ c2pResolverSupportEnv = "GRPC_EXPERIMENTAL_GOOGLE_C2P_RESOLVER"
+ c2pResolverTestOnlyTrafficDirectorURIEnv = "GRPC_TEST_ONLY_GOOGLE_C2P_RESOLVER_TRAFFIC_DIRECTOR_URI"
+)
+
+var (
+ // BootstrapFileName holds the name of the file which contains xDS bootstrap
+ // configuration. Users can specify the location of the bootstrap file by
+ // setting the environment variable "GRPC_XDS_BOOTSTRAP".
+ //
+ // When both bootstrap FileName and FileContent are set, FileName is used.
+ BootstrapFileName = os.Getenv(BootstrapFileNameEnv)
+ // BootstrapFileContent holds the content of the xDS bootstrap
+ // configuration. Users can specify the bootstrap config by
+ // setting the environment variable "GRPC_XDS_BOOTSTRAP_CONFIG".
+ //
+ // When both bootstrap FileName and FileContent are set, FileName is used.
+ BootstrapFileContent = os.Getenv(BootstrapFileContentEnv)
+ // RingHashSupport indicates whether ring hash support is enabled, which can
+ // be disabled by setting the environment variable
+ // "GRPC_XDS_EXPERIMENTAL_ENABLE_RING_HASH" to "false".
+ RingHashSupport = !strings.EqualFold(os.Getenv(ringHashSupportEnv), "false")
+ // ClientSideSecuritySupport is used to control processing of security
+ // configuration on the client-side.
+ //
+ // Note that there is no env var protection for the server-side because we
+ // have a brand new API on the server-side and users explicitly need to use
+ // the new API to get security integration on the server.
+ ClientSideSecuritySupport = !strings.EqualFold(os.Getenv(clientSideSecuritySupportEnv), "false")
+ // AggregateAndDNSSupportEnv indicates whether processing of aggregated
+ // cluster and DNS cluster is enabled, which can be enabled by setting the
+ // environment variable
+ // "GRPC_XDS_EXPERIMENTAL_ENABLE_AGGREGATE_AND_LOGICAL_DNS_CLUSTER" to
+ // "true".
+ AggregateAndDNSSupportEnv = strings.EqualFold(os.Getenv(aggregateAndDNSSupportEnv), "true")
+
+ // RetrySupport indicates whether xDS retry is enabled.
+ RetrySupport = !strings.EqualFold(os.Getenv(retrySupportEnv), "false")
+
+ // RBACSupport indicates whether xDS configured RBAC HTTP Filter is enabled,
+ // which can be disabled by setting the environment variable
+ // "GRPC_XDS_EXPERIMENTAL_RBAC" to "false".
+ RBACSupport = !strings.EqualFold(os.Getenv(rbacSupportEnv), "false")
+
+ // C2PResolverSupport indicates whether support for C2P resolver is enabled.
+ // This can be enabled by setting the environment variable
+ // "GRPC_EXPERIMENTAL_GOOGLE_C2P_RESOLVER" to "true".
+ C2PResolverSupport = strings.EqualFold(os.Getenv(c2pResolverSupportEnv), "true")
+ // C2PResolverTestOnlyTrafficDirectorURI is the TD URI for testing.
+ C2PResolverTestOnlyTrafficDirectorURI = os.Getenv(c2pResolverTestOnlyTrafficDirectorURIEnv)
+)
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/xds_handshake_cluster.go b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/xds_handshake_cluster.go
index 3677c3f04f84..e8b492774d1a 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/internal/xds_handshake_cluster.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/internal/xds_handshake_cluster.go
@@ -28,7 +28,7 @@ type handshakeClusterNameKey struct{}
// SetXDSHandshakeClusterName returns a copy of addr in which the Attributes field
// is updated with the cluster name.
func SetXDSHandshakeClusterName(addr resolver.Address, clusterName string) resolver.Address {
- addr.Attributes = addr.Attributes.WithValues(handshakeClusterNameKey{}, clusterName)
+ addr.Attributes = addr.Attributes.WithValue(handshakeClusterNameKey{}, clusterName)
return addr
}
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/picker_wrapper.go b/cluster-autoscaler/vendor/google.golang.org/grpc/picker_wrapper.go
index 0878ada9dbb2..e8367cb8993b 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/picker_wrapper.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/picker_wrapper.go
@@ -144,7 +144,7 @@ func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer.
acw, ok := pickResult.SubConn.(*acBalancerWrapper)
if !ok {
- logger.Error("subconn returned from pick is not *acBalancerWrapper")
+ logger.Errorf("subconn returned from pick is type %T, not *acBalancerWrapper", pickResult.SubConn)
continue
}
if t := acw.getAddrConn().getReadyTransport(); t != nil {
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/pickfirst.go b/cluster-autoscaler/vendor/google.golang.org/grpc/pickfirst.go
index b858c2a5e63b..f194d14a0816 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/pickfirst.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/pickfirst.go
@@ -107,10 +107,12 @@ func (b *pickfirstBalancer) UpdateSubConnState(sc balancer.SubConn, s balancer.S
}
switch s.ConnectivityState {
- case connectivity.Ready, connectivity.Idle:
+ case connectivity.Ready:
b.cc.UpdateState(balancer.State{ConnectivityState: s.ConnectivityState, Picker: &picker{result: balancer.PickResult{SubConn: sc}}})
case connectivity.Connecting:
b.cc.UpdateState(balancer.State{ConnectivityState: s.ConnectivityState, Picker: &picker{err: balancer.ErrNoSubConnAvailable}})
+ case connectivity.Idle:
+ b.cc.UpdateState(balancer.State{ConnectivityState: s.ConnectivityState, Picker: &idlePicker{sc: sc}})
case connectivity.TransientFailure:
b.cc.UpdateState(balancer.State{
ConnectivityState: s.ConnectivityState,
@@ -122,6 +124,12 @@ func (b *pickfirstBalancer) UpdateSubConnState(sc balancer.SubConn, s balancer.S
func (b *pickfirstBalancer) Close() {
}
+func (b *pickfirstBalancer) ExitIdle() {
+ if b.state == connectivity.Idle {
+ b.sc.Connect()
+ }
+}
+
type picker struct {
result balancer.PickResult
err error
@@ -131,6 +139,17 @@ func (p *picker) Pick(info balancer.PickInfo) (balancer.PickResult, error) {
return p.result, p.err
}
+// idlePicker is used when the SubConn is IDLE and kicks the SubConn into
+// CONNECTING when Pick is called.
+type idlePicker struct {
+ sc balancer.SubConn
+}
+
+func (i *idlePicker) Pick(info balancer.PickInfo) (balancer.PickResult, error) {
+ i.sc.Connect()
+ return balancer.PickResult{}, balancer.ErrNoSubConnAvailable
+}
+
func init() {
balancer.Register(newPickfirstBuilder())
}
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/resolver/map.go b/cluster-autoscaler/vendor/google.golang.org/grpc/resolver/map.go
new file mode 100644
index 000000000000..e87ecd0eeb38
--- /dev/null
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/resolver/map.go
@@ -0,0 +1,109 @@
+/*
+ *
+ * Copyright 2021 gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package resolver
+
+type addressMapEntry struct {
+ addr Address
+ value interface{}
+}
+
+// AddressMap is a map of addresses to arbitrary values taking into account
+// Attributes. BalancerAttributes are ignored, as are Metadata and Type.
+// Multiple accesses may not be performed concurrently. Must be created via
+// NewAddressMap; do not construct directly.
+type AddressMap struct {
+ m map[string]addressMapEntryList
+}
+
+type addressMapEntryList []*addressMapEntry
+
+// NewAddressMap creates a new AddressMap.
+func NewAddressMap() *AddressMap {
+ return &AddressMap{m: make(map[string]addressMapEntryList)}
+}
+
+// find returns the index of addr in the addressMapEntry slice, or -1 if not
+// present.
+func (l addressMapEntryList) find(addr Address) int {
+ if len(l) == 0 {
+ return -1
+ }
+ for i, entry := range l {
+ if entry.addr.ServerName == addr.ServerName &&
+ entry.addr.Attributes.Equal(addr.Attributes) {
+ return i
+ }
+ }
+ return -1
+}
+
+// Get returns the value for the address in the map, if present.
+func (a *AddressMap) Get(addr Address) (value interface{}, ok bool) {
+ entryList := a.m[addr.Addr]
+ if entry := entryList.find(addr); entry != -1 {
+ return entryList[entry].value, true
+ }
+ return nil, false
+}
+
+// Set updates or adds the value to the address in the map.
+func (a *AddressMap) Set(addr Address, value interface{}) {
+ entryList := a.m[addr.Addr]
+ if entry := entryList.find(addr); entry != -1 {
+ a.m[addr.Addr][entry].value = value
+ return
+ }
+ a.m[addr.Addr] = append(a.m[addr.Addr], &addressMapEntry{addr: addr, value: value})
+}
+
+// Delete removes addr from the map.
+func (a *AddressMap) Delete(addr Address) {
+ entryList := a.m[addr.Addr]
+ entry := entryList.find(addr)
+ if entry == -1 {
+ return
+ }
+ if len(entryList) == 1 {
+ entryList = nil
+ } else {
+ copy(entryList[entry:], entryList[entry+1:])
+ entryList = entryList[:len(entryList)-1]
+ }
+ a.m[addr.Addr] = entryList
+}
+
+// Len returns the number of entries in the map.
+func (a *AddressMap) Len() int {
+ ret := 0
+ for _, entryList := range a.m {
+ ret += len(entryList)
+ }
+ return ret
+}
+
+// Keys returns a slice of all current map keys.
+func (a *AddressMap) Keys() []Address {
+ ret := make([]Address, 0, a.Len())
+ for _, entryList := range a.m {
+ for _, entry := range entryList {
+ ret = append(ret, entry.addr)
+ }
+ }
+ return ret
+}
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/resolver/resolver.go b/cluster-autoscaler/vendor/google.golang.org/grpc/resolver/resolver.go
index 6a9d234a597a..e28b68026062 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/resolver/resolver.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/resolver/resolver.go
@@ -23,6 +23,7 @@ package resolver
import (
"context"
"net"
+ "net/url"
"google.golang.org/grpc/attributes"
"google.golang.org/grpc/credentials"
@@ -116,9 +117,14 @@ type Address struct {
ServerName string
// Attributes contains arbitrary data about this address intended for
- // consumption by the load balancing policy.
+ // consumption by the SubConn.
Attributes *attributes.Attributes
+ // BalancerAttributes contains arbitrary data about this address intended
+ // for consumption by the LB policy. These attribes do not affect SubConn
+ // creation, connection establishment, handshaking, etc.
+ BalancerAttributes *attributes.Attributes
+
// Type is the type of this address.
//
// Deprecated: use Attributes instead.
@@ -131,6 +137,15 @@ type Address struct {
Metadata interface{}
}
+// Equal returns whether a and o are identical. Metadata is compared directly,
+// not with any recursive introspection.
+func (a *Address) Equal(o Address) bool {
+ return a.Addr == o.Addr && a.ServerName == o.ServerName &&
+ a.Attributes.Equal(o.Attributes) &&
+ a.BalancerAttributes.Equal(o.BalancerAttributes) &&
+ a.Type == o.Type && a.Metadata == o.Metadata
+}
+
// BuildOptions includes additional information for the builder to create
// the resolver.
type BuildOptions struct {
@@ -204,25 +219,36 @@ type ClientConn interface {
// Target represents a target for gRPC, as specified in:
// https://github.com/grpc/grpc/blob/master/doc/naming.md.
-// It is parsed from the target string that gets passed into Dial or DialContext by the user. And
-// grpc passes it to the resolver and the balancer.
+// It is parsed from the target string that gets passed into Dial or DialContext
+// by the user. And gRPC passes it to the resolver and the balancer.
//
-// If the target follows the naming spec, and the parsed scheme is registered with grpc, we will
-// parse the target string according to the spec. e.g. "dns://some_authority/foo.bar" will be parsed
-// into &Target{Scheme: "dns", Authority: "some_authority", Endpoint: "foo.bar"}
+// If the target follows the naming spec, and the parsed scheme is registered
+// with gRPC, we will parse the target string according to the spec. If the
+// target does not contain a scheme or if the parsed scheme is not registered
+// (i.e. no corresponding resolver available to resolve the endpoint), we will
+// apply the default scheme, and will attempt to reparse it.
//
-// If the target does not contain a scheme, we will apply the default scheme, and set the Target to
-// be the full target string. e.g. "foo.bar" will be parsed into
-// &Target{Scheme: resolver.GetDefaultScheme(), Endpoint: "foo.bar"}.
+// Examples:
//
-// If the parsed scheme is not registered (i.e. no corresponding resolver available to resolve the
-// endpoint), we set the Scheme to be the default scheme, and set the Endpoint to be the full target
-// string. e.g. target string "unknown_scheme://authority/endpoint" will be parsed into
-// &Target{Scheme: resolver.GetDefaultScheme(), Endpoint: "unknown_scheme://authority/endpoint"}.
+// - "dns://some_authority/foo.bar"
+// Target{Scheme: "dns", Authority: "some_authority", Endpoint: "foo.bar"}
+// - "foo.bar"
+// Target{Scheme: resolver.GetDefaultScheme(), Endpoint: "foo.bar"}
+// - "unknown_scheme://authority/endpoint"
+// Target{Scheme: resolver.GetDefaultScheme(), Endpoint: "unknown_scheme://authority/endpoint"}
type Target struct {
- Scheme string
+ // Deprecated: use URL.Scheme instead.
+ Scheme string
+ // Deprecated: use URL.Host instead.
Authority string
- Endpoint string
+ // Deprecated: use URL.Path or URL.Opaque instead. The latter is set when
+ // the former is empty.
+ Endpoint string
+ // URL contains the parsed dial target with an optional default scheme added
+ // to it if the original dial target contained no scheme or contained an
+ // unregistered scheme. Any query params specified in the original dial
+ // target can be accessed from here.
+ URL url.URL
}
// Builder creates a resolver that will be used to watch name resolution updates.
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/server.go b/cluster-autoscaler/vendor/google.golang.org/grpc/server.go
index 0251f48daf1d..eadf9e05fd18 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/server.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/server.go
@@ -710,13 +710,6 @@ func (s *Server) GetServiceInfo() map[string]ServiceInfo {
// the server being stopped.
var ErrServerStopped = errors.New("grpc: the server has been stopped")
-func (s *Server) useTransportAuthenticator(rawConn net.Conn) (net.Conn, credentials.AuthInfo, error) {
- if s.opts.creds == nil {
- return rawConn, nil, nil
- }
- return s.opts.creds.ServerHandshake(rawConn)
-}
-
type listenSocket struct {
net.Listener
channelzID int64
@@ -839,35 +832,14 @@ func (s *Server) handleRawConn(lisAddr string, rawConn net.Conn) {
return
}
rawConn.SetDeadline(time.Now().Add(s.opts.connectionTimeout))
- conn, authInfo, err := s.useTransportAuthenticator(rawConn)
- if err != nil {
- // ErrConnDispatched means that the connection was dispatched away from
- // gRPC; those connections should be left open.
- if err != credentials.ErrConnDispatched {
- // In deployments where a gRPC server runs behind a cloud load
- // balancer which performs regular TCP level health checks, the
- // connection is closed immediately by the latter. Skipping the
- // error here will help reduce log clutter.
- if err != io.EOF {
- s.mu.Lock()
- s.errorf("ServerHandshake(%q) failed: %v", rawConn.RemoteAddr(), err)
- s.mu.Unlock()
- channelz.Warningf(logger, s.channelzID, "grpc: Server.Serve failed to complete security handshake from %q: %v", rawConn.RemoteAddr(), err)
- }
- rawConn.Close()
- }
- rawConn.SetDeadline(time.Time{})
- return
- }
// Finish handshaking (HTTP2)
- st := s.newHTTP2Transport(conn, authInfo)
+ st := s.newHTTP2Transport(rawConn)
+ rawConn.SetDeadline(time.Time{})
if st == nil {
- conn.Close()
return
}
- rawConn.SetDeadline(time.Time{})
if !s.addConn(lisAddr, st) {
return
}
@@ -888,10 +860,11 @@ func (s *Server) drainServerTransports(addr string) {
// newHTTP2Transport sets up a http/2 transport (using the
// gRPC http2 server transport in transport/http2_server.go).
-func (s *Server) newHTTP2Transport(c net.Conn, authInfo credentials.AuthInfo) transport.ServerTransport {
+func (s *Server) newHTTP2Transport(c net.Conn) transport.ServerTransport {
config := &transport.ServerConfig{
MaxStreams: s.opts.maxConcurrentStreams,
- AuthInfo: authInfo,
+ ConnectionTimeout: s.opts.connectionTimeout,
+ Credentials: s.opts.creds,
InTapHandle: s.opts.inTapHandle,
StatsHandler: s.opts.statsHandler,
KeepaliveParams: s.opts.keepaliveParams,
@@ -909,8 +882,15 @@ func (s *Server) newHTTP2Transport(c net.Conn, authInfo credentials.AuthInfo) tr
s.mu.Lock()
s.errorf("NewServerTransport(%q) failed: %v", c.RemoteAddr(), err)
s.mu.Unlock()
- c.Close()
- channelz.Warning(logger, s.channelzID, "grpc: Server.Serve failed to create ServerTransport: ", err)
+ // ErrConnDispatched means that the connection was dispatched away from
+ // gRPC; those connections should be left open.
+ if err != credentials.ErrConnDispatched {
+ // Don't log on ErrConnDispatched and io.EOF to prevent log spam.
+ if err != io.EOF {
+ channelz.Warning(logger, s.channelzID, "grpc: Server.Serve failed to create ServerTransport: ", err)
+ }
+ c.Close()
+ }
return nil
}
@@ -1124,16 +1104,21 @@ func chainUnaryServerInterceptors(s *Server) {
func chainUnaryInterceptors(interceptors []UnaryServerInterceptor) UnaryServerInterceptor {
return func(ctx context.Context, req interface{}, info *UnaryServerInfo, handler UnaryHandler) (interface{}, error) {
- var i int
- var next UnaryHandler
- next = func(ctx context.Context, req interface{}) (interface{}, error) {
- if i == len(interceptors)-1 {
- return interceptors[i](ctx, req, info, handler)
+ // the struct ensures the variables are allocated together, rather than separately, since we
+ // know they should be garbage collected together. This saves 1 allocation and decreases
+ // time/call by about 10% on the microbenchmark.
+ var state struct {
+ i int
+ next UnaryHandler
+ }
+ state.next = func(ctx context.Context, req interface{}) (interface{}, error) {
+ if state.i == len(interceptors)-1 {
+ return interceptors[state.i](ctx, req, info, handler)
}
- i++
- return interceptors[i-1](ctx, req, info, next)
+ state.i++
+ return interceptors[state.i-1](ctx, req, info, state.next)
}
- return next(ctx, req)
+ return state.next(ctx, req)
}
}
@@ -1409,16 +1394,21 @@ func chainStreamServerInterceptors(s *Server) {
func chainStreamInterceptors(interceptors []StreamServerInterceptor) StreamServerInterceptor {
return func(srv interface{}, ss ServerStream, info *StreamServerInfo, handler StreamHandler) error {
- var i int
- var next StreamHandler
- next = func(srv interface{}, ss ServerStream) error {
- if i == len(interceptors)-1 {
- return interceptors[i](srv, ss, info, handler)
+ // the struct ensures the variables are allocated together, rather than separately, since we
+ // know they should be garbage collected together. This saves 1 allocation and decreases
+ // time/call by about 10% on the microbenchmark.
+ var state struct {
+ i int
+ next StreamHandler
+ }
+ state.next = func(srv interface{}, ss ServerStream) error {
+ if state.i == len(interceptors)-1 {
+ return interceptors[state.i](srv, ss, info, handler)
}
- i++
- return interceptors[i-1](srv, ss, info, next)
+ state.i++
+ return interceptors[state.i-1](srv, ss, info, state.next)
}
- return next(srv, ss)
+ return state.next(srv, ss)
}
}
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/stats/stats.go b/cluster-autoscaler/vendor/google.golang.org/grpc/stats/stats.go
index a5ebeeb6932d..0285dcc6a268 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/stats/stats.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/stats/stats.go
@@ -36,12 +36,12 @@ type RPCStats interface {
IsClient() bool
}
-// Begin contains stats when an RPC begins.
+// Begin contains stats when an RPC attempt begins.
// FailFast is only valid if this Begin is from client side.
type Begin struct {
// Client is true if this Begin is from client side.
Client bool
- // BeginTime is the time when the RPC begins.
+ // BeginTime is the time when the RPC attempt begins.
BeginTime time.Time
// FailFast indicates if this RPC is failfast.
FailFast bool
@@ -49,6 +49,9 @@ type Begin struct {
IsClientStream bool
// IsServerStream indicates whether the RPC is a server streaming RPC.
IsServerStream bool
+ // IsTransparentRetryAttempt indicates whether this attempt was initiated
+ // due to transparently retrying a previous attempt.
+ IsTransparentRetryAttempt bool
}
// IsClient indicates if the stats information is from client side.
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/status/status.go b/cluster-autoscaler/vendor/google.golang.org/grpc/status/status.go
index 54d187186b8f..af2cffe985c0 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/status/status.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/status/status.go
@@ -73,11 +73,16 @@ func FromProto(s *spb.Status) *Status {
return status.FromProto(s)
}
-// FromError returns a Status representing err if it was produced by this
-// package or has a method `GRPCStatus() *Status`.
-// If err is nil, a Status is returned with codes.OK and no message.
-// Otherwise, ok is false and a Status is returned with codes.Unknown and
-// the original error message.
+// FromError returns a Status representation of err.
+//
+// - If err was produced by this package or implements the method `GRPCStatus()
+// *Status`, the appropriate Status is returned.
+//
+// - If err is nil, a Status is returned with codes.OK and no message.
+//
+// - Otherwise, err is an error not compatible with this package. In this
+// case, a Status is returned with codes.Unknown and err's Error() message,
+// and ok is false.
func FromError(err error) (s *Status, ok bool) {
if err == nil {
return nil, true
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/stream.go b/cluster-autoscaler/vendor/google.golang.org/grpc/stream.go
index e224af12d218..625d47b34e59 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/stream.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/stream.go
@@ -274,35 +274,6 @@ func newClientStreamWithParams(ctx context.Context, desc *StreamDesc, cc *Client
if c.creds != nil {
callHdr.Creds = c.creds
}
- var trInfo *traceInfo
- if EnableTracing {
- trInfo = &traceInfo{
- tr: trace.New("grpc.Sent."+methodFamily(method), method),
- firstLine: firstLine{
- client: true,
- },
- }
- if deadline, ok := ctx.Deadline(); ok {
- trInfo.firstLine.deadline = time.Until(deadline)
- }
- trInfo.tr.LazyLog(&trInfo.firstLine, false)
- ctx = trace.NewContext(ctx, trInfo.tr)
- }
- ctx = newContextWithRPCInfo(ctx, c.failFast, c.codec, cp, comp)
- sh := cc.dopts.copts.StatsHandler
- var beginTime time.Time
- if sh != nil {
- ctx = sh.TagRPC(ctx, &stats.RPCTagInfo{FullMethodName: method, FailFast: c.failFast})
- beginTime = time.Now()
- begin := &stats.Begin{
- Client: true,
- BeginTime: beginTime,
- FailFast: c.failFast,
- IsClientStream: desc.ClientStreams,
- IsServerStream: desc.ServerStreams,
- }
- sh.HandleRPC(ctx, begin)
- }
cs := &clientStream{
callHdr: callHdr,
@@ -316,7 +287,6 @@ func newClientStreamWithParams(ctx context.Context, desc *StreamDesc, cc *Client
cp: cp,
comp: comp,
cancel: cancel,
- beginTime: beginTime,
firstAttempt: true,
onCommit: onCommit,
}
@@ -325,9 +295,7 @@ func newClientStreamWithParams(ctx context.Context, desc *StreamDesc, cc *Client
}
cs.binlog = binarylog.GetMethodLogger(method)
- // Only this initial attempt has stats/tracing.
- // TODO(dfawley): move to newAttempt when per-attempt stats are implemented.
- if err := cs.newAttemptLocked(sh, trInfo); err != nil {
+ if err := cs.newAttemptLocked(false /* isTransparent */); err != nil {
cs.finish(err)
return nil, err
}
@@ -375,8 +343,43 @@ func newClientStreamWithParams(ctx context.Context, desc *StreamDesc, cc *Client
// newAttemptLocked creates a new attempt with a transport.
// If it succeeds, then it replaces clientStream's attempt with this new attempt.
-func (cs *clientStream) newAttemptLocked(sh stats.Handler, trInfo *traceInfo) (retErr error) {
+func (cs *clientStream) newAttemptLocked(isTransparent bool) (retErr error) {
+ ctx := newContextWithRPCInfo(cs.ctx, cs.callInfo.failFast, cs.callInfo.codec, cs.cp, cs.comp)
+ method := cs.callHdr.Method
+ sh := cs.cc.dopts.copts.StatsHandler
+ var beginTime time.Time
+ if sh != nil {
+ ctx = sh.TagRPC(ctx, &stats.RPCTagInfo{FullMethodName: method, FailFast: cs.callInfo.failFast})
+ beginTime = time.Now()
+ begin := &stats.Begin{
+ Client: true,
+ BeginTime: beginTime,
+ FailFast: cs.callInfo.failFast,
+ IsClientStream: cs.desc.ClientStreams,
+ IsServerStream: cs.desc.ServerStreams,
+ IsTransparentRetryAttempt: isTransparent,
+ }
+ sh.HandleRPC(ctx, begin)
+ }
+
+ var trInfo *traceInfo
+ if EnableTracing {
+ trInfo = &traceInfo{
+ tr: trace.New("grpc.Sent."+methodFamily(method), method),
+ firstLine: firstLine{
+ client: true,
+ },
+ }
+ if deadline, ok := ctx.Deadline(); ok {
+ trInfo.firstLine.deadline = time.Until(deadline)
+ }
+ trInfo.tr.LazyLog(&trInfo.firstLine, false)
+ ctx = trace.NewContext(ctx, trInfo.tr)
+ }
+
newAttempt := &csAttempt{
+ ctx: ctx,
+ beginTime: beginTime,
cs: cs,
dc: cs.cc.dopts.dc,
statsHandler: sh,
@@ -391,15 +394,14 @@ func (cs *clientStream) newAttemptLocked(sh stats.Handler, trInfo *traceInfo) (r
}
}()
- if err := cs.ctx.Err(); err != nil {
+ if err := ctx.Err(); err != nil {
return toRPCErr(err)
}
- ctx := cs.ctx
if cs.cc.parsedTarget.Scheme == "xds" {
// Add extra metadata (metadata that will be added by transport) to context
// so the balancer can see them.
- ctx = grpcutil.WithExtraMetadata(cs.ctx, metadata.Pairs(
+ ctx = grpcutil.WithExtraMetadata(ctx, metadata.Pairs(
"content-type", grpcutil.ContentType(cs.callHdr.ContentSubtype),
))
}
@@ -419,7 +421,7 @@ func (cs *clientStream) newAttemptLocked(sh stats.Handler, trInfo *traceInfo) (r
func (a *csAttempt) newStream() error {
cs := a.cs
cs.callHdr.PreviousAttempts = cs.numRetries
- s, err := a.t.NewStream(cs.ctx, cs.callHdr)
+ s, err := a.t.NewStream(a.ctx, cs.callHdr)
if err != nil {
// Return without converting to an RPC error so retry code can
// inspect.
@@ -444,8 +446,7 @@ type clientStream struct {
cancel context.CancelFunc // cancels all attempts
- sentLast bool // sent an end stream
- beginTime time.Time
+ sentLast bool // sent an end stream
methodConfig *MethodConfig
@@ -485,6 +486,7 @@ type clientStream struct {
// csAttempt implements a single transport stream attempt within a
// clientStream.
type csAttempt struct {
+ ctx context.Context
cs *clientStream
t transport.ClientTransport
s *transport.Stream
@@ -503,6 +505,7 @@ type csAttempt struct {
trInfo *traceInfo
statsHandler stats.Handler
+ beginTime time.Time
}
func (cs *clientStream) commitAttemptLocked() {
@@ -520,15 +523,16 @@ func (cs *clientStream) commitAttempt() {
}
// shouldRetry returns nil if the RPC should be retried; otherwise it returns
-// the error that should be returned by the operation.
-func (cs *clientStream) shouldRetry(err error) error {
+// the error that should be returned by the operation. If the RPC should be
+// retried, the bool indicates whether it is being retried transparently.
+func (cs *clientStream) shouldRetry(err error) (bool, error) {
if cs.attempt.s == nil {
// Error from NewClientStream.
nse, ok := err.(*transport.NewStreamError)
if !ok {
// Unexpected, but assume no I/O was performed and the RPC is not
// fatal, so retry indefinitely.
- return nil
+ return true, nil
}
// Unwrap and convert error.
@@ -537,19 +541,19 @@ func (cs *clientStream) shouldRetry(err error) error {
// Never retry DoNotRetry errors, which indicate the RPC should not be
// retried due to max header list size violation, etc.
if nse.DoNotRetry {
- return err
+ return false, err
}
// In the event of a non-IO operation error from NewStream, we never
// attempted to write anything to the wire, so we can retry
// indefinitely.
- if !nse.PerformedIO {
- return nil
+ if !nse.DoNotTransparentRetry {
+ return true, nil
}
}
if cs.finished || cs.committed {
// RPC is finished or committed; cannot retry.
- return err
+ return false, err
}
// Wait for the trailers.
unprocessed := false
@@ -559,17 +563,17 @@ func (cs *clientStream) shouldRetry(err error) error {
}
if cs.firstAttempt && unprocessed {
// First attempt, stream unprocessed: transparently retry.
- return nil
+ return true, nil
}
if cs.cc.dopts.disableRetry {
- return err
+ return false, err
}
pushback := 0
hasPushback := false
if cs.attempt.s != nil {
if !cs.attempt.s.TrailersOnly() {
- return err
+ return false, err
}
// TODO(retry): Move down if the spec changes to not check server pushback
@@ -580,13 +584,13 @@ func (cs *clientStream) shouldRetry(err error) error {
if pushback, e = strconv.Atoi(sps[0]); e != nil || pushback < 0 {
channelz.Infof(logger, cs.cc.channelzID, "Server retry pushback specified to abort (%q).", sps[0])
cs.retryThrottler.throttle() // This counts as a failure for throttling.
- return err
+ return false, err
}
hasPushback = true
} else if len(sps) > 1 {
channelz.Warningf(logger, cs.cc.channelzID, "Server retry pushback specified multiple values (%q); not retrying.", sps)
cs.retryThrottler.throttle() // This counts as a failure for throttling.
- return err
+ return false, err
}
}
@@ -599,16 +603,16 @@ func (cs *clientStream) shouldRetry(err error) error {
rp := cs.methodConfig.RetryPolicy
if rp == nil || !rp.RetryableStatusCodes[code] {
- return err
+ return false, err
}
// Note: the ordering here is important; we count this as a failure
// only if the code matched a retryable code.
if cs.retryThrottler.throttle() {
- return err
+ return false, err
}
if cs.numRetries+1 >= rp.MaxAttempts {
- return err
+ return false, err
}
var dur time.Duration
@@ -631,10 +635,10 @@ func (cs *clientStream) shouldRetry(err error) error {
select {
case <-t.C:
cs.numRetries++
- return nil
+ return false, nil
case <-cs.ctx.Done():
t.Stop()
- return status.FromContextError(cs.ctx.Err()).Err()
+ return false, status.FromContextError(cs.ctx.Err()).Err()
}
}
@@ -642,12 +646,13 @@ func (cs *clientStream) shouldRetry(err error) error {
func (cs *clientStream) retryLocked(lastErr error) error {
for {
cs.attempt.finish(toRPCErr(lastErr))
- if err := cs.shouldRetry(lastErr); err != nil {
+ isTransparent, err := cs.shouldRetry(lastErr)
+ if err != nil {
cs.commitAttemptLocked()
return err
}
cs.firstAttempt = false
- if err := cs.newAttemptLocked(nil, nil); err != nil {
+ if err := cs.newAttemptLocked(isTransparent); err != nil {
return err
}
if lastErr = cs.replayBufferLocked(); lastErr == nil {
@@ -937,7 +942,7 @@ func (a *csAttempt) sendMsg(m interface{}, hdr, payld, data []byte) error {
return io.EOF
}
if a.statsHandler != nil {
- a.statsHandler.HandleRPC(cs.ctx, outPayload(true, m, data, payld, time.Now()))
+ a.statsHandler.HandleRPC(a.ctx, outPayload(true, m, data, payld, time.Now()))
}
if channelz.IsOn() {
a.t.IncrMsgSent()
@@ -985,7 +990,7 @@ func (a *csAttempt) recvMsg(m interface{}, payInfo *payloadInfo) (err error) {
a.mu.Unlock()
}
if a.statsHandler != nil {
- a.statsHandler.HandleRPC(cs.ctx, &stats.InPayload{
+ a.statsHandler.HandleRPC(a.ctx, &stats.InPayload{
Client: true,
RecvTime: time.Now(),
Payload: m,
@@ -1047,12 +1052,12 @@ func (a *csAttempt) finish(err error) {
if a.statsHandler != nil {
end := &stats.End{
Client: true,
- BeginTime: a.cs.beginTime,
+ BeginTime: a.beginTime,
EndTime: time.Now(),
Trailer: tr,
Error: err,
}
- a.statsHandler.HandleRPC(a.cs.ctx, end)
+ a.statsHandler.HandleRPC(a.ctx, end)
}
if a.trInfo != nil && a.trInfo.tr != nil {
if err == nil {
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/version.go b/cluster-autoscaler/vendor/google.golang.org/grpc/version.go
index e3510e10f193..1a5fd584af38 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/version.go
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/version.go
@@ -19,4 +19,4 @@
package grpc
// Version is the current grpc version.
-const Version = "1.40.0"
+const Version = "1.42.0"
diff --git a/cluster-autoscaler/vendor/google.golang.org/grpc/vet.sh b/cluster-autoscaler/vendor/google.golang.org/grpc/vet.sh
index 5eaa8b05d6d3..d923187a7b3a 100644
--- a/cluster-autoscaler/vendor/google.golang.org/grpc/vet.sh
+++ b/cluster-autoscaler/vendor/google.golang.org/grpc/vet.sh
@@ -89,10 +89,6 @@ not git grep "\(import \|^\s*\)\"github.com/golang/protobuf/ptypes/" -- "*.go"
# - Ensure all xds proto imports are renamed to *pb or *grpc.
git grep '"github.com/envoyproxy/go-control-plane/envoy' -- '*.go' ':(exclude)*.pb.go' | not grep -v 'pb "\|grpc "'
-# - Check imports that are illegal in appengine (until Go 1.11).
-# TODO: Remove when we drop Go 1.10 support
-go list -f {{.Dir}} ./... | xargs go run test/go_vet/vet.go
-
misspell -error .
# - Check that generated proto files are up to date.
diff --git a/cluster-autoscaler/vendor/k8s.io/utils/inotify/inotify_linux.go b/cluster-autoscaler/vendor/k8s.io/utils/inotify/inotify_linux.go
index 6258277c9659..2963042e4745 100644
--- a/cluster-autoscaler/vendor/k8s.io/utils/inotify/inotify_linux.go
+++ b/cluster-autoscaler/vendor/k8s.io/utils/inotify/inotify_linux.go
@@ -120,7 +120,11 @@ func (w *Watcher) RemoveWatch(path string) error {
}
success, errno := syscall.InotifyRmWatch(w.fd, watch.wd)
if success == -1 {
- return os.NewSyscallError("inotify_rm_watch", errno)
+ // when file descriptor or watch descriptor not found, InotifyRmWatch syscall return EINVAL error
+ // if return error, it may lead this path remain in watches and paths map, and no other event can trigger remove action.
+ if errno != syscall.EINVAL {
+ return os.NewSyscallError("inotify_rm_watch", errno)
+ }
}
delete(w.watches, path)
// Locking here to protect the read from paths in readEvents.
diff --git a/cluster-autoscaler/vendor/modules.txt b/cluster-autoscaler/vendor/modules.txt
index 54b2f59a9d8c..0e5d038728c5 100644
--- a/cluster-autoscaler/vendor/modules.txt
+++ b/cluster-autoscaler/vendor/modules.txt
@@ -1,12 +1,14 @@
# cloud.google.com/go v0.81.0
## explicit
cloud.google.com/go/compute/metadata
-# github.com/Azure/azure-sdk-for-go v55.8.0+incompatible
+# github.com/Azure/azure-sdk-for-go v63.4.0+incompatible
## explicit
github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-12-01/compute
github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute
+github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute
github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2019-05-01/containerregistry
github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice
+github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice
github.com/Azure/azure-sdk-for-go/services/network/mgmt/2019-06-01/network
github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network
github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns
@@ -20,11 +22,11 @@ github.com/Azure/go-ansiterm
github.com/Azure/go-ansiterm/winterm
# github.com/Azure/go-autorest v14.2.0+incompatible
github.com/Azure/go-autorest
-# github.com/Azure/go-autorest/autorest v0.11.22
+# github.com/Azure/go-autorest/autorest v0.11.27
## explicit
github.com/Azure/go-autorest/autorest
github.com/Azure/go-autorest/autorest/azure
-# github.com/Azure/go-autorest/autorest/adal v0.9.17
+# github.com/Azure/go-autorest/autorest/adal v0.9.18
## explicit
github.com/Azure/go-autorest/autorest/adal
# github.com/Azure/go-autorest/autorest/azure/auth v0.5.8
@@ -35,7 +37,7 @@ github.com/Azure/go-autorest/autorest/azure/cli
# github.com/Azure/go-autorest/autorest/date v0.3.0
## explicit
github.com/Azure/go-autorest/autorest/date
-# github.com/Azure/go-autorest/autorest/mocks v0.4.1
+# github.com/Azure/go-autorest/autorest/mocks v0.4.2
github.com/Azure/go-autorest/autorest/mocks
# github.com/Azure/go-autorest/autorest/to v0.4.0
## explicit
@@ -149,7 +151,7 @@ github.com/beorn7/perks/quantile
github.com/bits-and-blooms/bitset
# github.com/blang/semver v3.5.1+incompatible
github.com/blang/semver
-# github.com/cespare/xxhash/v2 v2.1.1
+# github.com/cespare/xxhash/v2 v2.1.2
github.com/cespare/xxhash/v2
# github.com/checkpoint-restore/go-criu/v5 v5.0.0
github.com/checkpoint-restore/go-criu/v5
@@ -239,13 +241,13 @@ github.com/emicklei/go-restful
github.com/emicklei/go-restful/log
# github.com/euank/go-kmsg-parser v2.0.0+incompatible
github.com/euank/go-kmsg-parser/kmsgparser
-# github.com/evanphx/json-patch v4.12.0+incompatible
+# github.com/evanphx/json-patch v5.6.0+incompatible
github.com/evanphx/json-patch
# github.com/felixge/httpsnoop v1.0.1
github.com/felixge/httpsnoop
# github.com/form3tech-oss/jwt-go v3.2.3+incompatible
github.com/form3tech-oss/jwt-go
-# github.com/fsnotify/fsnotify v1.5.1
+# github.com/fsnotify/fsnotify v1.5.4
github.com/fsnotify/fsnotify
# github.com/ghodss/yaml v1.0.0
## explicit
@@ -271,7 +273,7 @@ github.com/gogo/protobuf/proto
github.com/gogo/protobuf/protoc-gen-gogo/descriptor
github.com/gogo/protobuf/sortkeys
github.com/gogo/protobuf/types
-# github.com/golang-jwt/jwt/v4 v4.0.0
+# github.com/golang-jwt/jwt/v4 v4.2.0
github.com/golang-jwt/jwt/v4
# github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
github.com/golang/groupcache/lru
@@ -337,7 +339,7 @@ github.com/google/cadvisor/utils/sysinfo
github.com/google/cadvisor/version
github.com/google/cadvisor/watcher
github.com/google/cadvisor/zfs
-# github.com/google/go-cmp v0.5.5
+# github.com/google/go-cmp v0.5.6
github.com/google/go-cmp/cmp
github.com/google/go-cmp/cmp/cmpopts
github.com/google/go-cmp/cmp/internal/diff
@@ -533,7 +535,7 @@ github.com/satori/go.uuid
github.com/seccomp/libseccomp-golang
# github.com/sirupsen/logrus v1.8.1
github.com/sirupsen/logrus
-# github.com/spf13/cobra v1.2.1
+# github.com/spf13/cobra v1.4.0
github.com/spf13/cobra
# github.com/spf13/pflag v1.0.5
## explicit
@@ -545,7 +547,7 @@ github.com/storageos/go-api/serror
github.com/storageos/go-api/types
# github.com/stretchr/objx v0.2.0
github.com/stretchr/objx
-# github.com/stretchr/testify v1.7.0
+# github.com/stretchr/testify v1.7.1
## explicit
github.com/stretchr/testify/assert
github.com/stretchr/testify/mock
@@ -585,14 +587,14 @@ github.com/vmware/govmomi/vim25/progress
github.com/vmware/govmomi/vim25/soap
github.com/vmware/govmomi/vim25/types
github.com/vmware/govmomi/vim25/xml
-# go.etcd.io/etcd/api/v3 v3.5.0
+# go.etcd.io/etcd/api/v3 v3.5.1
go.etcd.io/etcd/api/v3/authpb
go.etcd.io/etcd/api/v3/etcdserverpb
go.etcd.io/etcd/api/v3/membershippb
go.etcd.io/etcd/api/v3/mvccpb
go.etcd.io/etcd/api/v3/v3rpc/rpctypes
go.etcd.io/etcd/api/v3/version
-# go.etcd.io/etcd/client/pkg/v3 v3.5.0
+# go.etcd.io/etcd/client/pkg/v3 v3.5.1
go.etcd.io/etcd/client/pkg/v3/fileutil
go.etcd.io/etcd/client/pkg/v3/logutil
go.etcd.io/etcd/client/pkg/v3/systemd
@@ -691,7 +693,7 @@ go.uber.org/zap/internal/color
go.uber.org/zap/internal/exit
go.uber.org/zap/zapcore
go.uber.org/zap/zapgrpc
-# golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
+# golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce
## explicit
golang.org/x/crypto/cryptobyte
golang.org/x/crypto/cryptobyte/asn1
@@ -701,7 +703,7 @@ golang.org/x/crypto/nacl/secretbox
golang.org/x/crypto/pkcs12
golang.org/x/crypto/pkcs12/internal/rc2
golang.org/x/crypto/salsa20/salsa
-# golang.org/x/net v0.0.0-20210825183410-e898025ed96a
+# golang.org/x/net v0.0.0-20220225172249-27dd8689420f
golang.org/x/net/bpf
golang.org/x/net/context
golang.org/x/net/context/ctxhttp
@@ -716,7 +718,7 @@ golang.org/x/net/internal/timeseries
golang.org/x/net/proxy
golang.org/x/net/trace
golang.org/x/net/websocket
-# golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f
+# golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8
## explicit
golang.org/x/oauth2
golang.org/x/oauth2/authhandler
@@ -728,7 +730,7 @@ golang.org/x/oauth2/jws
golang.org/x/oauth2/jwt
# golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/sync/singleflight
-# golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e
+# golang.org/x/sys v0.0.0-20220412211240-33da011f77ad
golang.org/x/sys/cpu
golang.org/x/sys/internal/unsafeheader
golang.org/x/sys/plan9
@@ -736,7 +738,7 @@ golang.org/x/sys/unix
golang.org/x/sys/windows
golang.org/x/sys/windows/registry
golang.org/x/sys/windows/svc
-# golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b
+# golang.org/x/term v0.0.0-20210927222741-03fcf44c2211
golang.org/x/term
# golang.org/x/text v0.3.7
golang.org/x/text/encoding
@@ -785,12 +787,12 @@ google.golang.org/appengine/internal/modules
google.golang.org/appengine/internal/remote_api
google.golang.org/appengine/internal/urlfetch
google.golang.org/appengine/urlfetch
-# google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2
+# google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa
google.golang.org/genproto/googleapis/api/annotations
google.golang.org/genproto/googleapis/api/httpbody
google.golang.org/genproto/googleapis/rpc/status
google.golang.org/genproto/protobuf/field_mask
-# google.golang.org/grpc v1.40.0
+# google.golang.org/grpc v1.42.0
google.golang.org/grpc
google.golang.org/grpc/attributes
google.golang.org/grpc/backoff
@@ -829,6 +831,7 @@ google.golang.org/grpc/internal/status
google.golang.org/grpc/internal/syscall
google.golang.org/grpc/internal/transport
google.golang.org/grpc/internal/transport/networktype
+google.golang.org/grpc/internal/xds/env
google.golang.org/grpc/keepalive
google.golang.org/grpc/metadata
google.golang.org/grpc/peer
@@ -890,7 +893,7 @@ gopkg.in/warnings.v0
gopkg.in/yaml.v2
# gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
gopkg.in/yaml.v3
-# k8s.io/api v0.23.0 => k8s.io/api v0.23.0
+# k8s.io/api v0.23.5 => k8s.io/api v0.23.0
## explicit
k8s.io/api/admission/v1
k8s.io/api/admission/v1beta1
@@ -939,7 +942,7 @@ k8s.io/api/scheduling/v1beta1
k8s.io/api/storage/v1
k8s.io/api/storage/v1alpha1
k8s.io/api/storage/v1beta1
-# k8s.io/apimachinery v0.23.0 => k8s.io/apimachinery v0.23.1-rc.0
+# k8s.io/apimachinery v0.23.5 => k8s.io/apimachinery v0.23.1-rc.0
## explicit
k8s.io/apimachinery/pkg/api/equality
k8s.io/apimachinery/pkg/api/errors
@@ -999,7 +1002,7 @@ k8s.io/apimachinery/pkg/watch
k8s.io/apimachinery/third_party/forked/golang/json
k8s.io/apimachinery/third_party/forked/golang/netutil
k8s.io/apimachinery/third_party/forked/golang/reflect
-# k8s.io/apiserver v0.23.0 => k8s.io/apiserver v0.23.0
+# k8s.io/apiserver v0.23.5 => k8s.io/apiserver v0.23.0
## explicit
k8s.io/apiserver/pkg/admission
k8s.io/apiserver/pkg/admission/configuration
@@ -1129,7 +1132,7 @@ k8s.io/apiserver/plugin/pkg/audit/truncate
k8s.io/apiserver/plugin/pkg/audit/webhook
k8s.io/apiserver/plugin/pkg/authenticator/token/webhook
k8s.io/apiserver/plugin/pkg/authorizer/webhook
-# k8s.io/client-go v0.23.0 => k8s.io/client-go v0.23.0
+# k8s.io/client-go v0.23.5 => k8s.io/client-go v0.23.0
## explicit
k8s.io/client-go/applyconfigurations/admissionregistration/v1
k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1
@@ -1425,7 +1428,7 @@ k8s.io/client-go/util/homedir
k8s.io/client-go/util/keyutil
k8s.io/client-go/util/retry
k8s.io/client-go/util/workqueue
-# k8s.io/cloud-provider v0.23.0 => k8s.io/cloud-provider v0.23.0
+# k8s.io/cloud-provider v0.23.5 => k8s.io/cloud-provider v0.23.0
## explicit
k8s.io/cloud-provider
k8s.io/cloud-provider/api
@@ -1435,7 +1438,7 @@ k8s.io/cloud-provider/service/helpers
k8s.io/cloud-provider/volume
k8s.io/cloud-provider/volume/errors
k8s.io/cloud-provider/volume/helpers
-# k8s.io/component-base v0.23.0 => k8s.io/component-base v0.23.0
+# k8s.io/component-base v0.23.5 => k8s.io/component-base v0.23.0
## explicit
k8s.io/component-base/cli/flag
k8s.io/component-base/codec
@@ -1458,7 +1461,7 @@ k8s.io/component-base/metrics/testutil
k8s.io/component-base/traces
k8s.io/component-base/version
k8s.io/component-base/version/verflag
-# k8s.io/component-helpers v0.23.0 => k8s.io/component-helpers v0.23.0
+# k8s.io/component-helpers v0.23.5 => k8s.io/component-helpers v0.23.0
## explicit
k8s.io/component-helpers/apimachinery/lease
k8s.io/component-helpers/node/topology
@@ -1498,7 +1501,7 @@ k8s.io/kube-scheduler/config/v1beta3
k8s.io/kube-scheduler/extender/v1
# k8s.io/kubectl v0.0.0 => k8s.io/kubectl v0.23.0
k8s.io/kubectl/pkg/scale
-# k8s.io/kubelet v0.23.0 => k8s.io/kubelet v0.23.0
+# k8s.io/kubelet v0.23.5 => k8s.io/kubelet v0.23.0
## explicit
k8s.io/kubelet/config/v1alpha1
k8s.io/kubelet/config/v1beta1
@@ -1845,7 +1848,7 @@ k8s.io/legacy-cloud-providers/vsphere/vclib
k8s.io/legacy-cloud-providers/vsphere/vclib/diskmanagers
# k8s.io/mount-utils v0.23.0 => k8s.io/mount-utils v0.23.2-rc.0
k8s.io/mount-utils
-# k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b
+# k8s.io/utils v0.0.0-20211116205334-6203023598ed
## explicit
k8s.io/utils/buffer
k8s.io/utils/clock
@@ -1866,10 +1869,10 @@ k8s.io/utils/pointer
k8s.io/utils/strings
k8s.io/utils/strings/slices
k8s.io/utils/trace
-# sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.25
+# sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.30
sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client
sigs.k8s.io/apiserver-network-proxy/konnectivity-client/proto/client
-# sigs.k8s.io/cloud-provider-azure v1.23.2
+# sigs.k8s.io/cloud-provider-azure v1.23.11
## explicit
sigs.k8s.io/cloud-provider-azure/pkg/auth
sigs.k8s.io/cloud-provider-azure/pkg/azureclients
@@ -1914,13 +1917,14 @@ sigs.k8s.io/cloud-provider-azure/pkg/azureclients/zoneclient
sigs.k8s.io/cloud-provider-azure/pkg/cache
sigs.k8s.io/cloud-provider-azure/pkg/consts
sigs.k8s.io/cloud-provider-azure/pkg/metrics
+sigs.k8s.io/cloud-provider-azure/pkg/nodemanager
sigs.k8s.io/cloud-provider-azure/pkg/provider
sigs.k8s.io/cloud-provider-azure/pkg/retry
sigs.k8s.io/cloud-provider-azure/pkg/version
# sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6
sigs.k8s.io/json
sigs.k8s.io/json/internal/golang/encoding/json
-# sigs.k8s.io/structured-merge-diff/v4 v4.1.2
+# sigs.k8s.io/structured-merge-diff/v4 v4.2.1
sigs.k8s.io/structured-merge-diff/v4/fieldpath
sigs.k8s.io/structured-merge-diff/v4/merge
sigs.k8s.io/structured-merge-diff/v4/schema
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client/client.go b/cluster-autoscaler/vendor/sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client/client.go
index 31bf9e11fe52..a3e17cb103e3 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client/client.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client/client.go
@@ -43,10 +43,17 @@ type dialResult struct {
connid int64
}
+type pendingDial struct {
+ // resultCh is the channel to send the dial result to
+ resultCh chan<- dialResult
+ // cancelCh is the channel closed when resultCh no longer has a receiver
+ cancelCh <-chan struct{}
+}
+
// grpcTunnel implements Tunnel
type grpcTunnel struct {
stream client.ProxyService_ProxyClient
- pendingDial map[int64]chan<- dialResult
+ pendingDial map[int64]pendingDial
conns map[int64]*conn
pendingDialLock sync.RWMutex
connsLock sync.RWMutex
@@ -76,12 +83,13 @@ func CreateSingleUseGrpcTunnel(ctx context.Context, address string, opts ...grpc
stream, err := grpcClient.Proxy(ctx)
if err != nil {
+ c.Close()
return nil, err
}
tunnel := &grpcTunnel{
stream: stream,
- pendingDial: make(map[int64]chan<- dialResult),
+ pendingDial: make(map[int64]pendingDial),
conns: make(map[int64]*conn),
readTimeoutSeconds: 10,
}
@@ -110,21 +118,28 @@ func (t *grpcTunnel) serve(c clientConn) {
case client.PacketType_DIAL_RSP:
resp := pkt.GetDialResponse()
t.pendingDialLock.RLock()
- ch, ok := t.pendingDial[resp.Random]
+ pendingDial, ok := t.pendingDial[resp.Random]
t.pendingDialLock.RUnlock()
if !ok {
- klog.V(1).Infoln("DialResp not recognized; dropped")
+ klog.V(1).InfoS("DialResp not recognized; dropped", "connectionID", resp.ConnectID, "dialID", resp.Random)
+ return
} else {
result := dialResult{
err: resp.Error,
connid: resp.ConnectID,
}
- select {
- case ch <- result:
- default:
- klog.ErrorS(fmt.Errorf("blocked pending channel"), "Received second dial response for connection request", "connectionID", resp.ConnectID, "dialID", resp.Random)
- // On multiple dial responses, avoid leaking serve goroutine.
+ select {
+ // try to send to the result channel
+ case pendingDial.resultCh <- result:
+ // unblock if the cancel channel is closed
+ case <-pendingDial.cancelCh:
+ // If there are no readers of the pending dial channel above, it means one of two things:
+ // 1. There was a second DIAL_RSP for the connection request (this is very unlikely but possible)
+ // 2. grpcTunnel.DialContext() returned early due to a dial timeout or the client canceling the context
+ //
+ // In either scenario, we should return here as this tunnel is no longer needed.
+ klog.V(1).InfoS("Pending dial has been cancelled; dropped", "connectionID", resp.ConnectID, "dialID", resp.Random)
return
}
}
@@ -181,9 +196,16 @@ func (t *grpcTunnel) DialContext(ctx context.Context, protocol, address string)
}
random := rand.Int63() /* #nosec G404 */
- resCh := make(chan dialResult, 1)
+
+ // This channel is closed once we're returning and no longer waiting on resultCh
+ cancelCh := make(chan struct{})
+ defer close(cancelCh)
+
+ // This channel MUST NOT be buffered. The sender needs to know when we are not receiving things, so they can abort.
+ resCh := make(chan dialResult)
+
t.pendingDialLock.Lock()
- t.pendingDial[random] = resCh
+ t.pendingDial[random] = pendingDial{resultCh: resCh, cancelCh: cancelCh}
t.pendingDialLock.Unlock()
defer func() {
t.pendingDialLock.Lock()
@@ -224,8 +246,10 @@ func (t *grpcTunnel) DialContext(ctx context.Context, protocol, address string)
t.conns[res.connid] = c
t.connsLock.Unlock()
case <-time.After(30 * time.Second):
+ klog.V(5).InfoS("Timed out waiting for DialResp", "dialID", random)
return nil, errors.New("dial timeout, backstop")
case <-ctx.Done():
+ klog.V(5).InfoS("Context canceled waiting for DialResp", "ctxErr", ctx.Err(), "dialID", random)
return nil, errors.New("dial timeout, context")
}
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/armclient/azure_armclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/armclient/azure_armclient.go
index 350128667c97..fe10dd466dd2 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/armclient/azure_armclient.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/armclient/azure_armclient.go
@@ -19,13 +19,13 @@ package armclient
import (
"bytes"
"context"
- "crypto/tls"
"encoding/json"
"fmt"
+ "html"
"io/ioutil"
"net/http"
- "net/http/cookiejar"
"net/http/httputil"
+ "net/url"
"strings"
"sync"
"time"
@@ -43,45 +43,18 @@ import (
var _ Interface = &Client{}
-// Singleton transport for all connections to ARM.
-var commTransport *http.Transport
-
-func init() {
- // Use behaviour compatible with DefaultTransport, but override MaxIdleConns and MaxIdleConns
- const maxIdleConns = 64
- const maxIdleConnsPerHost = 64
- defaultTransport := http.DefaultTransport.(*http.Transport)
- commTransport = &http.Transport{
- Proxy: defaultTransport.Proxy,
- DialContext: defaultTransport.DialContext,
- MaxIdleConns: maxIdleConns,
- MaxIdleConnsPerHost: maxIdleConnsPerHost,
- IdleConnTimeout: defaultTransport.IdleConnTimeout,
- TLSHandshakeTimeout: defaultTransport.TLSHandshakeTimeout,
- ExpectContinueTimeout: defaultTransport.ExpectContinueTimeout,
- TLSClientConfig: &tls.Config{
- MinVersion: tls.VersionTLS12,
- Renegotiation: tls.RenegotiateNever,
- },
- }
-}
-
// Client implements ARM client Interface.
type Client struct {
- client autorest.Client
- backoff *retry.Backoff
-
- baseURI string
- apiVersion string
- clientRegion string
+ client autorest.Client
+ baseURI string
+ apiVersion string
+ regionalEndpoint string
}
// New creates a ARM client
-func New(authorizer autorest.Authorizer, clientConfig azureclients.ClientConfig, baseURI, apiVersion string) *Client {
+func New(authorizer autorest.Authorizer, clientConfig azureclients.ClientConfig, baseURI, apiVersion string, sendDecoraters ...autorest.SendDecorator) *Client {
restClient := autorest.NewClientWithUserAgent(clientConfig.UserAgent)
restClient.Authorizer = authorizer
- restClient.Sender = getSender()
- restClient.Sender = autorest.DecorateSender(restClient.Sender, autorest.DoCloseIfError())
if clientConfig.UserAgent == "" {
restClient.UserAgent = GetUserAgent(restClient)
@@ -114,20 +87,23 @@ func New(authorizer autorest.Authorizer, clientConfig azureclients.ClientConfig,
backoff.Steps = 1
}
- return &Client{
- client: restClient,
- baseURI: baseURI,
- backoff: backoff,
- apiVersion: apiVersion,
- clientRegion: NormalizeAzureRegion(clientConfig.Location),
+ url, _ := url.Parse(baseURI)
+
+ client := &Client{
+ client: restClient,
+ baseURI: baseURI,
+ apiVersion: apiVersion,
+ regionalEndpoint: fmt.Sprintf("%s.%s", clientConfig.Location, url.Host),
}
-}
+ client.client.Sender = autorest.DecorateSender(client.client,
+ autorest.DoCloseIfError(),
+ retry.DoExponentialBackoffRetry(backoff),
+ DoHackRegionalRetryDecorator(client),
+ )
-func getSender() autorest.Sender {
- // Setup sender with singleton transport so that connections to ARM are shared.
- // Refer https://github.com/Azure/go-autorest/blob/master/autorest/sender.go#L128 for how the sender is created.
- j, _ := cookiejar.New(nil)
- return &http.Client{Jar: j, Transport: commTransport}
+ client.client.Sender = autorest.DecorateSender(client.client.Sender, sendDecoraters...)
+
+ return client
}
// GetUserAgent gets the autorest client with a user agent that
@@ -150,96 +126,84 @@ func NormalizeAzureRegion(name string) string {
return strings.ToLower(region)
}
-// sendRequest sends a http request to ARM service.
-// Although Azure SDK supports retries per https://github.com/azure/azure-sdk-for-go#request-retry-policy, we
-// disable it since we want to fully control the retry policies.
-func (c *Client) sendRequest(ctx context.Context, request *http.Request) (*http.Response, *retry.Error) {
- sendBackoff := *c.backoff
- response, err := autorest.SendWithSender(
- c.client,
- request,
- retry.DoExponentialBackoffRetry(&sendBackoff),
- )
-
- if response == nil && err == nil {
- return response, retry.NewError(false, fmt.Errorf("Empty response and no HTTP code"))
- }
-
- return response, retry.GetError(response, err)
-}
-
-// Send sends a http request to ARM service with possible retry to regional ARM endpoint.
-func (c *Client) Send(ctx context.Context, request *http.Request) (*http.Response, *retry.Error) {
- response, rerr := c.sendRequest(ctx, request)
- if rerr != nil {
- return response, rerr
- }
-
- if response.StatusCode != http.StatusNotFound || c.clientRegion == "" {
- dumpResponse(response, 10)
- return response, rerr
- }
-
- bodyBytes, _ := ioutil.ReadAll(response.Body)
- defer func() {
- response.Body = ioutil.NopCloser(bytes.NewBuffer(bodyBytes))
- }()
+// DoExponentialBackoffRetry returns an autorest.SendDecorator which performs retry with customizable backoff policy.
+func DoHackRegionalRetryDecorator(c *Client) autorest.SendDecorator {
+ return func(s autorest.Sender) autorest.Sender {
+ return autorest.SenderFunc(func(request *http.Request) (*http.Response, error) {
+ response, rerr := s.Do(request)
+ if response == nil {
+ klog.V(2).Infof("response is empty")
+ return response, rerr
+ }
+ if rerr == nil || response.StatusCode == http.StatusNotFound || c.regionalEndpoint == "" {
+ return response, rerr
+ }
+ // Hack: retry the regional ARM endpoint in case of ARM traffic split and arm resource group replication is too slow
+ bodyBytes, _ := ioutil.ReadAll(response.Body)
+ defer func() {
+ response.Body = ioutil.NopCloser(bytes.NewBuffer(bodyBytes))
+ }()
+
+ bodyString := string(bodyBytes)
+ var body map[string]interface{}
+ if e := json.Unmarshal(bodyBytes, &body); e != nil {
+ klog.Errorf("Send.sendRequest: error in parsing response body string: %s, Skip retrying regional host", e.Error())
+ return response, rerr
+ }
+ klog.V(5).Infof("Send.sendRequest original response: %s", bodyString)
- bodyString := string(bodyBytes)
- klog.V(5).Infof("Send.sendRequest original error message: %s", bodyString)
+ if err, ok := body["error"].(map[string]interface{}); !ok ||
+ err["code"] == nil ||
+ !strings.EqualFold(err["code"].(string), "ResourceGroupNotFound") {
+ klog.V(5).Infof("Send.sendRequest: response body does not contain ResourceGroupNotFound error code. Skip retrying regional host")
+ return response, rerr
+ }
- // Hack: retry the regional ARM endpoint in case of ARM traffic split and arm resource group replication is too slow
- var body map[string]interface{}
- if e := json.Unmarshal(bodyBytes, &body); e != nil {
- klog.Errorf("Send.sendRequest: error in parsing response body string: %s, Skip retrying regional host", e)
- return response, rerr
- }
+ currentHost := request.URL.Host
+ if request.Host != "" {
+ currentHost = request.Host
+ }
- if err, ok := body["error"].(map[string]interface{}); !ok ||
- err["code"] == nil ||
- !strings.EqualFold(err["code"].(string), "ResourceGroupNotFound") {
- klog.V(5).Infof("Send.sendRequest: response body does not contain ResourceGroupNotFound error code. Skip retrying regional host")
- return response, rerr
- }
+ if strings.HasPrefix(strings.ToLower(currentHost), c.regionalEndpoint) {
+ klog.V(5).Infof("Send.sendRequest: current host %s is regional host. Skip retrying regional host.", html.EscapeString(currentHost))
+ return response, rerr
+ }
- currentHost := request.URL.Host
- if request.Host != "" {
- currentHost = request.Host
- }
+ request.Host = c.regionalEndpoint
+ request.URL.Host = c.regionalEndpoint
+ klog.V(5).Infof("Send.sendRegionalRequest on ResourceGroupNotFound error. Retrying regional host: %s", html.EscapeString(request.Host))
+
+ regionalResponse, regionalError := s.Do(request)
+ // only use the result if the regional request actually goes through and returns 2xx status code, for two reasons:
+ // 1. the retry on regional ARM host approach is a hack.
+ // 2. the concatenated regional uri could be wrong as the rule is not officially declared by ARM.
+ if regionalResponse == nil || regionalResponse.StatusCode > 299 {
+ regionalErrStr := ""
+ if regionalError != nil {
+ regionalErrStr = regionalError.Error()
+ }
- if strings.HasPrefix(strings.ToLower(currentHost), c.clientRegion) {
- klog.V(5).Infof("Send.sendRequest: current host %s is regional host. Skip retrying regional host.", currentHost)
- return response, rerr
+ klog.V(5).Infof("Send.sendRegionalRequest failed to get response from regional host, error: '%s'. Ignoring the result.", regionalErrStr)
+ return response, rerr
+ }
+ return regionalResponse, regionalError
+ })
}
+}
- request.Host = fmt.Sprintf("%s.%s", c.clientRegion, strings.ToLower(currentHost))
- klog.V(5).Infof("Send.sendRegionalRequest on ResourceGroupNotFound error. Retrying regional host: %s", request.Host)
- regionalResponse, regionalError := c.sendRequest(ctx, request)
-
- // only use the result if the regional request actually goes through and returns 2xx status code, for two reasons:
- // 1. the retry on regional ARM host approach is a hack.
- // 2. the concatenated regional uri could be wrong as the rule is not officially declared by ARM.
- if regionalResponse == nil || regionalResponse.StatusCode > 299 {
- regionalErrStr := ""
- if regionalError != nil {
- regionalErrStr = regionalError.Error().Error()
- }
+// Send sends a http request to ARM service with possible retry to regional ARM endpoint.
+func (c *Client) Send(ctx context.Context, request *http.Request, decorators ...autorest.SendDecorator) (*http.Response, *retry.Error) {
+ response, err := autorest.SendWithSender(
+ c.client,
+ request,
+ decorators...,
+ )
- klog.V(5).Infof("Send.sendRegionalRequest failed to get response from regional host, error: '%s'. Ignoring the result.", regionalErrStr)
- return response, rerr
+ if response == nil && err == nil {
+ return response, retry.NewError(false, fmt.Errorf("Empty response and no HTTP code"))
}
- dumpResponse(response, 10)
- return regionalResponse, regionalError
-}
-
-func dumpResponse(resp *http.Response, v klog.Level) {
- responseDump, err := httputil.DumpResponse(resp, true)
- if err != nil {
- klog.Errorf("Failed to dump response: %v", err)
- } else {
- klog.V(v).Infof("Dumping response: %s", string(responseDump))
- }
+ return response, retry.GetError(response, err)
}
func dumpRequest(req *http.Request, v klog.Level) {
@@ -346,13 +310,7 @@ func (c *Client) WaitForAsyncOperationResult(ctx context.Context, future *azure.
klog.V(5).Infof("Received error in WaitForAsyncOperationCompletion: '%v'", err)
return nil, err
}
-
- sendBackoff := *c.backoff
- sender := autorest.DecorateSender(
- c.client,
- retry.DoExponentialBackoffRetry(&sendBackoff),
- )
- return future.GetResult(sender)
+ return future.GetResult(c.client)
}
// SendAsync send a request and return a future object representing the async result as well as the origin http response
@@ -373,31 +331,22 @@ func (c *Client) SendAsync(ctx context.Context, request *http.Request) (*azure.F
}
// GetResource get a resource by resource ID
-func (c *Client) GetResource(ctx context.Context, resourceID, expand string) (*http.Response, *retry.Error) {
- decorators := []autorest.PrepareDecorator{
- autorest.WithPathParameters("{resourceID}", map[string]interface{}{"resourceID": resourceID}),
- }
+func (c *Client) GetResourceWithExpandQuery(ctx context.Context, resourceID, expand string) (*http.Response, *retry.Error) {
+ var decorators []autorest.PrepareDecorator
if expand != "" {
queryParameters := map[string]interface{}{
"$expand": autorest.Encode("query", expand),
}
decorators = append(decorators, autorest.WithQueryParameters(queryParameters))
}
- request, err := c.PrepareGetRequest(ctx, decorators...)
- if err != nil {
- klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "get.prepare", resourceID, err)
- return nil, retry.NewError(false, err)
- }
-
- return c.Send(ctx, request)
+ return c.GetResource(ctx, resourceID, decorators...)
}
// GetResourceWithDecorators get a resource with decorators by resource ID
-func (c *Client) GetResourceWithDecorators(ctx context.Context, resourceID string, decorators []autorest.PrepareDecorator) (*http.Response, *retry.Error) {
- getDecorators := []autorest.PrepareDecorator{
+func (c *Client) GetResource(ctx context.Context, resourceID string, decorators ...autorest.PrepareDecorator) (*http.Response, *retry.Error) {
+ getDecorators := append([]autorest.PrepareDecorator{
autorest.WithPathParameters("{resourceID}", map[string]interface{}{"resourceID": resourceID}),
- }
- getDecorators = append(getDecorators, decorators...)
+ }, decorators...)
request, err := c.PrepareGetRequest(ctx, getDecorators...)
if err != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "get.prepare", resourceID, err)
@@ -690,7 +639,7 @@ func (c *Client) PostResource(ctx context.Context, resourceID, action string, pa
return nil, retry.NewError(false, err)
}
- return c.sendRequest(ctx, request)
+ return c.Send(ctx, request)
}
// DeleteResource deletes a resource by resource ID
@@ -724,7 +673,7 @@ func (c *Client) HeadResource(ctx context.Context, resourceID string) (*http.Res
return nil, retry.NewError(false, err)
}
- return c.sendRequest(ctx, request)
+ return c.Send(ctx, request)
}
// DeleteResourceAsync delete a resource by resource ID and returns a future representing the async result
@@ -742,7 +691,7 @@ func (c *Client) DeleteResourceAsync(ctx context.Context, resourceID, ifMatch st
return nil, retry.NewError(false, err)
}
- resp, rerr := c.sendRequest(ctx, deleteRequest)
+ resp, rerr := c.Send(ctx, deleteRequest)
defer c.CloseResponse(ctx, resp)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "deleteAsync.send", resourceID, rerr.Error())
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/armclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/armclient/interface.go
index 0970f3e2e08d..4ce0ab0858e1 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/armclient/interface.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/armclient/interface.go
@@ -36,7 +36,7 @@ type PutResourcesResponse struct {
// Don't forget to run "hack/update-mock-clients.sh" command to generate the mock client.
type Interface interface {
// Send sends a http request to ARM service with possible retry to regional ARM endpoint.
- Send(ctx context.Context, request *http.Request) (*http.Response, *retry.Error)
+ Send(ctx context.Context, request *http.Request, decorators ...autorest.SendDecorator) (*http.Response, *retry.Error)
// PreparePutRequest prepares put request
PreparePutRequest(ctx context.Context, decorators ...autorest.PrepareDecorator) (*http.Request, error)
@@ -88,11 +88,11 @@ type Interface interface {
// HeadResource heads a resource by resource ID
HeadResource(ctx context.Context, resourceID string) (*http.Response, *retry.Error)
- // GetResource get a resource by resource ID
- GetResource(ctx context.Context, resourceID, expand string) (*http.Response, *retry.Error)
+ // GetResourceWithExpandQuery get a resource by resource ID
+ GetResourceWithExpandQuery(ctx context.Context, resourceID, expand string) (*http.Response, *retry.Error)
//GetResourceWithDecorators get a resource with decorators by resource ID
- GetResourceWithDecorators(ctx context.Context, resourceID string, decorators []autorest.PrepareDecorator) (*http.Response, *retry.Error)
+ GetResource(ctx context.Context, resourceID string, decorators ...autorest.PrepareDecorator) (*http.Response, *retry.Error)
// PostResource posts a resource by resource ID
PostResource(ctx context.Context, resourceID, action string, parameters interface{}, queryParameters map[string]interface{}) (*http.Response, *retry.Error)
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/containerserviceclient/azure_containerserviceclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/containerserviceclient/azure_containerserviceclient.go
index 34f5710590cc..22f9a45e4f9a 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/containerserviceclient/azure_containerserviceclient.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/containerserviceclient/azure_containerserviceclient.go
@@ -22,7 +22,7 @@ import (
"net/http"
"time"
- "github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice"
+ "github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/to"
@@ -111,6 +111,13 @@ func (c *Client) Get(ctx context.Context, resourceGroupName string, managedClust
// getManagedCluster gets a ManagedCluster.
func (c *Client) getManagedCluster(ctx context.Context, resourceGroupName string, managedClusterName string) (containerservice.ManagedCluster, *retry.Error) {
+ // telemetryDecorator := armclient.WithMetricsDecoratorWrapper("managed_clusters", "get", resourceGroupName, c.subscriptionID, "", func(mc *metrics.MetricContext) []autorest.SendDecorator {
+ // return []autorest.SendDecorator{
+ // armclient.NewErrorCounterDecorator(mc),
+ // armclient.NewRateLimitDecorater(c.rateLimiterReader, mc),
+ // armclient.NewThrottledDecorater(mc),
+ // }
+ // })
resourceID := armclient.GetResourceID(
c.subscriptionID,
resourceGroupName,
@@ -119,7 +126,7 @@ func (c *Client) getManagedCluster(ctx context.Context, resourceGroupName string
)
result := containerservice.ManagedCluster{}
- response, rerr := c.armClient.GetResource(ctx, resourceID, "")
+ response, rerr := c.armClient.GetResource(ctx, resourceID)
defer c.armClient.CloseResponse(ctx, response)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "managedcluster.get.request", resourceID, rerr.Error())
@@ -179,7 +186,7 @@ func (c *Client) listManagedCluster(ctx context.Context, resourceGroupName strin
page := &ManagedClusterResultPage{}
page.fn = c.listNextResults
- resp, rerr := c.armClient.GetResource(ctx, resourceID, "")
+ resp, rerr := c.armClient.GetResource(ctx, resourceID)
defer c.armClient.CloseResponse(ctx, resp)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "managedcluster.list.request", resourceID, rerr.Error())
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/containerserviceclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/containerserviceclient/interface.go
index f68ea46ed9c2..98ff18d8a15a 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/containerserviceclient/interface.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/containerserviceclient/interface.go
@@ -19,14 +19,13 @@ package containerserviceclient
import (
"context"
+ "github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice"
"sigs.k8s.io/cloud-provider-azure/pkg/retry"
-
- "github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice"
)
const (
// APIVersion is the API version for containerservice.
- APIVersion = "2020-04-01"
+ APIVersion = "2021-10-01"
)
// Interface is the client interface for ContainerService.
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/containerserviceclient/mockcontainerserviceclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/containerserviceclient/mockcontainerserviceclient/interface.go
index 10eda846fe76..6ea6b15d092e 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/containerserviceclient/mockcontainerserviceclient/interface.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/containerserviceclient/mockcontainerserviceclient/interface.go
@@ -16,7 +16,7 @@
//
// Code generated by MockGen. DO NOT EDIT.
-// Source: /go/src/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/containerserviceclient/interface.go
+// Source: pkg/azureclients/containerserviceclient/interface.go
// Package mockcontainerserviceclient is a generated GoMock package.
package mockcontainerserviceclient
@@ -25,7 +25,7 @@ import (
context "context"
reflect "reflect"
- containerservice "github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2020-04-01/containerservice"
+ containerservice "github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2021-10-01/containerservice"
gomock "github.com/golang/mock/gomock"
retry "sigs.k8s.io/cloud-provider-azure/pkg/retry"
)
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/deploymentclient/azure_deploymentclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/deploymentclient/azure_deploymentclient.go
index 9067d288ecd4..c0bffa7ee6dc 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/deploymentclient/azure_deploymentclient.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/deploymentclient/azure_deploymentclient.go
@@ -119,7 +119,7 @@ func (c *Client) getDeployment(ctx context.Context, resourceGroupName string, de
)
result := resources.DeploymentExtended{}
- response, rerr := c.armClient.GetResource(ctx, resourceID, "")
+ response, rerr := c.armClient.GetResource(ctx, resourceID)
defer c.armClient.CloseResponse(ctx, response)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "deployment.get.request", resourceID, rerr.Error())
@@ -179,7 +179,7 @@ func (c *Client) listDeployment(ctx context.Context, resourceGroupName string) (
page := &DeploymentResultPage{}
page.fn = c.listNextResults
- resp, rerr := c.armClient.GetResource(ctx, resourceID, "")
+ resp, rerr := c.armClient.GetResource(ctx, resourceID)
defer c.armClient.CloseResponse(ctx, resp)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "deployment.list.request", resourceID, rerr.Error())
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/diskclient/azure_diskclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/diskclient/azure_diskclient.go
index 50c21e7e38ea..5c9911aca6c8 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/diskclient/azure_diskclient.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/diskclient/azure_diskclient.go
@@ -23,7 +23,7 @@ import (
"strings"
"time"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/to"
@@ -129,7 +129,7 @@ func (c *Client) getDisk(ctx context.Context, resourceGroupName string, diskName
)
result := compute.Disk{}
- response, rerr := c.armClient.GetResource(ctx, resourceID, "")
+ response, rerr := c.armClient.GetResource(ctx, resourceID)
defer c.armClient.CloseResponse(ctx, response)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "disk.get.request", resourceID, rerr.Error())
@@ -338,7 +338,7 @@ func (c *Client) ListByResourceGroup(ctx context.Context, resourceGroupName stri
page := &DiskListPage{}
page.fn = c.listNextResults
- resp, rerr := c.armClient.GetResource(ctx, resourceID, "")
+ resp, rerr := c.armClient.GetResource(ctx, resourceID)
defer c.armClient.CloseResponse(ctx, resp)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "disk.list.request", resourceID, rerr.Error())
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/diskclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/diskclient/interface.go
index 405464a31c08..6d22cc8152d1 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/diskclient/interface.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/diskclient/interface.go
@@ -19,7 +19,7 @@ package diskclient
import (
"context"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
"sigs.k8s.io/cloud-provider-azure/pkg/retry"
)
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/diskclient/mockdiskclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/diskclient/mockdiskclient/interface.go
index bb34edf4cbe7..2df9677b9ed2 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/diskclient/mockdiskclient/interface.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/diskclient/mockdiskclient/interface.go
@@ -16,7 +16,7 @@
//
// Code generated by MockGen. DO NOT EDIT.
-// Source: /go/src/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/diskclient/interface.go
+// Source: pkg/azureclients/diskclient/interface.go
// Package mockdiskclient is a generated GoMock package.
package mockdiskclient
@@ -25,7 +25,7 @@ import (
context "context"
reflect "reflect"
- compute "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ compute "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
gomock "github.com/golang/mock/gomock"
retry "sigs.k8s.io/cloud-provider-azure/pkg/retry"
)
@@ -53,21 +53,6 @@ func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder {
return m.recorder
}
-// Get mocks base method.
-func (m *MockInterface) Get(ctx context.Context, resourceGroupName, diskName string) (compute.Disk, *retry.Error) {
- m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "Get", ctx, resourceGroupName, diskName)
- ret0, _ := ret[0].(compute.Disk)
- ret1, _ := ret[1].(*retry.Error)
- return ret0, ret1
-}
-
-// Get indicates an expected call of Get.
-func (mr *MockInterfaceMockRecorder) Get(ctx, resourceGroupName, diskName interface{}) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), ctx, resourceGroupName, diskName)
-}
-
// CreateOrUpdate mocks base method.
func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, diskName string, diskParameter compute.Disk) *retry.Error {
m.ctrl.T.Helper()
@@ -82,20 +67,6 @@ func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, disk
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, diskName, diskParameter)
}
-// Update mocks base method.
-func (m *MockInterface) Update(ctx context.Context, resourceGroupName, diskName string, diskParameter compute.DiskUpdate) *retry.Error {
- m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "Update", ctx, resourceGroupName, diskName, diskParameter)
- ret0, _ := ret[0].(*retry.Error)
- return ret0
-}
-
-// Update indicates an expected call of Update.
-func (mr *MockInterfaceMockRecorder) Update(ctx, resourceGroupName, diskName, diskParameter interface{}) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockInterface)(nil).Update), ctx, resourceGroupName, diskName, diskParameter)
-}
-
// Delete mocks base method.
func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, diskName string) *retry.Error {
m.ctrl.T.Helper()
@@ -110,6 +81,21 @@ func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, diskName int
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, diskName)
}
+// Get mocks base method.
+func (m *MockInterface) Get(ctx context.Context, resourceGroupName, diskName string) (compute.Disk, *retry.Error) {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Get", ctx, resourceGroupName, diskName)
+ ret0, _ := ret[0].(compute.Disk)
+ ret1, _ := ret[1].(*retry.Error)
+ return ret0, ret1
+}
+
+// Get indicates an expected call of Get.
+func (mr *MockInterfaceMockRecorder) Get(ctx, resourceGroupName, diskName interface{}) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), ctx, resourceGroupName, diskName)
+}
+
// ListByResourceGroup mocks base method.
func (m *MockInterface) ListByResourceGroup(ctx context.Context, resourceGroupName string) ([]compute.Disk, *retry.Error) {
m.ctrl.T.Helper()
@@ -124,3 +110,17 @@ func (mr *MockInterfaceMockRecorder) ListByResourceGroup(ctx, resourceGroupName
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListByResourceGroup", reflect.TypeOf((*MockInterface)(nil).ListByResourceGroup), ctx, resourceGroupName)
}
+
+// Update mocks base method.
+func (m *MockInterface) Update(ctx context.Context, resourceGroupName, diskName string, diskParameter compute.DiskUpdate) *retry.Error {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Update", ctx, resourceGroupName, diskName, diskParameter)
+ ret0, _ := ret[0].(*retry.Error)
+ return ret0
+}
+
+// Update indicates an expected call of Update.
+func (mr *MockInterfaceMockRecorder) Update(ctx, resourceGroupName, diskName, diskParameter interface{}) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockInterface)(nil).Update), ctx, resourceGroupName, diskName, diskParameter)
+}
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/interfaceclient/azure_interfaceclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/interfaceclient/azure_interfaceclient.go
index 85248c0d4ccb..4909e88ea71f 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/interfaceclient/azure_interfaceclient.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/interfaceclient/azure_interfaceclient.go
@@ -128,7 +128,7 @@ func (c *Client) getNetworkInterface(ctx context.Context, resourceGroupName stri
)
result := network.Interface{}
- response, rerr := c.armClient.GetResource(ctx, resourceID, "")
+ response, rerr := c.armClient.GetResourceWithExpandQuery(ctx, resourceID, expand)
defer c.armClient.CloseResponse(ctx, response)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "nic.get.request", resourceID, rerr.Error())
@@ -203,7 +203,7 @@ func (c *Client) getVMSSNetworkInterface(ctx context.Context, resourceGroupName
decorators := []autorest.PrepareDecorator{
autorest.WithQueryParameters(queryParameters),
}
- response, rerr := c.armClient.GetResourceWithDecorators(ctx, resourceID, decorators)
+ response, rerr := c.armClient.GetResource(ctx, resourceID, decorators...)
defer c.armClient.CloseResponse(ctx, response)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "vmssnic.get.request", resourceID, rerr.Error())
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/interfaceclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/interfaceclient/interface.go
index 3b8b40984694..dea78ddf6ae0 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/interfaceclient/interface.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/interfaceclient/interface.go
@@ -26,7 +26,7 @@ import (
const (
// APIVersion is the API version for network.
- APIVersion = "2020-08-01"
+ APIVersion = "2021-02-01"
// AzureStackCloudAPIVersion is the API version for Azure Stack
AzureStackCloudAPIVersion = "2018-11-01"
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/interfaceclient/mockinterfaceclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/interfaceclient/mockinterfaceclient/interface.go
index 311acabf6c38..37dcb6bb3978 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/interfaceclient/mockinterfaceclient/interface.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/interfaceclient/mockinterfaceclient/interface.go
@@ -16,7 +16,7 @@
//
// Code generated by MockGen. DO NOT EDIT.
-// Source: /go/src/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/interfaceclient/interface.go
+// Source: pkg/azureclients/interfaceclient/interface.go
// Package mockinterfaceclient is a generated GoMock package.
package mockinterfaceclient
@@ -53,6 +53,34 @@ func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder {
return m.recorder
}
+// CreateOrUpdate mocks base method.
+func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, networkInterfaceName string, parameters network.Interface) *retry.Error {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, networkInterfaceName, parameters)
+ ret0, _ := ret[0].(*retry.Error)
+ return ret0
+}
+
+// CreateOrUpdate indicates an expected call of CreateOrUpdate.
+func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, networkInterfaceName, parameters interface{}) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, networkInterfaceName, parameters)
+}
+
+// Delete mocks base method.
+func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, networkInterfaceName string) *retry.Error {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, networkInterfaceName)
+ ret0, _ := ret[0].(*retry.Error)
+ return ret0
+}
+
+// Delete indicates an expected call of Delete.
+func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, networkInterfaceName interface{}) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, networkInterfaceName)
+}
+
// Get mocks base method.
func (m *MockInterface) Get(ctx context.Context, resourceGroupName, networkInterfaceName, expand string) (network.Interface, *retry.Error) {
m.ctrl.T.Helper()
@@ -82,31 +110,3 @@ func (mr *MockInterfaceMockRecorder) GetVirtualMachineScaleSetNetworkInterface(c
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVirtualMachineScaleSetNetworkInterface", reflect.TypeOf((*MockInterface)(nil).GetVirtualMachineScaleSetNetworkInterface), ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand)
}
-
-// CreateOrUpdate mocks base method.
-func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, networkInterfaceName string, parameters network.Interface) *retry.Error {
- m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, networkInterfaceName, parameters)
- ret0, _ := ret[0].(*retry.Error)
- return ret0
-}
-
-// CreateOrUpdate indicates an expected call of CreateOrUpdate.
-func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, networkInterfaceName, parameters interface{}) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, networkInterfaceName, parameters)
-}
-
-// Delete mocks base method.
-func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, networkInterfaceName string) *retry.Error {
- m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, networkInterfaceName)
- ret0, _ := ret[0].(*retry.Error)
- return ret0
-}
-
-// Delete indicates an expected call of Delete.
-func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, networkInterfaceName interface{}) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, networkInterfaceName)
-}
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/loadbalancerclient/azure_loadbalancerclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/loadbalancerclient/azure_loadbalancerclient.go
index ca17e982f0c4..80f408720b15 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/loadbalancerclient/azure_loadbalancerclient.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/loadbalancerclient/azure_loadbalancerclient.go
@@ -126,7 +126,7 @@ func (c *Client) getLB(ctx context.Context, resourceGroupName string, loadBalanc
)
result := network.LoadBalancer{}
- response, rerr := c.armClient.GetResource(ctx, resourceID, expand)
+ response, rerr := c.armClient.GetResourceWithExpandQuery(ctx, resourceID, expand)
defer c.armClient.CloseResponse(ctx, response)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "loadbalancer.get.request", resourceID, rerr.Error())
@@ -186,7 +186,7 @@ func (c *Client) listLB(ctx context.Context, resourceGroupName string) ([]networ
page := &LoadBalancerListResultPage{}
page.fn = c.listNextResults
- resp, rerr := c.armClient.GetResource(ctx, resourceID, "")
+ resp, rerr := c.armClient.GetResource(ctx, resourceID)
defer c.armClient.CloseResponse(ctx, resp)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "loadbalancer.list.request", resourceID, rerr.Error())
@@ -492,6 +492,49 @@ func (c *Client) createOrUpdateLBBackendPool(ctx context.Context, resourceGroupN
return nil
}
+// DeleteLBBackendPool deletes a LoadBalancer backend pool by name.
+func (c *Client) DeleteLBBackendPool(ctx context.Context, resourceGroupName, loadBalancerName, backendPoolName string) *retry.Error {
+ mc := metrics.NewMetricContext("load_balancers", "delete_backend_pool", resourceGroupName, c.subscriptionID, "")
+
+ // Report errors if the client is rate limited.
+ if !c.rateLimiterWriter.TryAccept() {
+ mc.RateLimitedCount()
+ return retry.GetRateLimitError(true, "LBDeleteBackendPool")
+ }
+
+ // Report errors if the client is throttled.
+ if c.RetryAfterWriter.After(time.Now()) {
+ mc.ThrottledCount()
+ rerr := retry.GetThrottlingError("LBDeleteBackendPool", "client throttled", c.RetryAfterWriter)
+ return rerr
+ }
+
+ rerr := c.deleteLBBackendPool(ctx, resourceGroupName, loadBalancerName, backendPoolName)
+ mc.Observe(rerr)
+ if rerr != nil {
+ if rerr.IsThrottled() {
+ // Update RetryAfterReader so that no more requests would be sent until RetryAfter expires.
+ c.RetryAfterWriter = rerr.RetryAfter
+ }
+
+ return rerr
+ }
+
+ return nil
+}
+
+func (c *Client) deleteLBBackendPool(ctx context.Context, resourceGroupName, loadBalancerName, backendPoolName string) *retry.Error {
+ resourceID := armclient.GetChildResourceID(
+ c.subscriptionID,
+ resourceGroupName,
+ "Microsoft.Network/loadBalancers",
+ loadBalancerName,
+ "backendAddressPools",
+ backendPoolName,
+ )
+ return c.armClient.DeleteResource(ctx, resourceID, "")
+}
+
func (c *Client) createOrUpdateBackendPoolResponder(resp *http.Response) (*network.BackendAddressPool, *retry.Error) {
result := &network.BackendAddressPool{}
err := autorest.Respond(
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/loadbalancerclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/loadbalancerclient/interface.go
index a71b57391428..8ea9e9804db1 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/loadbalancerclient/interface.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/loadbalancerclient/interface.go
@@ -26,7 +26,7 @@ import (
const (
// APIVersion is the API version for network.
- APIVersion = "2020-08-01"
+ APIVersion = "2021-02-01"
// AzureStackCloudAPIVersion is the API version for Azure Stack
AzureStackCloudAPIVersion = "2018-11-01"
// AzureStackCloudName is the cloud name of Azure Stack
@@ -50,4 +50,7 @@ type Interface interface {
// Delete deletes a LoadBalancer by name.
Delete(ctx context.Context, resourceGroupName string, loadBalancerName string) *retry.Error
+
+ // DeleteLBBackendPool deletes a LoadBalancer backend pool by name.
+ DeleteLBBackendPool(ctx context.Context, resourceGroupName, loadBalancerName, backendPoolName string) *retry.Error
}
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/loadbalancerclient/mockloadbalancerclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/loadbalancerclient/mockloadbalancerclient/interface.go
index 7e45c8aa9e1b..989ea115261f 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/loadbalancerclient/mockloadbalancerclient/interface.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/loadbalancerclient/mockloadbalancerclient/interface.go
@@ -16,7 +16,7 @@
//
// Code generated by MockGen. DO NOT EDIT.
-// Source: /go/src/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/loadbalancerclient/interface.go
+// Source: pkg/azureclients/loadbalancerclient/interface.go
// Package mockloadbalancerclient is a generated GoMock package.
package mockloadbalancerclient
@@ -53,36 +53,6 @@ func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder {
return m.recorder
}
-// Get mocks base method.
-func (m *MockInterface) Get(ctx context.Context, resourceGroupName, loadBalancerName, expand string) (network.LoadBalancer, *retry.Error) {
- m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "Get", ctx, resourceGroupName, loadBalancerName, expand)
- ret0, _ := ret[0].(network.LoadBalancer)
- ret1, _ := ret[1].(*retry.Error)
- return ret0, ret1
-}
-
-// Get indicates an expected call of Get.
-func (mr *MockInterfaceMockRecorder) Get(ctx, resourceGroupName, loadBalancerName, expand interface{}) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), ctx, resourceGroupName, loadBalancerName, expand)
-}
-
-// List mocks base method.
-func (m *MockInterface) List(ctx context.Context, resourceGroupName string) ([]network.LoadBalancer, *retry.Error) {
- m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "List", ctx, resourceGroupName)
- ret0, _ := ret[0].([]network.LoadBalancer)
- ret1, _ := ret[1].(*retry.Error)
- return ret0, ret1
-}
-
-// List indicates an expected call of List.
-func (mr *MockInterfaceMockRecorder) List(ctx, resourceGroupName interface{}) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInterface)(nil).List), ctx, resourceGroupName)
-}
-
// CreateOrUpdate mocks base method.
func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, loadBalancerName string, parameters network.LoadBalancer, etag string) *retry.Error {
m.ctrl.T.Helper()
@@ -124,3 +94,47 @@ func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, loadBalancer
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, loadBalancerName)
}
+
+// DeleteLBBackendPool mocks base method.
+func (m *MockInterface) DeleteLBBackendPool(ctx context.Context, resourceGroupName, loadBalancerName, backendPoolName string) *retry.Error {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "DeleteLBBackendPool", ctx, resourceGroupName, loadBalancerName, backendPoolName)
+ ret0, _ := ret[0].(*retry.Error)
+ return ret0
+}
+
+// DeleteLBBackendPool indicates an expected call of DeleteLBBackendPool.
+func (mr *MockInterfaceMockRecorder) DeleteLBBackendPool(ctx, resourceGroupName, loadBalancerName, backendPoolName interface{}) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteLBBackendPool", reflect.TypeOf((*MockInterface)(nil).DeleteLBBackendPool), ctx, resourceGroupName, loadBalancerName, backendPoolName)
+}
+
+// Get mocks base method.
+func (m *MockInterface) Get(ctx context.Context, resourceGroupName, loadBalancerName, expand string) (network.LoadBalancer, *retry.Error) {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Get", ctx, resourceGroupName, loadBalancerName, expand)
+ ret0, _ := ret[0].(network.LoadBalancer)
+ ret1, _ := ret[1].(*retry.Error)
+ return ret0, ret1
+}
+
+// Get indicates an expected call of Get.
+func (mr *MockInterfaceMockRecorder) Get(ctx, resourceGroupName, loadBalancerName, expand interface{}) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), ctx, resourceGroupName, loadBalancerName, expand)
+}
+
+// List mocks base method.
+func (m *MockInterface) List(ctx context.Context, resourceGroupName string) ([]network.LoadBalancer, *retry.Error) {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "List", ctx, resourceGroupName)
+ ret0, _ := ret[0].([]network.LoadBalancer)
+ ret1, _ := ret[1].(*retry.Error)
+ return ret0, ret1
+}
+
+// List indicates an expected call of List.
+func (mr *MockInterfaceMockRecorder) List(ctx, resourceGroupName interface{}) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInterface)(nil).List), ctx, resourceGroupName)
+}
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/publicipclient/azure_publicipclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/publicipclient/azure_publicipclient.go
index be60a4f08a64..a440af3eb748 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/publicipclient/azure_publicipclient.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/publicipclient/azure_publicipclient.go
@@ -128,7 +128,7 @@ func (c *Client) getPublicIPAddress(ctx context.Context, resourceGroupName strin
)
result := network.PublicIPAddress{}
- response, rerr := c.armClient.GetResource(ctx, resourceID, expand)
+ response, rerr := c.armClient.GetResourceWithExpandQuery(ctx, resourceID, expand)
defer c.armClient.CloseResponse(ctx, response)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "publicip.get.request", resourceID, rerr.Error())
@@ -205,7 +205,7 @@ func (c *Client) getVMSSPublicIPAddress(ctx context.Context, resourceGroupName s
decorators := []autorest.PrepareDecorator{
autorest.WithQueryParameters(queryParameters),
}
- response, rerr := c.armClient.GetResourceWithDecorators(ctx, resourceID, decorators)
+ response, rerr := c.armClient.GetResource(ctx, resourceID, decorators...)
defer c.armClient.CloseResponse(ctx, response)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "vmsspublicip.get.request", resourceID, rerr.Error())
@@ -265,7 +265,7 @@ func (c *Client) listPublicIPAddress(ctx context.Context, resourceGroupName stri
page := &PublicIPAddressListResultPage{}
page.fn = c.listNextResults
- resp, rerr := c.armClient.GetResource(ctx, resourceID, "")
+ resp, rerr := c.armClient.GetResource(ctx, resourceID)
defer c.armClient.CloseResponse(ctx, resp)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "publicip.list.request", resourceID, rerr.Error())
@@ -531,7 +531,7 @@ func (c *Client) listAllPublicIPAddress(ctx context.Context) ([]network.PublicIP
page := &PublicIPAddressListResultPage{}
page.fn = c.listNextResults
- resp, rerr := c.armClient.GetResource(ctx, resourceID, "")
+ resp, rerr := c.armClient.GetResource(ctx, resourceID)
defer c.armClient.CloseResponse(ctx, resp)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "publicip.listall.request", resourceID, rerr.Error())
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/publicipclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/publicipclient/interface.go
index f53e7caa5df4..bb8cc34039a6 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/publicipclient/interface.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/publicipclient/interface.go
@@ -26,7 +26,7 @@ import (
const (
// APIVersion is the API version for network.
- APIVersion = "2020-08-01"
+ APIVersion = "2021-02-01"
// AzureStackCloudAPIVersion is the API version for Azure Stack
AzureStackCloudAPIVersion = "2018-11-01"
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/publicipclient/mockpublicipclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/publicipclient/mockpublicipclient/interface.go
index 44a8efe866fa..4030f145e409 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/publicipclient/mockpublicipclient/interface.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/publicipclient/mockpublicipclient/interface.go
@@ -16,7 +16,7 @@
//
// Code generated by MockGen. DO NOT EDIT.
-// Source: /go/src/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/publicipclient/interface.go
+// Source: pkg/azureclients/publicipclient/interface.go
// Package mockpublicipclient is a generated GoMock package.
package mockpublicipclient
@@ -53,6 +53,34 @@ func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder {
return m.recorder
}
+// CreateOrUpdate mocks base method.
+func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, publicIPAddressName string, parameters network.PublicIPAddress) *retry.Error {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, publicIPAddressName, parameters)
+ ret0, _ := ret[0].(*retry.Error)
+ return ret0
+}
+
+// CreateOrUpdate indicates an expected call of CreateOrUpdate.
+func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, publicIPAddressName, parameters interface{}) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, publicIPAddressName, parameters)
+}
+
+// Delete mocks base method.
+func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, publicIPAddressName string) *retry.Error {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, publicIPAddressName)
+ ret0, _ := ret[0].(*retry.Error)
+ return ret0
+}
+
+// Delete indicates an expected call of Delete.
+func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, publicIPAddressName interface{}) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, publicIPAddressName)
+}
+
// Get mocks base method.
func (m *MockInterface) Get(ctx context.Context, resourceGroupName, publicIPAddressName, expand string) (network.PublicIPAddress, *retry.Error) {
m.ctrl.T.Helper()
@@ -112,31 +140,3 @@ func (mr *MockInterfaceMockRecorder) ListAll(ctx interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAll", reflect.TypeOf((*MockInterface)(nil).ListAll), ctx)
}
-
-// CreateOrUpdate mocks base method.
-func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, publicIPAddressName string, parameters network.PublicIPAddress) *retry.Error {
- m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, publicIPAddressName, parameters)
- ret0, _ := ret[0].(*retry.Error)
- return ret0
-}
-
-// CreateOrUpdate indicates an expected call of CreateOrUpdate.
-func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, publicIPAddressName, parameters interface{}) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, publicIPAddressName, parameters)
-}
-
-// Delete mocks base method.
-func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, publicIPAddressName string) *retry.Error {
- m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, publicIPAddressName)
- ret0, _ := ret[0].(*retry.Error)
- return ret0
-}
-
-// Delete indicates an expected call of Delete.
-func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, publicIPAddressName interface{}) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, publicIPAddressName)
-}
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/routeclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/routeclient/interface.go
index 226161694863..d59f57cb322b 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/routeclient/interface.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/routeclient/interface.go
@@ -26,7 +26,7 @@ import (
const (
// APIVersion is the API version for network.
- APIVersion = "2020-08-01"
+ APIVersion = "2021-02-01"
// AzureStackCloudAPIVersion is the API version for Azure Stack
AzureStackCloudAPIVersion = "2018-11-01"
// AzureStackCloudName is the cloud name of Azure Stack
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/routeclient/mockrouteclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/routeclient/mockrouteclient/interface.go
index bdec03adde0b..ba2ba061e457 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/routeclient/mockrouteclient/interface.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/routeclient/mockrouteclient/interface.go
@@ -16,7 +16,7 @@
//
// Code generated by MockGen. DO NOT EDIT.
-// Source: /go/src/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/routeclient/interface.go
+// Source: pkg/azureclients/routeclient/interface.go
// Package mockrouteclient is a generated GoMock package.
package mockrouteclient
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/routetableclient/azure_routetableclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/routetableclient/azure_routetableclient.go
index bb81cd8ac58c..2ba1fbb99c94 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/routetableclient/azure_routetableclient.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/routetableclient/azure_routetableclient.go
@@ -124,7 +124,7 @@ func (c *Client) getRouteTable(ctx context.Context, resourceGroupName string, ro
)
result := network.RouteTable{}
- response, rerr := c.armClient.GetResource(ctx, resourceID, expand)
+ response, rerr := c.armClient.GetResourceWithExpandQuery(ctx, resourceID, expand)
defer c.armClient.CloseResponse(ctx, response)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "routetable.get.request", resourceID, rerr.Error())
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/routetableclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/routetableclient/interface.go
index 12582ecbf096..0584a733dc9d 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/routetableclient/interface.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/routetableclient/interface.go
@@ -26,7 +26,7 @@ import (
const (
// APIVersion is the API version for network.
- APIVersion = "2020-08-01"
+ APIVersion = "2021-02-01"
// AzureStackCloudAPIVersion is the API version for Azure Stack
AzureStackCloudAPIVersion = "2018-11-01"
// AzureStackCloudName is the cloud name of Azure Stack
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/routetableclient/mockroutetableclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/routetableclient/mockroutetableclient/interface.go
index 70aa3351e389..6ff402517da6 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/routetableclient/mockroutetableclient/interface.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/routetableclient/mockroutetableclient/interface.go
@@ -16,7 +16,7 @@
//
// Code generated by MockGen. DO NOT EDIT.
-// Source: /go/src/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/routetableclient/interface.go
+// Source: pkg/azureclients/routetableclient/interface.go
// Package mockroutetableclient is a generated GoMock package.
package mockroutetableclient
@@ -53,6 +53,20 @@ func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder {
return m.recorder
}
+// CreateOrUpdate mocks base method.
+func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, routeTableName string, parameters network.RouteTable, etag string) *retry.Error {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, routeTableName, parameters, etag)
+ ret0, _ := ret[0].(*retry.Error)
+ return ret0
+}
+
+// CreateOrUpdate indicates an expected call of CreateOrUpdate.
+func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, routeTableName, parameters, etag interface{}) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, routeTableName, parameters, etag)
+}
+
// Get mocks base method.
func (m *MockInterface) Get(ctx context.Context, resourceGroupName, routeTableName, expand string) (network.RouteTable, *retry.Error) {
m.ctrl.T.Helper()
@@ -67,17 +81,3 @@ func (mr *MockInterfaceMockRecorder) Get(ctx, resourceGroupName, routeTableName,
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), ctx, resourceGroupName, routeTableName, expand)
}
-
-// CreateOrUpdate mocks base method.
-func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, routeTableName string, parameters network.RouteTable, etag string) *retry.Error {
- m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, routeTableName, parameters, etag)
- ret0, _ := ret[0].(*retry.Error)
- return ret0
-}
-
-// CreateOrUpdate indicates an expected call of CreateOrUpdate.
-func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, routeTableName, parameters, etag interface{}) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, routeTableName, parameters, etag)
-}
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/securitygroupclient/azure_securitygroupclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/securitygroupclient/azure_securitygroupclient.go
index 9bc7a54fbff8..f625e7e4de25 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/securitygroupclient/azure_securitygroupclient.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/securitygroupclient/azure_securitygroupclient.go
@@ -126,7 +126,7 @@ func (c *Client) getSecurityGroup(ctx context.Context, resourceGroupName string,
)
result := network.SecurityGroup{}
- response, rerr := c.armClient.GetResource(ctx, resourceID, expand)
+ response, rerr := c.armClient.GetResourceWithExpandQuery(ctx, resourceID, expand)
defer c.armClient.CloseResponse(ctx, response)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "securitygroup.get.request", resourceID, rerr.Error())
@@ -186,7 +186,7 @@ func (c *Client) listSecurityGroup(ctx context.Context, resourceGroupName string
page := &SecurityGroupListResultPage{}
page.fn = c.listNextResults
- resp, rerr := c.armClient.GetResource(ctx, resourceID, "")
+ resp, rerr := c.armClient.GetResource(ctx, resourceID)
defer c.armClient.CloseResponse(ctx, resp)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "securitygroup.list.request", resourceID, rerr.Error())
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/securitygroupclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/securitygroupclient/interface.go
index 3611d2dcc5f5..7dd0e0c3dde5 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/securitygroupclient/interface.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/securitygroupclient/interface.go
@@ -26,7 +26,7 @@ import (
const (
// APIVersion is the API version for network.
- APIVersion = "2020-08-01"
+ APIVersion = "2021-02-01"
// AzureStackCloudAPIVersion is the API version for Azure Stack
AzureStackCloudAPIVersion = "2018-11-01"
// AzureStackCloudName is the cloud name of Azure Stack
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/securitygroupclient/mocksecuritygroupclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/securitygroupclient/mocksecuritygroupclient/interface.go
index d4629d7e94ef..54db4542d154 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/securitygroupclient/mocksecuritygroupclient/interface.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/securitygroupclient/mocksecuritygroupclient/interface.go
@@ -16,7 +16,7 @@
//
// Code generated by MockGen. DO NOT EDIT.
-// Source: /go/src/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/securitygroupclient/interface.go
+// Source: pkg/azureclients/securitygroupclient/interface.go
// Package mocksecuritygroupclient is a generated GoMock package.
package mocksecuritygroupclient
@@ -53,6 +53,34 @@ func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder {
return m.recorder
}
+// CreateOrUpdate mocks base method.
+func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, networkSecurityGroupName string, parameters network.SecurityGroup, etag string) *retry.Error {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, networkSecurityGroupName, parameters, etag)
+ ret0, _ := ret[0].(*retry.Error)
+ return ret0
+}
+
+// CreateOrUpdate indicates an expected call of CreateOrUpdate.
+func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, networkSecurityGroupName, parameters, etag interface{}) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, networkSecurityGroupName, parameters, etag)
+}
+
+// Delete mocks base method.
+func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, networkSecurityGroupName string) *retry.Error {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, networkSecurityGroupName)
+ ret0, _ := ret[0].(*retry.Error)
+ return ret0
+}
+
+// Delete indicates an expected call of Delete.
+func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, networkSecurityGroupName interface{}) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, networkSecurityGroupName)
+}
+
// Get mocks base method.
func (m *MockInterface) Get(ctx context.Context, resourceGroupName, networkSecurityGroupName, expand string) (network.SecurityGroup, *retry.Error) {
m.ctrl.T.Helper()
@@ -82,31 +110,3 @@ func (mr *MockInterfaceMockRecorder) List(ctx, resourceGroupName interface{}) *g
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInterface)(nil).List), ctx, resourceGroupName)
}
-
-// CreateOrUpdate mocks base method.
-func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, networkSecurityGroupName string, parameters network.SecurityGroup, etag string) *retry.Error {
- m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, networkSecurityGroupName, parameters, etag)
- ret0, _ := ret[0].(*retry.Error)
- return ret0
-}
-
-// CreateOrUpdate indicates an expected call of CreateOrUpdate.
-func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, networkSecurityGroupName, parameters, etag interface{}) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, networkSecurityGroupName, parameters, etag)
-}
-
-// Delete mocks base method.
-func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, networkSecurityGroupName string) *retry.Error {
- m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, networkSecurityGroupName)
- ret0, _ := ret[0].(*retry.Error)
- return ret0
-}
-
-// Delete indicates an expected call of Delete.
-func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, networkSecurityGroupName interface{}) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, networkSecurityGroupName)
-}
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/snapshotclient/azure_snapshotclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/snapshotclient/azure_snapshotclient.go
index 5e5000876476..256be5518ae6 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/snapshotclient/azure_snapshotclient.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/snapshotclient/azure_snapshotclient.go
@@ -23,7 +23,7 @@ import (
"strings"
"time"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/to"
@@ -126,7 +126,7 @@ func (c *Client) getSnapshot(ctx context.Context, resourceGroupName string, snap
)
result := compute.Snapshot{}
- response, rerr := c.armClient.GetResource(ctx, resourceID, "")
+ response, rerr := c.armClient.GetResource(ctx, resourceID)
defer c.armClient.CloseResponse(ctx, response)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "snapshot.get.request", resourceID, rerr.Error())
@@ -297,7 +297,7 @@ func (c *Client) listSnapshotsByResourceGroup(ctx context.Context, resourceGroup
page := &SnapshotListPage{}
page.fn = c.listNextResults
- resp, rerr := c.armClient.GetResource(ctx, resourceID, "")
+ resp, rerr := c.armClient.GetResource(ctx, resourceID)
defer c.armClient.CloseResponse(ctx, resp)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "snapshot.list.request", resourceID, rerr.Error())
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/snapshotclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/snapshotclient/interface.go
index 14b765c651bb..f0f6f285a5af 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/snapshotclient/interface.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/snapshotclient/interface.go
@@ -19,7 +19,7 @@ package snapshotclient
import (
"context"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
"sigs.k8s.io/cloud-provider-azure/pkg/retry"
)
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/snapshotclient/mocksnapshotclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/snapshotclient/mocksnapshotclient/interface.go
index 0fd0431fbad4..7936abf3de73 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/snapshotclient/mocksnapshotclient/interface.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/snapshotclient/mocksnapshotclient/interface.go
@@ -16,7 +16,7 @@
//
// Code generated by MockGen. DO NOT EDIT.
-// Source: /go/src/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/snapshotclient/interface.go
+// Source: pkg/azureclients/snapshotclient/interface.go
// Package mocksnapshotclient is a generated GoMock package.
package mocksnapshotclient
@@ -25,7 +25,7 @@ import (
context "context"
reflect "reflect"
- compute "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ compute "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
gomock "github.com/golang/mock/gomock"
retry "sigs.k8s.io/cloud-provider-azure/pkg/retry"
)
@@ -53,19 +53,18 @@ func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder {
return m.recorder
}
-// Get mocks base method.
-func (m *MockInterface) Get(ctx context.Context, resourceGroupName, snapshotName string) (compute.Snapshot, *retry.Error) {
+// CreateOrUpdate mocks base method.
+func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, snapshotName string, snapshot compute.Snapshot) *retry.Error {
m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "Get", ctx, resourceGroupName, snapshotName)
- ret0, _ := ret[0].(compute.Snapshot)
- ret1, _ := ret[1].(*retry.Error)
- return ret0, ret1
+ ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, snapshotName, snapshot)
+ ret0, _ := ret[0].(*retry.Error)
+ return ret0
}
-// Get indicates an expected call of Get.
-func (mr *MockInterfaceMockRecorder) Get(ctx, resourceGroupName, snapshotName interface{}) *gomock.Call {
+// CreateOrUpdate indicates an expected call of CreateOrUpdate.
+func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, snapshotName, snapshot interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), ctx, resourceGroupName, snapshotName)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, snapshotName, snapshot)
}
// Delete mocks base method.
@@ -82,6 +81,21 @@ func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, snapshotName
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, snapshotName)
}
+// Get mocks base method.
+func (m *MockInterface) Get(ctx context.Context, resourceGroupName, snapshotName string) (compute.Snapshot, *retry.Error) {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Get", ctx, resourceGroupName, snapshotName)
+ ret0, _ := ret[0].(compute.Snapshot)
+ ret1, _ := ret[1].(*retry.Error)
+ return ret0, ret1
+}
+
+// Get indicates an expected call of Get.
+func (mr *MockInterfaceMockRecorder) Get(ctx, resourceGroupName, snapshotName interface{}) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), ctx, resourceGroupName, snapshotName)
+}
+
// ListByResourceGroup mocks base method.
func (m *MockInterface) ListByResourceGroup(ctx context.Context, resourceGroupName string) ([]compute.Snapshot, *retry.Error) {
m.ctrl.T.Helper()
@@ -96,17 +110,3 @@ func (mr *MockInterfaceMockRecorder) ListByResourceGroup(ctx, resourceGroupName
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListByResourceGroup", reflect.TypeOf((*MockInterface)(nil).ListByResourceGroup), ctx, resourceGroupName)
}
-
-// CreateOrUpdate mocks base method.
-func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, snapshotName string, snapshot compute.Snapshot) *retry.Error {
- m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, snapshotName, snapshot)
- ret0, _ := ret[0].(*retry.Error)
- return ret0
-}
-
-// CreateOrUpdate indicates an expected call of CreateOrUpdate.
-func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, snapshotName, snapshot interface{}) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, snapshotName, snapshot)
-}
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/storageaccountclient/azure_storageaccountclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/storageaccountclient/azure_storageaccountclient.go
index 78b868a53c34..34bc3c1d72e4 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/storageaccountclient/azure_storageaccountclient.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/storageaccountclient/azure_storageaccountclient.go
@@ -126,7 +126,7 @@ func (c *Client) getStorageAccount(ctx context.Context, resourceGroupName string
)
result := storage.Account{}
- response, rerr := c.armClient.GetResource(ctx, resourceID, "")
+ response, rerr := c.armClient.GetResource(ctx, resourceID)
defer c.armClient.CloseResponse(ctx, response)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "storageaccount.get.request", resourceID, rerr.Error())
@@ -424,7 +424,7 @@ func (c *Client) ListStorageAccountByResourceGroup(ctx context.Context, resource
page := &AccountListResultPage{}
page.fn = c.listNextResults
- resp, rerr := c.armClient.GetResource(ctx, resourceID, "")
+ resp, rerr := c.armClient.GetResource(ctx, resourceID)
defer c.armClient.CloseResponse(ctx, resp)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "storageAccount.list.request", resourceID, rerr.Error())
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/storageaccountclient/mockstorageaccountclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/storageaccountclient/mockstorageaccountclient/interface.go
index d96113e8c102..8bad6f46cdb6 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/storageaccountclient/mockstorageaccountclient/interface.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/storageaccountclient/mockstorageaccountclient/interface.go
@@ -16,7 +16,7 @@
//
// Code generated by MockGen. DO NOT EDIT.
-// Source: /go/src/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/storageaccountclient/interface.go
+// Source: pkg/azureclients/storageaccountclient/interface.go
// Package mockstorageaccountclient is a generated GoMock package.
package mockstorageaccountclient
@@ -67,20 +67,6 @@ func (mr *MockInterfaceMockRecorder) Create(ctx, resourceGroupName, accountName,
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Create", reflect.TypeOf((*MockInterface)(nil).Create), ctx, resourceGroupName, accountName, parameters)
}
-// Update mocks base method.
-func (m *MockInterface) Update(ctx context.Context, resourceGroupName, accountName string, parameters storage.AccountUpdateParameters) *retry.Error {
- m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "Update", ctx, resourceGroupName, accountName, parameters)
- ret0, _ := ret[0].(*retry.Error)
- return ret0
-}
-
-// Update indicates an expected call of Update.
-func (mr *MockInterfaceMockRecorder) Update(ctx, resourceGroupName, accountName, parameters interface{}) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockInterface)(nil).Update), ctx, resourceGroupName, accountName, parameters)
-}
-
// Delete mocks base method.
func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, accountName string) *retry.Error {
m.ctrl.T.Helper()
@@ -95,19 +81,19 @@ func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, accountName
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, accountName)
}
-// ListKeys mocks base method.
-func (m *MockInterface) ListKeys(ctx context.Context, resourceGroupName, accountName string) (storage.AccountListKeysResult, *retry.Error) {
+// GetProperties mocks base method.
+func (m *MockInterface) GetProperties(ctx context.Context, resourceGroupName, accountName string) (storage.Account, *retry.Error) {
m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "ListKeys", ctx, resourceGroupName, accountName)
- ret0, _ := ret[0].(storage.AccountListKeysResult)
+ ret := m.ctrl.Call(m, "GetProperties", ctx, resourceGroupName, accountName)
+ ret0, _ := ret[0].(storage.Account)
ret1, _ := ret[1].(*retry.Error)
return ret0, ret1
}
-// ListKeys indicates an expected call of ListKeys.
-func (mr *MockInterfaceMockRecorder) ListKeys(ctx, resourceGroupName, accountName interface{}) *gomock.Call {
+// GetProperties indicates an expected call of GetProperties.
+func (mr *MockInterfaceMockRecorder) GetProperties(ctx, resourceGroupName, accountName interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListKeys", reflect.TypeOf((*MockInterface)(nil).ListKeys), ctx, resourceGroupName, accountName)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProperties", reflect.TypeOf((*MockInterface)(nil).GetProperties), ctx, resourceGroupName, accountName)
}
// ListByResourceGroup mocks base method.
@@ -125,17 +111,31 @@ func (mr *MockInterfaceMockRecorder) ListByResourceGroup(ctx, resourceGroupName
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListByResourceGroup", reflect.TypeOf((*MockInterface)(nil).ListByResourceGroup), ctx, resourceGroupName)
}
-// GetProperties mocks base method.
-func (m *MockInterface) GetProperties(ctx context.Context, resourceGroupName, accountName string) (storage.Account, *retry.Error) {
+// ListKeys mocks base method.
+func (m *MockInterface) ListKeys(ctx context.Context, resourceGroupName, accountName string) (storage.AccountListKeysResult, *retry.Error) {
m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "GetProperties", ctx, resourceGroupName, accountName)
- ret0, _ := ret[0].(storage.Account)
+ ret := m.ctrl.Call(m, "ListKeys", ctx, resourceGroupName, accountName)
+ ret0, _ := ret[0].(storage.AccountListKeysResult)
ret1, _ := ret[1].(*retry.Error)
return ret0, ret1
}
-// GetProperties indicates an expected call of GetProperties.
-func (mr *MockInterfaceMockRecorder) GetProperties(ctx, resourceGroupName, accountName interface{}) *gomock.Call {
+// ListKeys indicates an expected call of ListKeys.
+func (mr *MockInterfaceMockRecorder) ListKeys(ctx, resourceGroupName, accountName interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProperties", reflect.TypeOf((*MockInterface)(nil).GetProperties), ctx, resourceGroupName, accountName)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListKeys", reflect.TypeOf((*MockInterface)(nil).ListKeys), ctx, resourceGroupName, accountName)
+}
+
+// Update mocks base method.
+func (m *MockInterface) Update(ctx context.Context, resourceGroupName, accountName string, parameters storage.AccountUpdateParameters) *retry.Error {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Update", ctx, resourceGroupName, accountName, parameters)
+ ret0, _ := ret[0].(*retry.Error)
+ return ret0
+}
+
+// Update indicates an expected call of Update.
+func (mr *MockInterfaceMockRecorder) Update(ctx, resourceGroupName, accountName, parameters interface{}) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockInterface)(nil).Update), ctx, resourceGroupName, accountName, parameters)
}
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/subnetclient/azure_subnetclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/subnetclient/azure_subnetclient.go
index 1d6ed1480f3c..05ebfa0b4d41 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/subnetclient/azure_subnetclient.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/subnetclient/azure_subnetclient.go
@@ -127,7 +127,7 @@ func (c *Client) getSubnet(ctx context.Context, resourceGroupName string, virtua
)
result := network.Subnet{}
- response, rerr := c.armClient.GetResource(ctx, resourceID, expand)
+ response, rerr := c.armClient.GetResourceWithExpandQuery(ctx, resourceID, expand)
defer c.armClient.CloseResponse(ctx, response)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "subnet.get.request", resourceID, rerr.Error())
@@ -191,7 +191,7 @@ func (c *Client) listSubnet(ctx context.Context, resourceGroupName string, virtu
page := &SubnetListResultPage{}
page.fn = c.listNextResults
- resp, rerr := c.armClient.GetResource(ctx, resourceID, "")
+ resp, rerr := c.armClient.GetResource(ctx, resourceID)
defer c.armClient.CloseResponse(ctx, resp)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "subnet.list.request", resourceID, rerr.Error())
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/subnetclient/mocksubnetclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/subnetclient/mocksubnetclient/interface.go
index c4f1f24f2262..9866e668b523 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/subnetclient/mocksubnetclient/interface.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/subnetclient/mocksubnetclient/interface.go
@@ -16,7 +16,7 @@
//
// Code generated by MockGen. DO NOT EDIT.
-// Source: /go/src/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/subnetclient/interface.go
+// Source: pkg/azureclients/subnetclient/interface.go
// Package mocksubnetclient is a generated GoMock package.
package mocksubnetclient
@@ -53,6 +53,34 @@ func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder {
return m.recorder
}
+// CreateOrUpdate mocks base method.
+func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, virtualNetworkName, subnetName string, subnetParameters network.Subnet) *retry.Error {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, virtualNetworkName, subnetName, subnetParameters)
+ ret0, _ := ret[0].(*retry.Error)
+ return ret0
+}
+
+// CreateOrUpdate indicates an expected call of CreateOrUpdate.
+func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, virtualNetworkName, subnetName, subnetParameters interface{}) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, virtualNetworkName, subnetName, subnetParameters)
+}
+
+// Delete mocks base method.
+func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, virtualNetworkName, subnetName string) *retry.Error {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, virtualNetworkName, subnetName)
+ ret0, _ := ret[0].(*retry.Error)
+ return ret0
+}
+
+// Delete indicates an expected call of Delete.
+func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, virtualNetworkName, subnetName interface{}) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, virtualNetworkName, subnetName)
+}
+
// Get mocks base method.
func (m *MockInterface) Get(ctx context.Context, resourceGroupName, virtualNetworkName, subnetName, expand string) (network.Subnet, *retry.Error) {
m.ctrl.T.Helper()
@@ -82,31 +110,3 @@ func (mr *MockInterfaceMockRecorder) List(ctx, resourceGroupName, virtualNetwork
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInterface)(nil).List), ctx, resourceGroupName, virtualNetworkName)
}
-
-// CreateOrUpdate mocks base method.
-func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, virtualNetworkName, subnetName string, subnetParameters network.Subnet) *retry.Error {
- m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, virtualNetworkName, subnetName, subnetParameters)
- ret0, _ := ret[0].(*retry.Error)
- return ret0
-}
-
-// CreateOrUpdate indicates an expected call of CreateOrUpdate.
-func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, virtualNetworkName, subnetName, subnetParameters interface{}) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, virtualNetworkName, subnetName, subnetParameters)
-}
-
-// Delete mocks base method.
-func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, virtualNetworkName, subnetName string) *retry.Error {
- m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, virtualNetworkName, subnetName)
- ret0, _ := ret[0].(*retry.Error)
- return ret0
-}
-
-// Delete indicates an expected call of Delete.
-func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, virtualNetworkName, subnetName interface{}) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, virtualNetworkName, subnetName)
-}
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmasclient/azure_vmasclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmasclient/azure_vmasclient.go
index ce3616aaa7d6..4a9751b3f046 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmasclient/azure_vmasclient.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmasclient/azure_vmasclient.go
@@ -23,7 +23,7 @@ import (
"strings"
"time"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/to"
@@ -126,7 +126,7 @@ func (c *Client) getVMAS(ctx context.Context, resourceGroupName string, vmasName
)
result := compute.AvailabilitySet{}
- response, rerr := c.armClient.GetResource(ctx, resourceID, "")
+ response, rerr := c.armClient.GetResource(ctx, resourceID)
defer c.armClient.CloseResponse(ctx, response)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "vmas.get.request", resourceID, rerr.Error())
@@ -186,7 +186,7 @@ func (c *Client) listVMAS(ctx context.Context, resourceGroupName string) ([]comp
page := &AvailabilitySetListResultPage{}
page.fn = c.listNextResults
- resp, rerr := c.armClient.GetResource(ctx, resourceID, "")
+ resp, rerr := c.armClient.GetResource(ctx, resourceID)
defer c.armClient.CloseResponse(ctx, resp)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "vmas.list.request", resourceID, rerr.Error())
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmasclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmasclient/interface.go
index 3ff65ccfce3f..5f0a1c552ed8 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmasclient/interface.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmasclient/interface.go
@@ -19,7 +19,7 @@ package vmasclient
import (
"context"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
"sigs.k8s.io/cloud-provider-azure/pkg/retry"
)
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmclient/azure_vmclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmclient/azure_vmclient.go
index 5063d411bb40..f46fff6518e5 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmclient/azure_vmclient.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmclient/azure_vmclient.go
@@ -23,7 +23,7 @@ import (
"strings"
"time"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/to"
@@ -126,7 +126,7 @@ func (c *Client) getVM(ctx context.Context, resourceGroupName string, VMName str
)
result := compute.VirtualMachine{}
- response, rerr := c.armClient.GetResource(ctx, resourceID, string(expand))
+ response, rerr := c.armClient.GetResourceWithExpandQuery(ctx, resourceID, string(expand))
defer c.armClient.CloseResponse(ctx, response)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "vm.get.request", resourceID, rerr.Error())
@@ -188,7 +188,7 @@ func (c *Client) listVM(ctx context.Context, resourceGroupName string) ([]comput
page := &VirtualMachineListResultPage{}
page.fn = c.listNextResults
- resp, rerr := c.armClient.GetResource(ctx, resourceID, "")
+ resp, rerr := c.armClient.GetResource(ctx, resourceID)
defer c.armClient.CloseResponse(ctx, resp)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "vm.list.request", resourceID, rerr.Error())
@@ -294,12 +294,13 @@ func (c *Client) WaitForUpdateResult(ctx context.Context, future *azure.Future,
response, err := c.armClient.WaitForAsyncOperationResult(ctx, future, "VMWaitForUpdateResult")
mc.Observe(retry.NewErrorOrNil(false, err))
- if response != nil && response.StatusCode != http.StatusNoContent {
- _, rerr := c.updateResponder(response)
- if rerr != nil {
- klog.V(5).Infof("Received error: %s", "vm.put.respond", rerr.Error())
- return rerr
+ if err != nil {
+ if response != nil {
+ klog.V(5).Infof("Received error in WaitForAsyncOperationResult: '%s', response code %d", err.Error(), response.StatusCode)
+ } else {
+ klog.V(5).Infof("Received error in WaitForAsyncOperationResult: '%s', no response", err.Error())
}
+ return retry.GetError(response, err)
}
return nil
}
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmclient/interface.go
index 0fd19997d9b2..c521c898c23b 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmclient/interface.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmclient/interface.go
@@ -19,7 +19,7 @@ package vmclient
import (
"context"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
"github.com/Azure/go-autorest/autorest/azure"
"sigs.k8s.io/cloud-provider-azure/pkg/retry"
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmclient/mockvmclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmclient/mockvmclient/interface.go
index c6c9029dcc0b..b204a97bebf9 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmclient/mockvmclient/interface.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmclient/mockvmclient/interface.go
@@ -16,7 +16,7 @@
//
// Code generated by MockGen. DO NOT EDIT.
-// Source: /go/src/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmclient/interface.go
+// Source: pkg/azureclients/vmclient/interface.go
// Package mockvmclient is a generated GoMock package.
package mockvmclient
@@ -25,7 +25,7 @@ import (
context "context"
reflect "reflect"
- compute "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ compute "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
azure "github.com/Azure/go-autorest/autorest/azure"
gomock "github.com/golang/mock/gomock"
retry "sigs.k8s.io/cloud-provider-azure/pkg/retry"
@@ -54,6 +54,34 @@ func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder {
return m.recorder
}
+// CreateOrUpdate mocks base method.
+func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, VMName string, parameters compute.VirtualMachine, source string) *retry.Error {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, VMName, parameters, source)
+ ret0, _ := ret[0].(*retry.Error)
+ return ret0
+}
+
+// CreateOrUpdate indicates an expected call of CreateOrUpdate.
+func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, VMName, parameters, source interface{}) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, VMName, parameters, source)
+}
+
+// Delete mocks base method.
+func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, VMName string) *retry.Error {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, VMName)
+ ret0, _ := ret[0].(*retry.Error)
+ return ret0
+}
+
+// Delete indicates an expected call of Delete.
+func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, VMName interface{}) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, VMName)
+}
+
// Get mocks base method.
func (m *MockInterface) Get(ctx context.Context, resourceGroupName, VMName string, expand compute.InstanceViewTypes) (compute.VirtualMachine, *retry.Error) {
m.ctrl.T.Helper()
@@ -84,20 +112,6 @@ func (mr *MockInterfaceMockRecorder) List(ctx, resourceGroupName interface{}) *g
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInterface)(nil).List), ctx, resourceGroupName)
}
-// CreateOrUpdate mocks base method.
-func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, VMName string, parameters compute.VirtualMachine, source string) *retry.Error {
- m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "CreateOrUpdate", ctx, resourceGroupName, VMName, parameters, source)
- ret0, _ := ret[0].(*retry.Error)
- return ret0
-}
-
-// CreateOrUpdate indicates an expected call of CreateOrUpdate.
-func (mr *MockInterfaceMockRecorder) CreateOrUpdate(ctx, resourceGroupName, VMName, parameters, source interface{}) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdate", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdate), ctx, resourceGroupName, VMName, parameters, source)
-}
-
// Update mocks base method.
func (m *MockInterface) Update(ctx context.Context, resourceGroupName, VMName string, parameters compute.VirtualMachineUpdate, source string) *retry.Error {
m.ctrl.T.Helper()
@@ -140,17 +154,3 @@ func (mr *MockInterfaceMockRecorder) WaitForUpdateResult(ctx, future, resourceGr
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForUpdateResult", reflect.TypeOf((*MockInterface)(nil).WaitForUpdateResult), ctx, future, resourceGroupName, source)
}
-
-// Delete mocks base method.
-func (m *MockInterface) Delete(ctx context.Context, resourceGroupName, VMName string) *retry.Error {
- m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "Delete", ctx, resourceGroupName, VMName)
- ret0, _ := ret[0].(*retry.Error)
- return ret0
-}
-
-// Delete indicates an expected call of Delete.
-func (mr *MockInterfaceMockRecorder) Delete(ctx, resourceGroupName, VMName interface{}) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockInterface)(nil).Delete), ctx, resourceGroupName, VMName)
-}
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmsizeclient/azure_vmsizeclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmsizeclient/azure_vmsizeclient.go
index d3a6711ea074..8ec2c0ae5b21 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmsizeclient/azure_vmsizeclient.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmsizeclient/azure_vmsizeclient.go
@@ -23,7 +23,7 @@ import (
"strings"
"time"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
@@ -123,7 +123,7 @@ func (c *Client) listVirtualMachineSizes(ctx context.Context, location string) (
)
result := compute.VirtualMachineSizeListResult{}
- response, rerr := c.armClient.GetResource(ctx, resourceID, "")
+ response, rerr := c.armClient.GetResource(ctx, resourceID)
defer c.armClient.CloseResponse(ctx, response)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "vmsize.list.request", resourceID, rerr.Error())
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmsizeclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmsizeclient/interface.go
index 7d4235db3af5..215361e26594 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmsizeclient/interface.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmsizeclient/interface.go
@@ -19,7 +19,7 @@ package vmsizeclient
import (
"context"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
"sigs.k8s.io/cloud-provider-azure/pkg/retry"
)
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssclient/azure_vmssclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssclient/azure_vmssclient.go
index 59aac83e8108..b54f48ce53d2 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssclient/azure_vmssclient.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssclient/azure_vmssclient.go
@@ -23,7 +23,7 @@ import (
"strings"
"time"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/to"
@@ -126,7 +126,7 @@ func (c *Client) getVMSS(ctx context.Context, resourceGroupName string, VMScaleS
)
result := compute.VirtualMachineScaleSet{}
- response, rerr := c.armClient.GetResource(ctx, resourceID, "")
+ response, rerr := c.armClient.GetResource(ctx, resourceID)
defer c.armClient.CloseResponse(ctx, response)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "vmss.get.request", resourceID, rerr.Error())
@@ -186,7 +186,7 @@ func (c *Client) listVMSS(ctx context.Context, resourceGroupName string) ([]comp
page := &VirtualMachineScaleSetListResultPage{}
page.fn = c.listNextResults
- resp, rerr := c.armClient.GetResource(ctx, resourceID, "")
+ resp, rerr := c.armClient.GetResource(ctx, resourceID)
defer c.armClient.CloseResponse(ctx, resp)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "vmss.list.request", resourceID, rerr.Error())
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssclient/interface.go
index 5f572e35f5bb..dcd33f9df91b 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssclient/interface.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssclient/interface.go
@@ -20,7 +20,7 @@ import (
"context"
"net/http"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
"github.com/Azure/go-autorest/autorest/azure"
"sigs.k8s.io/cloud-provider-azure/pkg/retry"
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssclient/mockvmssclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssclient/mockvmssclient/interface.go
index 2cbd7d4c7784..449983234987 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssclient/mockvmssclient/interface.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssclient/mockvmssclient/interface.go
@@ -16,7 +16,7 @@
//
// Code generated by MockGen. DO NOT EDIT.
-// Source: /go/src/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssclient/interface.go
+// Source: pkg/azureclients/vmssclient/interface.go
// Package mockvmssclient is a generated GoMock package.
package mockvmssclient
@@ -26,7 +26,7 @@ import (
http "net/http"
reflect "reflect"
- compute "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ compute "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
azure "github.com/Azure/go-autorest/autorest/azure"
gomock "github.com/golang/mock/gomock"
retry "sigs.k8s.io/cloud-provider-azure/pkg/retry"
@@ -55,36 +55,6 @@ func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder {
return m.recorder
}
-// Get mocks base method.
-func (m *MockInterface) Get(ctx context.Context, resourceGroupName, VMScaleSetName string) (compute.VirtualMachineScaleSet, *retry.Error) {
- m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "Get", ctx, resourceGroupName, VMScaleSetName)
- ret0, _ := ret[0].(compute.VirtualMachineScaleSet)
- ret1, _ := ret[1].(*retry.Error)
- return ret0, ret1
-}
-
-// Get indicates an expected call of Get.
-func (mr *MockInterfaceMockRecorder) Get(ctx, resourceGroupName, VMScaleSetName interface{}) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), ctx, resourceGroupName, VMScaleSetName)
-}
-
-// List mocks base method.
-func (m *MockInterface) List(ctx context.Context, resourceGroupName string) ([]compute.VirtualMachineScaleSet, *retry.Error) {
- m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "List", ctx, resourceGroupName)
- ret0, _ := ret[0].([]compute.VirtualMachineScaleSet)
- ret1, _ := ret[1].(*retry.Error)
- return ret0, ret1
-}
-
-// List indicates an expected call of List.
-func (mr *MockInterfaceMockRecorder) List(ctx, resourceGroupName interface{}) *gomock.Call {
- mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInterface)(nil).List), ctx, resourceGroupName)
-}
-
// CreateOrUpdate mocks base method.
func (m *MockInterface) CreateOrUpdate(ctx context.Context, resourceGroupName, VMScaleSetName string, parameters compute.VirtualMachineScaleSet) *retry.Error {
m.ctrl.T.Helper()
@@ -114,19 +84,19 @@ func (mr *MockInterfaceMockRecorder) CreateOrUpdateAsync(ctx, resourceGroupName,
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdateAsync", reflect.TypeOf((*MockInterface)(nil).CreateOrUpdateAsync), ctx, resourceGroupName, VMScaleSetName, parameters)
}
-// WaitForAsyncOperationResult mocks base method.
-func (m *MockInterface) WaitForAsyncOperationResult(ctx context.Context, future *azure.Future, resourceGroupName, request, asyncOpName string) (*http.Response, error) {
+// DeallocateInstancesAsync mocks base method.
+func (m *MockInterface) DeallocateInstancesAsync(ctx context.Context, resourceGroupName, vmScaleSetName string, vmInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs) (*azure.Future, *retry.Error) {
m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "WaitForAsyncOperationResult", ctx, future, resourceGroupName, request, asyncOpName)
- ret0, _ := ret[0].(*http.Response)
- ret1, _ := ret[1].(error)
+ ret := m.ctrl.Call(m, "DeallocateInstancesAsync", ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs)
+ ret0, _ := ret[0].(*azure.Future)
+ ret1, _ := ret[1].(*retry.Error)
return ret0, ret1
}
-// WaitForAsyncOperationResult indicates an expected call of WaitForAsyncOperationResult.
-func (mr *MockInterfaceMockRecorder) WaitForAsyncOperationResult(ctx, future, resourceGroupName, request, asyncOpName interface{}) *gomock.Call {
+// DeallocateInstancesAsync indicates an expected call of DeallocateInstancesAsync.
+func (mr *MockInterfaceMockRecorder) DeallocateInstancesAsync(ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForAsyncOperationResult", reflect.TypeOf((*MockInterface)(nil).WaitForAsyncOperationResult), ctx, future, resourceGroupName, request, asyncOpName)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeallocateInstancesAsync", reflect.TypeOf((*MockInterface)(nil).DeallocateInstancesAsync), ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs)
}
// DeleteInstances mocks base method.
@@ -144,63 +114,93 @@ func (mr *MockInterfaceMockRecorder) DeleteInstances(ctx, resourceGroupName, vmS
}
// DeleteInstancesAsync mocks base method.
-func (m *MockInterface) DeleteInstancesAsync(ctx context.Context, resourceGroupName, VMScaleSetName string, vmInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs, forceDelete bool) (*azure.Future, *retry.Error) {
+func (m *MockInterface) DeleteInstancesAsync(ctx context.Context, resourceGroupName, vmScaleSetName string, vmInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs, forceDelete bool) (*azure.Future, *retry.Error) {
m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "DeleteInstancesAsync", ctx, resourceGroupName, VMScaleSetName, vmInstanceIDs, forceDelete)
+ ret := m.ctrl.Call(m, "DeleteInstancesAsync", ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs, forceDelete)
ret0, _ := ret[0].(*azure.Future)
ret1, _ := ret[1].(*retry.Error)
return ret0, ret1
}
// DeleteInstancesAsync indicates an expected call of DeleteInstancesAsync.
-func (mr *MockInterfaceMockRecorder) DeleteInstancesAsync(ctx, resourceGroupName, VMScaleSetName, vmInstanceIDs, forceDelete interface{}) *gomock.Call {
+func (mr *MockInterfaceMockRecorder) DeleteInstancesAsync(ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs, forceDelete interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteInstancesAsync", reflect.TypeOf((*MockInterface)(nil).DeleteInstancesAsync), ctx, resourceGroupName, VMScaleSetName, vmInstanceIDs, forceDelete)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteInstancesAsync", reflect.TypeOf((*MockInterface)(nil).DeleteInstancesAsync), ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs, forceDelete)
}
-// WaitForCreateOrUpdateResult mocks base method.
-func (m *MockInterface) WaitForCreateOrUpdateResult(ctx context.Context, future *azure.Future, resourceGroupName string) (*http.Response, error) {
+// Get mocks base method.
+func (m *MockInterface) Get(ctx context.Context, resourceGroupName, VMScaleSetName string) (compute.VirtualMachineScaleSet, *retry.Error) {
m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "WaitForCreateOrUpdateResult", ctx, future, resourceGroupName)
- ret0, _ := ret[0].(*http.Response)
- ret1, _ := ret[1].(error)
+ ret := m.ctrl.Call(m, "Get", ctx, resourceGroupName, VMScaleSetName)
+ ret0, _ := ret[0].(compute.VirtualMachineScaleSet)
+ ret1, _ := ret[1].(*retry.Error)
return ret0, ret1
}
-// WaitForCreateOrUpdateResult indicates an expected call of WaitForCreateOrUpdateResult.
-func (mr *MockInterfaceMockRecorder) WaitForCreateOrUpdateResult(ctx, future, resourceGroupName interface{}) *gomock.Call {
+// Get indicates an expected call of Get.
+func (mr *MockInterfaceMockRecorder) Get(ctx, resourceGroupName, VMScaleSetName interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForCreateOrUpdateResult", reflect.TypeOf((*MockInterface)(nil).WaitForCreateOrUpdateResult), ctx, future, resourceGroupName)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), ctx, resourceGroupName, VMScaleSetName)
}
-// WaitForDeleteInstancesResult mocks base method.
-func (m *MockInterface) WaitForDeleteInstancesResult(ctx context.Context, future *azure.Future, resourceGroupName string) (*http.Response, error) {
+// List mocks base method.
+func (m *MockInterface) List(ctx context.Context, resourceGroupName string) ([]compute.VirtualMachineScaleSet, *retry.Error) {
m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "WaitForDeleteInstancesResult", ctx, future, resourceGroupName)
- ret0, _ := ret[0].(*http.Response)
- ret1, _ := ret[1].(error)
+ ret := m.ctrl.Call(m, "List", ctx, resourceGroupName)
+ ret0, _ := ret[0].([]compute.VirtualMachineScaleSet)
+ ret1, _ := ret[1].(*retry.Error)
return ret0, ret1
}
-// WaitForDeleteInstancesResult indicates an expected call of WaitForDeleteInstancesResult.
-func (mr *MockInterfaceMockRecorder) WaitForDeleteInstancesResult(ctx, future, resourceGroupName interface{}) *gomock.Call {
+// List indicates an expected call of List.
+func (mr *MockInterfaceMockRecorder) List(ctx, resourceGroupName interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForDeleteInstancesResult", reflect.TypeOf((*MockInterface)(nil).WaitForDeleteInstancesResult), ctx, future, resourceGroupName)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInterface)(nil).List), ctx, resourceGroupName)
}
-// DeallocateInstancesAsync mocks base method.
-func (m *MockInterface) DeallocateInstancesAsync(ctx context.Context, resourceGroupName, vmScaleSetName string, vmInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs) (*azure.Future, *retry.Error) {
+// StartInstancesAsync mocks base method.
+func (m *MockInterface) StartInstancesAsync(ctx context.Context, resourceGroupName, vmScaleSetName string, vmInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs) (*azure.Future, *retry.Error) {
m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "DeallocateInstancesAsync", ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs)
+ ret := m.ctrl.Call(m, "StartInstancesAsync", ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs)
ret0, _ := ret[0].(*azure.Future)
ret1, _ := ret[1].(*retry.Error)
return ret0, ret1
}
-// DeallocateInstancesAsync indicates an expected call of DeallocateInstancesAsync.
-func (mr *MockInterfaceMockRecorder) DeallocateInstancesAsync(ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs interface{}) *gomock.Call {
+// StartInstancesAsync indicates an expected call of StartInstancesAsync.
+func (mr *MockInterfaceMockRecorder) StartInstancesAsync(ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeallocateInstancesAsync", reflect.TypeOf((*MockInterface)(nil).DeallocateInstancesAsync), ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartInstancesAsync", reflect.TypeOf((*MockInterface)(nil).StartInstancesAsync), ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs)
+}
+
+// WaitForAsyncOperationResult mocks base method.
+func (m *MockInterface) WaitForAsyncOperationResult(ctx context.Context, future *azure.Future, resourceGroupName, request, asyncOpName string) (*http.Response, error) {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "WaitForAsyncOperationResult", ctx, future, resourceGroupName, request, asyncOpName)
+ ret0, _ := ret[0].(*http.Response)
+ ret1, _ := ret[1].(error)
+ return ret0, ret1
+}
+
+// WaitForAsyncOperationResult indicates an expected call of WaitForAsyncOperationResult.
+func (mr *MockInterfaceMockRecorder) WaitForAsyncOperationResult(ctx, future, resourceGroupName, request, asyncOpName interface{}) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForAsyncOperationResult", reflect.TypeOf((*MockInterface)(nil).WaitForAsyncOperationResult), ctx, future, resourceGroupName, request, asyncOpName)
+}
+
+// WaitForCreateOrUpdateResult mocks base method.
+func (m *MockInterface) WaitForCreateOrUpdateResult(ctx context.Context, future *azure.Future, resourceGroupName string) (*http.Response, error) {
+ m.ctrl.T.Helper()
+ ret := m.ctrl.Call(m, "WaitForCreateOrUpdateResult", ctx, future, resourceGroupName)
+ ret0, _ := ret[0].(*http.Response)
+ ret1, _ := ret[1].(error)
+ return ret0, ret1
+}
+
+// WaitForCreateOrUpdateResult indicates an expected call of WaitForCreateOrUpdateResult.
+func (mr *MockInterfaceMockRecorder) WaitForCreateOrUpdateResult(ctx, future, resourceGroupName interface{}) *gomock.Call {
+ mr.mock.ctrl.T.Helper()
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForCreateOrUpdateResult", reflect.TypeOf((*MockInterface)(nil).WaitForCreateOrUpdateResult), ctx, future, resourceGroupName)
}
// WaitForDeallocateInstancesResult mocks base method.
@@ -218,19 +218,19 @@ func (mr *MockInterfaceMockRecorder) WaitForDeallocateInstancesResult(ctx, futur
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForDeallocateInstancesResult", reflect.TypeOf((*MockInterface)(nil).WaitForDeallocateInstancesResult), ctx, future, resourceGroupName)
}
-// StartInstancesAsync mocks base method.
-func (m *MockInterface) StartInstancesAsync(ctx context.Context, resourceGroupName, vmScaleSetName string, vmInstanceIDs compute.VirtualMachineScaleSetVMInstanceRequiredIDs) (*azure.Future, *retry.Error) {
+// WaitForDeleteInstancesResult mocks base method.
+func (m *MockInterface) WaitForDeleteInstancesResult(ctx context.Context, future *azure.Future, resourceGroupName string) (*http.Response, error) {
m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "StartInstancesAsync", ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs)
- ret0, _ := ret[0].(*azure.Future)
- ret1, _ := ret[1].(*retry.Error)
+ ret := m.ctrl.Call(m, "WaitForDeleteInstancesResult", ctx, future, resourceGroupName)
+ ret0, _ := ret[0].(*http.Response)
+ ret1, _ := ret[1].(error)
return ret0, ret1
}
-// StartInstancesAsync indicates an expected call of StartInstancesAsync.
-func (mr *MockInterfaceMockRecorder) StartInstancesAsync(ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs interface{}) *gomock.Call {
+// WaitForDeleteInstancesResult indicates an expected call of WaitForDeleteInstancesResult.
+func (mr *MockInterfaceMockRecorder) WaitForDeleteInstancesResult(ctx, future, resourceGroupName interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartInstancesAsync", reflect.TypeOf((*MockInterface)(nil).StartInstancesAsync), ctx, resourceGroupName, vmScaleSetName, vmInstanceIDs)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForDeleteInstancesResult", reflect.TypeOf((*MockInterface)(nil).WaitForDeleteInstancesResult), ctx, future, resourceGroupName)
}
// WaitForStartInstancesResult mocks base method.
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssvmclient/azure_vmssvmclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssvmclient/azure_vmssvmclient.go
index 8379f2449297..a65615eb3c05 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssvmclient/azure_vmssvmclient.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssvmclient/azure_vmssvmclient.go
@@ -23,7 +23,7 @@ import (
"strings"
"time"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/to"
@@ -129,7 +129,7 @@ func (c *Client) getVMSSVM(ctx context.Context, resourceGroupName string, VMScal
)
result := compute.VirtualMachineScaleSetVM{}
- response, rerr := c.armClient.GetResource(ctx, resourceID, string(expand))
+ response, rerr := c.armClient.GetResourceWithExpandQuery(ctx, resourceID, string(expand))
defer c.armClient.CloseResponse(ctx, response)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "vmssvm.get.request", resourceID, rerr.Error())
@@ -192,7 +192,7 @@ func (c *Client) listVMSSVM(ctx context.Context, resourceGroupName string, virtu
page := &VirtualMachineScaleSetVMListResultPage{}
page.fn = c.listNextResults
- resp, rerr := c.armClient.GetResource(ctx, resourceID, expand)
+ resp, rerr := c.armClient.GetResourceWithExpandQuery(ctx, resourceID, expand)
defer c.armClient.CloseResponse(ctx, resp)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "vmssvm.list.request", resourceID, rerr.Error())
@@ -299,12 +299,13 @@ func (c *Client) WaitForUpdateResult(ctx context.Context, future *azure.Future,
mc := metrics.NewMetricContext("vmss", "wait_for_update_result", resourceGroupName, c.subscriptionID, source)
response, err := c.armClient.WaitForAsyncOperationResult(ctx, future, "VMSSWaitForUpdateResult")
mc.Observe(retry.NewErrorOrNil(false, err))
- if response != nil && response.StatusCode != http.StatusNoContent {
- _, rerr := c.updateResponder(response)
- if rerr != nil {
- klog.V(5).Infof("Received error: %s", "vmss.put.respond", rerr.Error())
- return rerr
+ if err != nil {
+ if response != nil {
+ klog.V(5).Infof("Received error in WaitForAsyncOperationResult: '%s', response code %d", err.Error(), response.StatusCode)
+ } else {
+ klog.V(5).Infof("Received error in WaitForAsyncOperationResult: '%s', no response", err.Error())
}
+ return retry.GetError(response, err)
}
return nil
}
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssvmclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssvmclient/interface.go
index 84adbee110bf..001dba25b8a7 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssvmclient/interface.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssvmclient/interface.go
@@ -19,7 +19,7 @@ package vmssvmclient
import (
"context"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
"github.com/Azure/go-autorest/autorest/azure"
"sigs.k8s.io/cloud-provider-azure/pkg/retry"
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssvmclient/mockvmssvmclient/interface.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssvmclient/mockvmssvmclient/interface.go
index f98312e9e2dd..918d22be733f 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssvmclient/mockvmssvmclient/interface.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssvmclient/mockvmssvmclient/interface.go
@@ -16,44 +16,45 @@
//
// Code generated by MockGen. DO NOT EDIT.
-// Source: /go/src/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/vmssvmclient/interface.go
+// Source: pkg/azureclients/vmssvmclient/interface.go
// Package mockvmssvmclient is a generated GoMock package.
package mockvmssvmclient
import (
context "context"
- compute "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ reflect "reflect"
+
+ compute "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
azure "github.com/Azure/go-autorest/autorest/azure"
gomock "github.com/golang/mock/gomock"
- reflect "reflect"
retry "sigs.k8s.io/cloud-provider-azure/pkg/retry"
)
-// MockInterface is a mock of Interface interface
+// MockInterface is a mock of Interface interface.
type MockInterface struct {
ctrl *gomock.Controller
recorder *MockInterfaceMockRecorder
}
-// MockInterfaceMockRecorder is the mock recorder for MockInterface
+// MockInterfaceMockRecorder is the mock recorder for MockInterface.
type MockInterfaceMockRecorder struct {
mock *MockInterface
}
-// NewMockInterface creates a new mock instance
+// NewMockInterface creates a new mock instance.
func NewMockInterface(ctrl *gomock.Controller) *MockInterface {
mock := &MockInterface{ctrl: ctrl}
mock.recorder = &MockInterfaceMockRecorder{mock}
return mock
}
-// EXPECT returns an object that allows the caller to indicate expected use
+// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockInterface) EXPECT() *MockInterfaceMockRecorder {
return m.recorder
}
-// Get mocks base method
+// Get mocks base method.
func (m *MockInterface) Get(ctx context.Context, resourceGroupName, VMScaleSetName, instanceID string, expand compute.InstanceViewTypes) (compute.VirtualMachineScaleSetVM, *retry.Error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Get", ctx, resourceGroupName, VMScaleSetName, instanceID, expand)
@@ -62,13 +63,13 @@ func (m *MockInterface) Get(ctx context.Context, resourceGroupName, VMScaleSetNa
return ret0, ret1
}
-// Get indicates an expected call of Get
+// Get indicates an expected call of Get.
func (mr *MockInterfaceMockRecorder) Get(ctx, resourceGroupName, VMScaleSetName, instanceID, expand interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockInterface)(nil).Get), ctx, resourceGroupName, VMScaleSetName, instanceID, expand)
}
-// List mocks base method
+// List mocks base method.
func (m *MockInterface) List(ctx context.Context, resourceGroupName, virtualMachineScaleSetName, expand string) ([]compute.VirtualMachineScaleSetVM, *retry.Error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "List", ctx, resourceGroupName, virtualMachineScaleSetName, expand)
@@ -77,13 +78,13 @@ func (m *MockInterface) List(ctx context.Context, resourceGroupName, virtualMach
return ret0, ret1
}
-// List indicates an expected call of List
+// List indicates an expected call of List.
func (mr *MockInterfaceMockRecorder) List(ctx, resourceGroupName, virtualMachineScaleSetName, expand interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockInterface)(nil).List), ctx, resourceGroupName, virtualMachineScaleSetName, expand)
}
-// Update mocks base method
+// Update mocks base method.
func (m *MockInterface) Update(ctx context.Context, resourceGroupName, VMScaleSetName, instanceID string, parameters compute.VirtualMachineScaleSetVM, source string) *retry.Error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Update", ctx, resourceGroupName, VMScaleSetName, instanceID, parameters, source)
@@ -91,13 +92,13 @@ func (m *MockInterface) Update(ctx context.Context, resourceGroupName, VMScaleSe
return ret0
}
-// Update indicates an expected call of Update
+// Update indicates an expected call of Update.
func (mr *MockInterfaceMockRecorder) Update(ctx, resourceGroupName, VMScaleSetName, instanceID, parameters, source interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockInterface)(nil).Update), ctx, resourceGroupName, VMScaleSetName, instanceID, parameters, source)
}
-// UpdateAsync mocks base method
+// UpdateAsync mocks base method.
func (m *MockInterface) UpdateAsync(ctx context.Context, resourceGroupName, VMScaleSetName, instanceID string, parameters compute.VirtualMachineScaleSetVM, source string) (*azure.Future, *retry.Error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "UpdateAsync", ctx, resourceGroupName, VMScaleSetName, instanceID, parameters, source)
@@ -106,36 +107,36 @@ func (m *MockInterface) UpdateAsync(ctx context.Context, resourceGroupName, VMSc
return ret0, ret1
}
-// UpdateAsync indicates an expected call of UpdateAsync
+// UpdateAsync indicates an expected call of UpdateAsync.
func (mr *MockInterfaceMockRecorder) UpdateAsync(ctx, resourceGroupName, VMScaleSetName, instanceID, parameters, source interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAsync", reflect.TypeOf((*MockInterface)(nil).UpdateAsync), ctx, resourceGroupName, VMScaleSetName, instanceID, parameters, source)
}
-// WaitForUpdateResult mocks base method
-func (m *MockInterface) WaitForUpdateResult(ctx context.Context, future *azure.Future, resourceGroupName, source string) *retry.Error {
+// UpdateVMs mocks base method.
+func (m *MockInterface) UpdateVMs(ctx context.Context, resourceGroupName, VMScaleSetName string, instances map[string]compute.VirtualMachineScaleSetVM, source string, batchSize int) *retry.Error {
m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "WaitForUpdateResult", ctx, future, resourceGroupName, source)
+ ret := m.ctrl.Call(m, "UpdateVMs", ctx, resourceGroupName, VMScaleSetName, instances, source, batchSize)
ret0, _ := ret[0].(*retry.Error)
return ret0
}
-// WaitForUpdateResult indicates an expected call of WaitForUpdateResult
-func (mr *MockInterfaceMockRecorder) WaitForUpdateResult(ctx, future, resourceGroupName, source interface{}) *gomock.Call {
+// UpdateVMs indicates an expected call of UpdateVMs.
+func (mr *MockInterfaceMockRecorder) UpdateVMs(ctx, resourceGroupName, VMScaleSetName, instances, source, batchSize interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForUpdateResult", reflect.TypeOf((*MockInterface)(nil).WaitForUpdateResult), ctx, future, resourceGroupName, source)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateVMs", reflect.TypeOf((*MockInterface)(nil).UpdateVMs), ctx, resourceGroupName, VMScaleSetName, instances, source, batchSize)
}
-// UpdateVMs mocks base method
-func (m *MockInterface) UpdateVMs(ctx context.Context, resourceGroupName, VMScaleSetName string, instances map[string]compute.VirtualMachineScaleSetVM, source string, batchSize int) *retry.Error {
+// WaitForUpdateResult mocks base method.
+func (m *MockInterface) WaitForUpdateResult(ctx context.Context, future *azure.Future, resourceGroupName, source string) *retry.Error {
m.ctrl.T.Helper()
- ret := m.ctrl.Call(m, "UpdateVMs", ctx, resourceGroupName, VMScaleSetName, instances, source, batchSize)
+ ret := m.ctrl.Call(m, "WaitForUpdateResult", ctx, future, resourceGroupName, source)
ret0, _ := ret[0].(*retry.Error)
return ret0
}
-// UpdateVMs indicates an expected call of UpdateVMs
-func (mr *MockInterfaceMockRecorder) UpdateVMs(ctx, resourceGroupName, VMScaleSetName, instances, source, batchSize interface{}) *gomock.Call {
+// WaitForUpdateResult indicates an expected call of WaitForUpdateResult.
+func (mr *MockInterfaceMockRecorder) WaitForUpdateResult(ctx, future, resourceGroupName, source interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
- return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateVMs", reflect.TypeOf((*MockInterface)(nil).UpdateVMs), ctx, resourceGroupName, VMScaleSetName, instances, source, batchSize)
+ return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WaitForUpdateResult", reflect.TypeOf((*MockInterface)(nil).WaitForUpdateResult), ctx, future, resourceGroupName, source)
}
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/zoneclient/azure_zoneclient.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/zoneclient/azure_zoneclient.go
index 0d43ddd619c5..ac197a641980 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/zoneclient/azure_zoneclient.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/zoneclient/azure_zoneclient.go
@@ -94,7 +94,7 @@ func (c *Client) GetZones(ctx context.Context, subscriptionID string) (map[strin
func (c *Client) getZones(ctx context.Context, subscriptionID string) (map[string][]string, *retry.Error) {
resourceID := armclient.GetProviderResourcesListID(subscriptionID)
- response, rerr := c.armClient.GetResource(ctx, resourceID, "")
+ response, rerr := c.armClient.GetResource(ctx, resourceID)
defer c.armClient.CloseResponse(ctx, response)
if rerr != nil {
klog.V(5).Infof("Received error in %s: resourceID: %s, error: %s", "zone.get.request", resourceID, rerr.Error())
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/consts/consts.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/consts/consts.go
index 6edd9f1a29de..cd83134ae363 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/consts/consts.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/consts/consts.go
@@ -40,9 +40,10 @@ const (
// LabelFailureDomainBetaZone refer to https://github.com/kubernetes/api/blob/8519c5ea46199d57724725d5b969c5e8e0533692/core/v1/well_known_labels.go#L22-L23
LabelFailureDomainBetaZone = "failure-domain.beta.kubernetes.io/zone"
-
// LabelFailureDomainBetaRegion failure-domain region label
LabelFailureDomainBetaRegion = "failure-domain.beta.kubernetes.io/region"
+ // LabelPlatformSubFaultDomain is the label key of platformSubFaultDomain
+ LabelPlatformSubFaultDomain = "topology.kubernetes.azure.com/sub-fault-domain"
// ADFSIdentitySystem is the override value for tenantID on Azure Stack clouds.
ADFSIdentitySystem = "adfs"
@@ -259,6 +260,14 @@ const (
// If not set, the local service would use the HTTP and the cluster service would use the TCP by default.
ServiceAnnotationLoadBalancerHealthProbeProtocol = "service.beta.kubernetes.io/azure-load-balancer-health-probe-protocol"
+ // ServiceAnnotationLoadBalancerHealthProbeInterval determines the probe interval of the load balancer health probe.
+ // The minimum probe interval is 5 seconds and the default value is 15. The total duration of all intervals cannot exceed 120 seconds.
+ ServiceAnnotationLoadBalancerHealthProbeInterval = "service.beta.kubernetes.io/azure-load-balancer-health-probe-interval"
+
+ // ServiceAnnotationLoadBalancerHealthProbeNumOfProbe determines the minimum number of unhealthy responses which load balancer cannot tolerate.
+ // The minimum number of probe is 1. The total duration of all intervals cannot exceed 120 seconds.
+ ServiceAnnotationLoadBalancerHealthProbeNumOfProbe = "service.beta.kubernetes.io/azure-load-balancer-health-probe-num-of-probe"
+
// ServiceAnnotationLoadBalancerHealthProbeRequestPath determines the request path of the load balancer health probe.
// This is only useful for the HTTP and HTTPS, and would be ignored when using TCP. If not set,
// `/healthz` would be configured by default.
@@ -317,6 +326,9 @@ const (
// LoadBalancerBackendPoolConfigurationTypePODIP is the lb backend pool config type pod ip
// TODO (nilo19): support pod IP in the future
LoadBalancerBackendPoolConfigurationTypePODIP = "podIP"
+
+ // To get pip, we need both resource group name and pip name, key in cache has format: pip_rg:pip_name
+ PIPCacheKeySeparator = ":"
)
// error messages
@@ -344,7 +356,7 @@ const (
// metadata service
const (
// ImdsInstanceAPIVersion is the imds instance api version
- ImdsInstanceAPIVersion = "2019-03-11"
+ ImdsInstanceAPIVersion = "2021-10-01"
// ImdsLoadBalancerAPIVersion is the imds load balancer api version
ImdsLoadBalancerAPIVersion = "2020-10-01"
// ImdsServer is the imds server endpoint
@@ -373,3 +385,26 @@ const RateLimited = "rate limited"
// CreatedByTag tag key for CSI drivers
const CreatedByTag = "k8s-azure-created-by"
+
+// health probe
+const (
+ HealthProbeAnnotationPrefixPattern = "service.beta.kubernetes.io/port_%d_health-probe_"
+
+ // HealthProbeParamsProbeInterval determines the probe interval of the load balancer health probe.
+ // The minimum probe interval is 5 seconds and the default value is 5. The total duration of all intervals cannot exceed 120 seconds.
+ HealthProbeParamsProbeInterval HealthProbeParams = "interval"
+ HealthProbeDefaultProbeInterval int32 = 5
+
+ // HealthProbeParamsNumOfProbe determines the minimum number of unhealthy responses which load balancer cannot tolerate.
+ // The minimum number of probe is 2. The total duration of all intervals cannot exceed 120 seconds.
+ HealthProbeParamsNumOfProbe HealthProbeParams = "num-of-probe"
+ HealthProbeDefaultNumOfProbe int32 = 2
+
+ // HealthProbeParamsRequestPath determines the request path of the load balancer health probe.
+ // This is only useful for the HTTP and HTTPS, and would be ignored when using TCP. If not set,
+ // `/` would be configured by default.
+ HealthProbeParamsRequestPath HealthProbeParams = "request-path"
+ HealthProbeDefaultRequestPath string = "/"
+)
+
+type HealthProbeParams string
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/consts/helpers.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/consts/helpers.go
new file mode 100644
index 000000000000..f86236218f37
--- /dev/null
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/consts/helpers.go
@@ -0,0 +1,109 @@
+/*
+Copyright 2021 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+// Package consts stages all the consts under pkg/.
+package consts
+
+import (
+ "fmt"
+ "strconv"
+ "strings"
+
+ v1 "k8s.io/api/core/v1"
+)
+
+// IsK8sServiceHasHAModeEnabled return if HA Mode is enabled in kuberntes service annotations
+func IsK8sServiceHasHAModeEnabled(service *v1.Service) bool {
+ return expectAttributeInSvcAnnotationBeEqualTo(service.Annotations, ServiceAnnotationLoadBalancerEnableHighAvailabilityPorts, TrueAnnotationValue)
+}
+
+// IsK8sServiceUsingInternalLoadBalancer return if service is using an internal load balancer.
+func IsK8sServiceUsingInternalLoadBalancer(service *v1.Service) bool {
+ return expectAttributeInSvcAnnotationBeEqualTo(service.Annotations, ServiceAnnotationLoadBalancerInternal, TrueAnnotationValue)
+}
+
+// GetHealthProbeConfigOfPortFromK8sSvcAnnotation get health probe configuration for port
+func GetHealthProbeConfigOfPortFromK8sSvcAnnotation(annotations map[string]string, port int32, key HealthProbeParams, validators ...BusinessValidator) (*string, error) {
+ return GetAttributeValueInSvcAnnotation(annotations, BuildHealthProbeAnnotationKeyForPort(port, key), validators...)
+}
+
+// Getint32ValueFromK8sSvcAnnotation get health probe configuration for port
+func Getint32ValueFromK8sSvcAnnotation(annotations map[string]string, key string, validators ...Int32BusinessValidator) (*int32, error) {
+ val, err := GetAttributeValueInSvcAnnotation(annotations, key)
+ if err == nil && val != nil {
+ return extractInt32FromString(*val, validators...)
+ }
+ return nil, err
+}
+
+// BuildHealthProbeAnnotationKeyForPort get health probe configuration key for port
+func BuildHealthProbeAnnotationKeyForPort(port int32, key HealthProbeParams) string {
+ return fmt.Sprintf(HealthProbeAnnotationPrefixPattern, port) + string(key)
+}
+
+// GetInt32HealthProbeConfigOfPortFromK8sSvcAnnotation get health probe configuration for port
+func GetInt32HealthProbeConfigOfPortFromK8sSvcAnnotation(annotations map[string]string, port int32, key HealthProbeParams, validators ...Int32BusinessValidator) (*int32, error) {
+ return Getint32ValueFromK8sSvcAnnotation(annotations, BuildHealthProbeAnnotationKeyForPort(port, key), validators...)
+}
+
+// Int32BusinessValidator is validator function which is invoked after values are parsed in order to make sure input value meets the businees need.
+type Int32BusinessValidator func(*int32) error
+
+// getInt32FromAnnotations parse integer value from annotation and return an reference to int32 object
+func extractInt32FromString(val string, businessValidator ...Int32BusinessValidator) (*int32, error) {
+ val = strings.TrimSpace(val)
+ errKey := fmt.Errorf("%s value must be a whole number", val)
+ toInt, err := strconv.ParseInt(val, 10, 32)
+ if err != nil {
+ return nil, fmt.Errorf("error value: %w: %v", err, errKey)
+ }
+ parsedInt := int32(toInt)
+ for _, validator := range businessValidator {
+ if validator != nil {
+ err := validator(&parsedInt)
+ if err != nil {
+ return nil, fmt.Errorf("error parsing value: %w", err)
+ }
+ }
+ }
+ return &parsedInt, nil
+}
+
+// BusinessValidator is validator function which is invoked after values are parsed in order to make sure input value meets the businees need.
+type BusinessValidator func(*string) error
+
+// GetAttributeValueInSvcAnnotation get value in annotation map using key
+func GetAttributeValueInSvcAnnotation(annotations map[string]string, key string, validators ...BusinessValidator) (*string, error) {
+ if l, found := annotations[key]; found {
+ for _, validateFunc := range validators {
+ if validateFunc != nil {
+ if err := validateFunc(&l); err != nil {
+ return nil, err
+ }
+ }
+ }
+ return &l, nil
+ }
+ return nil, nil
+}
+
+// expectAttributeInSvcAnnotation get key in svc annotation and compare with target value
+func expectAttributeInSvcAnnotationBeEqualTo(annotations map[string]string, key string, value string) bool {
+ if l, err := GetAttributeValueInSvcAnnotation(annotations, key); err == nil && l != nil {
+ return strings.EqualFold(*l, value)
+ }
+ return false
+}
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/metrics/azure_metrics.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/metrics/azure_metrics.go
index 31855edcbbec..be2a7ae0cd94 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/metrics/azure_metrics.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/metrics/azure_metrics.go
@@ -22,6 +22,7 @@ import (
"k8s.io/component-base/metrics"
"k8s.io/component-base/metrics/legacyregistry"
+ "k8s.io/klog/v2"
"sigs.k8s.io/cloud-provider-azure/pkg/consts"
"sigs.k8s.io/cloud-provider-azure/pkg/retry"
@@ -80,23 +81,35 @@ func (mc *MetricContext) ThrottledCount() {
}
// Observe observes the request latency and failed requests.
-func (mc *MetricContext) Observe(rerr *retry.Error) {
- apiMetrics.latency.WithLabelValues(mc.attributes...).Observe(
- time.Since(mc.start).Seconds())
+func (mc *MetricContext) Observe(rerr *retry.Error, labelAndValues ...interface{}) {
+ latency := time.Since(mc.start).Seconds()
+ apiMetrics.latency.WithLabelValues(mc.attributes...).Observe(latency)
if rerr != nil {
errorCode := rerr.ServiceErrorCode()
attributes := append(mc.attributes, errorCode)
apiMetrics.errors.WithLabelValues(attributes...).Inc()
}
+ mc.logLatency(6, latency, append(labelAndValues, "error_code", rerr.ServiceErrorCode())...)
}
// ObserveOperationWithResult observes the request latency and failed requests of an operation.
-func (mc *MetricContext) ObserveOperationWithResult(isOperationSucceeded bool) {
- operationMetrics.operationLatency.WithLabelValues(mc.attributes...).Observe(
- time.Since(mc.start).Seconds())
+func (mc *MetricContext) ObserveOperationWithResult(isOperationSucceeded bool, labelAndValues ...interface{}) {
+ latency := time.Since(mc.start).Seconds()
+ operationMetrics.operationLatency.WithLabelValues(mc.attributes...).Observe(latency)
+ resultCode := "succeeded"
if !isOperationSucceeded {
+ resultCode = "failed"
mc.CountFailedOperation()
}
+ mc.logLatency(3, latency, append(labelAndValues, "result_code", resultCode)...)
+}
+
+func (mc *MetricContext) logLatency(logLevel int32, latency float64, additionalKeysAndValues ...interface{}) {
+ keysAndValues := []interface{}{"latency_seconds", latency}
+ for i, label := range metricLabels {
+ keysAndValues = append(keysAndValues, label, mc.attributes[i])
+ }
+ klog.V(klog.Level(logLevel)).InfoS("Observed Request Latency", append(keysAndValues, additionalKeysAndValues...)...)
}
// CountFailedOperation increase the number of failed operations
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/nodemanager/nodemanager.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/nodemanager/nodemanager.go
new file mode 100644
index 000000000000..9f1322709883
--- /dev/null
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/nodemanager/nodemanager.go
@@ -0,0 +1,786 @@
+/*
+Copyright 2019 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package nodemanager
+
+import (
+ "context"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "strings"
+ "time"
+
+ v1 "k8s.io/api/core/v1"
+ "k8s.io/apimachinery/pkg/api/equality"
+ apierrors "k8s.io/apimachinery/pkg/api/errors"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/types"
+ utilruntime "k8s.io/apimachinery/pkg/util/runtime"
+ "k8s.io/apimachinery/pkg/util/strategicpatch"
+ "k8s.io/apimachinery/pkg/util/wait"
+ coreinformers "k8s.io/client-go/informers/core/v1"
+ clientset "k8s.io/client-go/kubernetes"
+ "k8s.io/client-go/kubernetes/scheme"
+ v1core "k8s.io/client-go/kubernetes/typed/core/v1"
+ "k8s.io/client-go/tools/cache"
+ "k8s.io/client-go/tools/record"
+ clientretry "k8s.io/client-go/util/retry"
+ cloudprovider "k8s.io/cloud-provider"
+ cloudproviderapi "k8s.io/cloud-provider/api"
+ cloudnodeutil "k8s.io/cloud-provider/node/helpers"
+ nodeutil "k8s.io/component-helpers/node/util"
+ "k8s.io/klog/v2"
+
+ "sigs.k8s.io/cloud-provider-azure/pkg/consts"
+)
+
+// NodeProvider defines the interfaces for node provider.
+type NodeProvider interface {
+ // NodeAddresses returns the addresses of the specified instance.
+ NodeAddresses(ctx context.Context, name types.NodeName) ([]v1.NodeAddress, error)
+ // InstanceID returns the cloud provider ID of the specified instance.
+ InstanceID(ctx context.Context, name types.NodeName) (string, error)
+ // InstanceType returns the type of the specified instance.
+ InstanceType(ctx context.Context, name types.NodeName) (string, error)
+ // GetZone returns the Zone containing the current failure zone and locality region that the program is running in
+ GetZone(ctx context.Context, name types.NodeName) (cloudprovider.Zone, error)
+ // GetPlatformSubFaultDomain returns the PlatformSubFaultDomain from IMDS if set.
+ GetPlatformSubFaultDomain() (string, error)
+}
+
+// labelReconcileInfo lists Node labels to reconcile, and how to reconcile them.
+// primaryKey and secondaryKey are keys of labels to reconcile.
+// - If both keys exist, but their values don't match. Use the value from the
+// primaryKey as the source of truth to reconcile.
+// - If ensureSecondaryExists is true, and the secondaryKey does not
+// exist, secondaryKey will be added with the value of the primaryKey.
+var labelReconcileInfo = []struct {
+ primaryKey string
+ secondaryKey string
+ ensureSecondaryExists bool
+}{
+ {
+ // Reconcile the beta and the GA zone label using the beta label as
+ // the source of truth
+ // TODO: switch the primary key to GA labels in v1.21
+ primaryKey: v1.LabelZoneFailureDomain,
+ secondaryKey: v1.LabelZoneFailureDomainStable,
+ ensureSecondaryExists: true,
+ },
+ {
+ // Reconcile the beta and the stable region label using the beta label as
+ // the source of truth
+ // TODO: switch the primary key to GA labels in v1.21
+ primaryKey: v1.LabelZoneRegion,
+ secondaryKey: v1.LabelZoneRegionStable,
+ ensureSecondaryExists: true,
+ },
+ {
+ // Reconcile the beta and the stable instance-type label using the beta label as
+ // the source of truth
+ // TODO: switch the primary key to GA labels in v1.21
+ primaryKey: v1.LabelInstanceType,
+ secondaryKey: v1.LabelInstanceTypeStable,
+ ensureSecondaryExists: true,
+ },
+}
+
+// UpdateNodeSpecBackoff is the back configure for node update.
+var UpdateNodeSpecBackoff = wait.Backoff{
+ Steps: 20,
+ Duration: 50 * time.Millisecond,
+ Jitter: 1.0,
+}
+
+var updateNetworkConditionBackoff = wait.Backoff{
+ Steps: 5, // Maximum number of retries.
+ Duration: 100 * time.Millisecond,
+ Jitter: 1.0,
+}
+
+// CloudNodeController reconciles node information.
+type CloudNodeController struct {
+ nodeName string
+ waitForRoutes bool
+ nodeProvider NodeProvider
+ nodeInformer coreinformers.NodeInformer
+ kubeClient clientset.Interface
+ recorder record.EventRecorder
+
+ nodeStatusUpdateFrequency time.Duration
+}
+
+// NewCloudNodeController creates a CloudNodeController object
+func NewCloudNodeController(
+ nodeName string,
+ nodeInformer coreinformers.NodeInformer,
+ kubeClient clientset.Interface,
+ nodeProvider NodeProvider,
+ nodeStatusUpdateFrequency time.Duration,
+ waitForRoutes bool) *CloudNodeController {
+
+ eventBroadcaster := record.NewBroadcaster()
+ recorder := eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "cloud-node-controller"})
+ eventBroadcaster.StartLogging(klog.Infof)
+ if kubeClient != nil {
+ klog.V(0).Infof("Sending events to api server.")
+ eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: kubeClient.CoreV1().Events("")})
+ } else {
+ klog.V(0).Infof("No api server defined - no events will be sent to API server.")
+ }
+
+ cnc := &CloudNodeController{
+ nodeName: nodeName,
+ nodeInformer: nodeInformer,
+ kubeClient: kubeClient,
+ recorder: recorder,
+ nodeProvider: nodeProvider,
+ waitForRoutes: waitForRoutes,
+ nodeStatusUpdateFrequency: nodeStatusUpdateFrequency,
+ }
+
+ // Use shared informer to listen to add/update of nodes. Note that any nodes
+ // that exist before node controller starts will show up in the update method
+ cnc.nodeInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
+ AddFunc: func(obj interface{}) { cnc.AddCloudNode(context.TODO(), obj) },
+ UpdateFunc: func(oldObj, newObj interface{}) { cnc.UpdateCloudNode(context.TODO(), oldObj, newObj) },
+ })
+
+ return cnc
+}
+
+// Run controller updates newly registered nodes with information
+// from the cloud provider. This call is blocking so should be called
+// via a goroutine
+func (cnc *CloudNodeController) Run(stopCh <-chan struct{}) {
+ defer utilruntime.HandleCrash()
+
+ // The following loops run communicate with the APIServer with a worst case complexity
+ // of O(num_nodes) per cycle. These functions are justified here because these events fire
+ // very infrequently. DO NOT MODIFY this to perform frequent operations.
+
+ // Start a loop to periodically update the node addresses obtained from the cloud
+ wait.Until(func() { cnc.UpdateNodeStatus(context.TODO()) }, cnc.nodeStatusUpdateFrequency, stopCh)
+}
+
+// UpdateNodeStatus updates the node status, such as node addresses
+func (cnc *CloudNodeController) UpdateNodeStatus(ctx context.Context) {
+ node, err := cnc.nodeInformer.Lister().Get(cnc.nodeName)
+ if err != nil {
+ // If node not found, just ignore it.
+ if apierrors.IsNotFound(err) {
+ return
+ }
+
+ klog.Errorf("Error getting node %q from informer, err: %v", cnc.nodeName, err)
+ return
+ }
+
+ err = cnc.updateNodeAddress(ctx, node)
+ if err != nil {
+ klog.Errorf("Error reconciling node address for node %q, err: %v", node.Name, err)
+ }
+
+ err = cnc.reconcileNodeLabels(node)
+ if err != nil {
+ klog.Errorf("Error reconciling node labels for node %q, err: %v", node.Name, err)
+ }
+}
+
+// reconcileNodeLabels reconciles node labels transitioning from beta to GA
+func (cnc *CloudNodeController) reconcileNodeLabels(node *v1.Node) error {
+ if node.Labels == nil {
+ // Nothing to reconcile.
+ return nil
+ }
+
+ labelsToUpdate := map[string]string{}
+ for _, r := range labelReconcileInfo {
+ primaryValue, primaryExists := node.Labels[r.primaryKey]
+ secondaryValue, secondaryExists := node.Labels[r.secondaryKey]
+
+ if !primaryExists {
+ // The primary label key does not exist. This should not happen
+ // within our supported version skew range, when no external
+ // components/factors modifying the node object. Ignore this case.
+ continue
+ }
+ if secondaryExists && primaryValue != secondaryValue {
+ // Secondary label exists, but not consistent with the primary
+ // label. Need to reconcile.
+ labelsToUpdate[r.secondaryKey] = primaryValue
+
+ } else if !secondaryExists && r.ensureSecondaryExists {
+ // Apply secondary label based on primary label.
+ labelsToUpdate[r.secondaryKey] = primaryValue
+ }
+ }
+
+ if len(labelsToUpdate) == 0 {
+ return nil
+ }
+
+ if !cloudnodeutil.AddOrUpdateLabelsOnNode(cnc.kubeClient, labelsToUpdate, node) {
+ return fmt.Errorf("failed update labels for node %+v", node)
+ }
+
+ return nil
+}
+
+// UpdateNodeAddress updates the nodeAddress of a single node
+func (cnc *CloudNodeController) updateNodeAddress(ctx context.Context, node *v1.Node) error {
+ // Do not process nodes that are still tainted
+ cloudTaint := GetCloudTaint(node.Spec.Taints)
+ if cloudTaint != nil {
+ klog.V(5).Infof("This node %s is still tainted. Will not process.", node.Name)
+ return nil
+ }
+
+ // Node that isn't present according to the cloud provider shouldn't have its address updated
+ exists, err := cnc.ensureNodeExistsByProviderID(ctx, node)
+ if err != nil {
+ // Continue to update node address when not sure the node is not exists
+ klog.Warningf("ensureNodeExistsByProviderID (node %s) reported an error (%v), continue to update its address", node.Name, err)
+ } else if !exists {
+ klog.V(4).Infof("The node %s is no longer present according to the cloud provider, do not process.", node.Name)
+ return nil
+ }
+
+ nodeAddresses, err := cnc.getNodeAddressesByName(ctx, node)
+ if err != nil {
+ return fmt.Errorf("Error getting node addresses for node %q: %v", node.Name, err)
+ }
+
+ if len(nodeAddresses) == 0 {
+ klog.V(5).Infof("Skipping node address update for node %q since cloud provider did not return any", node.Name)
+ return nil
+ }
+
+ // Check if a hostname address exists in the cloud provided addresses
+ hostnameExists := false
+ for i := range nodeAddresses {
+ if nodeAddresses[i].Type == v1.NodeHostName {
+ hostnameExists = true
+ break
+ }
+ }
+ // If hostname was not present in cloud provided addresses, use the hostname
+ // from the existing node (populated by kubelet)
+ if !hostnameExists {
+ for _, addr := range node.Status.Addresses {
+ if addr.Type == v1.NodeHostName {
+ nodeAddresses = append(nodeAddresses, addr)
+ }
+ }
+ }
+ // If nodeIP was suggested by user, ensure that
+ // it can be found in the cloud as well (consistent with the behaviour in kubelet)
+ if nodeIP, ok := ensureNodeProvidedIPExists(node, nodeAddresses); ok {
+ if nodeIP == nil {
+ return fmt.Errorf("specified Node IP %s not found in cloudprovider for node %q", nodeAddresses, node.Name)
+ }
+ }
+ if !nodeAddressesChangeDetected(node.Status.Addresses, nodeAddresses) {
+ return nil
+ }
+
+ newNode := node.DeepCopy()
+ newNode.Status.Addresses = nodeAddresses
+ _, _, err = PatchNodeStatus(cnc.kubeClient.CoreV1(), types.NodeName(node.Name), node, newNode)
+ if err != nil {
+ return fmt.Errorf("Error patching node with cloud ip addresses = [%v]", err)
+ }
+
+ return nil
+}
+
+// nodeModifier is used to carry changes to node objects across multiple attempts to update them
+// in a retry-if-conflict loop.
+type nodeModifier func(*v1.Node)
+
+// UpdateCloudNode handles node update event.
+func (cnc *CloudNodeController) UpdateCloudNode(ctx context.Context, _, newObj interface{}) {
+ node, ok := newObj.(*v1.Node)
+ if !ok {
+ utilruntime.HandleError(fmt.Errorf("unexpected object type: %v", newObj))
+ return
+ }
+
+ // Skip other nodes other than cnc.nodeName.
+ if !strings.EqualFold(cnc.nodeName, node.Name) {
+ return
+ }
+
+ cloudTaint := GetCloudTaint(node.Spec.Taints)
+ if cloudTaint == nil {
+ // The node has already been initialized so nothing to do.
+ return
+ }
+
+ cnc.initializeNode(ctx, node)
+}
+
+// AddCloudNode handles initializing new nodes registered with the cloud taint.
+func (cnc *CloudNodeController) AddCloudNode(ctx context.Context, obj interface{}) {
+ node := obj.(*v1.Node)
+
+ // Skip other nodes other than cnc.nodeName.
+ if !strings.EqualFold(cnc.nodeName, node.Name) {
+ return
+ }
+
+ cloudTaint := GetCloudTaint(node.Spec.Taints)
+ if cloudTaint == nil {
+ klog.V(2).Infof("This node %s is registered without the cloud taint. Will not process.", node.Name)
+ return
+ }
+
+ cnc.initializeNode(ctx, node)
+}
+
+// This processes nodes that were added into the cluster, and cloud initialize them if appropriate
+func (cnc *CloudNodeController) initializeNode(ctx context.Context, node *v1.Node) {
+ klog.Infof("Initializing node %s with cloud provider", node.Name)
+ curNode, err := cnc.kubeClient.CoreV1().Nodes().Get(ctx, node.Name, metav1.GetOptions{})
+ if err != nil {
+ utilruntime.HandleError(fmt.Errorf("failed to get node %s: %w", node.Name, err))
+ return
+ }
+
+ cloudTaint := GetCloudTaint(curNode.Spec.Taints)
+ if cloudTaint == nil {
+ // Node object received from event had the cloud taint but was outdated,
+ // the node has actually already been initialized.
+ return
+ }
+
+ if cnc.waitForRoutes {
+ // Set node condition node NodeNetworkUnavailable=true so that Pods won't
+ // be scheduled to this node until routes have been created.
+ err = cnc.updateNetworkingCondition(node, false)
+ if err != nil {
+ utilruntime.HandleError(fmt.Errorf("failed to patch condition for node %s: %w", node.Name, err))
+ return
+ }
+ }
+
+ var nodeModifiers []nodeModifier
+ err = clientretry.OnError(UpdateNodeSpecBackoff, func(err error) bool {
+ return err != nil && strings.HasPrefix(err.Error(), "failed to set node provider id")
+ }, func() error {
+ nodeModifiers, err = cnc.getNodeModifiersFromCloudProvider(ctx, curNode)
+ return err
+ })
+ if err != nil {
+ // Instead of just logging the error, panic and node manager can restart
+ utilruntime.Must(fmt.Errorf("failed to initialize node %s at cloudprovider: %w", node.Name, err))
+ return
+ }
+
+ nodeModifiers = append(nodeModifiers, func(n *v1.Node) {
+ n.Spec.Taints = excludeCloudTaint(n.Spec.Taints)
+ })
+
+ err = clientretry.RetryOnConflict(UpdateNodeSpecBackoff, func() error {
+ curNode, err := cnc.kubeClient.CoreV1().Nodes().Get(ctx, node.Name, metav1.GetOptions{})
+ if err != nil {
+ return err
+ }
+
+ for _, modify := range nodeModifiers {
+ modify(curNode)
+ }
+
+ _, err = cnc.kubeClient.CoreV1().Nodes().Update(ctx, curNode, metav1.UpdateOptions{})
+ if err != nil {
+ return err
+ }
+
+ // After adding, call UpdateNodeAddress to set the CloudProvider provided IPAddresses
+ // So that users do not see any significant delay in IP addresses being filled into the node
+ err = cnc.updateNodeAddress(ctx, curNode)
+ if err != nil {
+ return err
+ }
+
+ klog.Infof("Successfully initialized node %s with cloud provider", node.Name)
+ return nil
+ })
+ if err != nil {
+ utilruntime.HandleError(err)
+ return
+ }
+}
+
+// getNodeModifiersFromCloudProvider returns a slice of nodeModifiers that update
+// a node object with provider-specific information.
+// All of the returned functions are idempotent, because they are used in a retry-if-conflict
+// loop, meaning they could get called multiple times.
+func (cnc *CloudNodeController) getNodeModifiersFromCloudProvider(ctx context.Context, node *v1.Node) ([]nodeModifier, error) {
+ var nodeModifiers []nodeModifier
+
+ if node.Spec.ProviderID == "" {
+ providerID, err := cnc.nodeProvider.InstanceID(ctx, types.NodeName(node.Name))
+ if err == nil {
+ nodeModifiers = append(nodeModifiers, func(n *v1.Node) {
+ if n.Spec.ProviderID == "" {
+ n.Spec.ProviderID = providerID
+ }
+ })
+ } else {
+ // if we are not able to get node provider id,
+ // we return error here and retry in the caller initializeNode()
+ return nil, fmt.Errorf("failed to set node provider id: %w", err)
+ }
+ }
+
+ nodeAddresses, err := cnc.getNodeAddressesByName(ctx, node)
+ if err != nil {
+ return nil, err
+ }
+
+ // If user provided an IP address, ensure that IP address is found
+ // in the cloud provider before removing the taint on the node
+ if nodeIP, ok := ensureNodeProvidedIPExists(node, nodeAddresses); ok {
+ if nodeIP == nil {
+ return nil, errors.New("failed to find kubelet node IP from cloud provider")
+ }
+ }
+
+ if instanceType, err := cnc.getInstanceTypeByName(ctx, node); err != nil {
+ return nil, err
+ } else if instanceType != "" {
+ klog.V(2).Infof("Adding node label from cloud provider: %s=%s", v1.LabelInstanceType, instanceType)
+ klog.V(2).Infof("Adding node label from cloud provider: %s=%s", v1.LabelInstanceTypeStable, instanceType)
+ nodeModifiers = append(nodeModifiers, func(n *v1.Node) {
+ if n.Labels == nil {
+ n.Labels = map[string]string{}
+ }
+ n.Labels[v1.LabelInstanceType] = instanceType
+ n.Labels[v1.LabelInstanceTypeStable] = instanceType
+ })
+ }
+
+ zone, err := cnc.getZoneByName(ctx, node)
+ if err != nil {
+ return nil, fmt.Errorf("failed to get zone from cloud provider: %w", err)
+ }
+ if zone.FailureDomain != "" {
+ klog.V(2).Infof("Adding node label from cloud provider: %s=%s", v1.LabelZoneFailureDomain, zone.FailureDomain)
+ klog.V(2).Infof("Adding node label from cloud provider: %s=%s", v1.LabelZoneFailureDomainStable, zone.FailureDomain)
+ nodeModifiers = append(nodeModifiers, func(n *v1.Node) {
+ if n.Labels == nil {
+ n.Labels = map[string]string{}
+ }
+ n.Labels[v1.LabelZoneFailureDomain] = zone.FailureDomain
+ n.Labels[v1.LabelZoneFailureDomainStable] = zone.FailureDomain
+ })
+ }
+ if zone.Region != "" {
+ klog.V(2).Infof("Adding node label from cloud provider: %s=%s", v1.LabelZoneRegion, zone.Region)
+ klog.V(2).Infof("Adding node label from cloud provider: %s=%s", v1.LabelZoneRegionStable, zone.Region)
+ nodeModifiers = append(nodeModifiers, func(n *v1.Node) {
+ if n.Labels == nil {
+ n.Labels = map[string]string{}
+ }
+ n.Labels[v1.LabelZoneRegion] = zone.Region
+ n.Labels[v1.LabelZoneRegionStable] = zone.Region
+ })
+ }
+
+ platformSubFaultDomain, err := cnc.getPlatformSubFaultDomain()
+ if err != nil {
+ return nil, fmt.Errorf("failed to get platformSubFaultDomain: %w", err)
+ }
+ if platformSubFaultDomain != "" {
+ klog.V(2).Infof("Adding node label from cloud provider: %s=%s", consts.LabelPlatformSubFaultDomain, platformSubFaultDomain)
+ nodeModifiers = append(nodeModifiers, func(n *v1.Node) {
+ if n.Labels == nil {
+ n.Labels = map[string]string{}
+ }
+ n.Labels[consts.LabelPlatformSubFaultDomain] = platformSubFaultDomain
+ })
+ }
+
+ return nodeModifiers, nil
+}
+
+func GetCloudTaint(taints []v1.Taint) *v1.Taint {
+ for _, taint := range taints {
+ if taint.Key == cloudproviderapi.TaintExternalCloudProvider {
+ return &taint
+ }
+ }
+ return nil
+}
+
+func excludeCloudTaint(taints []v1.Taint) []v1.Taint {
+ newTaints := []v1.Taint{}
+ for _, taint := range taints {
+ if taint.Key == cloudproviderapi.TaintExternalCloudProvider {
+ continue
+ }
+ newTaints = append(newTaints, taint)
+ }
+ return newTaints
+}
+
+// ensureNodeExistsByProviderID checks if the instance exists by the provider id,
+// If provider id in spec is empty it calls instanceId with node name to get provider id
+func (cnc *CloudNodeController) ensureNodeExistsByProviderID(ctx context.Context, node *v1.Node) (bool, error) {
+ providerID := node.Spec.ProviderID
+ if providerID == "" {
+ var err error
+ providerID, err = cnc.nodeProvider.InstanceID(ctx, types.NodeName(node.Name))
+ if err != nil {
+ if errors.Is(err, cloudprovider.InstanceNotFound) {
+ return false, nil
+ }
+ return false, err
+ }
+
+ if providerID == "" {
+ klog.Warningf("Cannot find valid providerID for node name %q, assuming non existence", node.Name)
+ return false, nil
+ }
+ }
+
+ return true, nil
+}
+
+func (cnc *CloudNodeController) getNodeAddressesByName(ctx context.Context, node *v1.Node) ([]v1.NodeAddress, error) {
+ nodeAddresses, err := cnc.nodeProvider.NodeAddresses(ctx, types.NodeName(node.Name))
+ if err != nil {
+ return nil, fmt.Errorf("error fetching node by name %s: %w", node.Name, err)
+ }
+ return nodeAddresses, nil
+}
+
+func nodeAddressesChangeDetected(addressSet1, addressSet2 []v1.NodeAddress) bool {
+ if len(addressSet1) != len(addressSet2) {
+ return true
+ }
+ addressMap1 := map[v1.NodeAddressType]string{}
+
+ for i := range addressSet1 {
+ addressMap1[addressSet1[i].Type] = addressSet1[i].Address
+ }
+
+ for _, v := range addressSet2 {
+ if addressMap1[v.Type] != v.Address {
+ return true
+ }
+ }
+ return false
+}
+
+func ensureNodeProvidedIPExists(node *v1.Node, nodeAddresses []v1.NodeAddress) (*v1.NodeAddress, bool) {
+ var nodeIP *v1.NodeAddress
+ nodeIPExists := false
+ if providedIP, ok := node.ObjectMeta.Annotations[cloudproviderapi.AnnotationAlphaProvidedIPAddr]; ok {
+ nodeIPExists = true
+ for i := range nodeAddresses {
+ if nodeAddresses[i].Address == providedIP {
+ nodeIP = &nodeAddresses[i]
+ break
+ }
+ }
+ }
+ return nodeIP, nodeIPExists
+}
+
+func (cnc *CloudNodeController) getInstanceTypeByName(ctx context.Context, node *v1.Node) (string, error) {
+ instanceType, err := cnc.nodeProvider.InstanceType(ctx, types.NodeName(node.Name))
+ if err != nil {
+ return "", fmt.Errorf("InstanceType: Error fetching by NodeName %s: %w", node.Name, err)
+ }
+ return instanceType, err
+}
+
+// getZoneByName will attempt to get the zone of node using its providerID
+// then it's name. If both attempts fail, an error is returned
+func (cnc *CloudNodeController) getZoneByName(ctx context.Context, node *v1.Node) (cloudprovider.Zone, error) {
+ zone, err := cnc.nodeProvider.GetZone(ctx, types.NodeName(node.Name))
+ if err != nil {
+ return cloudprovider.Zone{}, fmt.Errorf("Zone: Error fetching by NodeName %s: %w", node.Name, err)
+ }
+
+ return zone, nil
+}
+
+func (cnc *CloudNodeController) getPlatformSubFaultDomain() (string, error) {
+ subFD, err := cnc.nodeProvider.GetPlatformSubFaultDomain()
+ if err != nil {
+ return "", fmt.Errorf("cnc.getPlatformSubfaultDomain: %w", err)
+ }
+ return subFD, nil
+}
+
+func (cnc *CloudNodeController) updateNetworkingCondition(node *v1.Node, networkReady bool) error {
+ _, condition := nodeutil.GetNodeCondition(&(node.Status), v1.NodeNetworkUnavailable)
+ if networkReady && condition != nil && condition.Status == v1.ConditionFalse {
+ klog.V(4).Infof("set node %v with NodeNetworkUnavailable=false was canceled because it is already set", node.Name)
+ return nil
+ }
+
+ if !networkReady && condition != nil && condition.Status == v1.ConditionTrue {
+ klog.V(4).Infof("set node %v with NodeNetworkUnavailable=true was canceled because it is already set", node.Name)
+ return nil
+ }
+
+ klog.V(2).Infof("Patching node status %v with %v previous condition was:%+v", node.Name, networkReady, condition)
+
+ // either condition is not there, or has a value != to what we need
+ // start setting it
+ err := clientretry.RetryOnConflict(updateNetworkConditionBackoff, func() error {
+ var err error
+ // Patch could also fail, even though the chance is very slim. So we still do
+ // patch in the retry loop.
+ currentTime := metav1.Now()
+ if networkReady {
+ err = nodeutil.SetNodeCondition(cnc.kubeClient, types.NodeName(node.Name), v1.NodeCondition{
+ Type: v1.NodeNetworkUnavailable,
+ Status: v1.ConditionFalse,
+ Reason: "NodeInitialization",
+ Message: "Should wait for cloud routes",
+ LastTransitionTime: currentTime,
+ })
+ } else {
+ err = nodeutil.SetNodeCondition(cnc.kubeClient, types.NodeName(node.Name), v1.NodeCondition{
+ Type: v1.NodeNetworkUnavailable,
+ Status: v1.ConditionTrue,
+ Reason: "NodeInitialization",
+ Message: "Don't need to wait for cloud routes",
+ LastTransitionTime: currentTime,
+ })
+ }
+ if err != nil {
+ klog.V(4).Infof("Error updating node %s, retrying: %v", types.NodeName(node.Name), err)
+ }
+ return err
+ })
+
+ if err != nil {
+ klog.Errorf("Error updating node %s: %v", node.Name, err)
+ }
+
+ return err
+}
+
+// PatchNodeStatus patches node status.
+func PatchNodeStatus(c v1core.CoreV1Interface, nodeName types.NodeName, oldNode *v1.Node, newNode *v1.Node) (*v1.Node, []byte, error) {
+ patchBytes, err := preparePatchBytesforNodeStatus(nodeName, oldNode, newNode)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ updatedNode, err := c.Nodes().Patch(context.TODO(), string(nodeName), types.StrategicMergePatchType, patchBytes, metav1.PatchOptions{}, "status")
+ if err != nil {
+ return nil, nil, fmt.Errorf("failed to patch status %q for node %q: %w", patchBytes, nodeName, err)
+ }
+ return updatedNode, patchBytes, nil
+}
+
+func preparePatchBytesforNodeStatus(nodeName types.NodeName, oldNode *v1.Node, newNode *v1.Node) ([]byte, error) {
+ oldData, err := json.Marshal(oldNode)
+ if err != nil {
+ return nil, fmt.Errorf("failed to Marshal oldData for node %q: %w", nodeName, err)
+ }
+
+ // NodeStatus.Addresses is incorrectly annotated as patchStrategy=merge, which
+ // will cause strategicpatch.CreateTwoWayMergePatch to create an incorrect patch
+ // if it changed.
+ manuallyPatchAddresses := (len(oldNode.Status.Addresses) > 0) && !equality.Semantic.DeepEqual(oldNode.Status.Addresses, newNode.Status.Addresses)
+
+ // Reset spec to make sure only patch for Status or ObjectMeta is generated.
+ // Note that we don't reset ObjectMeta here, because:
+ // 1. This aligns with Nodes().UpdateStatus().
+ // 2. Some component does use this to update node annotations.
+ diffNode := newNode.DeepCopy()
+ diffNode.Spec = oldNode.Spec
+ if manuallyPatchAddresses {
+ diffNode.Status.Addresses = oldNode.Status.Addresses
+ }
+ newData, err := json.Marshal(diffNode)
+ if err != nil {
+ return nil, fmt.Errorf("failed to Marshal newData for node %q: %w", nodeName, err)
+ }
+
+ patchBytes, err := strategicpatch.CreateTwoWayMergePatch(oldData, newData, v1.Node{})
+ if err != nil {
+ return nil, fmt.Errorf("failed to CreateTwoWayMergePatch for node %q: %w", nodeName, err)
+ }
+ if manuallyPatchAddresses {
+ patchBytes, err = fixupPatchForNodeStatusAddresses(patchBytes, newNode.Status.Addresses)
+ if err != nil {
+ return nil, fmt.Errorf("failed to fix up NodeAddresses in patch for node %q: %w", nodeName, err)
+ }
+ }
+
+ return patchBytes, nil
+}
+
+// fixupPatchForNodeStatusAddresses adds a replace-strategy patch for Status.Addresses to
+// the existing patch
+func fixupPatchForNodeStatusAddresses(patchBytes []byte, addresses []v1.NodeAddress) ([]byte, error) {
+ // Given patchBytes='{"status": {"conditions": [ ... ], "phase": ...}}' and
+ // addresses=[{"type": "InternalIP", "address": "10.0.0.1"}], we need to generate:
+ //
+ // {
+ // "status": {
+ // "conditions": [ ... ],
+ // "phase": ...,
+ // "addresses": [
+ // {
+ // "type": "InternalIP",
+ // "address": "10.0.0.1"
+ // },
+ // {
+ // "$patch": "replace"
+ // }
+ // ]
+ // }
+ // }
+
+ var patchMap map[string]interface{}
+ if err := json.Unmarshal(patchBytes, &patchMap); err != nil {
+ return nil, err
+ }
+
+ addrBytes, err := json.Marshal(addresses)
+ if err != nil {
+ return nil, err
+ }
+ var addrArray []interface{}
+ if err := json.Unmarshal(addrBytes, &addrArray); err != nil {
+ return nil, err
+ }
+ addrArray = append(addrArray, map[string]interface{}{"$patch": "replace"})
+
+ status := patchMap["status"]
+ if status == nil {
+ status = map[string]interface{}{}
+ patchMap["status"] = status
+ }
+ statusMap, ok := status.(map[string]interface{})
+ if !ok {
+ return nil, fmt.Errorf("unexpected data in patch")
+ }
+ statusMap["addresses"] = addrArray
+
+ return json.Marshal(patchMap)
+}
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure.go
index 45fa3984fe02..b7397fb0a5aa 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure.go
@@ -70,6 +70,7 @@ import (
"sigs.k8s.io/cloud-provider-azure/pkg/azureclients/zoneclient"
azcache "sigs.k8s.io/cloud-provider-azure/pkg/cache"
"sigs.k8s.io/cloud-provider-azure/pkg/consts"
+ nodemanager "sigs.k8s.io/cloud-provider-azure/pkg/nodemanager"
"sigs.k8s.io/cloud-provider-azure/pkg/retry"
// ensure the newly added package from azure-sdk-for-go is in vendor/
@@ -227,6 +228,8 @@ type Config struct {
RouteTableCacheTTLInSeconds int `json:"routeTableCacheTTLInSeconds,omitempty" yaml:"routeTableCacheTTLInSeconds,omitempty"`
// AvailabilitySetsCacheTTLInSeconds sets the cache TTL for VMAS
AvailabilitySetsCacheTTLInSeconds int `json:"availabilitySetsCacheTTLInSeconds,omitempty" yaml:"availabilitySetsCacheTTLInSeconds,omitempty"`
+ // PublicIPCacheTTLInSeconds sets the cache TTL for public ip
+ PublicIPCacheTTLInSeconds int `json:"publicIPCacheTTLInSeconds,omitempty" yaml:"publicIPCacheTTLInSeconds,omitempty"`
// RouteUpdateWaitingInSeconds is the delay time for waiting route updates to take effect. This waiting delay is added
// because the routes are not taken effect when the async route updating operation returns success. Default is 30 seconds.
RouteUpdateWaitingInSeconds int `json:"routeUpdateWaitingInSeconds,omitempty" yaml:"routeUpdateWaitingInSeconds,omitempty"`
@@ -335,6 +338,7 @@ type Cloud struct {
lbCache *azcache.TimedCache
nsgCache *azcache.TimedCache
rtCache *azcache.TimedCache
+ pipCache *azcache.TimedCache
*ManagedDiskController
*controllerCommon
@@ -666,6 +670,11 @@ func (az *Cloud) initCaches() (err error) {
return err
}
+ az.pipCache, err = az.newPIPCache()
+ if err != nil {
+ return err
+ }
+
return nil
}
@@ -1036,16 +1045,20 @@ func (az *Cloud) updateNodeCaches(prevNode, newNode *v1.Node) {
delete(az.nodeResourceGroups, prevNode.ObjectMeta.Name)
}
- // Remove from unmanagedNodes cache.
managed, ok := prevNode.ObjectMeta.Labels[consts.ManagedByAzureLabel]
- if ok && strings.EqualFold(managed, consts.NotManagedByAzureLabelValue) {
+ isNodeManagedByCloudProvider := !ok || !strings.EqualFold(managed, consts.NotManagedByAzureLabelValue)
+
+ klog.Infof("managed=%v, ok=%v, isNodeManagedByCloudProvider=%v",
+ managed, ok, isNodeManagedByCloudProvider)
+
+ // Remove from unmanagedNodes cache
+ if !isNodeManagedByCloudProvider {
az.unmanagedNodes.Delete(prevNode.ObjectMeta.Name)
- az.excludeLoadBalancerNodes.Delete(prevNode.ObjectMeta.Name)
}
- // Remove from excludeLoadBalancerNodes cache.
- if _, hasExcludeBalancerLabel := prevNode.ObjectMeta.Labels[v1.LabelNodeExcludeBalancers]; hasExcludeBalancerLabel {
- az.excludeLoadBalancerNodes.Delete(prevNode.ObjectMeta.Name)
+ // if the node is being deleted from the cluster, exclude it from load balancers
+ if newNode == nil {
+ az.excludeLoadBalancerNodes.Insert(prevNode.ObjectMeta.Name)
}
// Remove from nodePrivateIPs cache.
@@ -1074,17 +1087,35 @@ func (az *Cloud) updateNodeCaches(prevNode, newNode *v1.Node) {
az.nodeResourceGroups[newNode.ObjectMeta.Name] = strings.ToLower(newRG)
}
- // Add to unmanagedNodes cache.
+ _, hasExcludeBalancerLabel := newNode.ObjectMeta.Labels[v1.LabelNodeExcludeBalancers]
managed, ok := newNode.ObjectMeta.Labels[consts.ManagedByAzureLabel]
- if ok && strings.EqualFold(managed, consts.NotManagedByAzureLabelValue) {
+ isNodeManagedByCloudProvider := !ok || !strings.EqualFold(managed, consts.NotManagedByAzureLabelValue)
+
+ // Update unmanagedNodes cache
+ if !isNodeManagedByCloudProvider {
az.unmanagedNodes.Insert(newNode.ObjectMeta.Name)
- az.excludeLoadBalancerNodes.Insert(newNode.ObjectMeta.Name)
}
- // Add to excludeLoadBalancerNodes cache.
- if _, hasExcludeBalancerLabel := newNode.ObjectMeta.Labels[v1.LabelNodeExcludeBalancers]; hasExcludeBalancerLabel {
- klog.V(4).Infof("adding node %s from the exclude-from-lb list because the label %s is found", newNode.Name, v1.LabelNodeExcludeBalancers)
+ // Update excludeLoadBalancerNodes cache
+ switch {
+ case !isNodeManagedByCloudProvider:
az.excludeLoadBalancerNodes.Insert(newNode.ObjectMeta.Name)
+
+ case hasExcludeBalancerLabel:
+ az.excludeLoadBalancerNodes.Insert(newNode.ObjectMeta.Name)
+
+ case !isNodeReady(newNode) && nodemanager.GetCloudTaint(newNode.Spec.Taints) == nil:
+ // If not in ready state and not a newly created node, add to excludeLoadBalancerNodes cache.
+ // New nodes (tainted with "node.cloudprovider.kubernetes.io/uninitialized") should not be
+ // excluded from load balancers regardless of their state, so as to reduce the number of
+ // VMSS API calls and not provoke VMScaleSetActiveModelsCountLimitReached.
+ // (https://github.com/kubernetes-sigs/cloud-provider-azure/issues/851)
+ az.excludeLoadBalancerNodes.Insert(newNode.ObjectMeta.Name)
+
+ default:
+ // Nodes not falling into the three cases above are valid backends and
+ // should not appear in excludeLoadBalancerNodes cache.
+ az.excludeLoadBalancerNodes.Delete(newNode.ObjectMeta.Name)
}
// Add to nodePrivateIPs cache
@@ -1220,3 +1251,12 @@ func (az *Cloud) ShouldNodeExcludedFromLoadBalancer(nodeName string) (bool, erro
return az.excludeLoadBalancerNodes.Has(nodeName), nil
}
+
+func isNodeReady(node *v1.Node) bool {
+ for _, cond := range node.Status.Conditions {
+ if cond.Type == v1.NodeReady && cond.Status == v1.ConditionTrue {
+ return true
+ }
+ }
+ return false
+}
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_backoff.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_backoff.go
index c236fca7b1d9..b91c72aeb7f1 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_backoff.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_backoff.go
@@ -24,7 +24,7 @@ import (
"regexp"
"strings"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network"
"github.com/Azure/go-autorest/autorest/to"
@@ -246,7 +246,7 @@ func (az *Cloud) CreateOrUpdateLB(service *v1.Service, lb network.LoadBalancer)
}
pipRG, pipName := matches[1], matches[2]
klog.V(3).Infof("The public IP %s referenced by load balancer %s is not in Succeeded provisioning state, will try to update it", pipName, to.String(lb.Name))
- pip, _, err := az.getPublicIPAddress(pipRG, pipName)
+ pip, _, err := az.getPublicIPAddress(pipRG, pipName, azcache.CacheReadTypeDefault)
if err != nil {
klog.Errorf("Failed to get the public IP %s in resource group %s: %v", pipName, pipRG, err)
return rerr.Error()
@@ -293,6 +293,34 @@ func (az *Cloud) CreateOrUpdateLBBackendPool(lbName string, backendPool network.
return rerr.Error()
}
+func (az *Cloud) DeleteLBBackendPool(lbName, backendPoolName string) error {
+ ctx, cancel := getContextWithCancel()
+ defer cancel()
+
+ klog.V(4).Infof("DeleteLBBackendPool: deleting backend pool %s in LB %s", backendPoolName, lbName)
+ rerr := az.LoadBalancerClient.DeleteLBBackendPool(ctx, az.getLoadBalancerResourceGroup(), lbName, backendPoolName)
+ if rerr == nil {
+ // Invalidate the cache right after updating
+ _ = az.lbCache.Delete(lbName)
+ return nil
+ }
+
+ // Invalidate the cache because ETAG precondition mismatch.
+ if rerr.HTTPStatusCode == http.StatusPreconditionFailed {
+ klog.V(3).Infof("LoadBalancer cache for %s is cleanup because of http.StatusPreconditionFailed", lbName)
+ _ = az.lbCache.Delete(lbName)
+ }
+
+ retryErrorMessage := rerr.Error().Error()
+ // Invalidate the cache because another new operation has canceled the current request.
+ if strings.Contains(strings.ToLower(retryErrorMessage), consts.OperationCanceledErrorMessage) {
+ klog.V(3).Infof("LoadBalancer cache for %s is cleanup because CreateOrUpdate is canceled by another operation", lbName)
+ _ = az.lbCache.Delete(lbName)
+ }
+
+ return rerr.Error()
+}
+
// ListManagedLBs invokes az.LoadBalancerClient.List and filter out
// those that are not managed by cloud provider azure or not associated to a managed VMSet.
func (az *Cloud) ListManagedLBs(service *v1.Service, nodes []*v1.Node, clusterName string) ([]network.LoadBalancer, error) {
@@ -308,6 +336,7 @@ func (az *Cloud) ListManagedLBs(service *v1.Service, nodes []*v1.Node, clusterNa
// return early if wantLb=false
if nodes == nil {
+ klog.V(4).Infof("ListManagedLBs: return all LBs in the resource group %s, including unmanaged LBs", az.getLoadBalancerResourceGroup())
return allLBs, nil
}
@@ -320,7 +349,7 @@ func (az *Cloud) ListManagedLBs(service *v1.Service, nodes []*v1.Node, clusterNa
agentPoolVMSetNamesSet := sets.NewString()
if agentPoolVMSetNames != nil && len(*agentPoolVMSetNames) > 0 {
for _, vmSetName := range *agentPoolVMSetNames {
- klog.V(5).Infof("ListManagedLBs: found agent pool vmSet name %s", vmSetName)
+ klog.V(6).Infof("ListManagedLBs: found agent pool vmSet name %s", vmSetName)
agentPoolVMSetNamesSet.Insert(strings.ToLower(vmSetName))
}
}
@@ -382,17 +411,33 @@ func (az *Cloud) CreateOrUpdatePIP(service *v1.Service, pipResourceGroup string,
rerr := az.PublicIPAddressesClient.CreateOrUpdate(ctx, pipResourceGroup, to.String(pip.Name), pip)
klog.V(10).Infof("PublicIPAddressesClient.CreateOrUpdate(%s, %s): end", pipResourceGroup, to.String(pip.Name))
- if rerr != nil {
- pipJSON, _ := json.Marshal(pip)
- klog.Warningf("PublicIPAddressesClient.CreateOrUpdate(%s, %s) failed: %s, PublicIP request: %s", pipResourceGroup, to.String(pip.Name), rerr.Error().Error(), string(pipJSON))
- az.Event(service, v1.EventTypeWarning, "CreateOrUpdatePublicIPAddress", rerr.Error().Error())
- return rerr.Error()
+ if rerr == nil {
+ // Invalidate the cache right after updating
+ _ = az.pipCache.Delete(az.getPIPCacheKey(pipResourceGroup, to.String(pip.Name)))
+ return nil
}
- return nil
+ pipJSON, _ := json.Marshal(pip)
+ klog.Warningf("PublicIPAddressesClient.CreateOrUpdate(%s, %s) failed: %s, PublicIP request: %s", pipResourceGroup, to.String(pip.Name), rerr.Error().Error(), string(pipJSON))
+ az.Event(service, v1.EventTypeWarning, "CreateOrUpdatePublicIPAddress", rerr.Error().Error())
+
+ // Invalidate the cache because ETAG precondition mismatch.
+ if rerr.HTTPStatusCode == http.StatusPreconditionFailed {
+ klog.V(3).Infof("PublicIP cache for (%s, %s) is cleanup because of http.StatusPreconditionFailed", pipResourceGroup, to.String(pip.Name))
+ _ = az.pipCache.Delete(az.getPIPCacheKey(pipResourceGroup, to.String(pip.Name)))
+ }
+
+ retryErrorMessage := rerr.Error().Error()
+ // Invalidate the cache because another new operation has canceled the current request.
+ if strings.Contains(strings.ToLower(retryErrorMessage), consts.OperationCanceledErrorMessage) {
+ klog.V(3).Infof("PublicIP cache for (%s, %s) is cleanup because CreateOrUpdate is canceled by another operation", pipResourceGroup, to.String(pip.Name))
+ _ = az.pipCache.Delete(az.getPIPCacheKey(pipResourceGroup, to.String(pip.Name)))
+ }
+
+ return rerr.Error()
}
-// CreateOrUpdateInterface invokes az.PublicIPAddressesClient.CreateOrUpdate with exponential backoff retry
+// CreateOrUpdateInterface invokes az.InterfacesClient.CreateOrUpdate with exponential backoff retry
func (az *Cloud) CreateOrUpdateInterface(service *v1.Service, nic network.Interface) error {
ctx, cancel := getContextWithCancel()
defer cancel()
@@ -425,6 +470,8 @@ func (az *Cloud) DeletePublicIP(service *v1.Service, pipResourceGroup string, pi
return rerr.Error()
}
+ // Invalidate the cache right after deleting
+ _ = az.pipCache.Delete(az.getPIPCacheKey(pipResourceGroup, pipName))
return nil
}
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_controller_common.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_controller_common.go
index 42a4611e3361..1d1c3a516666 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_controller_common.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_controller_common.go
@@ -27,7 +27,7 @@ import (
"sync"
"time"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
"k8s.io/apimachinery/pkg/types"
kwait "k8s.io/apimachinery/pkg/util/wait"
@@ -189,8 +189,8 @@ func (c *controllerCommon) AttachDisk(ctx context.Context, async bool, diskName,
diskEncryptionSetID = *disk.DiskProperties.Encryption.DiskEncryptionSetID
}
- if disk.DiskProperties.DiskState != compute.Unattached && (disk.MaxShares == nil || *disk.MaxShares <= 1) {
- return -1, fmt.Errorf("state of disk(%s) is %s, not in expected %s state", diskURI, disk.DiskProperties.DiskState, compute.Unattached)
+ if disk.DiskProperties.DiskState != compute.DiskStateUnattached && (disk.MaxShares == nil || *disk.MaxShares <= 1) {
+ return -1, fmt.Errorf("state of disk(%s) is %s, not in expected %s state", diskURI, disk.DiskProperties.DiskState, compute.DiskStateUnattached)
}
}
@@ -615,7 +615,7 @@ func (c *controllerCommon) checkDiskExists(ctx context.Context, diskURI string)
func getValidCreationData(subscriptionID, resourceGroup, sourceResourceID, sourceType string) (compute.CreationData, error) {
if sourceResourceID == "" {
return compute.CreationData{
- CreateOption: compute.Empty,
+ CreateOption: compute.DiskCreateOptionEmpty,
}, nil
}
@@ -631,7 +631,7 @@ func getValidCreationData(subscriptionID, resourceGroup, sourceResourceID, sourc
}
default:
return compute.CreationData{
- CreateOption: compute.Empty,
+ CreateOption: compute.DiskCreateOptionEmpty,
}, nil
}
@@ -643,7 +643,7 @@ func getValidCreationData(subscriptionID, resourceGroup, sourceResourceID, sourc
return compute.CreationData{}, fmt.Errorf("sourceResourceID(%s) is invalid, correct format: %s", sourceResourceID, managedDiskPathRE)
}
return compute.CreationData{
- CreateOption: compute.Copy,
+ CreateOption: compute.DiskCreateOptionCopy,
SourceResourceID: &sourceResourceID,
}, nil
}
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_controller_standard.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_controller_standard.go
index 3bf5d49772c1..facc04390611 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_controller_standard.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_controller_standard.go
@@ -21,7 +21,7 @@ import (
"net/http"
"strings"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/to"
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_controller_vmss.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_controller_vmss.go
index 7c9a3268e48c..d547ef51cb84 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_controller_vmss.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_controller_vmss.go
@@ -21,7 +21,7 @@ import (
"net/http"
"strings"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/to"
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_fakes.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_fakes.go
index abe343f43ad4..d6e1d56963f7 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_fakes.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_fakes.go
@@ -108,6 +108,7 @@ func GetTestCloud(ctrl *gomock.Controller) (az *Cloud) {
az.lbCache, _ = az.newLBCache()
az.nsgCache, _ = az.newNSGCache()
az.rtCache, _ = az.newRouteTableCache()
+ az.pipCache, _ = az.newPIPCache()
az.LoadBalancerBackendPool = NewMockBackendPool(ctrl)
_ = initDiskControllers(az)
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_instance_metadata.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_instance_metadata.go
index 629b8ec106a9..708804a19305 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_instance_metadata.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_instance_metadata.go
@@ -59,18 +59,19 @@ type Subnet struct {
// ComputeMetadata represents compute information
type ComputeMetadata struct {
- Environment string `json:"azEnvironment,omitempty"`
- SKU string `json:"sku,omitempty"`
- Name string `json:"name,omitempty"`
- Zone string `json:"zone,omitempty"`
- VMSize string `json:"vmSize,omitempty"`
- OSType string `json:"osType,omitempty"`
- Location string `json:"location,omitempty"`
- FaultDomain string `json:"platformFaultDomain,omitempty"`
- UpdateDomain string `json:"platformUpdateDomain,omitempty"`
- ResourceGroup string `json:"resourceGroupName,omitempty"`
- VMScaleSetName string `json:"vmScaleSetName,omitempty"`
- SubscriptionID string `json:"subscriptionId,omitempty"`
+ Environment string `json:"azEnvironment,omitempty"`
+ SKU string `json:"sku,omitempty"`
+ Name string `json:"name,omitempty"`
+ Zone string `json:"zone,omitempty"`
+ VMSize string `json:"vmSize,omitempty"`
+ OSType string `json:"osType,omitempty"`
+ Location string `json:"location,omitempty"`
+ FaultDomain string `json:"platformFaultDomain,omitempty"`
+ PlatformSubFaultDomain string `json:"platformSubFaultDomain,omitempty"`
+ UpdateDomain string `json:"platformUpdateDomain,omitempty"`
+ ResourceGroup string `json:"resourceGroupName,omitempty"`
+ VMScaleSetName string `json:"vmScaleSetName,omitempty"`
+ SubscriptionID string `json:"subscriptionId,omitempty"`
}
// InstanceMetadata represents instance information.
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_instances.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_instances.go
index 7ef038d2fbe0..fd906a92e278 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_instances.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_instances.go
@@ -28,7 +28,7 @@ import (
cloudprovider "k8s.io/cloud-provider"
"k8s.io/klog/v2"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
azcache "sigs.k8s.io/cloud-provider-azure/pkg/cache"
"sigs.k8s.io/cloud-provider-azure/pkg/consts"
)
@@ -231,6 +231,10 @@ func (az *Cloud) InstanceExists(ctx context.Context, node *v1.Node) (bool, error
var err error
providerID, err = cloudprovider.GetInstanceProviderID(ctx, az, types.NodeName(node.Name))
if err != nil {
+ if strings.Contains(err.Error(), cloudprovider.InstanceNotFound.Error()) {
+ return false, nil
+ }
+
klog.Errorf("InstanceExists: failed to get the provider ID by node name %s: %v", node.Name, err)
return false, err
}
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_loadbalancer.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_loadbalancer.go
index 0cc786ffe22a..351fa3eccfe0 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_loadbalancer.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_loadbalancer.go
@@ -50,12 +50,12 @@ func (az *Cloud) GetLoadBalancer(ctx context.Context, clusterName string, servic
// there is a chance that we could orphan public IP resources while we delete the load blanacer (kubernetes/kubernetes#80571).
// We need to make sure the existence of the load balancer depends on the load balancer resource and public IP resource on Azure.
existsPip := func() bool {
- pipName, _, err := az.determinePublicIPName(clusterName, service)
+ pipName, _, err := az.determinePublicIPName(clusterName, service, nil)
if err != nil {
return false
}
pipResourceGroup := az.getPublicIPAddressResourceGroup(service)
- _, existsPip, err := az.getPublicIPAddress(pipResourceGroup, pipName)
+ _, existsPip, err := az.getPublicIPAddress(pipResourceGroup, pipName, azcache.CacheReadTypeDefault)
if err != nil {
return false
}
@@ -85,27 +85,16 @@ func getPublicIPDomainNameLabel(service *v1.Service) (string, bool) {
return "", false
}
-// EnsureLoadBalancer creates a new load balancer 'name', or updates the existing one. Returns the status of the balancer
-func (az *Cloud) EnsureLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) (*v1.LoadBalancerStatus, error) {
- // When a client updates the internal load balancer annotation,
- // the service may be switched from an internal LB to a public one, or vise versa.
- // Here we'll firstly ensure service do not lie in the opposite LB.
+// reconcileService reconcile the LoadBalancer service. It returns LoadBalancerStatus on success.
+func (az *Cloud) reconcileService(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) (*v1.LoadBalancerStatus, error) {
serviceName := getServiceName(service)
- klog.V(5).Infof("ensureloadbalancer(%s): START clusterName=%q, service: %v", serviceName, clusterName, service)
-
- mc := metrics.NewMetricContext("services", "ensure_loadbalancer", az.ResourceGroup, az.SubscriptionID, serviceName)
- isOperationSucceeded := false
- defer func() {
- mc.ObserveOperationWithResult(isOperationSucceeded)
- }()
-
lb, err := az.reconcileLoadBalancer(clusterName, service, nodes, true /* wantLb */)
if err != nil {
klog.Errorf("reconcileLoadBalancer(%s) failed: %v", serviceName, err)
return nil, err
}
- lbStatus, _, err := az.getServiceLoadBalancerStatus(service, lb)
+ lbStatus, _, err := az.getServiceLoadBalancerStatus(service, lb, nil)
if err != nil {
klog.Errorf("getServiceLoadBalancerStatus(%s) failed: %v", serviceName, err)
return nil, err
@@ -115,7 +104,7 @@ func (az *Cloud) EnsureLoadBalancer(ctx context.Context, clusterName string, ser
if lbStatus != nil && len(lbStatus.Ingress) > 0 {
serviceIP = &lbStatus.Ingress[0].IP
}
- klog.V(2).Infof("EnsureLoadBalancer: reconciling security group for service %q with IP %q, wantLb = true", serviceName, logSafe(serviceIP))
+ klog.V(2).Infof("reconcileService: reconciling security group for service %q with IP %q, wantLb = true", serviceName, logSafe(serviceIP))
if _, err := az.reconcileSecurityGroup(clusterName, service, serviceIP, true /* wantLb */); err != nil {
klog.Errorf("reconcileSecurityGroup(%s) failed: %#v", serviceName, err)
return nil, err
@@ -129,30 +118,70 @@ func (az *Cloud) EnsureLoadBalancer(ctx context.Context, clusterName string, ser
}
// lb is not reused here because the ETAG may be changed in above operations, hence reconcilePublicIP() would get lb again from cache.
- klog.V(2).Infof("EnsureLoadBalancer: reconciling pip")
+ klog.V(2).Infof("reconcileService: reconciling pip")
if _, err := az.reconcilePublicIP(clusterName, updateService, to.String(lb.Name), true /* wantLb */); err != nil {
klog.Errorf("reconcilePublicIP(%s) failed: %#v", serviceName, err)
return nil, err
}
+ return lbStatus, nil
+}
+
+// EnsureLoadBalancer creates a new load balancer 'name', or updates the existing one. Returns the status of the balancer
+func (az *Cloud) EnsureLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) (*v1.LoadBalancerStatus, error) {
+ // When a client updates the internal load balancer annotation,
+ // the service may be switched from an internal LB to a public one, or vise versa.
+ // Here we'll firstly ensure service do not lie in the opposite LB.
+ var err error
+ serviceName := getServiceName(service)
+ mc := metrics.NewMetricContext("services", "ensure_loadbalancer", az.ResourceGroup, az.SubscriptionID, serviceName)
+ klog.V(5).InfoS("EnsureLoadBalancer Start", "service", serviceName, "cluster", clusterName, "service_spec", service)
+
+ isOperationSucceeded := false
+ defer func() {
+ mc.ObserveOperationWithResult(isOperationSucceeded)
+ klog.V(5).InfoS("EnsureLoadBalancer Finish", "service", serviceName, "cluster", clusterName, "service_spec", service, "error", err)
+ }()
+
+ lbStatus, err := az.reconcileService(ctx, clusterName, service, nodes)
+ if err != nil {
+ return nil, err
+ }
+
isOperationSucceeded = true
return lbStatus, nil
}
// UpdateLoadBalancer updates hosts under the specified load balancer.
func (az *Cloud) UpdateLoadBalancer(ctx context.Context, clusterName string, service *v1.Service, nodes []*v1.Node) error {
+ var err error
+ serviceName := getServiceName(service)
+ mc := metrics.NewMetricContext("services", "update_loadbalancer", az.ResourceGroup, az.SubscriptionID, serviceName)
+ klog.V(5).InfoS("UpdateLoadBalancer Start", "service", serviceName, "cluster", clusterName, "service_spec", service)
+ isOperationSucceeded := false
+ defer func() {
+ mc.ObserveOperationWithResult(isOperationSucceeded)
+ klog.V(5).InfoS("UpdateLoadBalancer Finish", "service", serviceName, "cluster", clusterName, "service_spec", service, "error", err)
+ }()
+
shouldUpdateLB, err := az.shouldUpdateLoadBalancer(clusterName, service, nodes)
if err != nil {
return err
}
if !shouldUpdateLB {
+ isOperationSucceeded = true
klog.V(2).Infof("UpdateLoadBalancer: skipping service %s because it is either being deleted or does not exist anymore", service.Name)
return nil
}
- _, err = az.EnsureLoadBalancer(ctx, clusterName, service, nodes)
- return err
+ _, err = az.reconcileService(ctx, clusterName, service, nodes)
+ if err != nil {
+ return err
+ }
+
+ isOperationSucceeded = true
+ return nil
}
// EnsureLoadBalancerDeleted deletes the specified load balancer if it
@@ -162,14 +191,15 @@ func (az *Cloud) UpdateLoadBalancer(ctx context.Context, clusterName string, ser
// have multiple underlying components, meaning a Get could say that the LB
// doesn't exist even if some part of it is still laying around.
func (az *Cloud) EnsureLoadBalancerDeleted(ctx context.Context, clusterName string, service *v1.Service) error {
+ var err error
isInternal := requiresInternalLoadBalancer(service)
serviceName := getServiceName(service)
- klog.V(5).Infof("Delete service (%s): START clusterName=%q", serviceName, clusterName)
-
mc := metrics.NewMetricContext("services", "ensure_loadbalancer_deleted", az.ResourceGroup, az.SubscriptionID, serviceName)
+ klog.V(5).InfoS("EnsureLoadBalancerDeleted Start", "service", serviceName, "cluster", clusterName, "service_spec", service)
isOperationSucceeded := false
defer func() {
mc.ObserveOperationWithResult(isOperationSucceeded)
+ klog.V(5).InfoS("EnsureLoadBalancerDeleted Finish", "service", serviceName, "cluster", clusterName, "service_spec", service, "error", err)
}()
serviceIPToCleanup, err := az.findServiceIPAddress(ctx, clusterName, service, isInternal)
@@ -178,15 +208,18 @@ func (az *Cloud) EnsureLoadBalancerDeleted(ctx context.Context, clusterName stri
}
klog.V(2).Infof("EnsureLoadBalancerDeleted: reconciling security group for service %q with IP %q, wantLb = false", serviceName, serviceIPToCleanup)
- if _, err := az.reconcileSecurityGroup(clusterName, service, &serviceIPToCleanup, false /* wantLb */); err != nil {
+ _, err = az.reconcileSecurityGroup(clusterName, service, &serviceIPToCleanup, false /* wantLb */)
+ if err != nil {
return err
}
- if _, err := az.reconcileLoadBalancer(clusterName, service, nil, false /* wantLb */); err != nil && !retry.HasStatusForbiddenOrIgnoredError(err) {
+ _, err = az.reconcileLoadBalancer(clusterName, service, nil, false /* wantLb */)
+ if err != nil && !retry.HasStatusForbiddenOrIgnoredError(err) {
return err
}
- if _, err := az.reconcilePublicIP(clusterName, service, "", false /* wantLb */); err != nil {
+ _, err = az.reconcilePublicIP(clusterName, service, "", false /* wantLb */)
+ if err != nil {
return err
}
@@ -226,9 +259,14 @@ func (az *Cloud) shouldChangeLoadBalancer(service *v1.Service, currLBName, clust
return false
}
- // if the current LB is what we want, keep it
lbName := strings.TrimSuffix(currLBName, consts.InternalLoadBalancerNameSuffix)
+ // change the LB from vmSet dedicated to primary if the vmSet becomes the primary one
if strings.EqualFold(lbName, vmSetName) {
+ if lbName != clusterName &&
+ strings.EqualFold(az.VMSet.GetPrimaryVMSetName(), vmSetName) {
+ klog.V(2).Infof("shouldChangeLoadBalancer(%s, %s, %s): change the LB to another one", service.Name, currLBName, clusterName)
+ return true
+ }
return false
}
if strings.EqualFold(vmSetName, az.VMSet.GetPrimaryVMSetName()) && strings.EqualFold(clusterName, lbName) {
@@ -379,7 +417,7 @@ func (az *Cloud) cleanOrphanedLoadBalancer(lb *network.LoadBalancer, existingLBs
// safeDeleteLoadBalancer deletes the load balancer after decoupling it from the vmSet
func (az *Cloud) safeDeleteLoadBalancer(lb network.LoadBalancer, clusterName, vmSetName string, service *v1.Service) *retry.Error {
- if strings.EqualFold(az.LoadBalancerBackendPoolConfigurationType, consts.LoadBalancerBackendPoolConfigurationTypeNodeIPConfiguration) {
+ if isLBBackendPoolTypeIPConfig(service, &lb, clusterName) {
lbBackendPoolID := az.getBackendPoolID(to.String(lb.Name), az.getLoadBalancerResourceGroup(), getBackendPoolName(clusterName, service))
err := az.VMSet.EnsureBackendPoolDeleted(service, lbBackendPoolID, vmSetName, lb.BackendAddressPools, true)
if err != nil {
@@ -452,10 +490,19 @@ func (az *Cloud) reconcileSharedLoadBalancer(service *v1.Service, clusterName st
return existingLBs, nil
}
+ // Skip if nodes is nil, which means the service is being deleted.
+ // When nodes is nil, all LBs included unmanaged LBs will be returned,
+ // if we don't skip this function, the unmanaged ones may be deleted later.
+ if nodes == nil {
+ klog.V(4).Infof("reconcileSharedLoadBalancer: returning early because the service %s is being deleted", service.Name)
+ return existingLBs, nil
+ }
+
lbBackendPoolName := getBackendPoolName(clusterName, service)
lbNamesToBeDeleted := sets.NewString()
// 1: delete unwanted LBs
for _, lb := range existingLBs {
+ klog.V(4).Infof("reconcileSharedLoadBalancer: checking LB %s", to.String(lb.Name))
lbNamePrefix := strings.TrimSuffix(to.String(lb.Name), consts.InternalLoadBalancerNameSuffix)
// skip the internal or external primary load balancer
@@ -593,6 +640,9 @@ func (az *Cloud) getServiceLoadBalancer(service *v1.Service, clusterName string,
}
}
+ // reuse pip list to reduce api call
+ var pips *[]network.PublicIPAddress
+
// check if the service already has a load balancer
for i := range existingLBs {
existingLB := existingLBs[i]
@@ -628,7 +678,8 @@ func (az *Cloud) getServiceLoadBalancer(service *v1.Service, clusterName string,
if isInternalLoadBalancer(&existingLB) != isInternal {
continue
}
- status, fipConfig, err := az.getServiceLoadBalancerStatus(service, &existingLB)
+ var fipConfig *network.FrontendIPConfiguration
+ status, fipConfig, err = az.getServiceLoadBalancerStatus(service, &existingLB, pips)
if err != nil {
return nil, nil, false, err
}
@@ -636,6 +687,7 @@ func (az *Cloud) getServiceLoadBalancer(service *v1.Service, clusterName string,
// service is not on this load balancer
continue
}
+ klog.V(4).Infof("getServiceLoadBalancer(%s, %s, %v): current lb ip: %s", service.Name, clusterName, wantLb, status.Ingress[0].IP)
// select another load balancer instead of returning
// the current one if the change is needed
@@ -661,7 +713,7 @@ func (az *Cloud) getServiceLoadBalancer(service *v1.Service, clusterName string,
return nil, nil, false, err
}
- return selectedLB, nil, exists, err
+ return selectedLB, status, exists, err
}
// create a default LB with meta data if not present
@@ -761,19 +813,19 @@ func (az *Cloud) selectLoadBalancer(clusterName string, service *v1.Service, exi
return selectedLB, existsLb, nil
}
-func (az *Cloud) getServiceLoadBalancerStatus(service *v1.Service, lb *network.LoadBalancer) (status *v1.LoadBalancerStatus, fipConfig *network.FrontendIPConfiguration, err error) {
+func (az *Cloud) getServiceLoadBalancerStatus(service *v1.Service, lb *network.LoadBalancer, pips *[]network.PublicIPAddress) (status *v1.LoadBalancerStatus, fipConfig *network.FrontendIPConfiguration, err error) {
if lb == nil {
klog.V(10).Info("getServiceLoadBalancerStatus: lb is nil")
return nil, nil, nil
}
- if lb.FrontendIPConfigurations == nil || *lb.FrontendIPConfigurations == nil {
+ if lb.FrontendIPConfigurations == nil || len(*lb.FrontendIPConfigurations) == 0 {
klog.V(10).Info("getServiceLoadBalancerStatus: lb.FrontendIPConfigurations is nil")
return nil, nil, nil
}
isInternal := requiresInternalLoadBalancer(service)
serviceName := getServiceName(service)
for _, ipConfiguration := range *lb.FrontendIPConfigurations {
- owns, isPrimaryService, err := az.serviceOwnsFrontendIP(ipConfiguration, service)
+ owns, isPrimaryService, err := az.serviceOwnsFrontendIP(ipConfiguration, service, pips)
if err != nil {
return nil, nil, fmt.Errorf("get(%s): lb(%s) - failed to filter frontend IP configs with error: %w", serviceName, to.String(lb.Name), err)
}
@@ -795,7 +847,7 @@ func (az *Cloud) getServiceLoadBalancerStatus(service *v1.Service, lb *network.L
if err != nil {
return nil, nil, fmt.Errorf("get(%s): lb(%s) - failed to get LB PublicIPAddress Name from ID(%s)", serviceName, *lb.Name, *pipID)
}
- pip, existsPip, err := az.getPublicIPAddress(az.getPublicIPAddressResourceGroup(service), pipName)
+ pip, existsPip, err := az.getPublicIPAddress(az.getPublicIPAddressResourceGroup(service), pipName, azcache.CacheReadTypeDefault)
if err != nil {
return nil, nil, err
}
@@ -827,7 +879,7 @@ func (az *Cloud) getServiceLoadBalancerStatus(service *v1.Service, lb *network.L
return nil, nil, nil
}
-func (az *Cloud) determinePublicIPName(clusterName string, service *v1.Service) (string, bool, error) {
+func (az *Cloud) determinePublicIPName(clusterName string, service *v1.Service, pips *[]network.PublicIPAddress) (string, bool, error) {
var shouldPIPExisted bool
if name, found := service.Annotations[consts.ServiceAnnotationPIPName]; found && name != "" {
shouldPIPExisted = true
@@ -845,7 +897,7 @@ func (az *Cloud) determinePublicIPName(clusterName string, service *v1.Service)
// For the services with loadBalancerIP set, an existing public IP is required, primary
// or secondary, or a public IP not found error would be reported.
- pip, err := az.findMatchedPIPByLoadBalancerIP(service, loadBalancerIP, pipResourceGroup)
+ pip, err := az.findMatchedPIPByLoadBalancerIP(service, loadBalancerIP, pipResourceGroup, pips)
if err != nil {
return "", shouldPIPExisted, err
}
@@ -857,13 +909,15 @@ func (az *Cloud) determinePublicIPName(clusterName string, service *v1.Service)
return "", shouldPIPExisted, fmt.Errorf("user supplied IP Address %s was not found in resource group %s", loadBalancerIP, pipResourceGroup)
}
-func (az *Cloud) findMatchedPIPByLoadBalancerIP(service *v1.Service, loadBalancerIP, pipResourceGroup string) (*network.PublicIPAddress, error) {
- pips, err := az.ListPIP(service, pipResourceGroup)
- if err != nil {
- return nil, err
+func (az *Cloud) findMatchedPIPByLoadBalancerIP(service *v1.Service, loadBalancerIP, pipResourceGroup string, pips *[]network.PublicIPAddress) (*network.PublicIPAddress, error) {
+ if pips == nil {
+ pipList, err := az.ListPIP(service, pipResourceGroup)
+ if err != nil {
+ return nil, err
+ }
+ pips = &pipList
}
-
- for _, pip := range pips {
+ for _, pip := range *pips {
if pip.PublicIPAddressPropertiesFormat.IPAddress != nil &&
*pip.PublicIPAddressPropertiesFormat.IPAddress == loadBalancerIP {
return &pip, nil
@@ -923,7 +977,7 @@ func (az *Cloud) findServiceIPAddress(ctx context.Context, clusterName string, s
func (az *Cloud) ensurePublicIPExists(service *v1.Service, pipName string, domainNameLabel, clusterName string, shouldPIPExisted, foundDNSLabelAnnotation bool) (*network.PublicIPAddress, error) {
pipResourceGroup := az.getPublicIPAddressResourceGroup(service)
- pip, existsPip, err := az.getPublicIPAddress(pipResourceGroup, pipName)
+ pip, existsPip, err := az.getPublicIPAddress(pipResourceGroup, pipName, azcache.CacheReadTypeDefault)
if err != nil {
return nil, err
}
@@ -1271,33 +1325,8 @@ func getDomainNameLabel(pip *network.PublicIPAddress) string {
return to.String(pip.PublicIPAddressPropertiesFormat.DNSSettings.DomainNameLabel)
}
-func getIdleTimeout(s *v1.Service) (*int32, error) {
- const (
- min = 4
- max = 30
- )
-
- val, ok := s.Annotations[consts.ServiceAnnotationLoadBalancerIdleTimeout]
- if !ok {
- // Return a nil here as this will set the value to the azure default
- return nil, nil
- }
-
- errInvalidTimeout := fmt.Errorf("idle timeout value must be a whole number representing minutes between %d and %d", min, max)
- toInt, err := strconv.ParseInt(val, 10, 32)
- if err != nil {
- return nil, fmt.Errorf("error parsing idle timeout value: %w: %v", err, errInvalidTimeout)
- }
- to32 := int32(toInt)
-
- if to32 < min || to32 > max {
- return nil, errInvalidTimeout
- }
- return &to32, nil
-}
-
-func (az *Cloud) isFrontendIPChanged(clusterName string, config network.FrontendIPConfiguration, service *v1.Service, lbFrontendIPConfigName string) (bool, error) {
- isServiceOwnsFrontendIP, isPrimaryService, err := az.serviceOwnsFrontendIP(config, service)
+func (az *Cloud) isFrontendIPChanged(clusterName string, config network.FrontendIPConfiguration, service *v1.Service, lbFrontendIPConfigName string, pips *[]network.PublicIPAddress) (bool, error) {
+ isServiceOwnsFrontendIP, isPrimaryService, err := az.serviceOwnsFrontendIP(config, service, pips)
if err != nil {
return false, err
}
@@ -1329,12 +1358,12 @@ func (az *Cloud) isFrontendIPChanged(clusterName string, config network.Frontend
}
return config.PrivateIPAllocationMethod != network.IPAllocationMethodStatic || !strings.EqualFold(loadBalancerIP, to.String(config.PrivateIPAddress)), nil
}
- pipName, _, err := az.determinePublicIPName(clusterName, service)
+ pipName, _, err := az.determinePublicIPName(clusterName, service, pips)
if err != nil {
return false, err
}
pipResourceGroup := az.getPublicIPAddressResourceGroup(service)
- pip, existsPip, err := az.getPublicIPAddress(pipResourceGroup, pipName)
+ pip, existsPip, err := az.getPublicIPAddress(pipResourceGroup, pipName, azcache.CacheReadTypeDefault)
if err != nil {
return false, err
}
@@ -1458,9 +1487,10 @@ func findMatchedOutboundRuleFIPConfig(fipConfigID *string, outboundRuleFIPConfig
func (az *Cloud) findFrontendIPConfigOfService(
fipConfigs *[]network.FrontendIPConfiguration,
service *v1.Service,
+ pips *[]network.PublicIPAddress,
) (*network.FrontendIPConfiguration, bool, error) {
for _, config := range *fipConfigs {
- owns, isPrimaryService, err := az.serviceOwnsFrontendIP(config, service)
+ owns, isPrimaryService, err := az.serviceOwnsFrontendIP(config, service, pips)
if err != nil {
return nil, false, err
}
@@ -1477,7 +1507,6 @@ func (az *Cloud) findFrontendIPConfigOfService(
// This entails adding rules/probes for expected Ports and removing stale rules/ports.
// nodes only used if wantLb is true
func (az *Cloud) reconcileLoadBalancer(clusterName string, service *v1.Service, nodes []*v1.Node, wantLb bool) (*network.LoadBalancer, error) {
- isInternal := requiresInternalLoadBalancer(service)
isBackendPoolPreConfigured := az.isBackendPoolPreConfigured(service)
serviceName := getServiceName(service)
klog.V(2).Infof("reconcileLoadBalancer for service(%s) - wantLb(%t): started", serviceName, wantLb)
@@ -1488,11 +1517,12 @@ func (az *Cloud) reconcileLoadBalancer(clusterName string, service *v1.Service,
return nil, err
}
- lb, _, _, err := az.getServiceLoadBalancer(service, clusterName, nodes, wantLb, existingLBs)
+ lb, lbStatus, _, err := az.getServiceLoadBalancer(service, clusterName, nodes, wantLb, existingLBs)
if err != nil {
klog.Errorf("reconcileLoadBalancer: failed to get load balancer for service %q, error: %v", serviceName, err)
return nil, err
}
+
lbName := *lb.Name
lbResourceGroup := az.getLoadBalancerResourceGroup()
lbBackendPoolID := az.getBackendPoolID(lbName, az.getLoadBalancerResourceGroup(), getBackendPoolName(clusterName, service))
@@ -1501,11 +1531,6 @@ func (az *Cloud) reconcileLoadBalancer(clusterName string, service *v1.Service,
defaultLBFrontendIPConfigID := az.getFrontendIPConfigID(lbName, lbResourceGroup, defaultLBFrontendIPConfigName)
dirtyLb := false
- lbIdleTimeout, err := getIdleTimeout(service)
- if wantLb && err != nil {
- return nil, err
- }
-
// reconcile the load balancer's backend pool configuration.
if wantLb {
preConfig, changed, err := az.LoadBalancerBackendPool.ReconcileBackendPools(clusterName, service, lb)
@@ -1519,7 +1544,7 @@ func (az *Cloud) reconcileLoadBalancer(clusterName string, service *v1.Service,
}
// reconcile the load balancer's frontend IP configurations.
- ownedFIPConfig, changed, err := az.reconcileFrontendIPConfigs(clusterName, service, lb, wantLb, defaultLBFrontendIPConfigName)
+ ownedFIPConfig, changed, err := az.reconcileFrontendIPConfigs(clusterName, service, lb, lbStatus, wantLb, defaultLBFrontendIPConfigName)
if err != nil {
return lb, err
}
@@ -1543,9 +1568,13 @@ func (az *Cloud) reconcileLoadBalancer(clusterName string, service *v1.Service,
}
}
- expectedProbes, expectedRules, err := az.getExpectedLBRules(service, wantLb, defaultLBFrontendIPConfigID, lbBackendPoolID, lbName, lbIdleTimeout)
- if err != nil {
- return nil, err
+ var expectedProbes []network.Probe
+ var expectedRules []network.LoadBalancingRule
+ if wantLb {
+ expectedProbes, expectedRules, err = az.getExpectedLBRules(service, defaultLBFrontendIPConfigID, lbBackendPoolID, lbName)
+ if err != nil {
+ return nil, err
+ }
}
if changed := az.reconcileLBProbes(lb, service, serviceName, wantLb, expectedProbes); changed {
@@ -1574,22 +1603,20 @@ func (az *Cloud) reconcileLoadBalancer(clusterName string, service *v1.Service,
klog.V(2).Infof("reconcileLoadBalancer: reconcileLoadBalancer for service(%s): lb(%s) - updating", serviceName, lbName)
err := az.CreateOrUpdateLB(service, *lb)
if err != nil {
- klog.Errorf("reconcileLoadBalancer for service(%s) abort backoff: lb(%s) - updating", serviceName, lbName)
+ klog.Errorf("reconcileLoadBalancer for service(%s) abort backoff: lb(%s) - updating: %s", serviceName, lbName, err.Error())
return nil, err
}
- if isInternal {
- // Refresh updated lb which will be used later in other places.
- newLB, exist, err := az.getAzureLoadBalancer(lbName, azcache.CacheReadTypeDefault)
- if err != nil {
- klog.Errorf("reconcileLoadBalancer for service(%s): getAzureLoadBalancer(%s) failed: %v", serviceName, lbName, err)
- return nil, err
- }
- if !exist {
- return nil, fmt.Errorf("load balancer %q not found", lbName)
- }
- lb = &newLB
+ // Refresh updated lb which will be used later in other places.
+ newLB, exist, err := az.getAzureLoadBalancer(lbName, azcache.CacheReadTypeDefault)
+ if err != nil {
+ klog.Errorf("reconcileLoadBalancer for service(%s): getAzureLoadBalancer(%s) failed: %v", serviceName, lbName, err)
+ return nil, err
}
+ if !exist {
+ return nil, fmt.Errorf("load balancer %q not found", lbName)
+ }
+ lb = &newLB
}
}
@@ -1707,7 +1734,7 @@ func (az *Cloud) reconcileLBRules(lb *network.LoadBalancer, service *v1.Service,
return dirtyRules
}
-func (az *Cloud) reconcileFrontendIPConfigs(clusterName string, service *v1.Service, lb *network.LoadBalancer, wantLb bool, defaultLBFrontendIPConfigName string) (*network.FrontendIPConfiguration, bool, error) {
+func (az *Cloud) reconcileFrontendIPConfigs(clusterName string, service *v1.Service, lb *network.LoadBalancer, status *v1.LoadBalancerStatus, wantLb bool, defaultLBFrontendIPConfigName string) (*network.FrontendIPConfiguration, bool, error) {
var err error
lbName := *lb.Name
serviceName := getServiceName(service)
@@ -1718,11 +1745,13 @@ func (az *Cloud) reconcileFrontendIPConfigs(clusterName string, service *v1.Serv
newConfigs = *lb.FrontendIPConfigurations
}
+ // Save pip list so it can be reused in loop
+ var pips *[]network.PublicIPAddress
var ownedFIPConfig *network.FrontendIPConfiguration
if !wantLb {
for i := len(newConfigs) - 1; i >= 0; i-- {
config := newConfigs[i]
- isServiceOwnsFrontendIP, _, err := az.serviceOwnsFrontendIP(config, service)
+ isServiceOwnsFrontendIP, _, err := az.serviceOwnsFrontendIP(config, service, pips)
if err != nil {
return nil, false, err
}
@@ -1753,9 +1782,19 @@ func (az *Cloud) reconcileFrontendIPConfigs(clusterName string, service *v1.Serv
}
}
} else {
+ var (
+ previousZone *[]string
+ isFipChanged bool
+ )
for i := len(newConfigs) - 1; i >= 0; i-- {
config := newConfigs[i]
- isFipChanged, err := az.isFrontendIPChanged(clusterName, config, service, defaultLBFrontendIPConfigName)
+ isServiceOwnsFrontendIP, _, _ := az.serviceOwnsFrontendIP(config, service, pips)
+ if !isServiceOwnsFrontendIP {
+ klog.V(4).Infof("reconcileFrontendIPConfigs for service (%s): the frontend IP configuration %s does not belong to the service", serviceName, to.String(config.Name))
+ continue
+ }
+ klog.V(4).Infof("reconcileFrontendIPConfigs for service (%s): checking owned frontend IP cofiguration %s", serviceName, to.String(config.Name))
+ isFipChanged, err = az.isFrontendIPChanged(clusterName, config, service, defaultLBFrontendIPConfigName, pips)
if err != nil {
return nil, false, err
}
@@ -1763,10 +1802,12 @@ func (az *Cloud) reconcileFrontendIPConfigs(clusterName string, service *v1.Serv
klog.V(2).Infof("reconcileLoadBalancer for service (%s)(%t): lb frontendconfig(%s) - dropping", serviceName, wantLb, *config.Name)
newConfigs = append(newConfigs[:i], newConfigs[i+1:]...)
dirtyConfigs = true
+ previousZone = config.Zones
}
+ break
}
- ownedFIPConfig, _, err = az.findFrontendIPConfigOfService(&newConfigs, service)
+ ownedFIPConfig, _, err = az.findFrontendIPConfigOfService(&newConfigs, service, pips)
if err != nil {
return nil, false, err
}
@@ -1802,14 +1843,19 @@ func (az *Cloud) reconcileFrontendIPConfigs(clusterName string, service *v1.Serv
if loadBalancerIP != "" {
configProperties.PrivateIPAllocationMethod = network.IPAllocationMethodStatic
configProperties.PrivateIPAddress = &loadBalancerIP
+ } else if status != nil && len(status.Ingress) > 0 {
+ klog.V(4).Infof("reconcileFrontendIPConfigs for service (%s): keep the original private IP %s", serviceName, status.Ingress[0].IP)
+ configProperties.PrivateIPAllocationMethod = network.IPAllocationMethodStatic
+ configProperties.PrivateIPAddress = to.StringPtr(status.Ingress[0].IP)
} else {
// We'll need to call GetLoadBalancer later to retrieve allocated IP.
+ klog.V(4).Infof("reconcileFrontendIPConfigs for service (%s): dynamically allocate the private IP", serviceName)
configProperties.PrivateIPAllocationMethod = network.IPAllocationMethodDynamic
}
fipConfigurationProperties = &configProperties
} else {
- pipName, shouldPIPExisted, err := az.determinePublicIPName(clusterName, service)
+ pipName, shouldPIPExisted, err := az.determinePublicIPName(clusterName, service, pips)
if err != nil {
return nil, false, err
}
@@ -1829,14 +1875,11 @@ func (az *Cloud) reconcileFrontendIPConfigs(clusterName string, service *v1.Serv
FrontendIPConfigurationPropertiesFormat: fipConfigurationProperties,
}
- // only add zone information for new internal frontend IP configurations for standard load balancer not deployed to an edge zone.
- location := az.Location
- zones, err := az.getRegionZonesBackoff(location)
- if err != nil {
- return nil, false, err
- }
- if isInternal && az.useStandardLoadBalancer() && len(zones) > 0 && !az.HasExtendedLocation() {
- newConfig.Zones = &zones
+ if isInternal {
+ if err := az.getFrontendZones(&newConfig, previousZone, isFipChanged, serviceName, defaultLBFrontendIPConfigName); err != nil {
+ klog.Errorf("reconcileLoadBalancer for service (%s)(%t): failed to getFrontendZones: %s", serviceName, wantLb, err.Error())
+ return nil, false, err
+ }
}
newConfigs = append(newConfigs, newConfig)
klog.V(2).Infof("reconcileLoadBalancer for service (%s)(%t): lb frontendconfig(%s) - adding", serviceName, wantLb, defaultLBFrontendIPConfigName)
@@ -1851,6 +1894,33 @@ func (az *Cloud) reconcileFrontendIPConfigs(clusterName string, service *v1.Serv
return ownedFIPConfig, dirtyConfigs, err
}
+func (az *Cloud) getFrontendZones(
+ fipConfig *network.FrontendIPConfiguration,
+ previousZone *[]string,
+ isFipChanged bool,
+ serviceName, defaultLBFrontendIPConfigName string) error {
+ if !isFipChanged { // fetch zone information from API for new frontends
+ // only add zone information for new internal frontend IP configurations for standard load balancer not deployed to an edge zone.
+ location := az.Location
+ zones, err := az.getRegionZonesBackoff(location)
+ if err != nil {
+ return err
+ }
+ if az.useStandardLoadBalancer() && len(zones) > 0 && !az.HasExtendedLocation() {
+ fipConfig.Zones = &zones
+ }
+ } else {
+ if previousZone == nil { // keep the existing zone information for existing frontends
+ klog.V(2).Infof("getFrontendZones for service (%s): lb frontendconfig(%s): setting zone to nil", serviceName, defaultLBFrontendIPConfigName)
+ } else {
+ zoneStr := strings.Join(*previousZone, ",")
+ klog.V(2).Infof("getFrontendZones for service (%s): lb frontendconfig(%s): setting zone to %s", serviceName, defaultLBFrontendIPConfigName, zoneStr)
+ }
+ fipConfig.Zones = previousZone
+ }
+ return nil
+}
+
// checkLoadBalancerResourcesConflicts checks if the service is consuming
// ports which conflict with the existing loadBalancer resources,
// including inbound NAT rule, inbound NAT pools and loadBalancing rules
@@ -1952,160 +2022,315 @@ func lbRuleConflictsWithPort(rule network.LoadBalancingRule, frontendIPConfigID
*rule.FrontendPort == port.Port
}
-func parseHealthProbeProtocolAndPath(service *v1.Service) (string, string) {
- var protocol, path string
- if v, ok := service.Annotations[consts.ServiceAnnotationLoadBalancerHealthProbeProtocol]; ok {
- protocol = v
- } else {
- return protocol, path
+// buildHealthProbeRulesForPort builds the LoadBalancer probe rules for the given port.
+// for following sku: basic loadbalancer vs standard load balancer
+// for following protocols: TCP HTTP HTTPS(SLB only)
+func (az *Cloud) buildHealthProbeRulesForPort(annotations map[string]string, port v1.ServicePort, lbrule string) (*network.Probe, error) {
+ if port.Protocol == v1.ProtocolUDP || port.Protocol == v1.ProtocolSCTP {
+ return nil, nil
+ }
+ // protocol should be tcp, because sctp is handled in outer loop
+
+ // get request path for http/https probe
+ requestPath, err := consts.GetHealthProbeConfigOfPortFromK8sSvcAnnotation(annotations, port.Port, consts.HealthProbeParamsRequestPath)
+ if err != nil {
+ return nil, fmt.Errorf("failed to parse annotation %s: %w", consts.BuildHealthProbeAnnotationKeyForPort(port.Port, consts.HealthProbeParamsRequestPath), err)
+ }
+ if requestPath == nil {
+ if requestPath, err = consts.GetAttributeValueInSvcAnnotation(annotations, consts.ServiceAnnotationLoadBalancerHealthProbeRequestPath); err != nil {
+ return nil, fmt.Errorf("failed to parse annotation %s: %w", consts.ServiceAnnotationLoadBalancerHealthProbeRequestPath, err)
+ }
+ }
+ if requestPath == nil {
+ // TCP would be used as default probe protocol for backward compatibility when probe requestPath is not set.
+ port.AppProtocol = to.StringPtr(string(network.ProtocolTCP))
+ }
+
+ properties := &network.ProbePropertiesFormat{}
+ if port.AppProtocol == nil {
+ if port.AppProtocol, err = consts.GetAttributeValueInSvcAnnotation(annotations, consts.ServiceAnnotationLoadBalancerHealthProbeProtocol); err != nil {
+ return nil, fmt.Errorf("failed to parse annotation %s: %w", consts.ServiceAnnotationLoadBalancerHealthProbeProtocol, err)
+ }
+ if port.AppProtocol == nil {
+ port.AppProtocol = to.StringPtr(string(network.ProtocolTCP))
+ }
+ }
+ protocol := strings.TrimSpace(*port.AppProtocol)
+ switch {
+ case strings.EqualFold(protocol, string(network.ProtocolTCP)):
+ properties.Protocol = network.ProbeProtocolTCP
+ case strings.EqualFold(protocol, string(network.ProtocolHTTPS)):
+ // HTTPS probe is only supported in standard loadbalancer
+ // For backward compatibility, fall back to TCP protocol for basic LoadBalancer.
+ if !az.useStandardLoadBalancer() {
+ properties.Protocol = network.ProbeProtocolTCP
+ } else {
+ properties.Protocol = network.ProbeProtocolHTTPS
+ }
+ case strings.EqualFold(protocol, string(network.ProtocolHTTP)):
+ properties.Protocol = network.ProbeProtocolHTTP
+ default:
+ // For backward compatibility, fall back to TCP protocol when unsupported protocol is used.
+ properties.Protocol = network.ProbeProtocolTCP
+ }
+
+ if strings.EqualFold(string(properties.Protocol), string(network.ProtocolHTTPS)) || strings.EqualFold(string(properties.Protocol), string(network.ProtocolHTTP)) {
+ if requestPath == nil {
+ // "/" is the default request path for HTTP/HTTPS probe
+ requestPath = to.StringPtr(consts.HealthProbeDefaultRequestPath)
+ }
+ properties.RequestPath = requestPath
+ }
+ // get number of probes
+ var numOfProbeValidator = func(val *int32) error {
+ //minimum number of unhealthy responses is 2. ref: https://docs.microsoft.com/en-us/rest/api/load-balancer/load-balancers/create-or-update#probe
+ const (
+ MinimumNumOfProbe = 2
+ )
+ if *val < MinimumNumOfProbe {
+ return fmt.Errorf("the minimum value of %s is %d", consts.HealthProbeParamsNumOfProbe, MinimumNumOfProbe)
+ }
+ return nil
+ }
+ numberOfProbes, err := consts.GetInt32HealthProbeConfigOfPortFromK8sSvcAnnotation(annotations, port.Port, consts.HealthProbeParamsNumOfProbe, numOfProbeValidator)
+ if err != nil {
+ return nil, fmt.Errorf("failed to parse annotation %s: %w", consts.BuildHealthProbeAnnotationKeyForPort(port.Port, consts.HealthProbeParamsNumOfProbe), err)
}
- // ignore the request path if using TCP
- if strings.EqualFold(protocol, string(network.ProbeProtocolHTTP)) ||
- strings.EqualFold(protocol, string(network.ProbeProtocolHTTPS)) {
- if v, ok := service.Annotations[consts.ServiceAnnotationLoadBalancerHealthProbeRequestPath]; ok {
- path = v
+ if numberOfProbes == nil {
+ if numberOfProbes, err = consts.Getint32ValueFromK8sSvcAnnotation(annotations, consts.ServiceAnnotationLoadBalancerHealthProbeNumOfProbe, numOfProbeValidator); err != nil {
+ return nil, fmt.Errorf("failed to parse annotation %s: %w", consts.ServiceAnnotationLoadBalancerHealthProbeNumOfProbe, err)
}
}
- return protocol, path
+
+ // if numberOfProbes is not set, set it to default instead ref: https://docs.microsoft.com/en-us/rest/api/load-balancer/load-balancers/create-or-update#probe
+ if numberOfProbes == nil {
+ numberOfProbes = to.Int32Ptr(consts.HealthProbeDefaultNumOfProbe)
+ }
+
+ // get probe interval in seconds
+ var probeIntervalValidator = func(val *int32) error {
+ //minimum probe interval in seconds is 5. ref: https://docs.microsoft.com/en-us/rest/api/load-balancer/load-balancers/create-or-update#probe
+ const (
+ MinimumProbeIntervalInSecond = 5
+ )
+ if *val < 5 {
+ return fmt.Errorf("the minimum value of %s is %d", consts.HealthProbeParamsProbeInterval, MinimumProbeIntervalInSecond)
+ }
+ return nil
+ }
+ probeInterval, err := consts.GetInt32HealthProbeConfigOfPortFromK8sSvcAnnotation(annotations, port.Port, consts.HealthProbeParamsProbeInterval, probeIntervalValidator)
+ if err != nil {
+ return nil, fmt.Errorf("failed to parse annotation %s:%w", consts.BuildHealthProbeAnnotationKeyForPort(port.Port, consts.HealthProbeParamsProbeInterval), err)
+ }
+ if probeInterval == nil {
+ if probeInterval, err = consts.Getint32ValueFromK8sSvcAnnotation(annotations, consts.ServiceAnnotationLoadBalancerHealthProbeInterval, probeIntervalValidator); err != nil {
+ return nil, fmt.Errorf("failed to parse annotation %s: %w", consts.ServiceAnnotationLoadBalancerHealthProbeInterval, err)
+ }
+ }
+ // if probeInterval is not set, set it to default instead ref: https://docs.microsoft.com/en-us/rest/api/load-balancer/load-balancers/create-or-update#probe
+ if probeInterval == nil {
+ probeInterval = to.Int32Ptr(consts.HealthProbeDefaultProbeInterval)
+ }
+
+ // total probe should be less than 120 seconds ref: https://docs.microsoft.com/en-us/rest/api/load-balancer/load-balancers/create-or-update#probe
+ if (*probeInterval)*(*numberOfProbes) >= 120 {
+ return nil, fmt.Errorf("total probe should be less than 120, please adjust interval and number of probe accordingly")
+ }
+ properties.IntervalInSeconds = probeInterval
+ properties.NumberOfProbes = numberOfProbes
+ properties.Port = &port.NodePort
+ probe := &network.Probe{
+ Name: &lbrule,
+ ProbePropertiesFormat: properties,
+ }
+ return probe, nil
}
+// buildLBRules
+// for following sku: basic loadbalancer vs standard load balancer
+// for following scenario: internal vs external
func (az *Cloud) getExpectedLBRules(
service *v1.Service,
- wantLb bool,
lbFrontendIPConfigID string,
lbBackendPoolID string,
- lbName string,
- lbIdleTimeout *int32) ([]network.Probe, []network.LoadBalancingRule, error) {
+ lbName string) ([]network.Probe, []network.LoadBalancingRule, error) {
- var ports []v1.ServicePort
- if wantLb {
- ports = service.Spec.Ports
- } else {
- ports = []v1.ServicePort{}
- }
+ var expectedRules []network.LoadBalancingRule
+ var expectedProbes []network.Probe
- var enableTCPReset *bool
- if az.useStandardLoadBalancer() {
- enableTCPReset = to.BoolPtr(true)
- }
+ // support podPresence health check when External Traffic Policy is local
+ // take precedence over user defined probe configuration
+ // healthcheck proxy server serves http requests
+ // https://github.com/kubernetes/kubernetes/blob/7c013c3f64db33cf19f38bb2fc8d9182e42b0b7b/pkg/proxy/healthcheck/service_health.go#L236
+ var nodeEndpointHealthprobe *network.Probe
+ if servicehelpers.NeedsHealthCheck(service) {
+ podPresencePath, podPresencePort := servicehelpers.GetServiceHealthCheckPathPort(service)
+ lbRuleName := az.getLoadBalancerRuleName(service, v1.ProtocolTCP, podPresencePort)
- var expectedProbes []network.Probe
- var expectedRules []network.LoadBalancingRule
- highAvailabilityPortsEnabled := false
- for _, port := range ports {
- if !requiresInternalLoadBalancer(service) && port.Protocol == v1.ProtocolSCTP {
- return nil, nil, fmt.Errorf("SCTP is only supported on internal LoadBalancer")
+ nodeEndpointHealthprobe = &network.Probe{
+ Name: &lbRuleName,
+ ProbePropertiesFormat: &network.ProbePropertiesFormat{
+ RequestPath: to.StringPtr(podPresencePath),
+ Protocol: network.ProbeProtocolHTTP,
+ Port: to.Int32Ptr(podPresencePort),
+ IntervalInSeconds: to.Int32Ptr(consts.HealthProbeDefaultProbeInterval),
+ NumberOfProbes: to.Int32Ptr(consts.HealthProbeDefaultNumOfProbe),
+ },
}
+ expectedProbes = append(expectedProbes, *nodeEndpointHealthprobe)
+ }
- if highAvailabilityPortsEnabled {
- // Since the port is always 0 when enabling HA, only one rule should be configured.
- break
- }
+ // In HA mode, lb forward traffic of all port to backend
+ // HA mode is only supported on standard loadbalancer SKU in internal mode
+ if consts.IsK8sServiceUsingInternalLoadBalancer(service) &&
+ az.useStandardLoadBalancer() &&
+ consts.IsK8sServiceHasHAModeEnabled(service) {
- lbRuleName := az.getLoadBalancerRuleName(service, port.Protocol, port.Port)
+ lbRuleName := az.getloadbalancerHAmodeRuleName(service)
klog.V(2).Infof("getExpectedLBRules lb name (%s) rule name (%s)", lbName, lbRuleName)
- transportProto, _, probeProto, err := getProtocolsFromKubernetesProtocol(port.Protocol)
+ props, err := az.getExpectedHAModeLoadBalancingRuleProperties(service, lbFrontendIPConfigID, lbBackendPoolID)
if err != nil {
- return expectedProbes, expectedRules, err
+ return nil, nil, fmt.Errorf("error generate lb rule for ha mod loadbalancer. err: %w", err)
+ }
+ //Here we need to find one health probe rule for the HA lb rule.
+ if nodeEndpointHealthprobe == nil {
+ // use user customized health probe rule if any
+ for _, port := range service.Spec.Ports {
+ portprobe, err := az.buildHealthProbeRulesForPort(service.Annotations, port, lbRuleName)
+ if err != nil {
+ klog.V(2).ErrorS(err, "error occurred when buildHealthProbeRulesForPort", "service", service.Name, "namespace", service.Namespace,
+ "rule-name", lbRuleName, "port", port.Port)
+ //ignore error because we only need one correct rule
+ }
+ if portprobe != nil {
+ expectedProbes = append(expectedProbes, *portprobe)
+ props.Probe = &network.SubResource{
+ ID: to.StringPtr(az.getLoadBalancerProbeID(lbName, az.getLoadBalancerResourceGroup(), *portprobe.Name)),
+ }
+ break
+ }
+ }
+ } else {
+ props.Probe = &network.SubResource{
+ ID: to.StringPtr(az.getLoadBalancerProbeID(lbName, az.getLoadBalancerResourceGroup(), *nodeEndpointHealthprobe.Name)),
+ }
}
- probeProtocol, requestPath := parseHealthProbeProtocolAndPath(service)
- if servicehelpers.NeedsHealthCheck(service) {
- podPresencePath, podPresencePort := servicehelpers.GetServiceHealthCheckPathPort(service)
- if probeProtocol == "" {
- probeProtocol = string(network.ProbeProtocolHTTP)
+ expectedRules = append(expectedRules, network.LoadBalancingRule{
+ Name: &lbRuleName,
+ LoadBalancingRulePropertiesFormat: props,
+ })
+ // end of HA mode handling
+ } else {
+ // generate lb rule for each port defined in svc object
+
+ for _, port := range service.Spec.Ports {
+ lbRuleName := az.getLoadBalancerRuleName(service, port.Protocol, port.Port)
+ klog.V(2).Infof("getExpectedLBRules lb name (%s) rule name (%s)", lbName, lbRuleName)
+
+ if port.Protocol == v1.ProtocolSCTP && !(az.useStandardLoadBalancer() && consts.IsK8sServiceUsingInternalLoadBalancer(service)) {
+ return expectedProbes, expectedRules, fmt.Errorf("SCTP is only supported on standard loadbalancer in internal mode")
}
- needRequestPath := strings.EqualFold(probeProtocol, string(network.ProbeProtocolHTTP)) || strings.EqualFold(probeProtocol, string(network.ProbeProtocolHTTPS))
- if requestPath == "" && needRequestPath {
- requestPath = podPresencePath
+ transportProto, _, _, err := getProtocolsFromKubernetesProtocol(port.Protocol)
+ if err != nil {
+ return expectedProbes, expectedRules, fmt.Errorf("failed to parse transport protocol: %w", err)
+ }
+ props, err := az.getExpectedLoadBalancingRulePropertiesForPort(service, lbFrontendIPConfigID, lbBackendPoolID, to.Int32Ptr(port.Port), *transportProto)
+ if err != nil {
+ return expectedProbes, expectedRules, fmt.Errorf("error generate lb rule for ha mod loadbalancer. err: %w", err)
}
- expectedProbes = append(expectedProbes, network.Probe{
- Name: &lbRuleName,
- ProbePropertiesFormat: &network.ProbePropertiesFormat{
- RequestPath: to.StringPtr(requestPath),
- Protocol: network.ProbeProtocol(probeProtocol),
- Port: to.Int32Ptr(podPresencePort),
- IntervalInSeconds: to.Int32Ptr(5),
- NumberOfProbes: to.Int32Ptr(2),
- },
- })
- } else if port.Protocol != v1.ProtocolUDP && port.Protocol != v1.ProtocolSCTP {
- // we only add the expected probe if we're doing TCP
- if probeProtocol == "" {
- probeProtocol = string(*probeProto)
- }
- var actualPath *string
- if !strings.EqualFold(probeProtocol, string(network.ProbeProtocolTCP)) {
- if requestPath != "" {
- actualPath = to.StringPtr(requestPath)
- } else {
- actualPath = to.StringPtr("/healthz")
+ if nodeEndpointHealthprobe == nil {
+ portprobe, err := az.buildHealthProbeRulesForPort(service.Annotations, port, lbRuleName)
+ if err != nil {
+ klog.V(2).ErrorS(err, "error occurred when buildHealthProbeRulesForPort", "service", service.Name, "namespace", service.Namespace,
+ "rule-name", lbRuleName, "port", port.Port)
+ return expectedProbes, expectedRules, err
+ }
+ if portprobe != nil {
+ expectedProbes = append(expectedProbes, *portprobe)
+ props.Probe = &network.SubResource{
+ ID: to.StringPtr(az.getLoadBalancerProbeID(lbName, az.getLoadBalancerResourceGroup(), *portprobe.Name)),
+ }
+ }
+ } else {
+ props.Probe = &network.SubResource{
+ ID: to.StringPtr(az.getLoadBalancerProbeID(lbName, az.getLoadBalancerResourceGroup(), *nodeEndpointHealthprobe.Name)),
}
}
- expectedProbes = append(expectedProbes, network.Probe{
- Name: &lbRuleName,
- ProbePropertiesFormat: &network.ProbePropertiesFormat{
- Protocol: network.ProbeProtocol(probeProtocol),
- RequestPath: actualPath,
- Port: to.Int32Ptr(port.NodePort),
- IntervalInSeconds: to.Int32Ptr(5),
- NumberOfProbes: to.Int32Ptr(2),
- },
+ expectedRules = append(expectedRules, network.LoadBalancingRule{
+ Name: &lbRuleName,
+ LoadBalancingRulePropertiesFormat: props,
})
- }
- loadDistribution := network.LoadDistributionDefault
- if service.Spec.SessionAffinity == v1.ServiceAffinityClientIP {
- loadDistribution = network.LoadDistributionSourceIP
}
+ }
- expectedRule := network.LoadBalancingRule{
- Name: &lbRuleName,
- LoadBalancingRulePropertiesFormat: &network.LoadBalancingRulePropertiesFormat{
- Protocol: *transportProto,
- FrontendIPConfiguration: &network.SubResource{
- ID: to.StringPtr(lbFrontendIPConfigID),
- },
- BackendAddressPool: &network.SubResource{
- ID: to.StringPtr(lbBackendPoolID),
- },
- LoadDistribution: loadDistribution,
- FrontendPort: to.Int32Ptr(port.Port),
- BackendPort: to.Int32Ptr(port.Port),
- DisableOutboundSnat: to.BoolPtr(az.disableLoadBalancerOutboundSNAT()),
- EnableTCPReset: enableTCPReset,
- EnableFloatingIP: to.BoolPtr(true),
- },
- }
+ return expectedProbes, expectedRules, nil
+}
- if port.Protocol == v1.ProtocolTCP {
- expectedRule.LoadBalancingRulePropertiesFormat.IdleTimeoutInMinutes = lbIdleTimeout
- }
+//getDefaultLoadBalancingRulePropertiesFormat returns the loadbalancing rule for one port
+func (az *Cloud) getExpectedLoadBalancingRulePropertiesForPort(
+ service *v1.Service,
+ lbFrontendIPConfigID string,
+ lbBackendPoolID string, port *int32, transportProto network.TransportProtocol) (*network.LoadBalancingRulePropertiesFormat, error) {
+ var err error
- if requiresInternalLoadBalancer(service) &&
- strings.EqualFold(az.LoadBalancerSku, consts.LoadBalancerSkuStandard) &&
- (strings.EqualFold(service.Annotations[consts.ServiceAnnotationLoadBalancerEnableHighAvailabilityPorts], consts.TrueAnnotationValue) || port.Protocol == v1.ProtocolSCTP) {
- expectedRule.FrontendPort = to.Int32Ptr(0)
- expectedRule.BackendPort = to.Int32Ptr(0)
- expectedRule.Protocol = network.TransportProtocolAll
- highAvailabilityPortsEnabled = true
- }
+ loadDistribution := network.LoadDistributionDefault
+ if service.Spec.SessionAffinity == v1.ServiceAffinityClientIP {
+ loadDistribution = network.LoadDistributionSourceIP
+ }
- // we didn't construct the probe objects for UDP or SCTP because they're not allowed on Azure.
- // However, when externalTrafficPolicy is Local, Kubernetes HTTP health check would be used for probing.
- if servicehelpers.NeedsHealthCheck(service) || (port.Protocol != v1.ProtocolUDP && port.Protocol != v1.ProtocolSCTP) {
- expectedRule.Probe = &network.SubResource{
- ID: to.StringPtr(az.getLoadBalancerProbeID(lbName, az.getLoadBalancerResourceGroup(), lbRuleName)),
- }
+ var lbIdleTimeout *int32
+ if lbIdleTimeout, err = consts.Getint32ValueFromK8sSvcAnnotation(service.Annotations, consts.ServiceAnnotationLoadBalancerIdleTimeout, func(val *int32) error {
+ const (
+ min = 4
+ max = 30
+ )
+ if *val < min || *val > max {
+ return fmt.Errorf("idle timeout value must be a whole number representing minutes between %d and %d, actual value: %d", min, max, *val)
}
-
- expectedRules = append(expectedRules, expectedRule)
+ return nil
+ }); err != nil {
+ return nil, fmt.Errorf("error parsing idle timeout key: %s, err: %w", consts.ServiceAnnotationLoadBalancerIdleTimeout, err)
+ } else if lbIdleTimeout == nil {
+ lbIdleTimeout = to.Int32Ptr(4)
+ }
+
+ props := &network.LoadBalancingRulePropertiesFormat{
+ Protocol: transportProto,
+ FrontendPort: port,
+ BackendPort: port,
+ DisableOutboundSnat: to.BoolPtr(az.disableLoadBalancerOutboundSNAT()),
+ EnableFloatingIP: to.BoolPtr(true),
+ LoadDistribution: loadDistribution,
+ FrontendIPConfiguration: &network.SubResource{
+ ID: to.StringPtr(lbFrontendIPConfigID),
+ },
+ BackendAddressPool: &network.SubResource{
+ ID: to.StringPtr(lbBackendPoolID),
+ },
+ IdleTimeoutInMinutes: lbIdleTimeout,
+ }
+ if strings.EqualFold(string(transportProto), string(network.TransportProtocolTCP)) && az.useStandardLoadBalancer() {
+ props.EnableTCPReset = to.BoolPtr(true)
}
+ return props, nil
+}
- return expectedProbes, expectedRules, nil
+//getExpectedHAModeLoadBalancingRuleProperties build load balancing rule for lb in HA mode
+func (az *Cloud) getExpectedHAModeLoadBalancingRuleProperties(
+ service *v1.Service,
+ lbFrontendIPConfigID string,
+ lbBackendPoolID string) (*network.LoadBalancingRulePropertiesFormat, error) {
+ props, err := az.getExpectedLoadBalancingRulePropertiesForPort(service, lbFrontendIPConfigID, lbBackendPoolID, to.Int32Ptr(0), network.TransportProtocolAll)
+ if err != nil {
+ return nil, fmt.Errorf("error generate lb rule for ha mod loadbalancer. err: %w", err)
+ }
+ props.EnableTCPReset = to.BoolPtr(true)
+ return props, nil
}
// This reconciles the Network Security Group similar to how the LB is reconciled.
@@ -2161,7 +2386,7 @@ func (az *Cloud) reconcileSecurityGroup(clusterName string, service *v1.Service,
var sourceAddressPrefixes []string
if (sourceRanges == nil || servicehelpers.IsAllowAll(sourceRanges)) && len(serviceTags) == 0 {
- if !requiresInternalLoadBalancer(service) {
+ if !requiresInternalLoadBalancer(service) || len(service.Spec.LoadBalancerSourceRanges) > 0 {
sourceAddressPrefixes = []string{"Internet"}
}
} else {
@@ -2628,8 +2853,15 @@ func (az *Cloud) reconcilePublicIP(clusterName string, service *v1.Service, lbNa
shouldPIPExisted bool
)
+ pipResourceGroup := az.getPublicIPAddressResourceGroup(service)
+
+ pips, err := az.ListPIP(service, pipResourceGroup)
+ if err != nil {
+ return nil, err
+ }
+
if !isInternal && wantLb {
- desiredPipName, shouldPIPExisted, err = az.determinePublicIPName(clusterName, service)
+ desiredPipName, shouldPIPExisted, err = az.determinePublicIPName(clusterName, service, &pips)
if err != nil {
return nil, err
}
@@ -2643,13 +2875,6 @@ func (az *Cloud) reconcilePublicIP(clusterName string, service *v1.Service, lbNa
lb = &loadBalancer
}
- pipResourceGroup := az.getPublicIPAddressResourceGroup(service)
-
- pips, err := az.ListPIP(service, pipResourceGroup)
- if err != nil {
- return nil, err
- }
-
discoveredDesiredPublicIP, pipsToBeDeleted, deletedDesiredPublicIP, pipsToBeUpdated, err := az.getPublicIPUpdates(clusterName, service, pips, wantLb, isInternal, desiredPipName, serviceName, serviceIPTagRequest, shouldPIPExisted)
if err != nil {
return nil, err
@@ -2836,7 +3061,12 @@ func (az *Cloud) safeDeletePublicIP(service *v1.Service, pipResourceGroup string
func findProbe(probes []network.Probe, probe network.Probe) bool {
for _, existingProbe := range probes {
- if strings.EqualFold(to.String(existingProbe.Name), to.String(probe.Name)) && to.Int32(existingProbe.Port) == to.Int32(probe.Port) {
+ if strings.EqualFold(to.String(existingProbe.Name), to.String(probe.Name)) &&
+ to.Int32(existingProbe.Port) == to.Int32(probe.Port) &&
+ strings.EqualFold(string(existingProbe.Protocol), string(probe.Protocol)) &&
+ strings.EqualFold(to.String(existingProbe.RequestPath), to.String(probe.RequestPath)) &&
+ to.Int32(existingProbe.IntervalInSeconds) == to.Int32(probe.IntervalInSeconds) &&
+ to.Int32(existingProbe.NumberOfProbes) == to.Int32(probe.NumberOfProbes) {
return true
}
}
@@ -2860,14 +3090,22 @@ func equalLoadBalancingRulePropertiesFormat(s *network.LoadBalancingRuleProperti
return false
}
- properties := reflect.DeepEqual(s.Protocol, t.Protocol) &&
- reflect.DeepEqual(s.FrontendIPConfiguration, t.FrontendIPConfiguration) &&
+ properties := reflect.DeepEqual(s.Protocol, t.Protocol)
+ if !properties {
+ return false
+ }
+
+ if reflect.DeepEqual(s.Protocol, network.TransportProtocolTCP) {
+ properties = properties && reflect.DeepEqual(to.Bool(s.EnableTCPReset), to.Bool(t.EnableTCPReset))
+ }
+
+ properties = properties && reflect.DeepEqual(s.FrontendIPConfiguration, t.FrontendIPConfiguration) &&
reflect.DeepEqual(s.BackendAddressPool, t.BackendAddressPool) &&
reflect.DeepEqual(s.LoadDistribution, t.LoadDistribution) &&
reflect.DeepEqual(s.FrontendPort, t.FrontendPort) &&
reflect.DeepEqual(s.BackendPort, t.BackendPort) &&
+ reflect.DeepEqual(s.Probe, t.Probe) &&
reflect.DeepEqual(s.EnableFloatingIP, t.EnableFloatingIP) &&
- reflect.DeepEqual(to.Bool(s.EnableTCPReset), to.Bool(t.EnableTCPReset)) &&
reflect.DeepEqual(to.Bool(s.DisableOutboundSnat), to.Bool(t.DisableOutboundSnat))
if wantLB && s.IdleTimeoutInMinutes != nil && t.IdleTimeoutInMinutes != nil {
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_loadbalancer_backendpool.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_loadbalancer_backendpool.go
index 2d3c6f86c88c..bf8c4d2c5218 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_loadbalancer_backendpool.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_loadbalancer_backendpool.go
@@ -137,7 +137,6 @@ func (bc *backendPoolTypeNodeIPConfig) ReconcileBackendPools(clusterName string,
}
foundBackendPool := false
- wantLb := true
changed := false
lbName := *lb.Name
@@ -145,12 +144,37 @@ func (bc *backendPoolTypeNodeIPConfig) ReconcileBackendPools(clusterName string,
lbBackendPoolName := getBackendPoolName(clusterName, service)
lbBackendPoolID := bc.getBackendPoolID(lbName, bc.getLoadBalancerResourceGroup(), lbBackendPoolName)
vmSetName := bc.mapLoadBalancerNameToVMSet(lbName, clusterName)
+ isBackendPoolPreConfigured := bc.isBackendPoolPreConfigured(service)
- for _, bp := range newBackendPools {
+ for i := len(newBackendPools) - 1; i >= 0; i-- {
+ bp := newBackendPools[i]
if strings.EqualFold(*bp.Name, lbBackendPoolName) {
- klog.V(10).Infof("bc.ReconcileBackendPools for service (%s)(%t): lb backendpool - found wanted backendpool. not adding anything", serviceName, wantLb)
+ klog.V(10).Infof("bc.ReconcileBackendPools for service (%s): lb backendpool - found wanted backendpool. not adding anything", serviceName)
foundBackendPool = true
+ // Don't bother to remove unused nodeIPConfiguration if backend pool is pre configured
+ if isBackendPoolPreConfigured {
+ break
+ }
+
+ // If the LB backend pool type is configured from nodeIP or podIP
+ // to nodeIPConfiguration, we need to decouple the VM NICs from the LB
+ // before attaching nodeIPs/podIPs to the LB backend pool.
+ if bp.BackendAddressPoolPropertiesFormat != nil &&
+ bp.LoadBalancerBackendAddresses != nil &&
+ len(*bp.LoadBalancerBackendAddresses) > 0 {
+ if removeNodeIPAddressesFromBackendPool(bp, []string{}, true) {
+ bp.Etag = nil
+ if err := bc.CreateOrUpdateLBBackendPool(lbName, bp); err != nil {
+ klog.Errorf("bc.ReconcileBackendPools for service (%s): failed to cleanup IP based backend pool %s: %s", serviceName, lbBackendPoolName, err.Error())
+ return false, false, fmt.Errorf("bc.ReconcileBackendPools for service (%s): failed to cleanup IP based backend pool %s: %w", serviceName, lbBackendPoolName, err)
+ }
+ newBackendPools[i] = bp
+ lb.BackendAddressPools = &newBackendPools
+ lb.Etag = nil
+ }
+ }
+
var backendIPConfigurationsToBeDeleted []network.InterfaceIPConfiguration
if bp.BackendAddressPoolPropertiesFormat != nil && bp.BackendIPConfigurations != nil {
for _, ipConf := range *bp.BackendIPConfigurations {
@@ -170,7 +194,7 @@ func (bc *backendPoolTypeNodeIPConfig) ReconcileBackendPools(clusterName string,
return false, false, err
}
if shouldExcludeLoadBalancer {
- klog.V(2).Infof("bc.ReconcileBackendPools for service (%s)(%t): lb backendpool - found unwanted node %s, decouple it from the LB %s", serviceName, wantLb, nodeName, lbName)
+ klog.V(2).Infof("bc.ReconcileBackendPools for service (%s): lb backendpool - found unwanted node %s, decouple it from the LB %s", serviceName, nodeName, lbName)
// construct a backendPool that only contains the IP config of the node to be deleted
backendIPConfigurationsToBeDeleted = append(backendIPConfigurationsToBeDeleted, network.InterfaceIPConfiguration{ID: to.StringPtr(ipConfID)})
}
@@ -193,11 +217,10 @@ func (bc *backendPoolTypeNodeIPConfig) ReconcileBackendPools(clusterName string,
}
break
} else {
- klog.V(10).Infof("bc.ReconcileBackendPools for service (%s)(%t): lb backendpool - found unmanaged backendpool %s", serviceName, wantLb, *bp.Name)
+ klog.V(10).Infof("bc.ReconcileBackendPools for service (%s): lb backendpool - found unmanaged backendpool %s", serviceName, *bp.Name)
}
}
- isBackendPoolPreConfigured := bc.isBackendPoolPreConfigured(service)
if !foundBackendPool {
isBackendPoolPreConfigured = newBackendPool(lb, isBackendPoolPreConfigured, bc.PreConfiguredBackendPoolLoadBalancerTypes, getServiceName(service), getBackendPoolName(clusterName, service))
changed = true
@@ -222,6 +245,7 @@ func (bi *backendPoolTypeNodeIP) EnsureHostsInPool(service *v1.Service, nodes []
vnetID := fmt.Sprintf("/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualNetworks/%s", bi.SubscriptionID, vnetResourceGroup, bi.VnetName)
changed := false
+ numOfAdd := 0
lbBackendPoolName := getBackendPoolName(clusterName, service)
if strings.EqualFold(to.String(backendPool.Name), lbBackendPoolName) &&
backendPool.BackendAddressPoolPropertiesFormat != nil {
@@ -278,7 +302,7 @@ func (bi *backendPoolTypeNodeIP) EnsureHostsInPool(service *v1.Service, nodes []
name = fmt.Sprintf("%s-ipv6", name)
}
- klog.V(4).Infof("bi.EnsureHostsInPool: adding %s with ip address %s", name, privateIP)
+ klog.V(6).Infof("bi.EnsureHostsInPool: adding %s with ip address %s", name, privateIP)
*backendPool.LoadBalancerBackendAddresses = append(*backendPool.LoadBalancerBackendAddresses, network.LoadBalancerBackendAddress{
Name: to.StringPtr(name),
LoadBalancerBackendAddressPropertiesFormat: &network.LoadBalancerBackendAddressPropertiesFormat{
@@ -286,12 +310,13 @@ func (bi *backendPoolTypeNodeIP) EnsureHostsInPool(service *v1.Service, nodes []
VirtualNetwork: &network.SubResource{ID: to.StringPtr(vnetID)},
},
})
+ numOfAdd++
changed = true
}
}
}
if changed {
- klog.V(2).Infof("bi.EnsureHostsInPool: updating backend pool %s of load balancer %s", lbBackendPoolName, lbName)
+ klog.V(2).Infof("bi.EnsureHostsInPool: updating backend pool %s of load balancer %s to add %d nodes", lbBackendPoolName, lbName, numOfAdd)
if err := bi.CreateOrUpdateLBBackendPool(lbName, backendPool); err != nil {
return fmt.Errorf("bi.EnsureHostsInPool: failed to update backend pool %s: %w", lbBackendPoolName, err)
}
@@ -357,52 +382,76 @@ func (bi *backendPoolTypeNodeIP) CleanupVMSetFromBackendPoolByCondition(slb *net
func (bi *backendPoolTypeNodeIP) ReconcileBackendPools(clusterName string, service *v1.Service, lb *network.LoadBalancer) (bool, bool, error) {
var newBackendPools []network.BackendAddressPool
- var err error
if lb.BackendAddressPools != nil {
newBackendPools = *lb.BackendAddressPools
}
foundBackendPool := false
- wantLb := true
changed := false
lbName := *lb.Name
serviceName := getServiceName(service)
lbBackendPoolName := getBackendPoolName(clusterName, service)
+ vmSetName := bi.mapLoadBalancerNameToVMSet(lbName, clusterName)
+ lbBackendPoolID := bi.getBackendPoolID(to.String(lb.Name), bi.getLoadBalancerResourceGroup(), getBackendPoolName(clusterName, service))
+ isBackendPoolPreConfigured := bi.isBackendPoolPreConfigured(service)
- for i, bp := range newBackendPools {
+ for i := len(newBackendPools) - 1; i >= 0; i-- {
+ bp := newBackendPools[i]
if strings.EqualFold(*bp.Name, lbBackendPoolName) {
- klog.V(10).Infof("bi.ReconcileBackendPools for service (%s)(%t): lb backendpool - found wanted backendpool. not adding anything", serviceName, wantLb)
+ klog.V(10).Infof("bi.ReconcileBackendPools for service (%s): found wanted backendpool. not adding anything", serviceName)
foundBackendPool = true
+ // Don't bother to remove unused nodeIP if backend pool is pre configured
+ if isBackendPoolPreConfigured {
+ break
+ }
+
+ // If the LB backend pool type is configured from nodeIPConfiguration
+ // to nodeIP, we need to decouple the VM NICs from the LB
+ // before attaching nodeIPs/podIPs to the LB backend pool.
+ if bp.BackendAddressPoolPropertiesFormat != nil &&
+ bp.BackendIPConfigurations != nil &&
+ len(*bp.BackendIPConfigurations) > 0 {
+ klog.V(2).Infof("bi.ReconcileBackendPools for service (%s): ensuring the LB is decoupled from the VMSet", serviceName)
+ if err := bi.VMSet.EnsureBackendPoolDeleted(service, lbBackendPoolID, vmSetName, lb.BackendAddressPools, true); err != nil {
+ klog.Errorf("bi.ReconcileBackendPools for service (%s): failed to EnsureBackendPoolDeleted: %s", serviceName, err.Error())
+ return false, false, err
+ }
+ newBackendPools[i].BackendAddressPoolPropertiesFormat.LoadBalancerBackendAddresses = &[]network.LoadBalancerBackendAddress{}
+ newBackendPools[i].BackendAddressPoolPropertiesFormat.BackendIPConfigurations = &[]network.InterfaceIPConfiguration{}
+ newBackendPools[i].Etag = nil
+ lb.Etag = nil
+ break
+ }
+
var nodeIPAddressesToBeDeleted []string
for nodeName := range bi.excludeLoadBalancerNodes {
for ip := range bi.nodePrivateIPs[nodeName] {
- klog.V(2).Infof("bi.ReconcileBackendPools for service (%s)(%t): lb backendpool - found unwanted node private IP %s, decouple it from the LB %s", serviceName, wantLb, ip, lbName)
+ klog.V(2).Infof("bi.ReconcileBackendPools for service (%s): found unwanted node private IP %s, decoupling it from the LB %s", serviceName, ip, lbName)
nodeIPAddressesToBeDeleted = append(nodeIPAddressesToBeDeleted, ip)
}
}
if len(nodeIPAddressesToBeDeleted) > 0 {
- updated := removeNodeIPAddressesFromBackendPool(bp, nodeIPAddressesToBeDeleted)
+ updated := removeNodeIPAddressesFromBackendPool(bp, nodeIPAddressesToBeDeleted, false)
if updated {
(*lb.BackendAddressPools)[i] = bp
if err := bi.CreateOrUpdateLBBackendPool(lbName, bp); err != nil {
- return false, false, fmt.Errorf("bi.ReconcileBackendPools for service (%s)(%t): lb backendpool - failed to update backend pool %s for load balancer %s: %w", serviceName, wantLb, lbBackendPoolName, lbName, err)
+ return false, false, fmt.Errorf("bi.ReconcileBackendPools for service (%s): lb backendpool - failed to update backend pool %s for load balancer %s: %w", serviceName, lbBackendPoolName, lbName, err)
}
}
}
break
} else {
- klog.V(10).Infof("bi.ReconcileBackendPools for service (%s)(%t): lb backendpool - found unmanaged backendpool %s", serviceName, wantLb, *bp.Name)
+ klog.V(10).Infof("bi.ReconcileBackendPools for service (%s): found unmanaged backendpool %s", serviceName, *bp.Name)
}
}
- isBackendPoolPreConfigured := bi.isBackendPoolPreConfigured(service)
if !foundBackendPool {
isBackendPoolPreConfigured = newBackendPool(lb, isBackendPoolPreConfigured, bi.PreConfiguredBackendPoolLoadBalancerTypes, getServiceName(service), getBackendPoolName(clusterName, service))
changed = true
}
- return isBackendPoolPreConfigured, changed, err
+ return isBackendPoolPreConfigured, changed, nil
}
func newBackendPool(lb *network.LoadBalancer, isBackendPoolPreConfigured bool, preConfiguredBackendPoolLoadBalancerTypes, serviceName, lbBackendPoolName string) bool {
@@ -424,7 +473,7 @@ func newBackendPool(lb *network.LoadBalancer, isBackendPoolPreConfigured bool, p
return isBackendPoolPreConfigured
}
-func removeNodeIPAddressesFromBackendPool(backendPool network.BackendAddressPool, nodeIPAddresses []string) bool {
+func removeNodeIPAddressesFromBackendPool(backendPool network.BackendAddressPool, nodeIPAddresses []string, removeAll bool) bool {
changed := false
nodeIPsSet := sets.NewString(nodeIPAddresses...)
if backendPool.BackendAddressPoolPropertiesFormat != nil &&
@@ -432,7 +481,11 @@ func removeNodeIPAddressesFromBackendPool(backendPool network.BackendAddressPool
for i := len(*backendPool.LoadBalancerBackendAddresses) - 1; i >= 0; i-- {
if (*backendPool.LoadBalancerBackendAddresses)[i].LoadBalancerBackendAddressPropertiesFormat != nil {
ipAddress := to.String((*backendPool.LoadBalancerBackendAddresses)[i].IPAddress)
- if nodeIPsSet.Has(ipAddress) {
+ if ipAddress == "" {
+ klog.V(4).Infof("removeNodeIPAddressFromBackendPool: LoadBalancerBackendAddress %s is not IP-based, skipping", to.String((*backendPool.LoadBalancerBackendAddresses)[i].Name))
+ continue
+ }
+ if removeAll || nodeIPsSet.Has(ipAddress) {
klog.V(4).Infof("removeNodeIPAddressFromBackendPool: removing %s from the backend pool %s", ipAddress, to.String(backendPool.Name))
*backendPool.LoadBalancerBackendAddresses = append((*backendPool.LoadBalancerBackendAddresses)[:i], (*backendPool.LoadBalancerBackendAddresses)[i+1:]...)
changed = true
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_managedDiskController.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_managedDiskController.go
index 09e439a64687..92e33ca5dae8 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_managedDiskController.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_managedDiskController.go
@@ -24,7 +24,7 @@ import (
"strconv"
"strings"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
"github.com/Azure/go-autorest/autorest/to"
v1 "k8s.io/api/core/v1"
@@ -123,7 +123,7 @@ func (c *ManagedDiskController) CreateManagedDisk(options *ManagedDiskOptions) (
if options.NetworkAccessPolicy != "" {
diskProperties.NetworkAccessPolicy = options.NetworkAccessPolicy
- if options.NetworkAccessPolicy == compute.AllowPrivate {
+ if options.NetworkAccessPolicy == compute.NetworkAccessPolicyAllowPrivate {
if options.DiskAccessID == nil {
return "", fmt.Errorf("DiskAccessID should not be empty when NetworkAccessPolicy is AllowPrivate")
}
@@ -135,7 +135,7 @@ func (c *ManagedDiskController) CreateManagedDisk(options *ManagedDiskOptions) (
}
}
- if diskSku == compute.UltraSSDLRS {
+ if diskSku == compute.DiskStorageAccountTypesUltraSSDLRS {
diskIOPSReadWrite := int64(consts.DefaultDiskIOPSReadWrite)
if options.DiskIOPSReadWrite != "" {
v, err := strconv.Atoi(options.DiskIOPSReadWrite)
@@ -339,7 +339,7 @@ func (c *ManagedDiskController) ResizeDisk(diskURI string, oldSize resource.Quan
return newSizeQuant, nil
}
- if !supportOnlineResize && result.DiskProperties.DiskState != compute.Unattached {
+ if !supportOnlineResize && result.DiskProperties.DiskState != compute.DiskStateUnattached {
return oldSize, fmt.Errorf("azureDisk - disk resize is only supported on Unattached disk, current disk state: %s, already attached to %s", result.DiskProperties.DiskState, to.String(result.ManagedBy))
}
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_mock_vmsets.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_mock_vmsets.go
index e606b554a95d..1d0e2be10763 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_mock_vmsets.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_mock_vmsets.go
@@ -20,7 +20,7 @@ import (
context "context"
reflect "reflect"
- compute "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ compute "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
network "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network"
azure "github.com/Azure/go-autorest/autorest/azure"
gomock "github.com/golang/mock/gomock"
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_routes.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_routes.go
index 92a93d73c1e2..a669e1be8f2c 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_routes.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_routes.go
@@ -183,6 +183,9 @@ func (d *delayedRouteUpdater) updateRoutes() {
break
}
}
+ if rt.operation == routeOperationDelete && !dirty {
+ klog.Warningf("updateRoutes: route to be deleted %s does not match any of the existing route", to.String(rt.route.Name))
+ }
// Add missing routes if the operation is add.
if rt.operation == routeOperationAdd {
@@ -366,7 +369,7 @@ func (az *Cloud) createRouteTable() error {
// route.Name will be ignored, although the cloud-provider may use nameHint
// to create a more user-meaningful name.
func (az *Cloud) CreateRoute(ctx context.Context, clusterName string, nameHint string, kubeRoute *cloudprovider.Route) error {
- mc := metrics.NewMetricContext("routes", "create_route", az.ResourceGroup, az.SubscriptionID, "")
+ mc := metrics.NewMetricContext("routes", "create_route", az.ResourceGroup, az.SubscriptionID, string(kubeRoute.TargetNode))
isOperationSucceeded := false
defer func() {
mc.ObserveOperationWithResult(isOperationSucceeded)
@@ -449,7 +452,7 @@ func (az *Cloud) CreateRoute(ctx context.Context, clusterName string, nameHint s
// DeleteRoute deletes the specified managed route
// Route should be as returned by ListRoutes
func (az *Cloud) DeleteRoute(ctx context.Context, clusterName string, kubeRoute *cloudprovider.Route) error {
- mc := metrics.NewMetricContext("routes", "delete_route", az.ResourceGroup, az.SubscriptionID, "")
+ mc := metrics.NewMetricContext("routes", "delete_route", az.ResourceGroup, az.SubscriptionID, string(kubeRoute.TargetNode))
isOperationSucceeded := false
defer func() {
mc.ObserveOperationWithResult(isOperationSucceeded)
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_standard.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_standard.go
index 3a912f71c078..6a39d6b9a1a6 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_standard.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_standard.go
@@ -26,10 +26,11 @@ import (
"strings"
"sync"
"time"
+ "unicode"
"sigs.k8s.io/cloud-provider-azure/pkg/consts"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network"
"github.com/Azure/go-autorest/autorest/to"
@@ -295,6 +296,10 @@ func (az *Cloud) getLoadBalancerRuleName(service *v1.Service, protocol v1.Protoc
return fmt.Sprintf("%s-%s-%s-%d", prefix, subnetSegment, protocol, port)
}
+func (az *Cloud) getloadbalancerHAmodeRuleName(service *v1.Service) string {
+ return az.getLoadBalancerRuleName(service, service.Spec.Ports[0].Protocol, service.Spec.Ports[0].Port)
+}
+
func (az *Cloud) getSecurityRuleName(service *v1.Service, port v1.ServicePort, sourceAddrPrefix string) string {
if useSharedSecurityRule(service) {
safePrefix := strings.Replace(sourceAddrPrefix, "/", "_", -1)
@@ -330,12 +335,11 @@ func (az *Cloud) serviceOwnsRule(service *v1.Service, rule string) bool {
// This means the name of the config can be tracked by the service UID.
// 2. The secondary services must have their loadBalancer IP set if they want to share the same config as the primary
// service. Hence, it can be tracked by the loadBalancer IP.
-func (az *Cloud) serviceOwnsFrontendIP(fip network.FrontendIPConfiguration, service *v1.Service) (bool, bool, error) {
+func (az *Cloud) serviceOwnsFrontendIP(fip network.FrontendIPConfiguration, service *v1.Service, pips *[]network.PublicIPAddress) (bool, bool, error) {
var isPrimaryService bool
baseName := az.GetLoadBalancerName(context.TODO(), "", service)
if strings.HasPrefix(to.String(fip.Name), baseName) {
- klog.V(6).Infof("serviceOwnsFrontendIP: found primary service %s of the "+
- "frontend IP config %s", service.Name, *fip.Name)
+ klog.V(6).Infof("serviceOwnsFrontendIP: found primary service %s of the frontend IP config %s", service.Name, *fip.Name)
isPrimaryService = true
return true, isPrimaryService, nil
}
@@ -349,7 +353,7 @@ func (az *Cloud) serviceOwnsFrontendIP(fip network.FrontendIPConfiguration, serv
// for external secondary service the public IP address should be checked
if !requiresInternalLoadBalancer(service) {
pipResourceGroup := az.getPublicIPAddressResourceGroup(service)
- pip, err := az.findMatchedPIPByLoadBalancerIP(service, loadBalancerIP, pipResourceGroup)
+ pip, err := az.findMatchedPIPByLoadBalancerIP(service, loadBalancerIP, pipResourceGroup, pips)
if err != nil {
klog.Warningf("serviceOwnsFrontendIP: unexpected error when finding match public IP of the service %s with loadBalancerLP %s: %v", service.Name, loadBalancerIP, err)
return false, isPrimaryService, nil
@@ -389,6 +393,11 @@ func (az *Cloud) getDefaultFrontendIPConfigName(service *v1.Service) string {
// Azure lb front end configuration name must not exceed 80 characters
if len(ipcName) > consts.FrontendIPConfigNameMaxLength {
ipcName = ipcName[:consts.FrontendIPConfigNameMaxLength]
+ // Cutting the string may result in char like "-" as the string end.
+ // If the last char is not a letter or '_', replace it with "_".
+ if !unicode.IsLetter(rune(ipcName[len(ipcName)-1:][0])) && ipcName[len(ipcName)-1:] != "_" {
+ ipcName = ipcName[:len(ipcName)-1] + "_"
+ }
}
return ipcName
}
@@ -644,7 +653,7 @@ func (as *availabilitySet) GetIPByNodeName(name string) (string, string, error)
if err != nil {
return "", "", fmt.Errorf("failed to publicIP name for node %q with pipID %q", name, pipID)
}
- pip, existsPip, err := as.getPublicIPAddress(as.ResourceGroup, pipName)
+ pip, existsPip, err := as.getPublicIPAddress(as.ResourceGroup, pipName, azcache.CacheReadTypeDefault)
if err != nil {
return "", "", err
}
@@ -977,7 +986,7 @@ func (as *availabilitySet) EnsureHostInPool(service *v1.Service, nodeName types.
// EnsureHostsInPool ensures the given Node's primary IP configurations are
// participating in the specified LoadBalancer Backend Pool.
func (as *availabilitySet) EnsureHostsInPool(service *v1.Service, nodes []*v1.Node, backendPoolID string, vmSetName string) error {
- mc := metrics.NewMetricContext("services", "vmas_ensure_hosts_in_pool", as.ResourceGroup, as.SubscriptionID, service.Name)
+ mc := metrics.NewMetricContext("services", "vmas_ensure_hosts_in_pool", as.ResourceGroup, as.SubscriptionID, getServiceName(service))
isOperationSucceeded := false
defer func() {
mc.ObserveOperationWithResult(isOperationSucceeded)
@@ -1027,7 +1036,7 @@ func (as *availabilitySet) EnsureBackendPoolDeleted(service *v1.Service, backend
return nil
}
- mc := metrics.NewMetricContext("services", "vmas_ensure_backend_pool_deleted", as.ResourceGroup, as.SubscriptionID, service.Name)
+ mc := metrics.NewMetricContext("services", "vmas_ensure_backend_pool_deleted", as.ResourceGroup, as.SubscriptionID, getServiceName(service))
isOperationSucceeded := false
defer func() {
mc.ObserveOperationWithResult(isOperationSucceeded)
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_storageaccount.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_storageaccount.go
index 480e89e6d369..958c20062397 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_storageaccount.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_storageaccount.go
@@ -21,7 +21,7 @@ import (
"fmt"
"strings"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network"
"github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2018-09-01/privatedns"
"github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-02-01/storage"
@@ -468,7 +468,7 @@ func AreVNetRulesEqual(account storage.Account, accountOptions *AccountOptions)
}
func isLargeFileSharesPropertyEqual(account storage.Account, accountOptions *AccountOptions) bool {
- if account.Sku.Tier != storage.SkuTier(compute.PremiumLRS) && accountOptions.EnableLargeFileShare && (len(account.LargeFileSharesState) == 0 || account.LargeFileSharesState == storage.LargeFileSharesStateDisabled) {
+ if account.Sku.Tier != storage.SkuTier(compute.DiskStorageAccountTypesPremiumLRS) && accountOptions.EnableLargeFileShare && (len(account.LargeFileSharesState) == 0 || account.LargeFileSharesState == storage.LargeFileSharesStateDisabled) {
return false
}
return true
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_utils.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_utils.go
index 1bde0b5612ef..9a5be2dae42a 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_utils.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_utils.go
@@ -241,7 +241,7 @@ func getNodePrivateIPAddress(service *v1.Service, node *v1.Node) string {
for _, nodeAddress := range node.Status.Addresses {
if strings.EqualFold(string(nodeAddress.Type), string(v1.NodeInternalIP)) &&
utilnet.IsIPv6String(nodeAddress.Address) == isIPV6SVC {
- klog.V(4).Infof("getNodePrivateIPAddress: node %s, ip %s", node.Name, nodeAddress.Address)
+ klog.V(6).Infof("getNodePrivateIPAddress: node %s, ip %s", node.Name, nodeAddress.Address)
return nodeAddress.Address
}
}
@@ -260,3 +260,19 @@ func getNodePrivateIPAddresses(node *v1.Node) []string {
return addresses
}
+
+func isLBBackendPoolTypeIPConfig(service *v1.Service, lb *network.LoadBalancer, clusterName string) bool {
+ if lb == nil || lb.LoadBalancerPropertiesFormat == nil || lb.BackendAddressPools == nil {
+ klog.V(4).Infof("isLBBackendPoolTypeIPConfig: no backend pools in the LB %s", to.String(lb.Name))
+ return false
+ }
+ lbBackendPoolName := getBackendPoolName(clusterName, service)
+ for _, bp := range *lb.BackendAddressPools {
+ if strings.EqualFold(to.String(bp.Name), lbBackendPoolName) {
+ return bp.BackendAddressPoolPropertiesFormat != nil &&
+ bp.BackendIPConfigurations != nil &&
+ len(*bp.BackendIPConfigurations) != 0
+ }
+ }
+ return false
+}
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_vmsets.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_vmsets.go
index cea1dc5f8a01..d9b2ec82374a 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_vmsets.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_vmsets.go
@@ -19,7 +19,7 @@ package provider
import (
"context"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network"
"github.com/Azure/go-autorest/autorest/azure"
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_vmss.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_vmss.go
index 0a14b870ca5a..8f1358ebca6e 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_vmss.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_vmss.go
@@ -24,7 +24,7 @@ import (
"strings"
"sync"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network"
"github.com/Azure/go-autorest/autorest/to"
@@ -735,7 +735,7 @@ func (ss *ScaleSet) listScaleSetVMs(scaleSetName, resourceGroup string) ([]compu
ctx, cancel := getContextWithCancel()
defer cancel()
- allVMs, rerr := ss.VirtualMachineScaleSetVMsClient.List(ctx, resourceGroup, scaleSetName, string(compute.InstanceView))
+ allVMs, rerr := ss.VirtualMachineScaleSetVMsClient.List(ctx, resourceGroup, scaleSetName, string(compute.InstanceViewTypesInstanceView))
if rerr != nil {
klog.Errorf("VirtualMachineScaleSetVMsClient.List(%s, %s) failed: %v", resourceGroup, scaleSetName, rerr)
if rerr.IsNotFound() {
@@ -950,9 +950,9 @@ func (ss *ScaleSet) getConfigForScaleSetByIPFamily(config *compute.VirtualMachin
var ipVersion compute.IPVersion
if IPv6 {
- ipVersion = compute.IPv6
+ ipVersion = compute.IPVersionIPv6
} else {
- ipVersion = compute.IPv4
+ ipVersion = compute.IPVersionIPv4
}
for idx := range ipConfigurations {
ipConfig := &ipConfigurations[idx]
@@ -1245,7 +1245,7 @@ func (ss *ScaleSet) ensureVMSSInPool(service *v1.Service, nodes []*v1.Node, back
// EnsureHostsInPool ensures the given Node's primary IP configurations are
// participating in the specified LoadBalancer Backend Pool.
func (ss *ScaleSet) EnsureHostsInPool(service *v1.Service, nodes []*v1.Node, backendPoolID string, vmSetNameOfLB string) error {
- mc := metrics.NewMetricContext("services", "vmss_ensure_hosts_in_pool", ss.ResourceGroup, ss.SubscriptionID, service.Name)
+ mc := metrics.NewMetricContext("services", "vmss_ensure_hosts_in_pool", ss.ResourceGroup, ss.SubscriptionID, getServiceName(service))
isOperationSucceeded := false
defer func() {
mc.ObserveOperationWithResult(isOperationSucceeded)
@@ -1504,7 +1504,7 @@ func (ss *ScaleSet) EnsureBackendPoolDeleted(service *v1.Service, backendPoolID,
return nil
}
- mc := metrics.NewMetricContext("services", "vmss_ensure_backend_pool_deleted", ss.ResourceGroup, ss.SubscriptionID, service.Name)
+ mc := metrics.NewMetricContext("services", "vmss_ensure_backend_pool_deleted", ss.ResourceGroup, ss.SubscriptionID, getServiceName(service))
isOperationSucceeded := false
defer func() {
mc.ObserveOperationWithResult(isOperationSucceeded)
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_vmss_cache.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_vmss_cache.go
index 8666ef83a117..ebf3591f8a2a 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_vmss_cache.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_vmss_cache.go
@@ -23,7 +23,7 @@ import (
"sync"
"time"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
"github.com/Azure/go-autorest/autorest/to"
"k8s.io/apimachinery/pkg/util/sets"
@@ -317,7 +317,7 @@ func (ss *ScaleSet) newAvailabilitySetNodesCache() (*azcache.TimedCache, error)
func (ss *ScaleSet) isNodeManagedByAvailabilitySet(nodeName string, crt azcache.AzureCacheReadType) (bool, error) {
// Assume all nodes are managed by VMSS when DisableAvailabilitySetNodes is enabled.
if ss.DisableAvailabilitySetNodes {
- klog.V(2).Infof("Assuming node %q is managed by VMSS since DisableAvailabilitySetNodes is set to true", nodeName)
+ klog.V(6).Infof("Assuming node %q is managed by VMSS since DisableAvailabilitySetNodes is set to true", nodeName)
return false, nil
}
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_wrap.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_wrap.go
index 32b6fed7233d..ad73f398dd66 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_wrap.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_wrap.go
@@ -23,7 +23,7 @@ import (
"strings"
"time"
- "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2020-12-01/compute"
+ "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2021-07-01/compute"
"github.com/Azure/azure-sdk-for-go/services/network/mgmt/2021-02-01/network"
"github.com/Azure/go-autorest/autorest/to"
@@ -41,6 +41,7 @@ var (
loadBalancerCacheTTLDefaultInSeconds = 120
nsgCacheTTLDefaultInSeconds = 120
routeTableCacheTTLDefaultInSeconds = 120
+ publicIPCacheTTLDefaultInSeconds = 120
azureNodeProviderIDRE = regexp.MustCompile(`^azure:///subscriptions/(?:.*)/resourceGroups/(?:.*)/providers/Microsoft.Compute/(?:.*)`)
azureResourceGroupNameRE = regexp.MustCompile(`.*/subscriptions/(?:.*)/resourceGroups/(.+)/providers/(?:.*)`)
@@ -96,26 +97,27 @@ func (az *Cloud) getRouteTable(crt azcache.AzureCacheReadType) (routeTable netwo
return *(cachedRt.(*network.RouteTable)), true, nil
}
-func (az *Cloud) getPublicIPAddress(pipResourceGroup string, pipName string) (network.PublicIPAddress, bool, error) {
+func (az *Cloud) getPIPCacheKey(pipResourceGroup string, pipName string) string {
resourceGroup := az.ResourceGroup
if pipResourceGroup != "" {
resourceGroup = pipResourceGroup
}
+ return fmt.Sprintf("%s%s%s", resourceGroup, consts.PIPCacheKeySeparator, pipName)
+}
- ctx, cancel := getContextWithCancel()
- defer cancel()
- pip, err := az.PublicIPAddressesClient.Get(ctx, resourceGroup, pipName, "")
- exists, rerr := checkResourceExistsFromError(err)
- if rerr != nil {
- return pip, false, rerr.Error()
+func (az *Cloud) getPublicIPAddress(pipResourceGroup string, pipName string, crt azcache.AzureCacheReadType) (network.PublicIPAddress, bool, error) {
+ pip := network.PublicIPAddress{}
+ cacheKey := az.getPIPCacheKey(pipResourceGroup, pipName)
+ cachedPIP, err := az.pipCache.Get(cacheKey, crt)
+ if err != nil {
+ return pip, false, err
}
- if !exists {
- klog.V(2).Infof("Public IP %q not found", pipName)
+ if cachedPIP == nil {
return pip, false, nil
}
- return pip, exists, nil
+ return *(cachedPIP.(*network.PublicIPAddress)), true, nil
}
func (az *Cloud) getSubnet(virtualNetworkName string, subnetName string) (network.Subnet, bool, error) {
@@ -189,7 +191,7 @@ func (az *Cloud) newVMCache() (*azcache.TimedCache, error) {
return nil, err
}
- vm, verr := az.VirtualMachinesClient.Get(ctx, resourceGroup, key, compute.InstanceView)
+ vm, verr := az.VirtualMachinesClient.Get(ctx, resourceGroup, key, compute.InstanceViewTypesInstanceView)
exists, rerr := checkResourceExistsFromError(verr)
if rerr != nil {
return nil, rerr.Error()
@@ -288,6 +290,37 @@ func (az *Cloud) newRouteTableCache() (*azcache.TimedCache, error) {
return azcache.NewTimedcache(time.Duration(az.RouteTableCacheTTLInSeconds)*time.Second, getter)
}
+func (az *Cloud) newPIPCache() (*azcache.TimedCache, error) {
+ getter := func(key string) (interface{}, error) {
+ ctx, cancel := getContextWithCancel()
+ defer cancel()
+
+ parsedKey := strings.Split(strings.TrimSpace(key), consts.PIPCacheKeySeparator)
+ if len(parsedKey) != 2 {
+ return nil, fmt.Errorf("failed to parse public ip rg and name from cache key %q", key)
+ }
+ pipResourceGroup, pipName := strings.TrimSpace(parsedKey[0]), strings.TrimSpace(parsedKey[1])
+
+ pip, err := az.PublicIPAddressesClient.Get(ctx, pipResourceGroup, pipName, "")
+ exists, rerr := checkResourceExistsFromError(err)
+ if rerr != nil {
+ return nil, rerr.Error()
+ }
+
+ if !exists {
+ klog.V(2).Infof("Public IP %q in rg %q not found", pipName, pipResourceGroup)
+ return nil, nil
+ }
+
+ return &pip, nil
+ }
+
+ if az.PublicIPCacheTTLInSeconds == 0 {
+ az.PublicIPCacheTTLInSeconds = publicIPCacheTTLDefaultInSeconds
+ }
+ return azcache.NewTimedcache(time.Duration(az.PublicIPCacheTTLInSeconds)*time.Second, getter)
+}
+
func (az *Cloud) useStandardLoadBalancer() bool {
return strings.EqualFold(az.LoadBalancerSku, consts.LoadBalancerSkuStandard)
}
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_zones.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_zones.go
index 52e178c0135b..68f8f8203da5 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_zones.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_zones.go
@@ -217,3 +217,20 @@ func (az *Cloud) GetZoneByNodeName(ctx context.Context, nodeName types.NodeName)
return az.VMSet.GetZoneByNodeName(string(nodeName))
}
+
+// GetPlatformSubFaultDomain returns the PlatformSubFaultDomain from IMDS if set.
+func (az *Cloud) GetPlatformSubFaultDomain() (string, error) {
+ if az.UseInstanceMetadata {
+ metadata, err := az.Metadata.GetMetadata(azcache.CacheReadTypeUnsafe)
+ if err != nil {
+ klog.Errorf("GetPlatformSubFaultDomain: failed to GetMetadata: %s", err.Error())
+ return "", err
+ }
+ if metadata.Compute == nil {
+ _ = az.Metadata.imsCache.Delete(consts.MetadataCacheKey)
+ return "", errors.New("failure of getting compute information from instance metadata")
+ }
+ return metadata.Compute.PlatformSubFaultDomain, nil
+ }
+ return "", nil
+}
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/retry/azure_retry.go b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/retry/azure_retry.go
index 6cd3e70015b3..903782c5074a 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/retry/azure_retry.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/cloud-provider-azure/pkg/retry/azure_retry.go
@@ -146,13 +146,15 @@ func jitter(duration time.Duration, maxFactor float64) time.Duration {
func DoExponentialBackoffRetry(backoff *Backoff) autorest.SendDecorator {
return func(s autorest.Sender) autorest.Sender {
return autorest.SenderFunc(func(r *http.Request) (*http.Response, error) {
- return doBackoffRetry(s, r, backoff)
+ return doBackoffRetry(s, r, *backoff)
})
}
}
// doBackoffRetry does the backoff retries for the request.
-func doBackoffRetry(s autorest.Sender, r *http.Request, backoff *Backoff) (resp *http.Response, err error) {
+// backoff is a retry policy here we implicitly copy the backoff policy when args is passed to function.
+
+func doBackoffRetry(s autorest.Sender, r *http.Request, backoff Backoff) (resp *http.Response, err error) {
rr := autorest.NewRetriableRequest(r)
// Increment to add the first call (attempts denotes number of retries)
for backoff.Steps > 0 {
@@ -176,7 +178,7 @@ func doBackoffRetry(s autorest.Sender, r *http.Request, backoff *Backoff) (resp
return resp, rerr.RawError
}
- if !delayForBackOff(backoff, r.Context().Done()) {
+ if !delayForBackOff(&backoff, r.Context().Done()) {
if r.Context().Err() != nil {
return resp, r.Context().Err()
}
diff --git a/cluster-autoscaler/vendor/sigs.k8s.io/structured-merge-diff/v4/typed/merge.go b/cluster-autoscaler/vendor/sigs.k8s.io/structured-merge-diff/v4/typed/merge.go
index 7e20f4083a72..75244ef64679 100644
--- a/cluster-autoscaler/vendor/sigs.k8s.io/structured-merge-diff/v4/typed/merge.go
+++ b/cluster-autoscaler/vendor/sigs.k8s.io/structured-merge-diff/v4/typed/merge.go
@@ -17,8 +17,6 @@ limitations under the License.
package typed
import (
- "math"
-
"sigs.k8s.io/structured-merge-diff/v4/fieldpath"
"sigs.k8s.io/structured-merge-diff/v4/schema"
"sigs.k8s.io/structured-merge-diff/v4/value"
@@ -170,80 +168,96 @@ func (w *mergingWalker) visitListItems(t *schema.List, lhs, rhs value.List) (err
if lhs != nil {
lLen = lhs.Length()
}
- out := make([]interface{}, 0, int(math.Max(float64(rLen), float64(lLen))))
-
- // TODO: ordering is totally wrong.
- // TODO: might as well make the map order work the same way.
+ outLen := lLen
+ if outLen < rLen {
+ outLen = rLen
+ }
+ out := make([]interface{}, 0, outLen)
+
+ rhsOrder, observedRHS, rhsErrs := w.indexListPathElements(t, rhs)
+ errs = append(errs, rhsErrs...)
+ lhsOrder, observedLHS, lhsErrs := w.indexListPathElements(t, lhs)
+ errs = append(errs, lhsErrs...)
+
+ sharedOrder := make([]*fieldpath.PathElement, 0, rLen)
+ for i := range rhsOrder {
+ pe := &rhsOrder[i]
+ if _, ok := observedLHS.Get(*pe); ok {
+ sharedOrder = append(sharedOrder, pe)
+ }
+ }
- // This is a cheap hack to at least make the output order stable.
- rhsOrder := make([]fieldpath.PathElement, 0, rLen)
+ var nextShared *fieldpath.PathElement
+ if len(sharedOrder) > 0 {
+ nextShared = sharedOrder[0]
+ sharedOrder = sharedOrder[1:]
+ }
- // First, collect all RHS children.
- observedRHS := fieldpath.MakePathElementValueMap(rLen)
- if rhs != nil {
- for i := 0; i < rhs.Length(); i++ {
- child := rhs.At(i)
- pe, err := listItemToPathElement(w.allocator, w.schema, t, i, child)
- if err != nil {
- errs = append(errs, errorf("rhs: element %v: %v", i, err.Error())...)
- // If we can't construct the path element, we can't
- // even report errors deeper in the schema, so bail on
- // this element.
+ lLen, rLen = len(lhsOrder), len(rhsOrder)
+ for lI, rI := 0, 0; lI < lLen || rI < rLen; {
+ if lI < lLen && rI < rLen {
+ pe := lhsOrder[lI]
+ if pe.Equals(rhsOrder[rI]) {
+ // merge LHS & RHS items
+ lChild, _ := observedLHS.Get(pe)
+ rChild, _ := observedRHS.Get(pe)
+ mergeOut, errs := w.mergeListItem(t, pe, lChild, rChild)
+ errs = append(errs, errs...)
+ if mergeOut != nil {
+ out = append(out, *mergeOut)
+ }
+ lI++
+ rI++
+
+ nextShared = nil
+ if len(sharedOrder) > 0 {
+ nextShared = sharedOrder[0]
+ sharedOrder = sharedOrder[1:]
+ }
continue
}
- if _, ok := observedRHS.Get(pe); ok {
- errs = append(errs, errorf("rhs: duplicate entries for key %v", pe.String())...)
- }
- observedRHS.Insert(pe, child)
- rhsOrder = append(rhsOrder, pe)
- }
- }
-
- // Then merge with LHS children.
- observedLHS := fieldpath.MakePathElementSet(lLen)
- if lhs != nil {
- for i := 0; i < lhs.Length(); i++ {
- child := lhs.At(i)
- pe, err := listItemToPathElement(w.allocator, w.schema, t, i, child)
- if err != nil {
- errs = append(errs, errorf("lhs: element %v: %v", i, err.Error())...)
- // If we can't construct the path element, we can't
- // even report errors deeper in the schema, so bail on
- // this element.
+ if _, ok := observedRHS.Get(pe); ok && nextShared != nil && !nextShared.Equals(lhsOrder[lI]) {
+ // shared item, but not the one we want in this round
+ lI++
continue
}
- if observedLHS.Has(pe) {
- errs = append(errs, errorf("lhs: duplicate entries for key %v", pe.String())...)
+ }
+ if lI < lLen {
+ pe := lhsOrder[lI]
+ if _, ok := observedRHS.Get(pe); !ok {
+ // take LHS item
+ lChild, _ := observedLHS.Get(pe)
+ mergeOut, errs := w.mergeListItem(t, pe, lChild, nil)
+ errs = append(errs, errs...)
+ if mergeOut != nil {
+ out = append(out, *mergeOut)
+ }
+ lI++
continue
}
- observedLHS.Insert(pe)
- w2 := w.prepareDescent(pe, t.ElementType)
- w2.lhs = value.Value(child)
- if rchild, ok := observedRHS.Get(pe); ok {
- w2.rhs = rchild
+ }
+ if rI < rLen {
+ // Take the RHS item, merge with matching LHS item if possible
+ pe := rhsOrder[rI]
+ lChild, _ := observedLHS.Get(pe) // may be nil
+ rChild, _ := observedRHS.Get(pe)
+ mergeOut, errs := w.mergeListItem(t, pe, lChild, rChild)
+ errs = append(errs, errs...)
+ if mergeOut != nil {
+ out = append(out, *mergeOut)
}
- errs = append(errs, w2.merge(pe.String)...)
- if w2.out != nil {
- out = append(out, *w2.out)
+ rI++
+ // Advance nextShared, if we are merging nextShared.
+ if nextShared != nil && nextShared.Equals(pe) {
+ nextShared = nil
+ if len(sharedOrder) > 0 {
+ nextShared = sharedOrder[0]
+ sharedOrder = sharedOrder[1:]
+ }
}
- w.finishDescent(w2)
}
}
- for _, pe := range rhsOrder {
- if observedLHS.Has(pe) {
- continue
- }
- value, _ := observedRHS.Get(pe)
- w2 := w.prepareDescent(pe, t.ElementType)
- w2.rhs = value
- errs = append(errs, w2.merge(pe.String)...)
- if w2.out != nil {
- out = append(out, *w2.out)
- }
- w.finishDescent(w2)
- }
-
if len(out) > 0 {
i := interface{}(out)
w.out = &i
@@ -252,6 +266,46 @@ func (w *mergingWalker) visitListItems(t *schema.List, lhs, rhs value.List) (err
return errs
}
+func (w *mergingWalker) indexListPathElements(t *schema.List, list value.List) ([]fieldpath.PathElement, fieldpath.PathElementValueMap, ValidationErrors) {
+ var errs ValidationErrors
+ length := 0
+ if list != nil {
+ length = list.Length()
+ }
+ observed := fieldpath.MakePathElementValueMap(length)
+ pes := make([]fieldpath.PathElement, 0, length)
+ for i := 0; i < length; i++ {
+ child := list.At(i)
+ pe, err := listItemToPathElement(w.allocator, w.schema, t, i, child)
+ if err != nil {
+ errs = append(errs, errorf("element %v: %v", i, err.Error())...)
+ // If we can't construct the path element, we can't
+ // even report errors deeper in the schema, so bail on
+ // this element.
+ continue
+ }
+ if _, found := observed.Get(pe); found {
+ errs = append(errs, errorf("duplicate entries for key %v", pe.String())...)
+ continue
+ }
+ observed.Insert(pe, child)
+ pes = append(pes, pe)
+ }
+ return pes, observed, errs
+}
+
+func (w *mergingWalker) mergeListItem(t *schema.List, pe fieldpath.PathElement, lChild, rChild value.Value) (out *interface{}, errs ValidationErrors) {
+ w2 := w.prepareDescent(pe, t.ElementType)
+ w2.lhs = lChild
+ w2.rhs = rChild
+ errs = append(errs, w2.merge(pe.String)...)
+ if w2.out != nil {
+ out = w2.out
+ }
+ w.finishDescent(w2)
+ return
+}
+
func (w *mergingWalker) derefList(prefix string, v value.Value) (value.List, ValidationErrors) {
if v == nil {
return nil, nil